07-01-2019 01:47 PM
I am attempting to generate smooth cyclic triangular waveform motion using a serial linear actuator. To do this, I am using 3 string commands with VISA write to control the movement of the actuator. For example, I am writing the command TA12500 in one VISA write, then TA7500 in the next VISA write, and finally TA10000 in the final VISA write. This causes the actuator to displace to these positions, generating a triangular waveform. The issue is that this waveform is not smooth because I must use time delays between each write block to ensure the code executes each string command in order. This causes a plateau/valley at the extreme positions of the motion which is highly undesirable.
However, if I remove the time delays, the code only executes the first string command, moving the actuator to position 12500. I believe this is because the code is attempting to execute all three string commands at once and is only registering the first. Additionally, if I make my time delay any shorter than 410 milliseconds, the code will only execute two of the string commands but not the third.
I have included a screenshot of the working block diagram. I am using an Ultramotion A1 Series Servo Cylinder Linear Actuator which should be well capable of generating the triangle waveform motion I am trying to create. If anyone has a suggestion as to how I could generate a smoother waveform I would love to hear it! Thanks in advance.
07-01-2019 03:38 PM
Can you query the device to find out when it is done its move?
I think you are using the wrong type of interface if you want something very smooth, continuous. By its nature, serial is an asynchronous process. Something can't happen until you tell it to do something. It takes time to send a command through a VISA write and for those bytes to be received, the device to decode the message and start moving. There is no way to instantly start the next move if you are forced to wait until the prior move is done and then have to send the next message. The only thing you can hope to do is have the device send you a message to tell you when it is done it's move.
07-01-2019 03:50 PM
I see what you are saying, what kind of interface would you suggest?
07-01-2019 03:51 PM
Does your actuator have the analog voltage input option?
That may be the way to go, but you would need a DAQ card with an analog output.
-AK2DM
07-01-2019 03:55 PM
It does...the issue is that I have the NI 9219 DAQ, which is unable to send analog output signals. I also am not trying to fork over another $1000+ dollars for a new DAQ card. I think I could do what I want with voltage signals, but I am trying to avoid that route if at all possible.