How do I create an addressList that can be used with the FindListeners() or Trigger() methods of a board object?
Language: C#
NI product: Measurement Studio.NET 8
Hardware: GPIB
I want to create an addressList that I can use in the FindListeners(0 and Trigger() board methods. However, the Measurement Studio doesn’t tell you anything except that an addressList is somehow an AddressCollection type.
Can someone explain what an <b>addressList</b> is, how to create one, and how to use it?
I have used board.FindListeners() without an addressList parameter, and it returns a list of all listeners on the GPIB that respond:
public AddressCollection addresses;
addresses = board.FindListeners();
//then…
public Device [] devices;
for(int i-0; i<addresses.Count; i++)
{
devices[i] = new Device(0, addresses[i]);
}
So far, OK. I have an array of devices, where each element contains a PAD (and a SAD if any).
But now I want to create sub-lists. For example, I’d like to create a list of only HP34401A DMMs so that I can trigger only the DMMs simultaneously. I know the PADs (no SADs used) of the DMMs from FindListeners() or from the instruments’ front panels. But how do I actually create an addressList?
I would really appreciate an example of creating an addressList, then of using it in a Trigger() method.