LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel Instances of 1 SubVI -- Other Solutions?

See photo for an illustration of the logic.

 

Basically I have a data stream coming in containing 2 rows of data. I decide to look at the first row and say, "if the row has ID of X, then do operation 1". In the same way if the ID is Y, do operation 2. I want the same logic for the second row. The first and second rows are illustrated as the grey blocks.

 

However, as you see each "sub VI" or "operation" needs to handle 2 data streams at once, since the ID of "X" or "Y" can result from either the 1st row or the 2nd. In other words, I don't know whether a given row will have an ID of X or Y.

 

I tried to do this by having 1 subVI which is called for each of the 2 rows; within the subVI I use a simple case structure to decide which operation to perform. However this gave weird results, even with "reentrant subvi" turned on; 1 subvi would execute fine but when the second is called it would interefere with the 1st.

 

Any ideas?

0 Kudos
Message 1 of 2
(1,937 Views)

Hi,


Check the attached VIs. May be you'll get some help.

 

Regards,
Nitz

(Give kudos to Good Answers, Mark it as a Solution if your problem is Solved;)) 

0 Kudos
Message 2 of 2
(1,921 Views)