LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port, functioning, check

Hi guys, thanks in advance for your help Smiley Happy

 

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. 

0 Kudos
Message 1 of 5
(2,964 Views)

jack@nz wrote:

Hi guys, thanks in advance for your help Smiley Happy

 

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!

Richard






0 Kudos
Message 2 of 5
(2,955 Views)
If you are trying to actually determine whether the port is functioning a loopback will be the minimum test. The MAX type check tells you whether the interface hardware is working up to a point, but I don't know of any serial ports that have built in loopback capability, so you wouldn't know whether the part of the path that is most likely to fail, the line drivers, are working.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 5
(2,950 Views)

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!!

 

 

0 Kudos
Message 4 of 5
(2,922 Views)
Hi, 

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.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,874 Views)