Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

loop

Hello,

 

I have a vi that runs and stops a stepper motor and also changes its direction.It is almost doing what I want it to do.See attached.

It is

a) outputting a pulse -top while loop

b) stopping when I hit a limit switch -top while loop

c) outputting high signal (changing direction) when I hit another limit switch for a length of x seconds -case structure within bottom while loop

d) stopping after x seconds -THIS IS NOT HAPPENING

 

At the moment the program is outputting a pulse and stopping when I hit a limit switch.

It is changing direction when I hit the second limit switch and runs for x seconds but then it changes direction again and continues to pulse. I want it to stop pulsing once second limit switch is pressed after x seconds.

 

I have tried wiring the output of the true/false case structure to the top while loop but it either stops working or slows program down or shows errors.

Can you please explain how I can control the top while loop with a negative output of case structure after x amount of seconds.

Thanks in advance,

Áine

0 Kudos
Message 1 of 3
(4,139 Views)

Hi ABeug,

 

What hardware are you using? ie cDAQ chassis? Modules? Slots?

 

Kind regards,

Daniel T
Account Manager
National Instruments UK & Ireland
0 Kudos
Message 2 of 3
(4,118 Views)

Hi Daniel,

Thanks I figured it out with a boolean stop.

0 Kudos
Message 3 of 3
(4,114 Views)