Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted time delay

    I am trying to control the motion of a stepper motor using LabView 8.0.  I have had success controlling it with the terminal that comes with the motor, however I would like to have an end-user friendly interface.  I have written a vi that works fine, with the exception of one problem.  When I command the motor to make a move, there is a delay of about 10 seconds before the motor actually moves.  Attached to the boolean control is an indicator light which remains on after I click the button, and it stays on for about 10 seconds before the motor makes its scheduled move.  I am using stacked sequence loops with five frames (one for acceleration, velocity, position, deceleration, and the command to begin the move).  I do not believe it is a CPU issue, since the terminal is able to control the motor with instantaneous results.  Does anybody have any suggestions as to how to eliminate this time delay? Thanks in advance for any help.

Tom

0 Kudos
Message 1 of 5
(4,020 Views)

Tom,


This does indeed seem like strange behavior.  Would you be able to post your code to this forum?


Thanks,
Luke H

0 Kudos
Message 2 of 5
(4,000 Views)
I have attached my VI.  I believe the problem is the motor is opening a connection with the driver each time a command is issued.  This would be the result of the DMCshell icon prior to each movement.  Is there anyway to have one connection, and then to just command movements?
Thanks for your help.

Tom
0 Kudos
Message 3 of 5
(3,991 Views)

Tom,



After looking over the code for a bit, I noticed that there are several ActiveX methods that get called every time the while loop iterates, regardless of the functionality needed.  The following commands are sent every time the while loop iterates:



TDX
PF 7
ST
SH

The other commands are not called every time the loop iterates because of the case structures.  They are called only when needed.  ActiveX is by nature slow.  You are communicating between programs and then communicating from one program to an external device.  Conceivably, all four of those commands could have to execute after the button is pressed to move the motor and before the movement code begins.  Try manipulating your code so that ActiveX methods are called at a minimum.

Also, for curiosity’s sake, what is your setup here?  I haven’t encountered someone doing motion control in LabVIEW through ActiveX before.  What hardware are you talking to?  What are you communicating with through ActiveX?

Thanks,
Luke H

0 Kudos
Message 4 of 5
(3,956 Views)
Thanks for your reply.  I am using a Galil Motor, the DMC-1822.  The terminal that is used to control the motor that comes with the hardware also comes with a book of commands.  Those commands include SH, PF7, etc.  Is there a better interface I could use to control them?  I will try to modify the amount I use the activeX commands, and I will let you know how this works.  Thanks again.

Tom
0 Kudos
Message 5 of 5
(3,939 Views)