LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why when i run two while loops parallel, there is a problem?

Hello,

In my VI, there are two while loops and i'd like them run parallel.

 

The DAQ Assistant is used to collect 1 thermocouple's data which will used to control 2 relays (DAQ Assistant4) which are included in the upper while loop.

 

Then the DAQ Assistant 2 is used to collect another thermocouple's data which will used to control the analog output(DAQ Assistant3) which is included in the lower while loop.

 

The DAQ Assistant and DAQ Assistant2 are using the same module and different channels.

 

If i run these two while loops in seperate VIs, there is no problem. But if i run them in one VI, there is errors shows: Error-50103: The specified resource is reserved.

 

Does anyone know the reason causes the errors? Thank you.

Download All
0 Kudos
Message 1 of 8
(3,906 Views)

You have two tasks trying to use the same resources (ADC, clock, possibly even channel).  That is not allowed.  Why can't you just merge the reading of the thermocouples into a single task?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(3,902 Views)

Thank you Crossrulz. i am using two DAQ assistants to collect the data of two thermocouples. Using The same module (NI9211), different channels. Each thermocouple's data will be used seperately for each while loop. Is this allowed? Thanks alot.

0 Kudos
Message 3 of 8
(3,889 Views)

@jzhu001 wrote:

Thank you Crossrulz. i am using two DAQ assistants to collect the data of two thermocouples. Using The same module (NI9211), different channels. Each thermocouple's data will be used seperately for each while loop. Is this allowed? Thanks alot.


No.  The sample clock and the ADC  on the 9211 will be needed for both tasks.  That is not allowed.  You either need another 9211 or combine into a single task.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(3,878 Views)

Thank you. Now I understand. Do you know if i combine the two thermocouple data togehter in one, then how can i seperate them for differet purpose? Do you know which function i should use?

Thanks

0 Kudos
Message 5 of 8
(3,870 Views)

Since you are using the DAQ Assisant, Split Signal is probably the one you want.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(3,859 Views)

Thank you. Sorry that i am confused that after i split the signals, how can i know which one is which one? Is there any rules? Smiley Very Happy

0 Kudos
Message 7 of 8
(3,838 Views)

They come out as #1, #2, #3 in order from top to bottom.  (or 0, 1, 2, 3 if you start counting based on zero.)

0 Kudos
Message 8 of 8
(3,832 Views)