Your cart is currently empty!
Applicable Model(s)
OIT Models
Title
Masking Hardware Handshaking for Modicon PLCs
Date
10/23/2023
Rev
02
P/N
0907-1028
The Maple Operator Interface Terminal (OIT) allows a Modicon PLC to call up a message that is stored in the OIT by using a “Message Request Register”. A 4XXXX Holding Register can be used by the PLC to tell the OIT to display one of its messages.
For example, register 40500 is the default Message Request Register set in the configuration menu during the OIT setup. When the OIT is attached to the PLC and operating, it will continuously monitor holding register 40500 for a number. If the PLC wants to display Message 1 of the OIT then it would simply put the number 1 into holding register 40500. The OIT would find the number 1 in register 40500, (the Message Request Register also known as the mailbox) and quickly display message #1.
Suppose that you wanted to make sure that the OIT displayed this message. How would you know? The OIT has a status/function key coil address which is used to pass keypress data, (from the F1-F12 keys) and status data to the PLC. The first coil of this address is used as a Message Received status bit. Whenever the OIT receives a new message, it will display the message, and then set the Message Received status bit. The PLC can then look at this bit and determine if the OIT has received the PLC’s call for a display message.
The PLC could then reset this bit to zero, so that the next time the PLC asks the OIT to display a message, it will be able to look at this bit and see if it has been set by the OIT. The OIT uses the discrete output coils 0XXXX for this software handshaking. If the OIT were using the default status coil of 00385, the PLC ladder logic might look something like this:

If Switch 10001 is on and the Message Received status bit (00385) is on then put Message #1 into the
default mailbox (40500) and reset the Message Received status bit (00385) to 0.
This process works great until the PLC wants to ask the OIT to display more than one message. Suppose, for instance, that the PLC is monitoring two doors, Door1 and Door2. If either door closes, the PLC would like to have the OIT display a different message depending upon which door is closed. Message #1 might say, “Door #1 is now closed.” Message #2 might say, “Door #2 is now closed.” We still want to use the status coils for handshaking so we might write a program like this:

Notice, however, that we are now trying to reset the Message Received coil in two places, something the
Modicon PLC will not allow us to do. We can overcome this problem by using a “copy” of the
status/function coil register that is a holding register. The Modicon PLC will let us write to a particular
holding register as many times, in as many places as we want. Therefore, we may want to rewrite the
program to the following:

Now the PLC is happy, but we still have a problem. Because we are copying the entire 16 bit register to the Status/Function Key coil register, we may be overwriting the current value of the function keys. By doing this, the PLC will constantly override our attempts to turn ON/OFF any output coils using the function keys. In addition, although the OIT will attempt to set the Message Received status bit after it has displayed a message, the PLC will overwrite this coil with whatever is in the corresponding coil of 40385, (in this case, a 0). This means the PLC is unable to see that the handshake has taken place, and so, will not allow any more messages to be sent to the OIT. Because of the way the Modicon PLC services the MODBUS port, there is, fortunately, a way out of this. The Modicon PLC will always operate in the following manner:
- The PLC will read all inputs, (i.e. switches, solenoids, etc.)
- The PLC will then perform an entire scan of its internal program.
- The PLC will send data to all outputs, (i.e. switches, relays, etc.)
- The PLC will service the MODBUS port.
This allows us to copy the Status/Function Key coils to a holding register at the beginning of the
program, then make changes to the duplicate during the scan. At the end of the program, the duplicate
register is copied back to the Status/Function Key coils as shown below:

By doing this, the OIT and the Modicon PLC are able to use the handshaking bit to ensure requests to
display messages have been received. With this configuration, the Modicon PLC can use the same
duplicate Holding Register for all messages that it would like the OIT to display.