Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS-232 Communication with Omron Panel Meters

I am trying to communicate with an Omron panel meter (K3GN). The line of code I am trying to write to it is

STX 01 00 0 0101 C0 0001 00 0001 ETX 65 (This is CompoWay/F code)

however, I think LabVIEW doesn't understand what STX and ETX means... just like the carriage return (CR) in denoted in LabVIEW as /r
Is there any special notation I need to use?

For example for communicating with the E5CK from Omron, I was able to successfully do it with the command code @00100000071*/r (Sysmac Way code)

I would appreciate if anybody could give me some guidance.

Thanks,

Felipe
0 Kudos
Message 1 of 7
(4,921 Views)
I suspect that what you are doing is sending the characters "S","T",and "X" instead of the control character STX. STX is a Control D or hex 02 and ETX is Control C or hex 03. So, in order for your instrument to correctly receive the control codes, replace the string "STX" with \02 and replace "ETX" with \03.
0 Kudos
Message 2 of 7
(4,915 Views)


@Dennis Knutson wrote:
I suspect that what you are doing is sending the characters "S","T",and "X" instead of the control character STX. STX is a Control D or hex 02 and ETX is Control C or hex 03. So, in order for your instrument to correctly receive the control codes, replace the string "STX" with \02 and replace "ETX" with \03.




Dennis,

thanks for your reply. You are right, I was typing the letters "S", "T", "X"... however, I went back and typed \02 instead of STX and \03 instead of ETX but had no luck (Do I need the backslashes?)

I think the problem is that part of the command line is in "hex" and part of it is in ASCII. Are you able to get a response back if you write the command: \02 01 00 0 0101 C0 0001 00 0001 \03 65

I am using the Instrument I/O Assistant... and the added the step "Query and Parse"... and typed the command but get an error.

Please let me know,

Felipe
0 Kudos
Message 3 of 7
(4,908 Views)
I never use the assistant but I believe you should be able to mix hex and ASCII just by prefixing each hex byte by \. I don't have an Omron programming manual so all I can recomend is that you double check the syntax and verify what characters are supposed to be hex and which ones need to be ASCII, what spaces are required, etc. If you can communicate with Omron provided software, you might want to get a serial port monitor utility like portmon and compare that with what LabVIEW is sending.
0 Kudos
Message 4 of 7
(4,905 Views)


@Dennis Knutson wrote:
I never use the assistant but I believe you should be able to mix hex and ASCII just by prefixing each hex byte by \. I don't have an Omron programming manual so all I can recomend is that you double check the syntax and verify what characters are supposed to be hex and which ones need to be ASCII, what spaces are required, etc. If you can communicate with Omron provided software, you might want to get a serial port monitor utility like portmon and compare that with what LabVIEW is sending.




Dennis,

thanks a lot for the suggestion on the PortMon. I used it together with the Omron sofware SysConfig to see what kind of code the SysConfig was writing to the panel meters.

I noticed the SysConf sofware was writing .010000101C00001000001.A

Do you have any idea what the decimal points mean? I try writing this string on LabVIEW and I still can't communicate.

I tried doing the \02, \2 and and \03, \3 combinations replacing the STX and ETX and it didn't seem to work either.

Thanks for your input,

Felipe
0 Kudos
Message 5 of 7
(4,895 Views)

hi,
Now I was given the task to connect Omron E5CK PC. I have not communicating with COM ports did not work, but I managed to get the port open, but when I send a command to Omron not responding. Could you help me with this? The best would be through Delphi 7
Rudo

0 Kudos
Message 6 of 7
(4,083 Views)

@ZRudo wrote:

hi,
Now I was given the task to connect Omron E5CK PC. I have not communicating with COM ports did not work, but I managed to get the port open, but when I send a command to Omron not responding. Could you help me with this? The best would be through Delphi 7
Rudo


Try using Hyperterminal first to learn how to communciate with the instrument.

 

 

You are going to be hardpressed to find someone using Delphi 7 around here.

 

 

0 Kudos
Message 7 of 7
(4,068 Views)