LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic timed Boolean Control

Solved!
Go to solution

Hey,

I have what I hope is a simple problem. I want to be able to control the boolen input to my case structure with "knob" inside it. I want to be able to have the input  held at "true" for x amount of time and held "false" for y amount of time. In addition to looping over "true"/"false" z number of times. Im fairly confident on the last part but I cannot find a way to alter the boolean states over a timed basis.

I have attached the Vi

Thanks

Adam

0 Kudos
Message 1 of 5
(3,202 Views)

Hi Adam,

 

what time intervals are you talking about?

 

Some pseudocode:

FOR i:= 0 to z-1
  input := TRUE
  wait(x)
  input := FALSE
  wait(y)
NEXT
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,192 Views)

Say, 5 minutes true, 20 minutes false? Its to control the position of a servo motor between two different positions.

Your pseudo code is exacty the behaviour Im looking for. Is there a way to turn this into a boolean input for a case structure?

Thanks

Adam

0 Kudos
Message 3 of 5
(3,160 Views)
Solution
Accepted by topic author flemingsta
Hi Adam,

I would use a statemachine: your problem reduces to just two states...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(3,152 Views)

Thankyou very much. it worked great!

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