Hi, I have a DMC 4040 controller and 4 linear motors. Now we need to figure out the distance of the motor moves. Is there any code in Galil can do that?
Comments 9
Galil_DJR on
12/06/2011 - 12:59
Can you explain what you are looking for in more detail?
TP contains the current motor position in encoder counts. It should be all you need to calculate distances.
Robin on
12/08/2011 - 07:58
That is probably what we need. Could you give me a code about that please?
I have a problem. My motors are controlled by a LabView code, when I run the motors, the code you posted can only work once at a time. It couldn't be executed continuously. Is there anyway I can fix it? Or it is impossible to control the motors with two different languages. Thank.
Galil_DJR on 12/06/2011 - 12:59
Can you explain what you are looking for in more detail?
TP contains the current motor position in encoder counts. It should be all you need to calculate distances.
Robin on 12/08/2011 - 07:58
That is probably what we need. Could you give me a code about that please?
Galil_DJR on 12/08/2011 - 09:36
Sure:
http://www.galilmc.com/support/manuals/com40x0/Tell%20Position.html
Robin on 12/12/2011 - 07:51
Thanks. It works. But can I use the controller to output a series data recorded the motor position every second?
Galil_AndyH on 12/12/2011 - 08:50
Yup:
Download and execute the following program.
#main
TP
WT1000
JP#main
Robin on 12/12/2011 - 11:04
I am so sorry to bother you with silly question, but could you explain the meaning of each line please? And where can I find the output files? Thanks.
Galil_AndyH on 12/12/2011 - 11:19
See #, TP, WT and JP in the command reference for your controller.
http://www.galilmc.com/support/manuals.php
The output will be an unsolicited message and shown in the terminal.
http://www.galilmc.com/support/manuals/galiltools/terminal.html#messages
Robin on 12/13/2011 - 08:01
I have a problem. My motors are controlled by a LabView code, when I run the motors, the code you posted can only work once at a time. It couldn't be executed continuously. Is there anyway I can fix it? Or it is impossible to control the motors with two different languages. Thank.
Galil_AndyH on 12/13/2011 - 08:44
See this article found here:
http://www.galilmc.com/techtalk/software/using-labview-with-the-galilto…
And the Hello Galil Examples found here:
http://www.galilmc.com/learning/hellogalil.php
In the Hello Galil Examples, see programDownload and message(_onMessage) under Full_Vi's