Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB RS232 serial converter problem

I am trying to control a UV lamp using LabVIEW via rs232 DB9 cable. 

It's working very well with the PC which is having DB9 port. The PC which I supposed to configure with the lamp doesn't have DB9 port. So, I tried using CH340 USB RS232 connector, the drivers were perfectly installed and it was detected as COM port in device manager. 

The same LabVIEW VI is not working in this configuration. It is throwing some read error. Do I need to change any VISA settings for USB port ?rs232.PNG

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

I am trying to control a UV lamp using LabVIEW via rs232 DB9 cable. 


We would need the manufaturer and model number of that device to answer with any confidance.  However, since you state that the communication is OK using the PCs COM port we can guess that one of two things is wrong.

  1. The device wants +/-12 levels (Yes, RS-232 is +/-12 normally as supplied from the COM port but, many devices are designed to work with 5v or 3v3)  or,
  2. You are miss-using the CH340 (which would be easy to do considering the broken and nearly incomprehensible English in the user's manual that resulted from a poor translation.  Honestly the translators English is most certainly better than my command of the original language but stil, its barely readable)

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4
(4,307 Views)

Thank you for your response Jeff,

Labview control VI for OMNICURE  Lamp  is attached herewith.

I tried changing the converter cable also. That didn't work.

I doubt on LabVIEW read command VI, but if i debug everything looks fine.

I could not make out what's wrong with VI when i am using USB RS232 converter.

Please let me know your suggestions 

0 Kudos
Message 3 of 4
(4,274 Views)

Well,  its time to read the manual again!  See section 16.3.1 Here is 1 of your problems:

Capture.PNG

The CRC calculator formats a string as [<Command><CRC><CR>] where <CR> is a ASCII 0x0D Example: "CONN" becomes "CONN18\r" That seems right.  To check the CRC calculation "Err" maps to "Err67\r" exactly as section 16.3.2 shows.

 

Then you have that search and replace that removes the correct termination character and replaces it with a litteral <CR>.  Thats not what the manual says to do so, don't do that!Smiley Wink

 

You may have other problems.  For instance: that Type def enum "Command" really should be a combo box control. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(4,268 Views)