ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing a boolean value every x seconds

I am trying to do something quite simple in LabView but am having a hard time doing it.

 

Basically I want to have a boolean value that is false and every x seconds it turns true for about 1 second and then reverts back to false.

 

This boolean value would be wired in a loop to the stop condition so that the loop stops every five seconds. This loop is within a bigger loop that will restart the inner loop every time it stops.

 

Any help would be greatly appreciated!

 

 

0 Kudos
Message 1 of 4
(1,866 Views)

Can you share what you have already tried? Have you considered using a state machine architecture (no reason for the loop within a loop)? 

Message 2 of 4
(1,848 Views)

Yes I did try to use a state machine architecture but was not able to get it to run succesfully.


I have attached the .vi below. I want the "stop 3" block to be replaced with something that continually outputs False and every x seconds switches to True for about a second before outputting False again.

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

Sorry for the delayed response. Could you backsave to an earlier LabVIEW version? I have not yet installed LabVIEW 2020 so cannot open your vi. If you are using the latest version of LabVIEW it is usually a good idea to save back at least two versions to get maximum response on the forum.

0 Kudos
Message 4 of 4
(1,762 Views)