The Omron PLC has three operating modes:
- Monitor Mode
- Run Mode
- Program Mode
Monitor Mode
In monitor mode the PLC continues to execute any existing program, but gives the ability for the SCADA to write data into any of its registers. Alterations to the program can be made in this mode.
Run Mode
When in run mode no registers can be written to, either by a SCADA or by the PLC programming software. Only monitoring of registers is supported in this mode. No alterations to the program can be made.
Program Mode
This mode takes the PLC off line and stops any execution of a program, this allows the reprogramming of the PLC. Registers can be read or written to in this mode.
To Start the Omron CQM PLC in monitor mode write the value 0201 into DM 6600
To Start the PLC In run mode write the value 0202 into DM 6600
Connections
RS232 (1:1)
To connect to multiple CQM’s an RS232 converter must be added to each CQM.
Requirements on Data Area Access
Bit writes only available on these areas:
IR, HR, AR, LR areas.
Notes:
Digital writes i.e. bit writes use the forced set and forced reset commands, therefore to reset these bits, the equivalent commands must be used in the PLC ladder logic.
When writing Analogue or Digital Values in Omron PLC’s, firstly the PLC must be put in the MONITOR mode so that writes from the serial port will succeed. The Monitor mode means that the PLC runs the program and write access is available via a serial device i.e. the Omron Interface Driver.
SETTING MONITOR MODE:
Use SYSWIN or LSS to connect to the PLC, and change the contents of DM 6600
to 0201 (HEX). Turn the PLC off and on again, and use SYSWIN to check the PLC Starts up in the Monitor mode.
If the PLC is not in MONITOR mode, Analogue and Digital writes from the MicroScan software will fail if attempted with a CQM or CPM PLC.
When using BCD numbers in an Omron PLC, a sign bit on the number is not available. Negative numbers can be represented by assigning an offset value to be the zero point, and values below this point are negative.
For Example 500 = zero
Data Value Required | BCD Value |
-50.0 | 0 |
-10.0 | 400 |
0 | 500 |
10.0 | 600 |
499.9 | 999 |
The Omron PLC uses BCD data representation for values in Data Memory locations.
The range of a 4 digit BCD number is 0-9999. A four digit BCD number is the largest number that can be read from one word in the interface.
Recorder Access of BCD words.
On each line, select the Input Scaling range called “BCD Prescale”. When a line is used to read a BCD value, the value must be scaled in the PLC as the Recorder cannot scale the value.
Tag Access of BCD Words
On each tag, in the Input Scaling dialog box, click “BCD Prescale” on. The tag can scale the value, so select the correct range from the list of scales, or use “User Defined Scale” if the required scale is not found.
Note on Analogue Inputs for tags: The Steps value must equal the number of steps that the PLC uses to represent the number. If the input comes in as -20 to +30 = 0 to 1000 steps, then 1000 must be entered into the steps edit box.
Limitations on using a WORD write command to synthesise a BIT write operation
When using the Word write command to the PLC, all bits in the word are written at once. Therefore if a bit write is synthesised from a word write command, the interface must remember which bits have been set or reset. However if bits in a word are being set and reset by a part of the PLC ladder logic, the interface will not be able to keep track of which bits the plc has changed in the word, thus the bits that have been changed by the PLC will have their states put back to those the last time the interface
read them. To work around this problem, do not use bits in a word for internal PLC status flags etc if that word is to be written to using a bit write command.
Because of this limitation it is recommended NOT to use the SCADA to directly write the output states of Output Relays, rather an intermediate buffer should be used, with the plc ladder logic copying the data to the output relays. Direct Bit Writes to Output Relays will fail if the PLC ladder logic is writing to the Output Relay IR Area.
This Program change supersedes PSS article 96116 “PLC Omron Interface Data Access”.
The Omron interface supports Word / bit data transactions from the following data areas.
Data Area | Word Read | Word Write | Bit Read | Bit Write |
IR Area | Yes | Yes | Yes | Yes |
HR Area | Yes | Yes | Yes | Yes |
AR Area | Yes | Yes | Yes | Yes |
LR Area | Yes | Yes | Yes | Yes |
TC Area | Yes | Yes | ||
DM Area | Ys | Yes | Yes | Yes |
PV Area | Yes | Yes | Yes | |
Status | Yes | Yes | ||
Error | Yes | Yes |
Word Read = Analogue Input Word Write = Mimic Analogue Output
Bit Read = Digital Input Bit Write= Mimic Digital Output / Alarm Output.
If using a C Series PLC, the PLC must be put into Monitor Mode, before a write from the interface will succeed.