Communication protocol between PC and OMRON CPM1A series PLC

The order in which the OMRON CPM1A PLC communicates with the host computer is that the host computer first issues command information to the PLC, and the PLC returns response information to the host computer. A set of data sent/received per communication is referred to as a "frame." The frame is composed of data of less than 131 characters. If the data is to be transmitted in a split frame, the end of the split frame is replaced by a delimiter of one character of the CR code instead of the terminator. The party that sends the frame has the transmission right, and after the sender sends one frame, the transmission right is given to the receiver.

The basic format of the transmitted frame is:

@机号ID body FCS terminator

among them:

@ —— is the frame start flag;

Machine No.——Specify the PLC that communicates with the host computer (set in the DM6653 of the PLC);

Identification code - the communication command code of the frame (two bytes);

Body - set command parameters;

FCS - frame check code (two characters), which is the result of bitwise XOR operation of the ASCII code of all characters from @ to the end of the text;

Terminator - Command terminator, set "*" and "carriage return" characters to indicate the end of the command.

The basic format of the response is:

@机号号号end code body text FCS terminator

among them:

@ ---- is the frame start flag;

Machine No.----The PLC number of the response is the same as the PLC number specified by the host computer;

Identification code----the communication command code of the frame is the same as the command code sent by the host computer;

End code ---- return to the end of the command with or without errors;

Body - set the command parameters, only valid when the host computer has read data;

FCS - frame check code, given by PLC calculation, the calculation method is the same as above;

Terminator - the command terminator.

BT Speaker Battery

BT Battery,Speaker Battery,BT Speaker Battery,Bluetooth Speaker Battery

Shenzhen Sunwind Energy Tech Co.,Ltd , https://www.sunwindbatterylm.com