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.