09-11-2017 07:57 PM
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.
Solved! Go to Solution.
09-11-2017 09:15 PM - edited 09-11-2017 09:17 PM
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.
09-12-2017 03:28 AM
Hi thanks! That was a big help!