I am currently developing a test for a machine that has three Ethernet ports.
I need LabVIEW to test each port via a dedicated Ethernet card within the PC.
I have read some posts and KB articles but they seem to be related to communicating to networks/other pcs.
My Question is:
How can I address each card individually? I cannot see how I can use the Listener vis as they require a response and my device will only respond once a command has been sent.
I'm not sure what you mean by "test each port". What exactly do you want to do?
If you want to get the TCP Listen VI to listen using only one of the network adapters, you can use the Net Address input, as explained in the help for the VI.
Attached is a ping vi. Not mine, I picked it up somewhere. This
verifies that an IP address is active but won't check that it is
actually receiving messages.
In your search you probably would have found that the OS decides which network adapter will be used when you use the TCP Open Connection VI. I think I remember seeing something about a way to programmatically change the adapter priorities for windows, so maybe you should try searching for something like "adapters" and "priorities". The simplest solution, of course, would probably be to have only one cable connected at a time and create a testing process for this.
If each port can have it's own unique ip and separate subnets, then using three separate nics will work fine. If they can't then tst's solution is probably the easiest. My current project is with a product with 6 ports and I just stuck a 4x6 switch between the nic and the product. However, you could try the attached VI. It just runs the DOS command to assign the ip address of the nic card. The idea would be to assign a valid ip to the nic wired to the port you want to test and assign bogus ones to the others. It works with win2k and though we never tested it, it should also work with xp.