Hi, I am trying to control a servo motor with a trapeze of velocity by NI 7330. After pressing a "start" button, the velocity will start from 0 with a acceleration, go to a constant speed, stay there for some seconds then go down with a desaceleracion.
I have search the forum but samples I found are too complex. For me, the hardest part is "start" button. If it is in python, it is like: "if t < ... ; v =...- else if... - else ....". But I dont know how to do the same thing with LabView.
Sorry for my bad english. If there is any help/examples/documents I would be very appreciated. Thanks!
Solved! Go to Solution.
For me, the hardest part is "start" button.
So your VI should wait until you press that Start button? Use an event structure…
If it is in python, it is like: "if t < ... ; v =...- else if... - else ....". But I dont know how to do the same thing with LabView.
The IF-THEN-ELSE is a case structure in LabVIEW…
(It seems you should take the Training resources offered in the header of this LabVIEW board…)
The term I have always heard and used for such a profile of Constant Acceleration, Constant Velocity, Constant Deceleration, particularly where the Start and End Velocity is zero, is a "Velocity Trapezoid". It is fairly easy to work out the timing of the stimulus waveform, particularly if the position is not constrained (in my case, I was using this stimulus to "Move from Position A to Position B", which effectively puts a maximum on the allowed Acceleration and/or Velocity values).
Do learn more LabVIEW, particularly the material covered in the Tutorials listed on the first page of this Forum. You will learn about Event Loops, which are excellent ways to "Do Something When I Push This Button". You may need to learn "more than you are ready to absorb", so a good strategy is to find a colleague, a teacher, a LabVIEW Guru whom you can consult who can help you organize the "facts", "structures", and "functions" of LabVIEW into an intelligently-designed Program (VI).
After searching online for what you say, I finally make this VI. I hope it work!
Thank you for information, do you have any advise for my VI?
Yes, I have advice for your VI. Attach the VI rather than a "picture" of it -- it wastes too much of my time opening a Picture, then not being able to "see" the other Cases, adjust wires, test the logic, etc.
do you have any advise for my VI?