10-03-2014 10:51 AM
Hi,
I'm using a LabView VISA program to control some stepper motor controlers. I can get the stepper motors to move using the attached program, but all i can do is get them to move whilst the mouse button is pressed down.
How do i get the program to run for a certain number of seconds, i.e. for the stepper motor runs for a certain number of seconds in the X Y or Z direction?
Thanks very much for any help. I am a newbie to LabView, having learnt it a while back and now coming back to it having forgotten most of it. So this is prob quite a basic Q!
Cheers,
Charlie
10-03-2014 11:01 AM
You need to make a real state machine with one of the cases (Idle) containing an event structure. The event structure can then set the next states to be ran, whether it is to just set a single point or run a sequence.
This is not quite the trivial project here. But if you do a good study of the CLD examples and solutions, you will get some really good ideas.
10-06-2014 03:23 AM
Thanks crossrulz,
Thanks so much for the reply. Can I ask what CLD is? Certified LAbview developer?
I'll go through examples and see how i get along,
Cheers,
Charlie
10-06-2014 06:29 AM
CLD = Certified LabVIEW Developer. You can find the practice exams and any other prep material here: http://sine.ni.com/nips/cds/view/p/lang/en/nid/10647
10-06-2014 06:33 AM
Great thanks very much!
Charlie
10-13-2014 07:07 AM
Hi again,
I've attempted to get one stepper motor running in one direction for 5 seconds - please see the attached edited version of the VI, and the 'Z forward' tab in the RHS event structure (which is the only one I've changed at the moment). This loop added in kind of does move the Z axis 'forward' for 5 seconds, but it does seem to vary in how long it moves. Sometimes it will move the Z axis forward for 5 seconds sometimes 3, sometimes less.
10-13-2014 07:08 AM
Sorry i forgot to add the attachment! Here you go