Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using board level commands how would I connect(send/receive messages) to an instrument?

I Have included the commands I typed at the prompt below. I used the "GPIB Messges Tutorial Development Libary" web page to guide me, however I don't get the results I expect out of "*IDN?" when I type "ibrd 100" I get an buffer is empty(see below). Do you know what I am doing wrong?


gpib0:> ibic

ESP-488 in C for GPIB-ENET Interactive Test Program.

😆 find gpib0 board

IBSTA: 0
IBERR: 0
IBCNT: 0

BOARD-> sic
IBSTA: 0
IBERR: 0
IBCNT: 0

BOARD-> cmd "@?\x22"
IBSTA: 0
IBERR: 0
IBCNT: 0

BOARD-> wrt "*IDN?"
IBSTA: 130
IBERR: 1
IBCNT: 0

BOARD-> wrt "*IDN?"
IBSTA: 0
IBERR: 0
IBCNT: 0

BOARD-> cmd "?SPB"
IBSTA: 0
IBE
RR: 0
IBCNT: 0

BOARD-> rd 100

Buffer =




IBSTA: 8130
IBERR: 3
IBCNT: 0

BOARD->
0 Kudos
Message 1 of 2
(3,176 Views)
>> cmd "@?\x22"
-- This command sends MTA0, UNL(isten), MLA2.
This is correct if you wish to set the device at primary address 0 as a talker (likely your host computer) and the device at primary address 2 as a listener (likely your device)

>> cmd "?SPB"
-- This command sends UNL, MTA19, MTA16, MTA2
This is not correct. From the code, it appears that you want to set the device to be a talker and the host computer to be a listener. In this case, you would send
cmd "?\x42\x20" (anything with \x4 is a talk address, anything with \x2 is a listen addrress, so we have said UNL(isten), MTA2, MLA0)

In addition, you should only need to send the wrt "*IDN?" once.
0 Kudos
Message 2 of 2
(3,176 Views)