LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Old serial COM Port device is now a USB device and converting readcomport code

Some old code that I have been using for a serial RS232 com port device works well. This device through a RS232-USB convertor works well too - that is, the code is looking for a COM port number and the reading of the serial input is correct.

The new version of this serial device is a USB only unit and I dont see a "COM PORT" in the system hardware configuration?  how do I "see" my new USB device and let my code be reused?  Or do I need to treat the USB differently?

 

0 Kudos
Message 1 of 4
(4,278 Views)

I suppose you need to rewrite part of the code using VISA insteead of RS232 library. VISA is a different product that you need to install separately on the target machine (you should have it already installed on the development machine) and is useful for communicating over a variety of buses, inclunding RS232; that is, the new software could handle with little or no change both old and new instruments of yours.

You can find several documents regarding VISA like for example this one or this other one: the best startgin point is probably the Instrument Control Fundamentals page. You'll see that the majority of them is aimed to LabVIEW but don't be afraid of that: CVI version of VISA is equivalent to the LabVIEW one, with functions with the same name and parameters.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(4,275 Views)

thanks Roberto I will give that a look,

I was 'hoping' that a different "name" for the port might be a simple fix.  I assume that the complete handling of serial coms is different with USB - is that correct?

 

0 Kudos
Message 3 of 4
(4,262 Views)
If the vendor decided to convert to USBTMC for its connection, your old serial code is easily ported to VISA. If they did not, the USB connection will require a major programming change as it is not at all the same. You need to first find what sort of driver the vendor is providing. You can look in Windows Device Manager.
0 Kudos
Message 4 of 4
(4,243 Views)