Académique Documents
Professionnel Documents
Culture Documents
TABLE OF CONTENTS
January 1997 i
CONTENTS CG39-26
LIST OF FIGURES
LIST OF TABLES
Moore Products Co. assumes no liability for errors or omissions in this document or for the application and use of information included
in this document. The information herein is subject to change without notice.
The Moore logo, APACS, the APACS logo ,QUADLOG and 4-mation are trademarks of Moore Products Co.
All other trademarks are the property of the respective owners.
ii January 1997
CG39-26 INTRODUCTION
1.0 INTRODUCTION
This Guide provides reference information for the Ladder Logic (LL) language of the 4-mation configuration
software. It is intended to be used in conjunction with the configuration procedures located in Using the
4-mation Configuration Software (document number CG39-20).
C Section 1, Introduction
C Section 5, Contacts
C Section 6, Coils
1.1 DESCRIPTION
The Ladder Logic (LL) language is one of the four configuration languages of 4-mation. LL simulates
hardwired relay logic . Therefore, it lends itself to the configuration of interlock and interface circuits, etc.
Document categories can be identified by the prefix (e.g. CGxx-xx) of the document number as listed here:
The following 4-mation and other APACS literature is available from Moore Products Co. Generally, all
needed documentation is supplied with your system. Refer to it as needed or as directed in text.
START
LEFT RIGHT
LINK LINK
The state of a reference may be different from the state of the ladder logic element. This difference will be
explained in the description of each element. All ladder logic elements assume a reference state of FALSE
when not assigned a reference.
The Ladder Logic language is configured on a 32 x 32 grid of cells called a sheet. In this language,
configuration elements are connected together to perform a specific task. The group of connected elements is
called a Ladder Logic Network. An example a network is shown in Figure 2-1. The elements permitted in
this type of network include:
The following sections in this Guide explain each of the ladder logic elements. The ladder logic elements are
as follows:
C Power Rails
C Link Elements
Horizontal Link Element (H Shunt)
Vertical Link Element (V Shunt)
C Contacts
Normally Open Contact (NOC)
Normally Closed Contact (NCC)
Positive Transition-Sensing Contact (PTC)
Negative Transition-Sensing Contact (NTC)
C Coils
Coil
Set (Latch) Coil
Reset (Unlatch) Coil
Retentive (Memory) Coil
Set Retentive (Memory) Coil
Reset Retentive (Memory) Coil
Positive Transition-Sensing Coil
Negative Transition-Sensing Coil
Negated Coil
As appropriate, refer to documents APACS Standard Function Blocks (document number CG39-22) or
QUADLOG Standard Function Blocks (document number CGQL-3) for a description of the standard
function blocks that can be used in ladder logic diagrams.
A ladder diagram contains a vertical line on the left side called the left power rail. A ladder diagram also
contains a vertical line on the right side called the right power rail. The state of the left power rail is
considered to be TRUE. No state is defined for the right power rail. The left power rail on a sheet can be
extended by connecting horizontal and vertical shunts (explained below) to the right power rail. See Figure
3-1.
Connection of elements to the right power rail can be explicit or implied. For example, the right power rail is
implied in Figure 3-1. The position of the right rail defaults to column AF. The rail can be moved closer to
the left rail by from the Main Menu Bar by selecting Options, Resize Sheet.
Link Elements may be either horizontal (Horizontal Shunt) or vertical (Vertical Shunt). Link Elements have
an associated state that can be TRUE or FALSE and are used to make connections between contacts, coils,
etc.
A Horizontal Link Element is displayed as a horizontal line that occupies one cell.
H SHUNT
A Horizontal Link Element transfers the state of the element in the cell on its left side to the element in the
cell on its right side. This ladder element is not the same as the horizontal wiring element of the Function
Block language. The Function Block wiring element can transfer analog and Boolean data and does not
indicate state on-line, where as the ladder logic horizontal shunt only transfers Boolean data and does indicate
state on-line.
A Vertical Link Element is displayed as a vertical line that can connect the elements in two consecutive cells
in the same column.
V SHUNT
The state of the Vertical Link Element is the inclusive OR of the states of the elements on its left side and
those connected to it via V Shunts above and below. For example, the state of the Vertical Link Element will
be FALSE if the states of all the attached elements to its left are FALSE. The state will be TRUE if the state
of any of the attached elements to its left are TRUE. The transfer of state can flow up or down, but only in
the direction which enables the rung logic to continue its flow from left to right. For example, Figure 4-1
shows vertical shunts flowing upwards which allows the flow of the rung logic to go from left to right
Unlike the Horizontal Shunt, the Vertical Shunt does not always occupy a cell exclusively. If a Vertical Shunt
was placed in a cell first, then another object cannot be placed in that cell. However, if another element
(contact, horizontal shunt, etc.) existed in a cell, a vertical shunt can be placed there also. Refer the example
in Figure 4-2.
Removing a Vertical Link Element requires a special method. Do not use the [Delete] key as this will delete
all cell contents, not just the Vertical Link Element.
To remove only a Vertical Link Element and preserve the other contents of the cell:
1. On the ladder logic sheet, place the cursor on the cell where the Vertical Link Element is located.
5.0 CONTACTS
A contact is an element that copies a state to the element on its right side that is equal to the AND of the state
of the element on its left side with the given reference. For memory usage and ACM execution time
information on all standard configuration elements, see Appendix A in Using the 4-mation Configuration
Software (document number CG39-20).
The symbol of a NOC is shown below. The state of the left link is copied to the right link if the state of the
associated reference is TRUE. Otherwise, the state of the right link is FALSE. Refer to Table 5-1.
The symbol of a NCC is shown below. The state of the left link is copied to the right link if the state of the
associated reference is FALSE. Otherwise, the state of the right link is FALSE. Refer to Table 5-2.
Figure 5-1 contains an example using a Normally Open Contact and a Normally Closed Contact.
The symbol of a PTC is shown below. The state of the right link is TRUE for one controller scan when a
FALSE to TRUE transition of the associated reference is sensed at the same time that the state of the left link
is TRUE. The state of the right link is FALSE at all other times. Refer to Table 5-3.
NOTE
Since the PTC conducts for a single scan of the controller and the controller execution speed
is greater than the screen update rate, the transitions of the PTC may not be visible while
observing a configuration on-line.
The symbol of an NTC is shown below. The state of the right link is TRUE for one controller scan when a
transition of the associated reference from TRUE to FALSE is sensed at the same time that the state of the left
link is TRUE. The state of the right link is FALSE at all other times. Refer to Table 5-4.
NOTE
Since the NTC conducts for a single scan of the controller and the controller execution speed
is greater than the screen update rate, the transitions of the NTC may not be visible while
observing a configuration on-line.
Figure 5-2 shows an example of using a Positive Transition-Sensing Contact and a Negative Transition-
Sensing Contact.
C If POS experiences a FALSE to TRUE change when SWITCH is TRUE, then LIGHT1 will CONDUCT
for one scan.
C If NEG experiences a TRUE to FALSE change when SWITCH is TRUE, then LIGHT2 will CONDUCT
for one scan.
6.0 COILS
A coil copies the state of the link on its left to the link on its right without modification. The coil also stores
the state of the left link into an associated Boolean variable (e.g. reference to a Boolean input, output or other
Boolean variable). For memory usage and ACM execution time information on all standard configuration
elements, see Appendix A in Using the 4-mation Configuration Software (document number CG39-20).
6.1 COIL
The symbol of a coil is shown below. The state of the left link is copied to the associated reference and to the
right link. Refer to Table 6-1.
The symbol of a Set Coil is shown below. The associated reference is in the TRUE state when the left link is
in the TRUE state. The reference, but not the coil, remains set to TRUE until reset by another coil. Refer to
Table 6-2.
(S )
TABLE 6-2 State of the Set Coil
The on-line display of the (S) part of the element is based upon the state of the reference. For example, if
the reference is in the TRUE state, then the (S) portion of the element will be displayed in the
CONDUCTING state color (i.e. the coil is set). The example in Figure 6-1 demonstrates the functionality of
When LATCH_ON is TRUE, the LATCH1 set coil, the LIGHT1 coil, the LATCH1 contact, and the LIGHT2
coil are CONDUCTING. If LATCH_ON then turns FALSE, the LATCH1 set coil and the LIGHT1 coil are
NOT CONDUCTING, but since the LATCH1 reference remains TRUE, the LATCH1 contact and the
LIGHT2 coil remain CONDUCTING. To reset the LATCH1 reference in this example, the reference
LATCH_OFF must become TRUE.
The symbol of a Reset Coil is shown below. The associated reference is in the FALSE state when the left link
is in the TRUE state. The reference, but not the coil, remains reset to FALSE until set by another coil. Refer
to Table 6-3.
The on-line display of the (R) part of the element is based upon the state of the reference. For example, if the
reference is in the FALSE state then the (R) portion of the element is displayed in the CONDUCTING state
color (i.e. the coil is reset).
The symbol of a Retentive Coil is shown below. The state of the left link is copied to the associated reference
variable and to the right link. The retentive feature, which saves the current value through a warm restart, is
automatically activated when a reference is assigned to this coil (the RETAIN check box found on the
Variable Declaration dialog box is automatically selected). Refer to Table 6-4.
(M )
The symbol of a Set Retentive Coil is shown below. The associated reference is set to TRUE when the left
link is in the TRUE state. The reference remains TRUE until reset by another coil (R or RM). The retentive
feature, which saves the current value through a warm restart, is automatically activated when a reference is
assigned to this coil (the RETAIN check box found on the Variable Declaration dialog box is automatically
selected). Refer to Table 6-5.
The symbol of a Reset Retentive Coil is shown above. The associated reference is reset to FALSE when the
left link is in the TRUE state. The reference remains reset to FALSE until set by another coil (S or SM). The
retentive feature, which saves the current value through a warm restart, is automatically activated when a
reference is assigned to this coil (the RETAIN check box found on the Variable Declaration dialog box is
automatically selected). Refer to Table 6-6.
The symbol of a Positive Transition-Sensing Coil is shown below. The state of the associated reference is
TRUE for one controller scan when a FALSE to TRUE transition of the left link is sensed. The state of the
left link is always copied to the right link. Refer to Table 6-7.
The example in Figure 6-2 demonstrates the functionality of the Positive Transition-Sensing Coil.
When SWITCH changes from FALSE to TRUE, coil A, coil LIGHT1, contact A and coil LIGHT2 are all
CONDUCTING. The very next scan, SWITCH remains CONDUCTING and coil A and coil LIGHT1
remain CONDUCTING. However, contact A and coil LIGHT2 are NOT CONDUCTING because the
reference of a Positive Transition-Sensing Coil is TRUE for one scan only. If SWITCH becomes FALSE,
then the A and LIGHT1 coils are NOT CONDUCTING.
The symbol of a Negative Transition-Sensing Coil is shown below. The state of the associated reference is
TRUE for one controller scan when a TRUE to FALSE transition of the left link is sensed. The state of the
left link is always copied to the right link. Refer to Table 6-8.
The example in Figure 6-3 demonstrates the functionality of the Negative Transition-Sensing Coil.
When the reference variable SWITCH is TRUE, contact SWITCH, coil B, and coil LIGHT1 are
CONDUCTING because the state of the left link is always copied to the right link. Contact B and LIGHT2
are NOT CONDUCTING because the reference of a Negative Transition-Sensing Coil is not TRUE unless a
negative transition is sensed. When the reference SWITCH transitions from TRUE to FALSE, the B coil,
LIGHT1 coil , and SWITCH contact are NOT CONDUCTING, while the B contact and LIGHT2 coil are
CONDUCTING. The very next scan, the SWITCH contact, B coil and LIGHT1 coil remain NOT
CONDUCTING while the B contact and LIGHT2 coil change to NOT CONDUCTING because the
reference of a Negative Transition-Sensing Coil is TRUE for one scan only.
The symbol of a Negated Coil is shown below. The inverse of the left link is copied to the associated
reference variable. The state of the left link is always copied to the right link. Refer to Table 6-9.