Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IBRD timeouts between sequence of reads

My project requires me to grab a stream over data over time. I am using the Interactive Control command IBRD.
My problem is when I try to force multiple reads by the command '10 * IBRD 22'
all I get is every other read cycle with a timeout in between. I have tried changing the timeout span to no avail.
 
Does anyone have any ideas of what is causing this anomaly?
 
My OS:         Windows XP
NI Device:     GPIB-USB-HS
Data Equipment:  JDS Uniphase RX3
 
Thanks in advance for any help!
0 Kudos
Message 1 of 5
(3,969 Views)
Hello!

I am not familiar with your instrument, but the device I used worked fine with the multiple reads. Do you have all the data availableat one time, and you just need to read them in 22 byte chunks, or does the data come in periodically? And after you get the timeout, do you still receive the data you are expecting, and is it actually 22 bytes of data or less? It could be that at the time of the read, the data available was less than 22 bytes, and your device did not assert the EOI line, hence the timeout. If you don't read in chunks, but read everything at once, do you still get a timeout after the read? Try reading less than 22 bytes also and see if that makes a difference.  Hope this helps!


Ebele O.
National Instruments
0 Kudos
Message 2 of 5
(3,940 Views)

Thank you for responding, Ebele!

The equipment that I am using is very similar in function to a DMM. The machine constantly refreshes the values of measurement.

The data stream from the command 'IBRD 22' is returned as 22 Bytes of data Like this:

[0100]     (cmpl)

count: 22

42 52 20 2D 36 37 2E 35            BR  -67.5

2A 64 42 20 20 20 31 33             *db   13

31 32 20 20 31 0d                       12   1.

 

If I try to force multiples of reads using the command '100*IBRD 22', then I will get the timeout between every other data stream like this:

[0100]     (cmpl)

count: 22

42 52 20 2D 36 37 2E 35            BR  -67.5

2A 64 42 20 20 20 31 33             *db   13

31 32 20 20 31 0d                       12   1.

[c100]    (err timo cmpl)

error: EABO

count: 1

0a

[0100]     (cmpl)

count: 22

42 52 20 2D 36 37 2E 35            BR  -67.5

2A 64 42 20 20 20 31 33             *db   13

31 32 20 20 31 0d                       12   1.

 

I have tried changing the timeout period from 0 to Infinite (17 max on my machine) with no resolve.

Every other stream of data is as expected per the command.

I tried reading less than 22 bytes per your request with the same result. It seems almost as though its a timing problem but

changing the timeout will not cure.

Any help you can offer is greatly appreciated!

Thanks

Phil

0 Kudos
Message 3 of 5
(3,930 Views)
Try reading 23 bytes each time.  If you look at the calls where you're getting a TIMO, you are reading 1 byte(0xa).  Your device has an extra byte that you aren't accounting for, so this is probably what is throwing you off.

Craig A.
National Instruments Engineer
0 Kudos
Message 4 of 5
(3,915 Views)

Thank you for the suggestion Craig!

I actually saw that  myself. I have since tried reading 23 bytes but then every return is a timeout. I spoke with Technical Support for the company

and she was able to replicate my problem but was unable to effect a fix. Must be a bug in their GPIB software.

Anyhow, I am just going to code the task and run a loop in my routine instead of relying on the equipment's S/W.

Thanks again for responding and offering to help!

Phil

0 Kudos
Message 5 of 5
(3,910 Views)