Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

same command to multiple instruments

Solved!
Go to solution
I want to send the same commands to two identical counters in Visual Basic 6.
How do I go about doing this? I recall that there is some low-level command for doing this - ?.
0 Kudos
Message 1 of 19
(5,463 Views)
You cannot send the command to the two counters at the same time. You only can send the commands and then send an eventual group trigger command over the gpib bus.
On rs232 even that is not possible.
greetings from the Netherlands
0 Kudos
Message 2 of 19
(5,453 Views)
What about the 488.2 command SendList? The help for it says it will address multiple instruments to listen and then sends the command.
0 Kudos
Message 3 of 19
(5,451 Views)
What about the ibcmd()  command?
 
0 Kudos
Message 4 of 19
(5,448 Views)
In NI-488.2 help, ibcmd is defined as"

"ibcmd sends count bytes from cmdbuf over the GPIB as command bytes (interface messages). The number of command bytes transferred is returned in the global variable, ibcntl. Refer to the list of IEEE 488 command messages for defined interface messages.

Command bytes are used to configure the state of the GPIB. They are not used to send instructions to GPIB devices. Use ibwrt to send device-specific instructions."

So, no.

0 Kudos
Message 5 of 19
(5,445 Views)
Hi Dennis
 
What about the gpib handshake for multiple instruments, I don't trust it
 
greetings from the Netherlands
0 Kudos
Message 6 of 19
(5,443 Views)
Hi,

1) Concerning the GPIB bus, it is very easy, the list of GPIB low-level
commands is the following with counter at GPIB address 1 and 2
responding to group executive trigger and a GPIB board at address 0:
dcl
listen 1
listen 2
talk 0
get ' with your counter set up to respond to GET -> see manual
unl
unt

That's it

If you want to send litteral commands it is possible otherwise to send
the "START" ( or equivalent in your manual ) litteral command instead
of the GET at the board at address 0 and it will work.

Despite it may be a little difficult to obtain, when it works, this
method is excellent, particularly to reduce the phase noise when
reading on several devices, here the method is used for writing which
has the same benefits interms of synchronism.

This is the power of GPIB !!!

2) Concerning the use of Visual Basic with NI API, you can use the
ibcmd NI function, for me I use also Labtab ( www.LabTab.com ) whic is
free for one Gpib address and lets you experiment with the Gpib bus
with litteral commands which is more user-friendly. As this is a COM
component, use with VB6 is immediate.
My advise may be to have an approach with both tools since obtaining
the response to GET from instruments may be the "graal" of
instrumentation.

3) A gpib analyser may also help in case nothing works ... ;=)


Regards,

FG

0 Kudos
Message 7 of 19
(5,439 Views)

Thanks all for the help.

I will have to "experiment" with using the low-level commands since that is new to me.

0 Kudos
Message 8 of 19
(5,421 Views)
Let me explain about the GPIB low-level calls by using VISA.
 
If you want to use GPIB low-level functions from VISA, you must viOpen() a GPIB interface controller session such as "GPIB0::INTFC" that encapsulates low-level (a.k.a. "board level"  in NI-488.2 terminology) functions, then use viGpibCommand() to send ATN-TRUE (addressing) part and any VISA Write functions to send ATN-FALSE (device message) part. If you use VISA COM, you can do the same thing through the IGpibIntfc::Command() and IGpibIntfcMessage::WriteString() methods.  The "GPIB0::INTFC" session can be opened while typical GPIB0::n::INSTR sessions are being openned.  Therefore you can use both sessions at a time in mixture unless the function calls get conflicted. 
 
In any cases, you need send an ATN-TRUE command through the GPIB bus in order to set multiple listener addresses at the same time, then send ATN-FALSE part with the Write functions through the low-level (board-level) interface.  This is the only different point than the high-level (device-level) Write function, which automatically sends both ATN-TRUE and ATN-FALSE parts.
 
Makoto
0 Kudos
Message 9 of 19
(5,392 Views)

Unfortunately, these two HP counters do not work well with VISA. They're from the 1970s.

As I am understanding this, I would need to send ibcmd "\x40\x2a\x2b" (GPIB address 10 and 11) and also ibcmd "\x08" and using ibwrt to send the actual commands?

0 Kudos
Message 10 of 19
(5,389 Views)