LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error handling on multi-channel VISA read

I have multiple (up to 10) custom-built data acquisition systems that I am reading data from in my LabVIEW code. The data comes in the form of a tab delimited string, [data \t data \t data \t data \n] and is triggered from the LabVIEW code through an NI 9472 mounted in a cDAQ. 

 

I have a few problems that seem to be related, but I will list them here. 

1. If I run a simplified code (see attached) that only handles 1 DAQ the code waits for the whole timeout limit set in the VISA setup.  I asked this question here,   https://forums.ni.com/t5/LabVIEW/VI-freezes-for-first-10-seconds-of-code/m-p/3609140#M1011600 .  My workaround has been to lower the timeout time so this does not greatly affect my data collection. 

 

2. When I move to a more complex code (see attached) I get a timeout errror on my channel 8 DAQ. 

error_1.PNG

 

I know it is channel 8 from probing my wires. The timeout error does not seem to be affected by the timeout value I set for the VISA. Even with a timeout value of 5000 I get the error.  I do not think it is a problem with the DAQ as I can run the single DAQ VI on the channel 8 DAQ without a problem. Here is the full code that I am running:

10.png

 

The VISA tasks are along the bottom and the DAQ triggering is along the top of the VI.

 

Note: if I change the indexing tunnel to last value for the VISA read for-loop the code runs every other time. i.e. the timeout error only happens every other time I run the code. 

 

I have also attached the single DAQ VI that works every time on all the boxes and the multi DAQ VI that gives an error every other time I run the code. 

 

 

Download All
0 Kudos
Message 1 of 2
(2,716 Views)

You need to figure out why you are getting a timeout error for channel 8.

 

Something must be different or wrong about the setup of that one device.

 

I don't understand what you mean by channel 8 DAQ.  Or why you say you are getting a timeout error on the DAQ device when obviously the timeout error is occurring on the VISA device.

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