Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa and Gpib SendList

Hi,

 

I'm using an Agilent mainframe that has 8 power supply modules.  The mainframe has the primary gpib address and the modules have a unique secondary address.  The standrard gpib 'Sendall'  command doesn't work with this configuration to send the same command to all 8 modules at the same time.  Is there a Visa equivalent that will work?

 

Curt

0 Kudos
Message 1 of 5
(4,135 Views)

in short- NO

 

The 8 modules are intended to be indivual instruments and you can only access the module level functions 1 at a time. 

 

GET, IFC and SPOLL are bus specific but most other GPIB commands require the listeners to be addressed before they take action or even pay attention.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(4,122 Views)

Curt C,

 

I was able to get it to work successfully, but it was a little difficult.  First, I found out that secondary addresses range from hex 60 to hex 7E (NI-488.2 help under the GPIB Addresses topic).  The SendList function allows you to specify multiple addresses.  However all of the examples only use Primary addresses for the address list.

 

It turns out that you simply use a 16bit unsigned integer to represent each address.  The upper 8 bits are for the secondary address ( from hex 60 to hex 7E ) and the lower 8 bits are for the primary address ( between 0 and 30 decimal ).

 

You can then make the address list have multiple entries (one for each individual module).  As long as the address list is correct, everything should work for you.

 

I hope this helps,

Steven T.

Message 3 of 5
(4,099 Views)

Hi Steve,

 

Thanks for the reply.

 

If I understand you correctly then I should do something like this;

 

int address;
 int pad = 10;
 int sad = 96;

 address = ((pad)&0xFF) | ((sad)<<8);

 AtlTrace( "makeaddress = %d \n",address); //address = 24586

 

and then use 24586 as the primary address value.

 

Is that right?

 

Curt

0 Kudos
Message 4 of 5
(4,089 Views)

Curt,

 

Thats exactly how I was able to get it to work.

 

Since SendList can take an array of addresses, you can use this method to send the same query to all of your devices at once.

 

I hope this helps,

Steven T.

0 Kudos
Message 5 of 5
(4,086 Views)