LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital output in sequence without wait or sequence structure

I would like to send digital output to switch contactors at user defined delay times by writing a boolean array without using the sequence structure and wait function .Any ideas how I can achieve this ?Below is my code but it uses the wait function 

Download All
0 Kudos
Message 1 of 3
(2,320 Views)

How about a state machine then?

Lets see besides the standard initialize, error, and exit cases you might need:

A state to take user input for the delay times

A state to switch the relays on

A state to switch the relays off

A wait state

...

 

BTW: Except for a few rare instances of a single pane sequence, you should NEVER need to use the Sequence structure. If you find yourself grabbing for it stop and think about what  you are doing as there is probably a better way...

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 3
(2,316 Views)
  • Why is there no outer loop? Are you using "continuous run" mode?
  • Only the "Write" belongs inside the loop. "Open" needs to be done only once.
  • Why do your boolean array elements have a space label?
  • None of your times should be orange. Note the coercion dots.
  • Instead of that bulky case structure, autoindex on an array of times.
  • Use a state machine instead of the FOR loop.All your controls should have labels and they should show on the diagram.
  • Your error handling is not reasonable
  • ....
0 Kudos
Message 3 of 3
(2,294 Views)