AddressCollection

Hello

I want to use the FindListeners function to get a list of devices that are attached to the gpib.

How to use the AddressCollection object and an object addresslist for the primary addresses and secondarry of all devices on the bus.

Here's what I have so far.

public boolean FindListeners()
{

Try
{

m_board = new Board (m_boardnum);
m_addresslist = new AddressCollection();

m_addresslist = m_board. FindListeners();

Trace.write ("Number of device found" + m_addresslist. (Count);
Trace.write ("Devices" + m_addresslist. (ToString());

Returns true;
}
catch (Exception ex)
{
Trace.write (ex.) Message);
Returns false;
}

}

How to read the values of primary and secondary address?

Thank you

Curt

Hello

I thought that this one myself.

If anyone is interested, here's how you do it.

Copy the contents of the AddressCollection in an array of addresses.

        public boolean FindListeners()
{

Try
{

m_board = new Board (m_boardnum);
m_addresslist = new AddressCollection();

m_addresslist = m_board. FindListeners();

Address [] m_address = new address [m_addresslist. Count];

Trace.write ("Number of device found" + m_addresslist. (Count);
Trace.write ("Devices" + m_addresslist. (ToString());

< m_addresslist.count;="">
{
m_addresslist. CopyTo (m_address, i);
Trace.write (i + m_address [i]. PrimaryAddress.ToString ());
Trace.write (i + m_address [i]. SecondaryAddress.ToString ());
}

Returns true;
}
catch (Exception ex)
{
Trace.write (ex.) Message);
Returns false;
}

}

Curt

Tags: NI Software

Similar Questions

  • 488.2 SendList. equivalent NET

    Hello

    Is there a 488.2 equivalent NET lib for the former function of gpib - 32.obj SendList?

    I need to send the same command to selected multiple devices at the same time. Not all devices on the bus.

    I found the function Board.SendCommands, but there is no way to send a list of addresses.

    Thank you

    Curt

    Hi Curt,.

    In the C API SendList is replaced by writing in .NET. You use the "Write" command to send a command to an AddressCollection. You use an Add function to add new types of data 'Address' of the collection.

    This information can be found using .NET to 488.2. "" "Click on start" all programs "National Instruments" NOR-488. 2' 488,2 help of .NET Framework.

    This should do what you want.

    Take care!

Maybe you are looking for

  • Time Capsule 2 TB

    Hi all First of all, please forgive me... I'm not at all very irritable! I just bought a Time Capsule for my new iMac, I plugged in my sky router and my iMac Time Capsule and a house card plugged into my router from Sky - first question, can I transf

  • Cannot find 9.3 update on iphone 5s 9.2.1

    I have iPhone 5s 9.2.1 when I'll update, it says that your software is up-to-date! How while it has 9.3?

  • my Quick Time installer does not

    tried to recover the file, but could not do.

  • Connect to HP ProtectTools before Windows starts

    I recently used HP Recovery to reinstall my HP Elitebook 8560w. When configuring HP ProtectTools, I chose to let him ask for a password before starting Windows. It's not ideal because it slows down the startup of my HP (and sometimes it freezes at st

  • "System error" when I try to start printer storage Center and

    Separated from this thread. Hi I bougt garage just a new computer processor laptop whith I7 quadcore and 8.1 for Windows 64-bit. The problem is that I can use 64-bit driver onley. I used the 64 bit Windows 7 driver for my versteckte. I installed the