LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating sequencer for digital output operations

Hi,

 

I am in the process of creating a sequencer to operate a number of digital outputs on a cDaq. The user would create the sequence prior to operation. There is an array for Time of Event, then boolean for every output in the system.

 

To implement this, I am following this basic structure:

 

GOB34_0-1724858267193.png

 

But I am trying to figure out how to work in the timing factor.

I have a timer start when "Sequence Start" is pressed by the user.

 

Then I would need to get the current time in the loop and compare it to the Command Time in the sequence array, then go to the state that implements the commands for that state.

 

I appreciate the help!

 

 

0 Kudos
Message 1 of 5
(268 Views)

Update: I am using a table now for the steps so that I can have a time column and boolean states (1 or 0) for each control.

 

Column 1: Step Name/Number

Column 2: Time to execute (seconds from time 0)

Columns 3....number of outputs: output state (1 or 0)

 

I convert the strings from the table to either a number (for time in seconds) or boolean (for output state).

0 Kudos
Message 2 of 5
(250 Views)

Use a comma to separate the arguments. 

0 Kudos
Message 3 of 5
(223 Views)

Here is my current VI to run this, it works as far as I can tell.

 

What do people think?

 

 

0 Kudos
Message 4 of 5
(209 Views)

As I work on this, I realize I would also like to modify it so that it only sends the DO array out when there is a change - that way I'm not constantly writing to my physical DO.

0 Kudos
Message 5 of 5
(195 Views)