From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Test System with Serial port error message

Hello experts,

Can someone help me with my Test System.I had a Ni PXI-1042 System. I also had a Ni PXI-8186 Embedded Controller in the PXI-1042.

 

I no longer want to run the PXI-8186 because it’s slow and sometime it crashes on me, so I purchased the PXI-8331 (MXI-4) and the PCI-8331 card.

 

Currently in my PXI-1042 system, I have the following cards

PXI-8331

PXI-6534

PXI-6052E

PXI-2503

PXI-2503

 

I am runny windows XP with Labview 7.0 on my Dell Desktop computer.

I also have a USB to Serial Cable

 

I am receiving an error message about the serial port that I can’t seems to solve.

Can someone help?

Please look at my attachments, they contain images of my system/ device manager/ MAX/ the serial setup.vi and the error message.

Let me know if you can help me with this.

 

 

Thank you in advance!

Best regards,
Krispiekream
Download All
0 Kudos
Message 1 of 6
(4,563 Views)
here are more pictures.
Best regards,
Krispiekream
Download All
0 Kudos
Message 2 of 6
(4,561 Views)

Hello,

Based on your device manager screenshot it looks like your USB to Serial adapter is on COM5 so all you should have to do is feed a string with the value "COM5" into the VISA Configure Serial Port (Instr).vi input for VISA resource name.  You can also right click this input on your block diagram and choose "create -> control" to create an actual VISA resource name control which should automatically list any serial ports that were detected in the system when you click the drop down button on the control.  This is also the same control used on the serial example VIs in labview. 

The method you are using that involves getting a list of VISA devices in the system first is useful if you want the program to automatically detect the COM port for your system (for example if your serial device has a query command which always returns a unique response you could do a search for all serial ports in the system and send that query command to each serial port in the array and whichever one responds with the expected response would be the serial port you would then use).  Your code looks like it would still work but in your screen shot you are specifying a 6 in the numeric control but the only ports in your system are COM1 and COM5 according to your device manager screenshot.

In your serial setup VI screenshot the find list shows 3 ports, the first two are COM1 and 5, the third is probably a parallel port.  I would try verifying your code works properly when you manually specify the visa resource name and then debug your code that searches for the name.

regards,

Matt

Message 3 of 6
(4,551 Views)
hi,
i think my vi already have this right?
"an actual VISA resource name control which should automatically list any serial ports that were detected in the system when you click the drop down button on the control. "
if i am not, let me know.


Best regards,
Krispiekream
0 Kudos
Message 4 of 6
(4,541 Views)

Your attached VI named "VISA Configure Serial Port.vi" does have the control I am talking about but in your screenshot of this VI you do not seem to have anything entered in the VISA resource name control which is why I suspect you got an error.  If you click the little black triangle on the right side of this control you should see COM1 and COM5 listed in a drop down menu.  Please let me know if this is not the case.

Your VI named "serial_set_up.vi" does not have the control and it seems you have a numeric control that specifies the number portion of the COM port name and then tries to find a matching VISA resource descriptior (i.e. ASRL1 or ASRL5) that matches the numeric number.  While I think your approach in this VI should work your screenshot looks like you ran the VI with the numeric control set to 6 which would search for a port named COM6 or ASRL6.  Since there is no such port in your system I think this is why you received and error.  If you set your numeric control to 1 or 5 I suspect it would work correctly.

Based on your previous posts and the screenshot you sent of device manager it seems like you are trying to communicate with something connected to the USB to serial adapter.  Your device manager has this adapter listed as COM5 so you should either select COM5 from the pull down menu in the first VI or set your numeric control to 5 in the second VI.

-Matt

Message 5 of 6
(4,535 Views)
Hi Matt,
Thank you so much for trying to help me with my problem.
it is working now. I found this link
http://digital.ni.com/public.nsf/allkb/EEFC314B69621F6486256C38006AED8D
I reinstalled DAQmx 7.4 and instead of have only COM5 in my system, I just added COM6 in it as well because in my systemSetup.csv, I have it called out/look for COM5/COM6.
I think that solved the problem.
thank you so much though, you have been a help and I really appreciated that. Thanks again!

Best regards,
Krispiekream
0 Kudos
Message 6 of 6
(4,532 Views)