Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract value from function call in NI Spy software

Hello,
I am doing Visual Basic 6.0 programming to control a GPIB instrument. I use a statement:
status = ilrsp(device, 0).

note: status As Integer
device = gpib0, 0 = instrument's number

In NI Spy ware, I monitor the call, and the description reads:
ibrsp(UD0, 16(0x10))
and another one reads:
ibrsp(UD0, 64(0x40))

But, in my program, when I print out the "status" value immediately after the function call, I got number 256 for both ilrsp calls in my program. Instead, I want to get the values of 16(0x10) and 64(0x40) like in NI Spy ware's description. How was that being done in NI Spy ware? How do I extract and obtain those values in my Visual Basic program?


Thank You very much,
Jim
0 Kudos
Message 1 of 2
(3,515 Views)
The status that is returned from ilrsp is ibsta, not the serial poll status byte. The serial poll status byte is returned in the second parameter of the function. So, instead of passing in a 0, you should pass in a variable.
0 Kudos
Message 2 of 2
(3,515 Views)