Message Request Protocol for the GE Fanuc PLCs
Technical Note 1024
Applicable Model(s)
OIT Models
Title
Message Request Protocol for the GE Fanuc PLCs
Date
10/23/2023
Rev
02
P/N
0907-1024
The Maple Operator Interface Terminal’s (OITs) message passing protocol allows the PLC programmer to choose between two different levels of implementation. The first is a simple, no-handshaking message protocol intended for simpler operator interface applications; the second level adds full message handshaking between the OIT and the PLC. This technical note describes how to use both levels of the message passing protocol, and describes the benefits and features of each level. Also included in this technical note are examples of ladder logic for the PLC to help illustrate the use of the OIT.
1. No-Handshaking Message Protocol
The first level of message protocol supported by the OIT requires no handshaking between the OIT and the PLC. The PLC program simply writes the number of the desired display message into the Message Request Register. The OIT is constantly reading the Message Request Register (once every 200 milliseconds), and will display the desired message when it finds a new message number in the request register.
Example 1
This example will display a different message whenever the F1 or F2 function key is pressed on the OIT’s
keyboard. It assumes the following setup for the OIT and the PLC:
OIT
Message Request Register address = %R500 (default), labeled MSG_REQ
Status/Key Coil address = %M961 (default)
F1 Function Key coil = %M965, labeled F1_KEY
F2 Function Key coil = %M966, labeled F2_KEY
… through …
F12 Function Key coil = %M976, labeled F12_KEY
Message #1 text = HELLO, OPERATOR, displays on line #1, no message chain
Message #2 text = MESSAGE #2, displays on line #1, no message chain
All function keys configured as PUSHBUTTON (momentary contacts)
GE Fanuc Series 90 PLC
Output Module = %Q1 and up, labeled OUT1, OUT2, OUT3, etc.
After the OIT and PLC are both configured, connect the two together and apply power to start the example program. After the OIT sounds one long “beep” to signal that everything is operating properly, press the F1 key on the OIT’s keyboard. The HELLO, OPERATOR message will appear on the OIT’s display and the OUT1 LED will light on the PLC’s output module. When the F1 key is released, the OUT1 LED will turn off, but the message will remain on the OIT’s display. Press the F2 key, and the MESSAGE #2 message will appear on the OIT’s display while the OUT2 LED will light on the PLC’s output module. Alternate the pressing of the two function keys to display each message in turn.
1.2. First Problem – Two Simultaneous Message Requests
The first example seems to work fairly well. Each message is displayed properly when its input is on. However, the function keys are not exactly simulating inputs properly, since only one was on at a time. Also, the message numbers are being written to the Message Request Register at “human speed”, which is fairly slow. To simulate what might happen when more than one input is on at the same time, perform the following steps using the same program:
Press and hold the F1 key. The HELLO,OPERATOR message will appear on the display. While holding
the F1 key down, press and hold the F2 key as well. This will cause the MESSAGE #2 message to write
over the first one. Release the F2 key, and the HELLO, OPERATOR message will re-appear. Release the
F1 key. Now reverse the order of pressing the function keys. Press and hold the F2 key, and the
MESSAGE #2 message appears. Press the F1 key. NOTHING HAPPENS! The first message is nowhere
to be found. Release the F1 and then the F2 key. The second message remains on the OIT’s display.
The reason for the above behavior is obvious once it is pointed out. The OIT reads the Message Request
Register in the “time slot” allotted for programmer and external communication by the PLC. This occurs
between scans in the PLC’s operation. When both inputs are on at the same time in the example
program, the first rung writes the constant value of +00001 to the request register, but the second rung
immediately writes the constant value of +00002 over the top of the first value. If the second message
number was already written there first, then the OIT will never see the first message number.
1.3. First Solution – Using Transitional Coils
One way around the first problem is to use some internal coils configured as Positive Transition coils
(one-shots) to trigger the actual move. This will help prevent a message request at the bottom of the
program from “hogging” the request register. The next example illustrates this method.
1.4. Example #2
Configure the OIT and the PLC in the following manner:
OIT
Message Request Register address = %R500 (default), labeled MSG_REQ
Status/Key Coil address = %M961 (default)
F1 Function Key coil = %M965, labeled F1_KEY
F2 Function Key coil = %M966, labeled F2_KEY
…through …
F12 Function Key coil = %M976, labeled F12_KEY
Message #1 text = HELLO, OPERATOR, displays on line #1, no message chain
Message #2 text = MESSAGE #2, displays on line #1, no message chain
All function keys configured as PUSHBUTTON (momentary contacts)
GE Fanuc Series 90 PLC
Output module = %Q1 and up, labeled OUT1, OUT2, OUT3, etc.
Internal Coils = %M1 and up, labeled WC1, WC2, WC3, etc.
Run this example and experiment with different combinations of keypresses for the F1 and F2 keys. Now
each message will be displayed properly when the respective function key is pressed, even if the other key
is held down.
1.5. Second Problem – Message Request Overwrites
The second example still does not solve the problem of what happens when two message requests arrive
simultaneously. To simulate this, press the F3 function key. This will attempt to display both messages
during the same program scan in the PLC. What happens is the same as before; the second message
number is written over the top of the first one, and only the second message is displayed. This could
cause difficulties with the application if the first message was an important status or alarm message.
1.6. Second Solution – Timed Messages
One way to insure that no messages or alarm codes are overwritten is to use a time delay and “interlock”
between message requests. This requires the use of an internal coil as the interlock and an on-delay timer
to space the message requests properly.
1.7. Example #3
Configure the OIT and the PLC in the following manner:
OIT
Message Request Register address = %R500 (default), labeled MSG_REQ
Status/Key Coil address = %M961 (default)
F1 Function Key coil = %M965, labeled F1_KEY
F2 Function Key coil = %M966, labeled F2_KEY
…through …
F12 Function Key coil = %M976, labeled F12_KEY
Message #1 text = HELLO, OPERATOR, displays on line #1, no message chain
Message #2 text = MESSAGE #2, displays on line #1, no message chain
Message #3 text = <<< STOPPED >>>, displays on line #1, no message chain
Message #4 text = [ ERROR – PRESS F9 ], displays on line #1, no message chain
All function keys configured as PUSHBUTTON (momentary contacts)
GE Fanuc Series 90 PLC
Output Module = %Q1 and up, labeled OUT1, OUT2, OUT3, etc.
Internal Coils = %M1 and up, labeled WC1, WC2, WC3, etc.
%M20, used for interlock and labeled ILOCK
%M21, used for timer coil and labeled TMR1
Data Memory = %R1 through %R3, used for on-delay timer and labeled TMR1_REG
Run this example using the F1 through F4 keys. Notice that OUT5 is used to indicate when a message
timeout is still in progress. While the current message is timing out, all other message requests are
blocked. The timeout value in this example is fixed at 3 seconds, but it could just as easily be read from a
data register instead. This allows the PLC program to vary the time between messages on a
message-by-message basis.
1.8. Third Problem – Latching Events for Message Requests
The third example introduces a new problem all of its own. If a message is being displayed and is
currently timing out, then all other requests are blocked and discarded until the interlock coil is reset. If a
blocked request’s triggering event (in this example, the function key press) is disabled before the interlock
coil is cleared, then the message request is lost completely. To simulate this, press and release the F1 and
F2 keys quickly in succession. The first message is displayed properly, but the second message is lost
because the triggering event (the function key press) happened only during the timeout period. If the F2
key had remained pressed after the timeout had expired, then the second message would have been
properly displayed.
To latch an event so that it always displays its message even if it is currently blocked, the logic that enables the message request needs to be modified.
1.9. Example #4
Configure the OIT and the PLC in the following manner:
OIT
Message Request Register address = %R500 (default), labeled MSG_REQ
Status/Key Coil address = %M961 (default)
F1 Function Key coil = %M965, labeled F1_KEY
F2 Function Key coil = %M966, labeled F2_KEY
… through …
F12 Function Key coil = %M976, labeled F12_KEY
Message #1 text = HELLO, OPERATOR, displays on line #1, no message chain
Message #2 text = MESSAGE #2, displays on line #1, no message chain
Message #3 text = <<< STOPPED >>>, displays on line #1, no message chain
Message #4 text = [ ERROR – PRESS F9 ], displays on line #1, no message chain
All function keys configured as PUSHBUTTON (momentary contacts)
GE Fanuc Series 90 PLC
Output Module = %Q1 and up, labeled OUT1, OUT2, OUT3, etc.
Internal Coils = %M1 and up, labeled WC1, WC2, WC3, etc.
%M20, used for interlock and labeled ILOCK
%M21, used for timer coil and labeled TMR1
Data Memory = %R1 through %R3, used for on-delay timer and labeled TMR1_REG
Run the example and experiment with the F1 through F4 keys. Notice that short keypresses are now
“captured” and each message is displayed, even if the function key was pressed while another message is
timing out.
1.10. Reasons for using Message Handshaking
The fourth example illustrates a typical method of sending messages to the OIT without the use of the
message handshaking protocol. This can suffice for a large number of applications. However, the PLC
program has no way of knowing whether or not the OIT is connected to it, nor does the PLC have any
assurances that the desired message was actually displayed by the OIT. If the message request is intended
to signal a critical alarm condition or some other status message, the no-handshaking method described
above is no longer suitable.
Message Request Handshaking Protocol
The OIT uses four internal coils of the PLC for handshaking/status bits. Two are used for indicating
errors, and the other two are used for the power-up clear and message handshaking. The Message
Received status bit is used to implement the message handshaking. Every time the OIT receives a new
message number or command code request, it sets the Message Received bit after completing the desired
action. The PLC must clear the Message Received bit before writing a new number to the Message
Request Register if handshaking is implemented. This is illustrated by the following flow diagram.
By using the message handshaking protocol, the PLC can verify that the OIT has received and displayed the desired message. If a command code is sent using handshaking, the Message Received bit is set by the OIT after the code is processed. For the two continuous alarm codes (908 and 909) that require the operator acknowledgment, the Message Received bit is set after the operator’s input is received. This could be used by the PLC program to perform an automatic safety shut-down if the operator does not respond within a given time period.
Using the handshaking protocol also allows the PLC to “pace” the message requests to the speed of the
PLC-to-OIT interface polling. This eliminates the need of an arbitrary time delay between message
requests.
2.1. Example #5
This example will display a different message whenever the F1 or F2 function key is pressed on the OIT’s
keyboard. Configure the OIT and the PLC in the following manner:
OIT
Message Request Register address = %R500 (default), labeled MSG_REQ
Status/Key Coil address = %M961 (default)
Message Receive coil = %M961, labeled MSG_RECV
F1 Function Key coil = %M965, labeled F1_KEY
F2 Function Key coil = %M966, labeled F2_KEY
… through …
F12 Function Key coil = %M976, labeled F12_KEY
Message #1 text = HELLO, OPERATOR, displays on line #1, no message chain
Message #2 text = MESSAGE #2, displays on line #1, no message chain
Message #3 text = <<< STOPPED >>>, displays on line #1, no message chain
All function keys configured as PUSHBUTTON (momentary contacts)
GE Fanuc Series 90 PLC
Output Module = %Q1 and up, labeled OUT1, OUT2, OUT3, etc.
Internal Coils = %M1 and up, labeled WC1, WC2, WC3, etc.
Run the example and alternate between pressing the F1, F2, and F3 keys. Notice the WC4 LED on the
output module, which shows the activity of the Message Received status bit.
2.2. Fourth Problem – The Duplicate Message Request
Using the example, press one of the function keys twice in a row. The Message Received bit will be
cleared and remain cleared, and the function keys no longer display new messages. This is caused by the
OIT requiring a new message number before it will display a message and set the received bit. If the PLC
program requires that any message number can be sent in any order, including duplicate message numbers, then the way out of this dilemma is to use the dummy message #0 as outlined in Example #6 below.
2.3. Example #6
Configure the OIT and the PLC in the following manner:
OIT
Message Request Register address = %R500 (default), labeled MSG_REQ
Status/Key Coil address = %M961 (default)
Message Receive coil = %M961, labeled MSG_RECV
F1 Function Key coil = %M965, labeled F1_KEY
F2 Function Key coil = %M966, labeled F2_KEY
… through …
F12 Function Key coil = %M976, labeled F12_KEY
Message #1 text = HELLO, OPERATOR, displays on line #1, no message chain
Message #2 text = MESSAGE #2, displays on line #1, no message chain
Message #3 text = <<< STOPPED >>>, displays on line #1, no message chain
All function keys configured as PUSHBUTTON (momentary contacts)
GE Fanuc Series 90 PLC
Output Module = %Q1 and up, labeled OUT1, OUT2, OUT3, etc.
Internal Coils = %M1 and up, labeled WC1, WC2, WC3, etc.
Now all of the function keys will work, regardless of the order pressed. The first two rungs of the PLC
program are position dependent, meaning that they must be included before any of the rungs that write a
message number to the request register. This method works because the OIT always reads the request
register and sets any status bits between scans, in the time slot allotted by the PLC for programmer and
external communication.
2.4. Creating “Message Blocks”
It is often desirable to create a “message block” that displays a number of messages and/or command codes in an uninterrupted sequence. The following technique can be used when message chaining is inappropriate, such as the case when a number of different messages must be displayed depending upon which function key is pressed in response.
The following example shows two different message block types. The first block is triggered by function
key F1, and will show a status message and sound the OIT’s transducer using command code 906 (Alarm
6) for 3 seconds, then clear the display. The second block is triggered by F4. It requires the operator to
press one of the listed function keys (F2 or F3), and then displays a different message depending upon the
key pressed. Neither block can be interrupted by the other one while it is in progress. Both blocks use an
“interlock” bit in a manner similar to examples 3 and 4.
2.5. Example #7
This example requires a 2-line version of the Maple OIT. Configure the OIT and the PLC in the following
manner:
OIT
Message Request Register address = %R500 (default), labeled MSG_REQ
Status/Key Coil address = %M961 (default)
Message Receive coil = %M961, labeled MSG_RECV
F1 Function Key coil = %M965, labeled F1_KEY
F2 Function Key coil = %M966, labeled F2_KEY
… through …
F12 Function Key coil = %M976, labeled F12_KEY
Message #1 text = WARNING! Conveyer speed is running, displays on line #1, chained to message #2
Message #2 text = TOO FAST!!, displays on line #2, no message chain
Message #3 text = Press F2 to select conveyer loop 101, displays on line #1, chained to message #4
Message #4 text = F3 to select conveyer loop 220, displays on line #2, no message chain
Message #5 text = Conveyer loop 101 now in progress, displays on line #1, no message chain
Message #6 text = Conveyer loop 220 now in progress, displays on line #1, no message chain
All function keys configured as PUSHBUTTON (momentary contacts)
GE Fanuc Series 90 PLC
Output Module = %Q1 and up, labeled OUT1, OUT2, OUT3, etc.
Internal Coils = %M1 and up, labeled WC1, WC2, WC3, etc.
%M50, used for interlock and labeled ILOCK
%M51, used for timer coil and labeled TMR1
Data Memory = %R1 through %R3, used for on-delay timer and labeled TMR1_REG
WC3 through WC5 bits are used as sequencing steps for the F1 key’s block, while the WC7 through
WC10 bits are used for sequencing the F4 key’s block. The way the example works is as follows.
Pressing the F1 key will cause messages 1 and 2 to be displayed as a full screen message set. The
ILOCK (interlock) bit is set to prevent any other block from interrupting the steps in the F1 key message
block. When the message request is acknowledged by the OIT, command code 906 (Alarm 6) is sent and
the 3 second timer is enabled. When the timer times out, it disables itself after enabling the next step.
The command code 900 (clear display) is sent after the timeout and when the previous command code has
been acknowledged by the OIT. Sending the clear display command finishes the message block and
disables the ILOCK bit to enable other message blocks.
Pressing the F4 key will cause messages 3 and 4 to be displayed as a full screen message set, and sets the
ILOCK bit. It also sets the WC7 bit, which enables the F2 and F3 keys. Pressing one of the two
function keys will cause command code 900 (clear display) to be sent, and then the appropriate status
message (message 5 or 6) after the command code is acknowledged by the OIT. This also clears the
ILOCK bit to enable other message blocks.