Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to load 500 data points in binary, using Power Basic for DOS. IBRDI will not compile in Power Basic. ILRDI will compile, but I can not get it to work. I get a run time error"subscript out of range"

According to NI manual for DOS IL functions return the value of ibsta, which is an integer. So what is the problem, or is Power Basic 3.1 a special case. If so what is the solution
0 Kudos
Message 1 of 3
(3,559 Views)
This error typically occurs in BASIC when writing to a bad index of an array. Maybe the array being used is not large enough. Try increasing the size of the read array. Also, make sure you're not using a negative index.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,559 Views)
The subscript error I get does obviously relate to the array, but I know in advance how much data will be transfered, 500 data points of a trace and I have DIM the array just prior to the transfer code, in the same subroutine. Also I have attemped to make the transfer a for next loop and it I get the same error at the start of the loop? The has to be another cause of this problem.
0 Kudos
Message 3 of 3
(3,559 Views)