LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple time based actions

Hi,

 

I am using labview 2017 version for my application development.

 

I am using event driven producer/consumer architecture. I have some Digital and Analog cards connected through MODBUS-TCP to my PC. Approx number for these I/Os is around 500.

 

In my program, user can create different sequences. Each sequence will have I/O number, type of action to be performed: read/write, and time (in sec) after which the next step is to be performed.

For example:

1. P0.1, High, 1 sec

2. P0.1, Low, 1 sec

3. P.02, High, 4 sec

4. p0.2, Low, 5 sec.     There can be 50-100 number of such steps in 1 sequence. I am creating a csv file and saving the sequence with its name.

 

On my main dashboard, Multiple sequences can be called at a time and can be started individually. I have a sequence file selector on my dashboard with a start/stop button next to it. User can add up to 50-100 such sequences along with number of cycles to be performed for that particular sequence.

 

Since each sequence can start or stop by user at any random time in any random order, each will have its own different number of cycles and IO ports, I am confused as how to create a logic to send appropriate commands to the hardware so that the all sequences are executed properly.

 

My programming skills and understanding of labview is intermediate.

 

Appreciate your help!

 

Thanks

Rohan

0 Kudos
Message 1 of 3
(233 Views)

I would recommend that you look at tutorials about dynamically starting reentrant VIs. You can also look at the examples for starting VIs dynamically. You will basically have a VI that will run a sequence. This task will be dynamically started whenever the user starts a sequence. As they start other sequences your application will start another clone of your sequence task. Each of these tasks will run independently and in parallel. You will need to set the execution properties of your task VI to "shared clone reentrant execution".



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 3
(193 Views)

Thank you for your response. I will try to implement it.

0 Kudos
Message 3 of 3
(168 Views)