Force Set address bit in Omron PLC

J

Thread Starter

Jimmy Xing

I've managed to interface an Omron PLC (CPM1A-40CDR-A) via a serial Host Link to a computer (using the Omron Host Link protocol written in C) and I'm now facing difficulty in activating the Forced Set/Reset command. the address bit I'm supposed to set is an input channel 00 bit 00, where a start button is hardwired to the PLC. Can anyone advise on how to force set that particular address?
 
If you can alter the software why not branch round the input with an internal bit and then write to this.
 
D

David Wooden

Hello Jimmy::

The command format for the KS command is
@(Unit)KS(MemArea)(Word)(Bit)(FCS)*(CR)
where:
Unit (2 chars) = unit number of your PLC, which is usually 00.
MemArea (4 chars) = "CIO " for I/O memory.
(Note that the manual shows dashes after the CIO, but in the fine print underneath it says that the dashes are actually spaces.
Word (4 chars) = desired memory address.
Bit (2 chars) = Desired bit
FCS (2 chars) = Frame Checksum. To calculate, XOR all bytes in the packet together and convert to ASCII.
CR (2 chars) = carriage return character, Hex 0D.

To force bit 0.0, the command should be :
@00KSCIO(Space)0000003D*(CR)
Note that the manual shows dashes after the CIO, but in the fine print underneath it says that the dashes are actually spaces. the (CR) represents
the carriage return character, Hex 0D.

To force reset, the command is:
@00KRCIO(Space)0000003C*(CR)

To cancel all forces,
@00KC48*(CR)

I assume that you have the CPM1A manual. Another very useful manual is the Host Link Units manual, W143-E1-6. This can be downloaded in PDF format
from "knowledge.omron.com":http://knowledge.omron.com

Best of luck,

David Wooden
Senior Software Engineer, Systems Integration
Automation and Enterprise Solutions Group
TAS Division of Omron Electronics LLC
Office: (847) 884-7034 Extension 432
Fax: (847) 884-9383
E-mail: [email protected]
 
Top