LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Zig-Zag with 2 stepper motors

I'm trying to move 2 steppermotors. I can already drive them so thats not the question. But i'm trying to create a sort of zig zag. The first stepper motor1 is doing like anticlockwise 1500 steps if the 1500 steps are over i want te other steppermotor2 to do 200 steps if thats done i want the other steppermotor1 to do 1500 steps clockwise and so on. This has to go on for some time untill the stepper motor2 has done his procedure 10 times, but.. the times that stepper motor 2 has to run is an control so it can be 10 or 20 or 30 times. I already created something but it doesn't work because using an event structere the structure is waiting for frontpanel activity. Please help me out,

Tristan

PS. Please if you have sugges
tions and want to post a labview.vi please make it useable in LV 6.1
0 Kudos
Message 1 of 3
(2,792 Views)
Your vi architecture is wrong. First of all, you cannot fire an event programatically in LV6.1. You can do so in LV 7 and later by writing to the Value(Signaling) property, which does not exist in 6.1. Also, when using events, you must put the event structure in a while loop, or else only the first event to occur will be processed, then the vi is done. You should learn the state machine architecture. This is what would work best for your situation. There are some examples of state machines in the examples folder. If you use state machines, you would not need the event structure at all. You run in one state, and when it is over you can call the next state. State1 calls State2 which calls State3 which calls State1, and over and over until you click a st
op button or some condition is programmed to stop the vi. Learn state machines and try to write your vi in this architecture. It will be easier and will work much better.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 3
(2,792 Views)
Thanks alot,

I'm learning Labview now so that is why i ask such silly questions 😞 But thanks for helping me out.
0 Kudos
Message 3 of 3
(2,792 Views)