11-20-2009 02:56 PM
Hi guys, thanks in advance for your help
This is the scenario: I am writing a program to make all the serial ports on a PXI box is working.
When the check is performed, the serial port wont be connected to any thing, so I guess I probably can't do a loop back test.
So how can I do this?
Below are some of the possibilities I have thought of:
01 I know that in MAX, under the "device status" panel, it would tell you if a port is functioning or not.
So, how does MAX do that? (so that I can do the same in my labview program).
Alternatively, would it be possible to just simply interrogate MAX to get it to tell me if a port is functioning?
If that's possible, how would you do that?
02 There is a VI called "VISA find resource"...which I can use quiet happily to find all my ports...
now, if I can find it, does it mean it's functioning? If this is true, I can just use this VI.
Apologies ofr the lengthiness of this post.
11-20-2009 03:16 PM
jack@nz wrote:Hi guys, thanks in advance for your help
This is the scenario: I am writing a program to make all the serial ports on a PXI box is working.
When the check is performed, the serial port wont be connected to any thing, so I guess I probably can't do a loop back test.
So how can I do this?
Maybe I don't understand what you mean, but when nothing is connected to the port is exactly when you can do a loopback test. Assuming it's a normal DB9 connector, short out pins 2 and 3. Make a dedicated connector to do this safely. No paper clips!
11-20-2009 03:33 PM
11-21-2009 02:31 AM
Thanks for the reply guys!
To Broken Arrow:
My apologies here, I haven't explained the scenario clearly.
The serial ports is tested as a part of an automated, self-diagnostic check for the PXI box when it is powered up.
According to one of NI's tutorial articles, if I understood it correctly, to do the loop back test, you will have to manually wire together some pins of a port.
So, it can't be done in my case.
To LV_Pro:
Well, now that the scenario is more clearly set out (I hope), can you kindly advise me on the best check I can do?
Cheers!!
11-23-2009 04:05 PM
Is something else connected to the device? If so you can open a session and try to ping the connected device (*IDN? Or some other basic command and then read the response). If nothing is connected you can open a session to the com port and look for errors on the error line. This last suggestion, as LV_Pro mentioned, is not as good as an actual loopback because you miss the ability to test that last hardware layer.