08-28-2024 10:19 AM
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:
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!
08-28-2024 10:59 AM - edited 08-28-2024 11:00 AM
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).
08-28-2024 12:01 PM
Use a comma to separate the arguments.
08-28-2024 02:10 PM
Here is my current VI to run this, it works as far as I can tell.
What do people think?
08-28-2024 04:26 PM
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.