LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a sub vi using VISA in parallel in a subpanel

Solved!
Go to solution

Hi,

 

I am learning about how to run a sub vi in parallel.  Ideally what I'd like to be able to do is have 8 copies of a FSM sub vi running in parallel collecting and handling I/O from various instruments. I am trying to do this by running 8 clones (?) of the sub iv in a subpanel.  While this does execute, I have a problem with VISA.  I have simplified my sub vi in the attached but it still has a VISA error (-1073807346) when I run it through the subpanel and I don't know why.  If I enter the sub vi and run it, no error occurs.

 

Thanks for your help.

 

 

Download All
0 Kudos
Message 1 of 3
(2,703 Views)
Solution
Accepted by topic author Famine

Your running the subVI, but you never define what the VISA port should be.  It uses the front panel control which is not wired to the terminal, and that value is the default value of empty.

 

So you are trying to open an undefined serial port and thus get an error.

 

You need to define the serial port for each of those subVI clones.  Of course they will need to be separate serial ports since you can't have 8 VI's all trying to talk to the same port at the same time.

 

Also, you really don't want to open and close a serial port on every iteration of that while loop 10 times per second.

Message 2 of 3
(2,678 Views)

Hi thanks!  That was a big help!

0 Kudos
Message 3 of 3
(2,642 Views)