Nov 4, 2011

Omron PLC Instruction for Serial Communication

We have discussed much about omron plc and programming with Omron plc. We have also studied about sample programs using omron PLC. Today we are going to study about the serial communication (No Protocol Mode) instruction. In cases where we need to connect a modem with PLC then we have to take the modem data by serial RS232 port. In this case no special protocol is used for communication and we have to use the Instruction for receiving and sending the data over serial RS232 channel.


Sending data to terminal device over RS232 Port :-
In omron PLC there is instruction named TXD by which we can send the specified number of bits to the device connected with PLC RS232 port.
Syntax of TXD Instruction :-

TXD S C N

where - S is the source word which contains the data to be transmitted. C is the control word and N is the number of bytes.
Now let us see that what the control word means and what its bit signifies. Control word is of 2 bytes i.e 16 bit. See the below diagram.



After writing this instruction we also have to ON a internal PLC bit to use this instruction to send the Data in No protocol mode.

If CPU Unit's built-in RS-232C Port is used than ON A392.05 when data need to be sent in the no-protocol mode. If Serial Option Board port is used than ON A392.13 when data can be sent in the no-protocol mode.

Also we have to define in the programming that we are going to use the RS232 port for the no protocol mode. for this we have to made certain settings in the CX-Programmer. See the below diagram.




RXD instruction for Receving data in NO Protocol Mode in Omron PLC :-
Similarly RXD instruction is used for receiving the data from the terminal device.

RXD D C N

Where D is the destination word and C, N are the same as in TXD instruction.

The auxiliary PLC internal bit A392.06 is on when no-protocol reception is completed.
Number of Receive Bytes Specified: The flag will turn ON when the specified number of bytes has been received. End Code Specified: The flag will turn ON when the end code is received or when 256 bytes have been received.

Keep reading for the latest tips and logic development using Omron PLC.
Subscribe to Automation-Talk by Email.

Advertisements :-

0 comments:

Post a Comment

Receive all updates via Facebook. Just Click the Like Button Below