From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Guidance to integrate 2 VI's

Background: I have an event based state machine  (two state machines ) which concurrently reads data from 2 sensors and writes to a text file. The sensors are IMU 500 and an INTRANAV indoor  navigation position sensor. 

 
I have also developed 2 separate VI's to read data from each sensor and it works fine(just to check if it is working)
 
Problem: integration of these 2 sensors in a single VI causes error with serial communication using VISA while read and write
 
I have verified the COM port with NI Max and device manager. 
 
I'm attaching the screen shots with error and the actual VI
 
Cheers
 
Download All
0 Kudos
Message 1 of 2
(2,479 Views)

Did you look up the error code -1073807346 that you get?

 

It says the session is invalid.  Looking at the your code, I see a number of tunnels including the upper and lower while loops and the VISA reference tunnel set to Use Default if Unwired (generally the wrong setting to use), and that you must have some cases unwired because the tunnel is hollowed out.  So you are probably executing some cases were the VISA reference is not wired through, it is being reset to the default value of zero, and the next iteration your VISA functions fail on that.

 

The file reference wire at the very bottom almost off screen on your image as the same problem.

0 Kudos
Message 2 of 2
(2,461 Views)