Modicon Ladder Logic Block Library User Guide Volume 1
Modicon Ladder Logic Block Library User Guide Volume 1
043505766.81
4/2006
www.barr-thorp.com
ii
www.barr-thorp.com
Table of Contents
Chapter 2
Chapter 3
16
18
20
22
26
Chapter 4
Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Parameter Assignment of Instuctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
iii
www.barr-thorp.com
Chapter 5
Instruction Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Instruction Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
ASCII Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Counters and Timers Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Fast I/O Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Loadable DX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Matrix Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Move Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Skips/Specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Special Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Coils, Contacts and Interconnects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Chapter 6
Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Equation Network Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Mathematical Equations in Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Mathematical Operations in Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . 59
Mathematical Functions in Equation Networks . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Data Conversions in an Equation Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Roundoff Differences in PLCs without a Math Coprocessor . . . . . . . . . . . . . . . . 68
Benchmark Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Interrupt Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Chapter 11
Subroutine Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
iv
www.barr-thorp.com
Chapter 12
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Chapter 21
www.barr-thorp.com
Chapter 22
Chapter 23
Chapter 24
Chapter 25
Chapter 26
Chapter 27
Coils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Short Description: Coils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
General Usage Guidelines: Coils. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Chapter 28
Chapter 29
Chapter 30
Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Short Description: Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Representation: Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
vi
www.barr-thorp.com
Chapter 31
Chapter 32
Chapter 33
Chapter 34
Chapter 35
Chapter 36
Chapter 37
Chapter 38
224
225
226
228
Chapter 39
vii
www.barr-thorp.com
Chapter 40
Chapter 42
Chapter 43
Chapter 44
Chapter 45
Chapter 46
Chapter 47
viii
www.barr-thorp.com
Chapter 48
Chapter 49
Chapter 50
Chapter 51
Chapter 52
Chapter 53
Chapter 54
326
327
329
330
ix
www.barr-thorp.com
Chapter 55
Chapter 56
Chapter 57
Chapter 58
Chapter 59
Chapter 60
Chapter 61
Chapter 62
www.barr-thorp.com
Chapter 63
Chapter 64
Chapter 65
Chapter 66
Chapter 67
Chapter 68
Chapter 69
Chapter 70
xi
www.barr-thorp.com
Chapter 71
Chapter 72
Chapter 73
Chapter 74
Chapter 75
Chapter 76
Chapter 77
Chapter 78
xii
www.barr-thorp.com
Chapter 79
Chapter 80
Chapter 81
Chapter 82
470
471
472
475
479
480
482
486
487
490
491
492
494
Chapter 84
Chapter 85
xiii
www.barr-thorp.com
Chapter 86
Chapter 87
Chapter 88
Chapter 89
Chapter 90
Chapter 91
xiv
www.barr-thorp.com
Chapter 92
Chapter 93
598
599
601
602
Chapter 94
Chapter 95
Chapter 96
612
613
614
616
Chapter 97
Chapter 98
Chapter 99
626
627
628
630
Chapter 100
xv
www.barr-thorp.com
Chapter 101
Chapter 102
Chapter 103
Chapter 104
Chapter 105
Chapter 106
Chapter 107
Chapter 108
Chapter 109
xvi
www.barr-thorp.com
Chapter 110
Chapter 111
Chapter 112
703
704
707
711
713
715
717
719
720
721
723
725
728
729
731
733
738
739
740
742
744
747
Chapter 113
Chapter 114
Chapter 115
xvii
www.barr-thorp.com
Chapter 116
Chapter 117
Chapter 119
Chapter 120
Chapter 121
Chapter 122
Chapter 123
Chapter 124
xviii
www.barr-thorp.com
Chapter 125
Chapter 126
Chapter 127
Chapter 128
Chapter 129
Chapter 130
Chapter 131
Chapter 132
Chapter 133
xix
www.barr-thorp.com
Chapter 134
Chapter 135
Chapter 136
Chapter 137
Chapter 138
Chapter 139
Chapter 140
Chapter 141
Chapter 142
xx
www.barr-thorp.com
Chapter 143
Chapter 144
914
915
916
919
924
Chapter 146
Chapter 147
Chapter 148
Chapter 149
Chapter 150
Chapter 151
xxi
www.barr-thorp.com
Chapter 152
Chapter 153
Chapter 154
Chapter 155
Chapter 156
Shorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 979
Short Description: Shorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
Representation: Shorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
Chapter 157
Chapter 158
Chapter 159
xxii
www.barr-thorp.com
Chapter 160
Chapter 161
Chapter 162
Chapter 163
Chapter 164
Chapter 165
Chapter 166
Chapter 167
Chapter 168
Chapter 169
Chapter 170
xxiii
www.barr-thorp.com
Chapter 171
Chapter 172
Chapter 173
Chapter 174
Chapter 175
Chapter 176
Chapter 177
Chapter 178
Chapter 179
Chapter 180
xxiv
www.barr-thorp.com
Chapter 181
Chapter 182
Appendices
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1151
Optimizing RIO Performance with the Segment Scheduler . . . . . . . . . . . . . . 1151
Appendix A
Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1153
Optimizing RIO Peformance with the Segment Scheduler . . . . . . . . . . . . . . .
Scan Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How to Measure Scan Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Maximizing Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Order of Solve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Segment Scheduler to Improve Critical I/O Throughput . . . . . . . . . . . .
Using Segment Scheduler to Improve System Performance . . . . . . . . . . . . .
Using Segment Scheduler to Improve Communication Port Servicing . . . . . .
Sweep Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1153
1154
1158
1159
1161
1162
1164
1165
1166
Glossary
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi
Index
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . lv
xxv
www.barr-thorp.com
xxvi
www.barr-thorp.com
Safety Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with
the device before trying to install, operate, or maintain it. The following special
messages may appear throughout this documentation or on the equipment to warn
of potential hazards or to call attention to information that clarifies or simplifies
a procedure.
The addition of this symbol to a Danger or Warning safety label indicates
that an electrical hazard exists, which will result in personal injury if the
instructions are not followed.
This is the safety alert symbol. It is used to alert you to potential personal
injury hazards. Obey all safety messages that follow this symbol to avoid
possible injury or death.
DANGER
DANGER indicates an imminently hazardous situation, which, if not avoided, will
result in death or serious injury.
WARNING
WARNING indicates a potentially hazardous situation, which, if not avoided, can result
in death, serious injury, or equipment damage.
CAUTION
CAUTION indicates a potentially hazardous situation, which, if not avoided, can result
in injury or equipment damage.
PLEASE NOTE
xxvii
043505766 4/2006
www.barr-thorp.com
Safety Information
xxviii
043505766 4/2006
www.barr-thorp.com
At a Glance
Document Scope
This documentation will help you configure LL 984 instructions to any controller
using ProWorx NxT, ProWorx 32 or Modbus Plus. Examples in this book are used
with ProWorx 32. For LL 984 using Concept software, see Concept Block Library
LL984 (840USE49600).
Validity Note
The data and illustrations found in this book are not binding. We reserve the right to
modify our products in line with our policy of continuous product development. The
information in this document is subject to change without notice and should not be
construed as a commitment by Schneider Electric.
Related
Documents
Title of Documentation
Reference Number
xxix
043505766 4/2006
www.barr-thorp.com
Product Related
Warnings
Schneider Electric assumes no responsibility for any errors that may appear in this
document. If you have any suggestions for improvements or amendments or have
found errors in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic
or mechanical, including photocopying, without express written permission of
Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when
installing and using this product. For reasons of safety and to ensure compliance
with documented system data, only the manufacturer should perform repairs to
components.
When controllers are used for applications with technical safety
requirements, please follow the relevant instructions.
Failure to use Schneider Electric software or approved software with our hardware
products may result in injury, harm, or improper operating results.
Failure to observe this product related warning can result in injury or
equipment damage.
User Comments
We welcome your comments about this document. You can reach us by e-mail at
techpub@schneider-electric.com
xxx
043505766 4/2006
www.barr-thorp.com
General Information
I
Introduction
At a Glance
In this part you will find general information about the instruction groups and the use
of instructions.
What's in this
Part?
Chapter Name
Page
15
27
Instructions
35
Instruction Groups
37
Equation Networks
51
71
83
91
10
Interrupt Handling
97
11
Subroutine Handling
99
12
Installation of DX Loadables
101
043505766 4/2006
www.barr-thorp.com
General Information
043505766 4/2006
www.barr-thorp.com
1
At a Glance
Overview
What's in this
Chapter?
Page
043505766 4/2006
www.barr-thorp.com
A Ladder Logic
Network
A network is a ladder diagram bounded on the left and right by power rails. By
convention, the rail on the left is shown and the one on the right is not. Seven rungs
(or rows) run from left to right between the two power rails. Each rung is eleven
columns wide.
Power
Rail
The 77 regions formed by the intersections of rungs and columns are called nodes.
Logic elements and instructions can be programmed into these nodes. All 77 nodes
in a network may be used to store ladder logic elements and instructions, which are
the fundamental building blocks of the logic program. Some rules of placement
apply, particularly with respect to coil placement.
043505766 4/2006
www.barr-thorp.com
A Coil Placement
in a Network
Although the coil expansion display shows the coils in the 11th column, they are
solved in their real logic-solve position. Coil 00103 is solved immediately after
contact 10034 and coil 00102 is solved immediately after contact 10033 in both
examples above. Coil 00101 is always the last coil solved in the network.
043505766 4/2006
www.barr-thorp.com
Ladder Logic
Segments
Because the structure of a network is fixed, the logic program generally overlaps into
multiple networks. A group of contiguous networks performing a task or subtask in
the application program is called a segment. There is no prescribed limit on the
number of networks that can be placed in a segmentsize is limited only by the
amount of UserMemory available and by the maximum amount of PLC scan
time(250 ms).For small ladder logic applications, a single segment may be sufficient
to store the whole program. For larger applications, such as multi-drop remote I/O
applications, several segments may be programmed. As arule in RIO
configurations, the number of segments in the program equals the number of I/O
drops; you may want to use more segments than drops, but never fewer segments
than drops.Segments are numbered 1 ... n, up to a maximum of 32, in the order they
are created by the programmer. You may modify the order in which segments are
solved with the segment scheduler, an editor available with your panel software that
allows you to adjust the order-of-solve table in system memory. Refer to Appendix
A for a description of how to improve system performance via the segment
scheduler.With some PLCs, you may also create an unscheduled segment that
contains one or more ladder logic subroutines, which can be called from the
scheduled segments via the JSR function.
043505766 4/2006
www.barr-thorp.com
The PLC scans the ladder logic program sequentially in the following order.
z
z
z
Segments are scanned according to the way they are scheduled in an order-ofsolve table known as the segment scheduler. The segment scheduler can be
customized during system configuration, or it can default to a standard scanning
sequence (segment 1 followed by segment 2 followed by segment 3, etc.)
Networks in each segment are scanned contiguously.
Nodes within each network are scanned top to bottom, left to right.
Segment
Network
1
1
Segment
Network
1
2
Start
Segment Boundary
Segment
Network
2
3
The PLC begins solving logic in the network at the top of the leftmost column and
proceeds down, then moves to the top of the next column and proceeds down, as
shown in the illustration. Each node is solved in the order it is encountered in the
logic scan. Power flow within the network is down each column from left to right,
never from bottom to top and never from right to left.
043505766 4/2006
www.barr-thorp.com
There is a core set of ladder logic elements (contacts, coils, vertical and horizontal
shorts) and instructions built into all PLC firmware packages. Additional instructions
are available for specific PLC types as either built-in or loadable instructions. This
section provides a brief list of the available instructions and their functions; a detailed
description of all instruction, including the PLC models they are available on, is
provided in later chapters of this book.
Standard Ladder Logic Elements
Symbol
Definition
Nodes Consumed
A normal coil
A horizontal short
A vertical short
043505766 4/2006
www.barr-thorp.com
Standard
Ladder Logic
Instructions for
all PLCs
Definition
Nodes Consumed
UCTR
DCTR
T1.0
T0.1
T.01
Definition
Nodes Consumed
ADD
SUB
MUL
DIV
DX Move Instructions
Instruction
Definition
Nodes Consumed
Ro7
To5
To7
BLKM
FIN
FOUT
SRCH
STAT
DX Matrix Instructions
Instruction
Definition
Nodes Consumed
AND
OR
XOR
COMP
CMPR
MBIT
043505766 4/2006
www.barr-thorp.com
Instruction
Definition
Nodes Consumed
SENS
BROT
Skip-Node Instruction
Instruction
Definition
Nodes Consumed
SKP
Some ladder logic instructions are standard (built in) to some PLCs but unavailable
in others. For example, PLCs with the Modbus Plus communication capability built
in it are shipped with an MSTR instruction in the firmware while PLCs that cannot
operate on Modbus Plus do not support this instruction. Here is a list of these select
built-in instruction
Built-in Ladder
Logic Instruction
for Select PLCs
Definition
Nodes Consumed
NOBT
NCBT
NBIT
SBIT
RBIT
Clears a bit that has been set via the SBIT instruction
Definition
Nodes Consumed
AD16
SU16
TEST
MU16
DV16
ITOF
FTOI
EMTH
BCD
10
043505766 4/2006
www.barr-thorp.com
Instruction
Definition
Nodes Consumed
Equation
Network
77
Interrupt Instructions
Instruction
Definition
Nodes Consumed
ITMR
ID
Interrupt disable
IE
Interrupt enable
BMDI
IMIO
Nodes Consumed
READ
WRIT
COMM
Nodes Consumed
JSR
LAB
RET
CTIF
11
043505766 4/2006
www.barr-thorp.com
Nodes Consumed
CKSM
MSTR
PID2
PCFL
TBLK
BLKT
SCIF
T1MS
IKBR
IBKW
12
043505766 4/2006
www.barr-thorp.com
Other instructions are available for specific PLCs as loabable functions. Loadables
support optional software development products that can be purchased for special
applications. The loadable instructions may be used only with specific PLC models.
Loadable instructions include:
Instruction
Definition
Nodes Consumed
HSBY
CHS
CALL
ESI
FNxx
MATH
DMATH
Support some square root, logarithm, and doubleprecision math functions in PLCs that cannot support
the Enhanced Math library
EARS
EUCA
HLTH
13
043505766 4/2006
www.barr-thorp.com
14
043505766 4/2006
www.barr-thorp.com
2
At a Glance
Overview
What's in this
Chapter?
Page
User Memory
16
18
20
22
26
15
043505766 4/2006
www.barr-thorp.com
User Memory
Overview
User memory is the space provided in the PLC for the logic program and for system
overhead. User memory sizes vary from 1K ... 64K words, depending on PLC type
and model. Each word in user memory is stored on page 0 in the PLCs memory
structure; words may be either 16 or 24 bits long, depending on the CPU size.
page 0
Overhead
User
Logic
CKSM Diagnostics
Configuration Table
Loadables
I/O Map
Segment Scheduler
(129 words)
STAT Block Tables
(up to 277 words)
System Diagnostics
Configuration Extension
Table (optional)
ASCII Message area
(optional)
Approximately
888 Words
User Logic
The amount of space available for application logic is calculated by subtracting the
amount of space consumed by system overhead from the total amount of user logic.
System overhead in a relatively conservative system configuration can be expected
to consume around 1000 words; system configurations with moderate or large I/O
maps will require more overhead.
16
043505766 4/2006
www.barr-thorp.com
User Memory
Ladder logic requires one word of either 16-bit or 24-bit memory to uniquely identify
each node in an application program. Contacts and coils each occupy one node, and
therefore one word. Instructions, which usually comprise two or three nodes, require
two or three words, respectively. Other elements that control program scanning
three words, respectively. Other elements that control program scanning start of
a network (SON), beginning of a column (BOC), and horizontal shorts use one
word of user logic memory as well.
SON
BOC
BOC
BOC
SON
BOC
8 words
System
Overhead
System overhead refers to the contents of a set of tables where the systems size,
structure, and status are defined. Some overhead tables have a predetermined
amount of memory allocated to them. The configuration table, for example, contains
128 words, and the order-of-solve table (the segment scheduler) contains 129
words. Other tables, such as the I/O map (a.ka. traffic cop), can consume a large
amount of memory, but its size is not predetermined. Optional pieces of system
overhead e.g., the loadable table, the ASCII message area, the configuration
extension table may or may not consume memory depending on the
requirements of your application.
Memory Backup
User memory is stored in CMOS RAM. In the event that power is lost, CMOS RAM
is backed up by a long-life (typically 12-month) battery. In many PLC models, the
battery is a standard part of the hardware package; in smaller-scale PLCs e.g.,
the Micro PLCs a battery is available as an option.In the case of the Micro PLCs,
where the battery is an option, an area in its Flash memory is available for backing
up user logic. (Flash is a standard feature on the Micros.)
17
043505766 4/2006
www.barr-thorp.com
As part of your PLCs configuration process, you specify a certain number of discrete
outputs or coils, discrete inputs, input registers, and output holding registers
available for application control. These inputs and outputs are placed in a table of
16-bit words in an area of system memory called state RAM.
Referencing
System for
Inputs and
Outputs
The system uses a reference numbering system to identify the various types of
inputs and outputs. Each reference number has a leading digit that identifies its data
type (discrete input, discrete output, register input, register output) followed by a
string of digits indicating its unique location in state RAM.
Meaning
0x
1x
discrete input
3x
input register
4x
6x
extended memory
register
18
043505766 4/2006
www.barr-thorp.com
Storing a
Discreet and
Register Data in
State RAM
State RAM data is stored in 16-bit words on page F in System Memory. The state
RAM table is followed by a discrete history table that stores the state of the bits at
the end of the previous scan, and by a table of the current ENABLE/DISABLE status
of all the discrete (0x and 1x) values in state RAM.
page F
State RAM
ENABLE/DISABLE Tables
Discrete History Tables
4x History Table
EOL Pointers*
Crash Codes*
Executive ID*
Executive Rev #*
*Not available in the
984A/B/X PLCs
16 bits
19
043505766 4/2006
www.barr-thorp.com
Words are entered into the state RAM table from the top down in the following order.
Word 0001
Coil History
Discrete DISABLE
Word 2048
Discrete references come before registers, the 0x words first followed by the 1x
words. The discrete references are stored in words containing 16 contiguous
discrete references.The register values follow the discrete words. Blocks of 3x and
4x register values must each begin at a word that is a multiple of 16. For example,
if you allocate five words for eighty 0x references and five words for eighty 1x
references, you have used words 0001 ... 0010 in state RAM. Words 0011 ... 0016
are then left empty so that the first 3x reference begins at word 0017.
20
043505766 4/2006
www.barr-thorp.com
Minimum
Required State
RAM Values
History and
Disable Bits for
Discrete
References
48
16
Discrete in (1x)
16
16
Register in (3x)
For each word allocated to discrete references, two additional words are allocated
in the history/disable tables. These tables follow the state RAM table on page F in
system memory. They are generated from the bottom up in the following manner.
Word 0001
Word 2048
21
043505766 4/2006
www.barr-thorp.com
The configuration table is one of the key pieces of overhead contained in system
memory. It comprises 128 consecutive words and provides a means of accessing
information defining your control system capabilities and your user logic program.
With your programming panel software, you can access the configurator editor,
which allows you to specify the configuration parameters such as those shown
on the following page for your control system.When a PLCs memory is empty
in a state called DIM AWARENESS you are not able to write a I/O map or a user
logic program. Therefore, the first programming task you must undertake with a new
PLC is to write a valid configuration table using your configurator editor.
Assigning a
Battery Coil
A 0x coil can be set aside in the configuration to reflect the current status of the
PLCs battery backup system. If this coil has been set and is queried, it displays a
discrete value of either 0, indicating that the battery system is healthy, or 1 indicating
the battery system is not healthy.
Assigning
Timer Register
22
043505766 4/2006
www.barr-thorp.com
Time of Day
Clock
When a 4x holding register assignment is made in the configurator for the time of
day (TOD) clock, that register and the next seven consecutive registers (4x ... 4x +
7) are set aside in the configuration to store TOD information. The block of registers
is implemented as follows.
Register Definition
4X
The control register:
1 = error
1 = all clock values have been set
1 = clock values are being read
1 = clock values are being set
4X+1
4x+2
4x+3
4x+4
4x+5
4x+6
4x+7
Register Definition
400500
0110000000000000
400501
3 (decimal)
400502
7 (decimal)
400503
16 (decimal)
400504
91 (decimal)
400505
9 (decimal)
400506
25 (decimal
400507
30 (decimal)
23
043505766 4/2006
www.barr-thorp.com
Data Type
Format
Default Setting
# of coils
Even multiple of 16
16
# of discrete inputs
Even multiple of 16
16
# of register outputs
01
# of register inputs
01
# of I/O drops
Up to 32, depending 01
on PLC type
# of I/O modules
Up to 1024,
depending on the
PLC type
00
# of logic segments
Generally equal to
the # of drops
00
# of I/O channels
02
Memory Size
PLC- dependent
PLC-dependent
RTU
Notes
Baud Rate
9600
Parity
ON/OFF, EVEN/ODD
ON/EVEN
Stop bit(s)
1or 2
Device address
001...247
001
10...20 (representing
10...20 ms)
Size of
message area
00
00
24
043505766 4/2006
www.barr-thorp.com
ASCII port
parameters
Baud
Parity
# of stop bits
# of data bits per
character
Presence of a keyboard
1200
ON/EVEN
01
08
NONE
ASCII input
A 4x value representing
the first of 32 registers
for simple ASCII input
NONE
ASCII output)
A 4x value representing
the first of 32 registers
for simple ASCII output
NONE
Special Functions
Skip Functions Allowed YES/NO
No
Timer Register
NONE
TOD Clock
NONE
Battery Coil
A 0x reference reflecting
the status of battery
backup system 00000
00000
Loadable Instructions
Install Loadable
PROCEED or CANCEL
25
043505766 4/2006
www.barr-thorp.com
Determining the
Size of the I/O
Map Table
The I/O map directs data flow between the input/output signals and the user logic
program; it tells the PLC how to implement inputs in user logic and provides a
pathway down which to send signals to the output modules. The I/O map table,
which is stored on page 0 in system memory, consumes a large but not
predetermined amount of system overhead.Its length is a function of the number of
discrete and register I/O points your system has implemented and is defined by the
type of I/O modules you specify in the configuration table.
The minimum allowable size of the I/O map table is nine words.
Writing Data to
the I/O Map
With your programming panel software, you can access a I/O map editor that allows
you to define:
z
the number of discretes/registers that may be used for input and output
the number, type and slot location of the I/O modules in the drop
the reference numbers that link the discrete/registers to the I/O modules
26
043505766 4/2006
www.barr-thorp.com
3
At a Glance
Overview
What's in this
Chapter?
Page
28
30
33
27
043505766 4/2006
www.barr-thorp.com
A PLC automatically translates symbolic ladder elements and function blocks into
database nodes that are stored on page 0 in system memory. A node in ladder logic
is a 16- or 24-bit word an element such as a contact translates into one database
node, while an instruction such as an ADD block translates into three database
nodes. The database format differs for 16-bit and 24-bit nodes.
16-bit Node Format
The five most significant bits in a 16-bit node and the eight most significant bits in a
24-bit node the x bits are reserved for opcodes . An opcode defines the type
of functional element associated with the node for example, the code 01000
specifies that the node is a normally open contact, and the code 11010 specifies that
the node is the third of three nodes in a multiplication function block.
Translating
Logic Elements
and Non-DX
Functions
When the system is translating standard ladder logic elements and non-DX function
blocks, it uses the remaining (y and z) bits as pointers to register or bit locations in
State RAM associated with the discretes or registers used in your ladder logic
program. With a 16-bit node, 11 bits are available as state RAM pointers, giving you
a total addressing capability of 2048 words. The maximum number of configurable
registers in most 16-bit machines is 1920, with the balance occupied by up to 128
words (2048 bits) of discrete reference, disable, and history bits. An exception is the
984-680/-685 PLCs, which have an extended registers option that supports 4096
registers in state RAM. With a 24-bit node, 16 bits are available as state RAM
pointers. The maximum number of configurable registers in a 24-bit machine is
9999. Opcodes are generally expressed by their hex values.
Opcode Definition
00
01
02
03
04
Start of a network
05
I/O exchange/End-of-Logic
06
Null Element
07
Horizontal short
08
N.O. contact
28
043505766 4/2006
www.barr-thorp.com
Opcode Definition
09
N.C. contact
0A
P.T. contact
0B
N.T. contact
0C
Normal coil
0D
0E
0F
10
11
Register reference
12
13
DCTR instruction
14
UCTR instruction
15
T1.0 instruction
16
T0.1 instruction
17
T.01 instruction
18
ADD instruction
19
SUB instruction
1A
MULT instruction
1B
DIV instruction
31
AD16 instruction
32
SU16 instruction
33
MU16 instruction
34
DV16 instruction
35
TEST instruction
36
ITOF instruction
37
FTOI instruction
5E
PID2 instruction
7F
EMTH instruction
9F
BLKT instruction
BE
LAB instruction
BF
DE
DF
TBLK instruction
FE
RET instruction
29
043505766 4/2006
www.barr-thorp.com
When you are using a 16-bit CPU, you are left with only four more x-bit combinations
111000, 11101, 11110 and 11111 with which to express opcodes for the DX
instructions. To gain the necessary bit values, the system uses the three least
significant (Z) bits along with the x bits to express the opcodes.
R
T
T
T
R
T
BLKM
FIN
FOUT
SRCH
STAT
AND
OR
CMPR
SENS
MBIT
COMP
XOR
BROT
READ
WRIT
30
043505766 4/2006
www.barr-thorp.com
In the 24-bit CPUs, the three most significant x bits are used to incicate the type of
DX function. The z bits which simply echo the three most significant x bits, may be
ignored in the 24-bit nodes.
R
T
T
T
R
T
BLKM
FIN
FOUT
SRCH
STAT
AND
OR
CMPR
SENS
MBIT
COMP
XOR
BROT
READ
WRIT
31
043505766 4/2006
www.barr-thorp.com
Opcodes for
Standard DX
Instructions
Opcode
Definition
1c
R->T instruction
3C
T->R instruction
5C
T->T instruction
7C
BLKM instruction
9C
FIN Instruction
BC
FOUT Instruction
DC
SRCH Instruction
FC
STAT Instruction
20
DIOH Instruction
1D
AND Instruction
3D
OR Instruction
5D
CMPR Instruction
7D
SENS Instruction
9D
MBIT Instruction
BD
COMP Instruction
DD
XOR Instruction
FD
BROT Instruction
1E
READ Instruction
3E
WRIT Instruction
7E
XMIT Instruction
9E
XMRD Instruction
51
IBKR
52
IBKW
Note: These opcodes are hard-coded in the appropriate system firmware, and they
cannot be altered.
The y bits in a database node holding DX function data contain a binary number that
expresses the number of registers being transferred in the function. A 16-bit
database node has 8 y bits. A 16-bit CPU is, therefore, machine limited to no more
than 255 transfer registers per DX operation.A 24-bit database node has 13 y bits.
A 24-bit CPU is, therefore, capable of reaching a theoretical machine limit of 8191
transfer registers per DX operation; practically, however, the greatest number of
transfer registers allowed in a 24-bit DX operation is 999.
32
043505766 4/2006
www.barr-thorp.com
How to
Handle Opcode
Operations
Various ladder logic instructions are available only in loadable software packages.
When instructions are loaded to a controller, they are stored in RAM on page 0 in
system memory. They are not resident on the EPROM. The loadable functions have
the following opcodes.
Opcode
Definition
FF
HSBY instruction
SF
1F
MBUS instruction
3F
PEER instruction
DE
DMTH instruction
BE
FE
DRUM instruction
7F
ICMP instruction
Note: No two instructions with the same opcode can coexist on a PLC.
The easiest way to stay out of trouble is to never employ two loadables with
conflicting opcodes in your user logic. If you are using MODSOFT panel software, it
allows you to change the opcodes for loadable instructions. The lodutil utility in the
Modicon Custom Loadable Software package (SW-AP98-GDA) also allows you to
change loadable opcodes.
WARNING
If you modify any loadables so that their opcodes are different from the ones shown
in this chapter, you must use caution when porting user logic to or from your
controller. The opcode conflicts that can result may hang up the target controller or
cause the wrong function blocks to be executed in ladder logic.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
33
043505766 4/2006
www.barr-thorp.com
34
043505766 4/2006
www.barr-thorp.com
Instructions
4
Parameter Assignment of Instuctions
General
Parameter
Assignment
Inputs
Operation
Nodes
Outputs
e.g. DV16
Top input
Middle input
top node
middle node
Bottom input
DV16
Top output
Middle output
Bottom output
bottom node
35
043505766 4/2006
www.barr-thorp.com
Instructions
Operation
The nodes and in- and outputs determines what the operation will be executed with.
36
043505766 4/2006
www.barr-thorp.com
Instruction Groups
5
At a Glance
Introduction
What's in this
Chapter?
Page
Instruction Groups
38
ASCII Functions
39
40
41
Loadable DX
42
Math Instructions
43
Matrix Instructions
45
Miscellaneous
46
Move Instructions
47
Skips/Specials
48
Special Instructions
49
50
37
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Instruction Groups
General
38
043505766 4/2006
www.barr-thorp.com
Instruction Groups
ASCII Functions
ASCII Functions
Meaning
Compact
Momentum
Atrium
READ
yes
no
no
no
WRIT
yes
no
no
no
PLCs that support ASCII messaging use instructions called READ and WRIT to
handle the sending of messages to display devices and the receiving of messages
from input devices. These instructions provide the routines necessary for
communication between the ASCII message table in the PLCs system memory and
an interface module at the Remote I/O drops.
For further information, see p. 83.
39
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Meaning
Compact
Momentum
Atrium
UCTR
yes
yes
yes
DCTR
yes
yes
yes
yes
T1.0
yes
yes
yes
yes
T0.1
yes
yes
yes
yes
T.01
yes
yes
yes
yes
T1MS
yes
yes
(See note.)
yes
yes
Note: The T1MS instruction is available only on the B984-102, the Micro 311, 411,
512, and 612, and the Quantum 424 02.
40
043505766 4/2006
www.barr-thorp.com
Instruction Groups
The following instructions are designed for a variety of functions known generally as
fast I/O updating.
Instruction Meaning
Momentum Atrium
BMDI
yes
yes
no
yes
ID
Disable interrupt
yes
yes
no
yes
IE
Enable interrupt
yes
yes
no
yes
IMIO
yes
yes
no
yes
IMOD
yes
no
no
yes
ITMR
no
yes
no
yes
41
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Loadable DX
Loadable DX
Compact
Momentum Atrium
CHS
yes
no
no
no
DRUM
DRUM sequenzer
yes
yes
no
yes
ESI
yes
no
no
no
EUCA
yes
yes
no
yes
HLTH
yes
yes
no
yes
ICMP
Input comparison
yes
yes
no
yes
MAP3
MAP 3 Transaction
no
no
no
no
MBUS
MBUS Transaction
no
no
no
no
MRTM
Multi-register transfer
module
yes
yes
no
yes
NOL
yes
no
no
no
PEER
PEER Transaction
no
no
no
no
XMIT
yes
yes
yes
no
42
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Math Instructions
Math
Instructions
Two groups of instructions that support basic math operations are available. The first
group comprises four integer-based instructions: ADD, SUB, MUL and DIV.
The second group contains five comparable instructions, AD16, SU16, TEST,
MU16 and DV16, that support signed and unsigned 16-bit math calculations
and comparisons.
Three additional instructions, ITOF, FTOI and BCD, are provided to convert the
formats of numerical values (from integer to floating point, floating point to integer,
binary to BCD and BCD to binary). Conversion operations are usful in
expanded math.
Integer Based
Instructions
Comparable
Instructions
Meaning
Compact
Momentum
Atrium
ADD
Addition
yes
yes
yes
yes
DIV
Division
yes
yes
yes
yes
MUL
Multiplication
yes
yes
yes
yes
SUB
Subtraction
yes
yes
yes
yes
Meaning
Compact
Momentum
Atrium
AD16
Add 16 bit
yes
yes
yes
yes
DV16
Divide 16 bit
yes
yes
yes
yes
MU16
Multiply 16 bit
yes
yes
yes
yes
SU16
Subtract 16 bit
yes
yes
yes
yes
TEST
Test of 2 values
yes
yes
yes
yes
43
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Format
Conversion
BCD
yes
yes
yes
yes
FTOI
yes
yes
yes
yes
ITOF
Conversion from i
nteger to floating point
yes
yes
yes
yes
44
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Matrix Instructions
Matrix
Instructions
Meaning
Compact
Momentum
Atrium
AND
Logical AND
yes
yes
yes
yes
BROT
Bit rotate
yes
yes
yes
yes
CMPR
Compare register
yes
yes
yes
yes
COMP
yes
yes
yes
MBIT
Modify bit
yes
yes
yes
yes
NBIT
Bit control
yes
yes
no
yes
NCBT
yes
yes
no
yes
NOBT
yes
yes
no
yes
OR
Logical OR
yes
yes
yes
yes
RBIT
Reset bit
yes
yes
no
yes
SBIT
Set bit
yes
yes
no
yes
SENS
Sense
yes
yes
yes
yes
XOR
Exclusive OR
yes
yes
yes
yes
45
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Miscellaneous
Miscellaneous
Meaning
Compact
Momentum
Atrium
yes
yes
yes
yes
CKSM
Check sum
DLOG
yes
no
no
EMTH
yes
yes
yes
LOAD
Load flash
yes
yes
(CPU
434 12/
534 14 only)
yes
(CCC
960 x0/
980 x0 only)
no
MSTR
Master
yes
yes
yes
SAVE
Save flash
yes
yes
(CPU
434 12/
534 14 only)
yes
(CCC
960 x0/
980 x0 only)
no
SCIF
Sequential control
interfaces
yes
yes
no
yes
XMRD
yes
no
no
yes
XMWT
yes
no
no
yes
yes
46
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Move Instructions
Move
Instructions
Compact
Momentum
Atrium
BLKM
Block move
yes
yes
yes
yes
BLKT
yes
yes
yes
yes
FIN
First in
yes
yes
yes
yes
FOUT
First out
yes
yes
yes
yes
IBKR
yes
yes
no
yes
IBKW
yes
yes
no
yes
RoT
yes
yes
yes
yes
SRCH
Search table
yes
yes
yes
yes
ToR
yes
yes
yes
yes
ToT
yes
yes
yes
yes
TBLK
yes
yes
yes
yes
47
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Skips/Specials
Skips/Specials
DANGER
Inputs and outputs that normally effect control may be unintentionally
skipped (or not skipped).
SKP is a dangerous instruction that should be used carefully. If inputs and outputs
that normally effect control are unintentionally skipped (or not skipped), the result
can create hazardous conditions for personnel and application equipment.
Failure to follow this instruction will result in death or serious injury.
This group provides the following instructions.
Instruction
Meaning
Compact
Momentum
Atrium
JSR
Jump to subroutine
yes
yes
yes
yes
LAB
yes
yes
yes
yes
RET
yes
yes
yes
SKPC
Skip (constant)
yes
yes
yes
yes
SKPR
Skip (register)
yes
yes
yes
yes
48
043505766 4/2006
www.barr-thorp.com
Instruction Groups
Special Instructions
Special
Instructions
These instructions are used in special situations to measure statistical events on the
overall logic system or create special loop control situations.
This group provides the following instructions.
Instruction Meaning
DIOH
yes
no
no
yes
PCFL
yes
yes
no
yes
PID2
yes
yes
yes
STAT
Status
yes
yes
yes
yes
49
043505766 4/2006
www.barr-thorp.com
Instruction Groups
50
043505766 4/2006
www.barr-thorp.com
Equation Networks
6
At a Glance
Overview
Equation network is a departure from standard ladder logic. Instead of using a twoor three-high function block configuration, this instruction takes a ladder logic
network and uses it as an editor where you can compose a complex equation using
algebraic notation. It allows you to use standard math operators such as +, -, *, /, as
well as conditional and logical expressions. It also lets you specify variables and
constants as necessary and group expressions in nested layers of parentheses.
The power of an equation network is its ability to deal with complexity in a clear and
efficient way. An equation composed in a single equation network might require
many networks of standard ladder logic to produce the same result. An equation
network can also be read and understood by other users without the need for
detailed annotation, as is often required when standard ladder logic is used for
complex calculations.
What's in this
Chapter?
Page
52
55
59
64
66
68
Benchmark Performance
69
51
043505766 4/2006
www.barr-thorp.com
Equation Networks
An equation network provides an easy way to program complex math functions, with
values stored in register locations. Equations in an equation network are presented
in a regular, left-to-right format, technically known as infix notation. You program
equation networks and set its enable contact and output coil(s) in the Equation
Network Editor.
Equation networks were introduced in Quantum Rev. 2 controllers; not all controllers
support equation networks. The easiest way to see if your controller supports
equation networks is by trying to create a new one; if your controller doesnt support
it, the equation network option on the right-click Insert menu wont be available.
Note: Controllers do not allow blank equation networks. Since ProWORX 32 allows
blank equation networks, please note that they will not be saved to the controller.
Creating an
Equation
Network
Using the
Equation
Network
Step
Action
In the Network Navigator panel, click the network where you want to insert the
equation network.
Step
Action
In the Properties panel, click the Input Type field, and select an input type
from the list.
Set the register address for the output coils. You can enter either the direct address
(in X:Y numeric format) or a symbolic address. You can also insert addresses from
the Symbols panel, Used Register Address table, and the Descriptor Summary. See
below for coil descriptions.
52
043505766 4/2006
www.barr-thorp.com
Equation Networks
Coil Descriptions
Enter a 0x reference.
Coil
Description
Solved OK
< Coil
Result < 0 is set when the equation result is less than zero.
= Coil
> Coil
Result > 0 is set when the equation result is greater than zero.
Error Coil
The error coil is set when errors have occurred while solving the equation.
While online, if the error coil receives power, an error message will appear
under the coil describing the error (see p. 53).
Note: If you dont want to use a particular output coil, leave the address for that coil
blank (or erase one already typed in). That coil will not be included in the
equation network.
Error Coil
Messages
Setting up an
Enable Contact
Error Message
Meaning
Invalid operation
Overflow
Underflow
Divide by 0
Invalid operation
with boolean data
An equation networks enable contact, when set, activates the equation network. If
an enable contact passes current, the equation network will be solved. You change
settings for the enable contact in the Enable Editor display.
To select a type for the enable contact, select the symbol of the enable contact that
corresponds with your chosen type. An enable contact can be a normally-open
contact, normally-closed contact, horizontal short, or a horizontal open.
To select a register address for the enable contact, in the Enable Contact address
field, type the direct address (in X:Y numeric format) or symbolic address for the
enable contact coil. This field is only available if the enable contact type is a
normally-open or normally closed contact.
53
043505766 4/2006
www.barr-thorp.com
Equation Networks
Equation
Network Content
a variable contained in 1 or 2 4x registers. It may be a signed or unsigned 16bit short integer, a signed or unsigned 32-bit long integer, or a floating point
number.
algebraic
a syntactically correct construction of variable and/or constant data, standard
expression is algebraic operators, and/or functions. Parentheses can be used to define the
order in which the expression is evaluated and indicate arguments to
functions within the expression.
Equation
Network Size
An equation network can contain a maximum of 81 words, which are used according
to the following rules:
Each...
Consumes....
enabling input
1 word
1 word
no words
output coil
1 word
1 word
1 word
1 word
short integer
1 word
2 words
2 words
54
043505766 4/2006
www.barr-thorp.com
Equation Networks
Equation elements appear in specific formats. Operations and functions each have
their own format. Also, for each value, you must specify what kind of value it is
(register address, constant or symbol) and its data type (signed integer, unsigned
integer, etc.).
Equation Values
and Data Types
Each value can refer to a constant, register address or symbol. The Equation
Network Editor determines which data type the value is, based on the
following format.
Format
Meaning
Example
Register address
40001
Prefixed by #
Constant
#123
Symbol
HEIGHT
The actual data type of a value is determined by its suffix, as shown in the
following table:
Suffix
Data Type
Applies to
Boolean (binary)
Constants, 1x, or 0x
Constants, 3x, or 4x
Constants, 3x, or 4x
Constants, 3x, or 4x
UL
Constants, 3x, or 4x
Constants, 3x, or 4x
Typically, youd first indicate the register address where the calculated result is to be
stored, followed by an equal sign (the assignment operator), followed by the
calculation itself. For example:
40001 = 40002U + COS(40003UL) * #+1.35E-4F / HEIGHTL
z
z
z
z
z
55
043505766 4/2006
www.barr-thorp.com
Equation Networks
Variable Data
Registers Consumed
Boolean
0x or 1x
One
N/A
3x or 4x
One
One
3x or 4x
One
One
3x or 4x
One
Two
One
Two
One
Two
3x or 4x
Note: When contiguous 3x or 4x registers are used for 32-bit long integers, the
value still consumes only one word in the equation network.
Note: When 3x or 4x registers are used for a floating point number, the value
requires one word for complete definition.
56
043505766 4/2006
www.barr-thorp.com
Equation Networks
Entering Variable
Data in an
Equation
Network
then . .
without a suffix,
Constant Data
Constants can also be used to specify data in an equation network. Long (32-bit)
constants and floating point constants always require two words. The least
significant byte (LSB) is always in the first of the two words. Both words must have
the same data type.
Data Type
Boolean
One
0, 1
One
One
0 ... 65,535
Two
Two
0 ... 4,294,967,295
Two
57
043505766 4/2006
www.barr-thorp.com
Equation Networks
Entering
Constant Data in
an Equation
Network
A constant is prefaced with a # sign and appended with a data type suffix (See
p. 55). All constant values are in decimal format. Hexadecimal values are not
allowed in ProWORX.
If you enter a constant in an equation network without a suffix, it is assumed to a
signed short integer. For example, the entries #-3574 and #-3574S are equivalent.
A boolean constant must have the suffix B. The only two valid boolean constants are
#0B and #1B. No other values are legal boolean constants.
Exponential
Notation
The default data type is unsigned 16-bit integer. So, since the above value is a
fraction (and therefore must be a floating point number), it would have to appear as
#+1.35E-4F.
With no data type suffix, numbers in exponential notation are assumed to be
integers. For example, #+1.35E+2 represents the unsigned 16-bit integer value 135.
Exponential notation is particularly useful for very large integers.
58
043505766 4/2006
www.barr-thorp.com
Equation Networks
The following table lists the mathematical operations you can include in
your equation:
Type
Operator
Result
=
Assignment operator
The assignment operator = is used to assign a
storage place for the results of the equation. All
equations will use the assignment operator. The
format is:
ADDRESS = EXPRESSION
Where ADDRESS is a valid register address and
EXPRESSION is a valid value or expression
assigned to the address.
Assignment
Unary operator
Unary means single, so unary operators are
used on only one value. The unary operator is
~
placed just before the value or expression to
which it is applied. For example, -(30002) returns
-1 times the number stored at address 30002.
Exponentiation operator
**
Takes values to a specified power. 40001**3
returns the (integer) value stored at 40001, taken
to the third power.
Exponentiation
Arithmetic operator
These require two values, one before and one
after the operator. These values can be any valid
expression. For example, #4 * 40003 results in
four multiplied by the value stored at address
40003.
Multiplication
Division
Addition
Subtraction
59
043505766 4/2006
www.barr-thorp.com
Equation Networks
Type
Operator
Result
Bitwise operator
Bitwise operators work on binary (base 2)
representations of values.
&
Relational operator
These operators perform a comparison between
two values or expressions. The result is always
true (1) or false (0). For example, #35 <= #42
evaluates to 1 (true). Relational operators are
used in Conditional expressions.
Conditional operator
See below for details.
>>
<
Less than.
<=
Equal to.
<>
=>
>
Greater than.
?:
Used in conditional
expression.
Parentheses
()
Used to set precedence in solving equations. To
make sure certain operations are solved before
others, enclose those operations in parentheses.
60
043505766 4/2006
www.barr-thorp.com
Equation Networks
How an Equation
Network
Resolves an
Equation
An equation network calculates its result in one of two ways, depending on the
operator types used in the expression.
Single Expression
Evaluate a single expression and execute it by copying the derived value to the
result register.
Conditional Expression
Evaluate the validity of the first of three arguments in a conditional expression and
execute it by copying the value from either the second or third argument in the
conditional expression to the result register.
If the expression being evaluated contains only some combination of unary,
exponentiation, mathematical, and/or logical bitwise operators, it is treated as a
single argument and is solved via single expression. For example, in the equation
400001 = (#16 ** #2 - #5) * #7
the square of 16 (256( minus 5 (251) is multiplied by 7, and the result (1,757) is
copied to register 400001.
If you use one or more of the six relational operators shown in the previous table,
you create the first of three arguments that comprise a conditional expression. The
conditional operators must be used to create then/else arguments in the expression,
and conditional expression is used to execute the result. For example, in the
equation
400001 = 400002 >= #100 ? 300001 : 300002
the value in register 400002 is evaluated to see if it is greater than or equal to 100.
This is the first argument in the conditional expression. If the value is greater than or
equal to 100, the second argument is executed and the value in register 300001 is
copied to register 400001. It is less than 100, the third argument is executed and the
value in register 300002 is copied to register 400001
61
043505766 4/2006
www.barr-thorp.com
Equation Networks
Operator
Precedence
In a string of data types and operators, the order or precedence in the expression
determines the order in which operations will be evaluated. Review the
following examples:
#
Equation
Comments
400001 = 300001F **
300002F * 300003 +
300004 & 300005 >
300006 ? 300007 :
300008
62
043505766 4/2006
www.barr-thorp.com
Equation Networks
Using
Parentheses in
an Equation
Network
Expression
Nested
Parentheses
You can alter the order in which an expression is evaluated by enclosing portions of
the expression in parentheses. Parenthetical portions of the expressions are
evaluated before portions outside the parentheses. Notice how the following
expressions are evaluated with and without parentheses:
#
Equation
Comments
When multiple levels of parenthetical data are nested in an expression, the most
deeply nested parenthetical data is evaluated first. An equation network permits up
to 10 nested levels of parentheses in an expression.
For example, the order in which the second expression above is evaluated can be
seen more clearly when parentheses are used.
300002U > ( 300003U & ( 300004U + ( 300005U * ( 300006F ** 300007F ) ) ) ) ?
300008 : 300009
Entering
Parentheses in
an Equation
Network
Equation network will echo back to you the expression as you enter it. It does not
prevent you from entering additional levels of parentheses even when they may not
be necessary to make the expression syntactically correct. For example, in
the expression
( ( ( ( 300004U + 300005U ) ) ) ) / 300006U
equation network maintains the four nested level of parentheses in the expression
even when only one set of parentheses may be needed.
Note: The expression must have an equal and balanced number of open and
closed parentheses in order to compile properly. If it does not, a compiler error will
be generated and the equation network will not function.
Each pair of open and closed parentheses consumes two words in the
equation network.
63
043505766 4/2006
www.barr-thorp.com
Equation Networks
The following table lists the pre-defined math functions you can include in your
equation. Each of these functions takes one argument enclosed in brackets
following the function name. The argument can be any valid value or expression. For
example, COS(#35+40001) returns the cosine of 35 plus the number stored at
address 40001. In this table, X refers to a functions argument (as in COS(X)).
Entering
Functions in an
Equation
Network
Function
Description
ABS(S)
ARCCOS(X)
ARCSIN(X)
ARCTAN(X)
COS(X)
Cosine of X radians.
COSD(X)
Cosine of X degrees.
EXP(X)
FIX(X)
FLOAT(X)
LN(X)
LOG(X)
SIN(X)
Sine of X radians.
SIND(X)
Sine of X degrees.
SQRT(X)
Square root of X.
TAN(X)
Tangent of X radians.
TAND(X)
Tangent of X degrees.
A function must be entered with its argument in the following form in the equation
network expression:
function name ( argument )
where the function name is one of those listed in the table above and the argument
is entered in parentheses immediately after the function name. The argument may
be entered as:
z one or more unary operations
z one or more exponential operations
z one or more multiplication/division operations
z oneo or more addition/subtraction operations
z one or more logical operations
z one or more relational operations
z any legal combination of the above operations
64
043505766 4/2006
www.barr-thorp.com
Equation Networks
For example, if you want to calculate the absolute value of the sine of the number in
FP register 400025 and place the result in FP register 400015, enter the following in
the equation network:
400015F = ABS (SIN (400025F))
See p. 59 for more details about these operations.
Limits on the
Argument to a
Function
Argument
Range
ABS
FP value
ARCCOS
FP value
ARCSIN
FP value
ARCTAN
FP value
COS
FP value
COSD
FP value
EXP
FP value
FIX
FP value
FLOAT
FP value
LN
FP value
LOG
FP value
SIN
FP value
SIND
FP value
SQRT
FP value
TAN
FP value
TAND
FP value
65
043505766 4/2006
www.barr-thorp.com
Equation Networks
66
043505766 4/2006
www.barr-thorp.com
Equation Networks
z
z
z
z
z
z
z
z
67
043505766 4/2006
www.barr-thorp.com
Equation Networks
Equation networks can be executed by Quantum PLCs like the 140 CPU 424 02 and
140 CPU 213 04, which have on-board math coprocessors, as well as by the 140
CPU 113 02 and 03 PLCs, which do not have math coprocessors. Quantum PLCs
without math coprocessors use a 32-bit processing mechanism within the PLC itself
to handle floating point calculations, and they can produce results that are less
accurate than those produced by the 80-bit math coprocessor.
Differences in accuracy can be noticed starting in the sixth position to the right of the
decimal point. For example, the 140 CPU 424 02 and 213 04 will calculate the
equation
401010F = SIN(#45)
and produces the result 0.8509035, whereas the 140 CPU 113 02/03 will handle the
same equation and produce the result 0.8509022.
For applications that require accuracy beyond the 5th decimal position, a Quantum
PLC with a math coprocessor is recommended. Generally, if your application does
not require this kind of accuracy, a PLC without a math coprocessor may be
acceptable.
Another potential consideration is the effect of less accurate calculation on a
truncated result. For example, a PLC with a math coprocessor will calculate the
tangent of 225 degrees
401015F = TAND(#225)
as 1, whereas a PLC without a math coprocessor will produce the result 0.999991.
If we were to assign the TAND operation to a non-floating point register, equation
network will truncate the result so that
401040 = TAND(#225)
will produce a result of 1 when the math coprocessor is used but a result of 0 when
the coprocessor is not used.
68
043505766 4/2006
www.barr-thorp.com
Equation Networks
Benchmark Performance
Benchmark
Performance
6
5
No Logic
EMTH Logic
Equation Network
4
3
2
1
0
CPU1130x
CPU21304 CPU42402
Note: The equation network approach provides a more accurate result than the
interpolated math implemented in EMTH operations.
Note: Equation network operations yield even better performance versus EMTH
operations as the equations become more complex.
69
043505766 4/2006
www.barr-thorp.com
Equation Networks
70
043505766 4/2006
www.barr-thorp.com
At a Glance
Introduction
In this chapter you will find general information about configuring closed loop control
and using analog values.
What's in this
Chapter?
Page
72
PCFL Subfunctions
73
A PID Example
77
80
71
043505766 4/2006
www.barr-thorp.com
An analog closed loop control system is one in which the deviation from an ideal
process condition is measured, analyzed and adjusted in an attempt to obtain and
maintain zero error in the process condition. Provided with the Enhanced Instruction
Set is a proportional-integral-derivative function block called PID2, which allows you
to establish closed loop (or negative feedback) control in ladder logic.
Definition of Set
Point and
Process Variable
The desired (zero error) control point, which you will define in the PID2 block, is
called the set point (SP). The conditional measurement taken against SP is called
the process variable (PV). The difference between the SP and the PV is the
deviation or error (E). E is fed into a control calculation that produces a manipulated
variable (Mv) used to adjust the process so that PV = SP (and, therefore, E = 0).
Control
End Device
PV
Process
Process
Transmitter
Mv
(Output)
Control
Calculation
PV (Input)
E
SP
72
043505766 4/2006
www.barr-thorp.com
PCFL Subfunctions
General
The PCFL instruction gives you access to a library of process control functions
utilizing analog values.
PCFL operations fall into three major categories.
z Advanced Calculations
z Signal Processing
z Regulatory Control
Advanced
Calculations
Advanced calculations are used for general mathematical purposes and are not
limited to process control applications. With advanced calculations, you can create
custom signal processing algorithms, derive states of the controlled process, derive
statistical measures of the process, etc.
Simple math routines have already been offered in the EMTH instruction. The
calculation capability included in PCFL is a textual equation calculator for writing
custom equations instead of programming a series of math operations one by one.
Signal
Processing
Signal processing functions are used to manipulate process and derived process
signals. They can do this in a variety of ways; they linearize, filter, delay and
otherwise modify a signal. This category would include functions such as an Analog
Input/Output, Limiters, Lead/Lag and Ramp generators.
Regulatory
Control
Explanation of
Formula
Elements
YP
YI
YD
Bias
BT
SP
Set point
73
043505766 4/2006
www.barr-thorp.com
General
Equations
KP
Proportional gain
Dt
TI
TD
TD1
XD
XD_1
Process input
X_1
Condition /Requirement
Y = YP + YI + YD + BIAS
Integral bit ON
Y = YP + YD + BIAS + BT
Y high d Y d Y low
High/low limits
with
Proportional
Calculations
XD = SP X r GRZ u 1 KGRZ
Gain reduction
XD = SP X
Condition /Requirement
YP = KP u XD
Proportional bit ON
YP = 0
Integral
Calculation
Condition /Requirement
't XD_1 + XD
YI = YI + KP u ------ u -----------------------------2
TI
Integral bit ON
YI = 0
74
043505766 4/2006
www.barr-thorp.com
Derivative
Calculation
Condition /Requirement
DXD = X_1 X
Base derivative or PV
DXD = XD X_1
TD1 u YD + TD u KP u DXD
YD = ------------------------------------------------------------------------------------'t + TD1
Derivative bit ON
YD = 0
75
043505766 4/2006
www.barr-thorp.com
Structure
Diagram
CONTROL DEVIATION
Anti-Windup-Reset
a)
PROPORTIONAL
GAIN
SET POINT
SP
0
1
1 = INTEGRAL ON
- GAIN
1
0
CONTROL
INPUT
b)
c)
1 = DERIVATIVE ON
1
0
X(n)
0 = base Derivative on XD
1 = base Derivative on X
1 = PROPORTION ON
a)
INTEGRAL
TI
OPERATING
MODES
Anti-Windup-Limits
+
HIGH
b)
LOW
P+I+D
DERVATIVE
TD
Manual
Automatic
Halt
CONTROL
OUTPUT
Y (n)
Contributions
c)
SUMMING
JUNCTION
MODE SELECT
76
043505766 4/2006
www.barr-thorp.com
A PID Example
Description
This example illustrates how a typical PID loop could be configured using PCFL
function PID. The calculation begins with the AIN function, which takes raw input
simulated to cause the output to run between approximately 20 and 22 when the
engineering unit scale is set to 0 ... 100.
LL984 Ladder Diagram
#3
AIN
LKUP
RAMP
MODE
PID
AOUT
400100
400120
400160
400190
400200
400250
PCFL
PCFL
PCFL
PCFL
PCFL
PCFL
# 14
# 39
# 14
#8
# 44
#9
400112
400157
400172
400196
400242
400120
400200
400190
400206
400250
BLKM
BLKM
BLKM
BLKM
BLKM
#2
#2
#2
#2
#2
000100
T0.1
000100
400185
The process variable over time should look something like this.
Process Variable Value
22
20
Time
77
043505766 4/2006
www.barr-thorp.com
Main PID
Ladder Logic
The AIN output is block moved to the LKUP function, which is used to scale the input
signal. We do this because the input sensor is not likely to produce highly linear
readings; the result is an ideal linear signal.
7 Points Defined
In Look Up table
100
*
*
80
*
60
50
Linearized Signal
40
Actual Input
20
0
Input
20 40
50 60 80 100
The look-up table output is block moved to the PID function. RAMP is used to control
the rise (or fall) of the set point for the PID controller with regard to the rate of ramp
and the solution interval. In this example, the set point is established in another logic
section to simulate a remote setting. The MODE function is placed after the RAMP
so that we can switch between the RAMP-generated set point or a manual value.
Simulated
Process
The PID function is actually controlling the process simulated by this logic [value in
400100: 878(Dec)].
LLAG
LLAG
DELAY
AOUT
400260
400280
400300
400340
PCFL
PCFL
PCFL
PCFL
# 20
# 20
# 32
#9
400242
400278
400298
400330
400348
400260
400280
400300
400340
400100
BLKM
BLKM
BLKM
BLKM
BLKM
#1
#1
#1
#1
#1
#3
000103
T0.1
000103
400188
000103
78
043505766 4/2006
www.barr-thorp.com
The process simulator is comprised of two LLAG functions that act as a filter and
input to a DELAY queue that is also a PCFL function block. This arrangement is the
equivalent of a second-order process with dead time.
The solution intervals for the LLAG filters do not affect the process dynamics and
were chosen to give fast updates. The solution interval for the DELAY queue is set
at 1000 ms with a delay of 5 intervals,i.e. 5 s. The LLAG filters each have lead terms
of 4 s and lag terms of 10 s. The gain for each is 1.0.
In process control terms the transfer function can be expressed as:
5S
The PID controller is tuned to control this process at 20.0, using the Ziegler-Nichols
tuning method. The resulting controller gain is 2.16, equivalent to a proportional
band of 46.3%.
The integral time is set at 12.5 s/repeat (4.8 repeats/ min). The derivative time is
initially 3 s, then reduced to 0.3 s to de-emphasize the derivative effect.
An AOUT function is used after the PID. It conditions the PID control output by
scaling the signal back to an integer for use as the control value.
The entire control loop is preceded by a 0.1 s timer. The target solution interval for
the entire loop is 1 s, and the full solve is 1 s. However, the nontime-dependent
functions that are used (AIN, LKUP, MODE, and AOUT) do not need to be solved
every scan. To reduce the scan time impact, these functions are scheduled to solve
less frequently. The example has a loop solve every 3 s, reducing the average scan
time dramatically.
Note: It is still important to be aware of the maximum scan impact. When
programming other loops, you will not want all of the loops to solve on the
same scan.
79
043505766 4/2006
www.barr-thorp.com
Here is a simplified P&I diagram for an inlet separator in a gas processing plant.
There is a two-phase inlet stream: liquid and gas.
Vent
Blowdown
Inlet Vent
Plant
Inlet
FCV
Inlet Block
LT
1
LSH
1
LC
1
Gas
PV-1
LSL
1
LV
I/P
1
FC
Condensate
The liquid is dumped from the tank to maintain a constant level. The control objective
is to maintain a constant level in the separator. The phases must be separated
before processing; separation is the role of the inlet separator, PV-1. If the level
controller, LC-1, fails to perform its job, the inlet separator could fill, causing liquids
to get into the gas stream; this could severely damage devices such as
gas compressors.
80
043505766 4/2006
www.barr-thorp.com
Ladder Logic
Diagram
400102
#0
#0
SUB
SUB
400113
400500
400100
000101
000102
400200
PID2
000103
# 30
The first SUB block is used to move the analog input from LT-1 to the PID2 analog
input register, 40113. The second SUB block is used to move the PID2 output Mv to
the I/O mapped output I/P-1. Coil 00101 is used to change the loop from AUTO to
MANUAL mode, if desired. For AUTO mode, it should be ON.
Register Content
Specify the set point in mm for input scaling (E.U.). The full input range will be 0 ...
4000 mm (for 0 ... 4095 raw analog). Specify the register content of the top node in
the PID2 block as follows.
Register
Content
Numeric
400100
Content
Meaning
Comments
Scaled PV (mm)
400101
2000
Scaled SP (mm)
400102
0000
400103
3500
400104
1000
400105
0100
PB (%)
81
043505766 4/2006
www.barr-thorp.com
Register
Content
Numeric
Content
Meaning
Comments
400106
0500
Integral constant
(5.00 repeats/
min)
400107
0000
Rate time
Setting this to 0 turns off the derivative mode
constant (per min)
400108
0000
400109
4095
400110
0000
400111
4000
High engineering
range (mm)
400112
0000
Low engineering
range (mm)
Raw analog
measure
(0 ... 4095)
400113
400114
0000
Offset to loop
counter register
400115
0000
400116
0102
Pointer to reset
feedback
400117
4095
400118
0000
400119
0015
400120
0000
Pointer to track
input
The values in the registers in the 400200 destination block are all set by
the PID2 block.
82
043505766 4/2006
www.barr-thorp.com
At a Glance
Introduction
In this chapter you will find general information about formatting messages for ASCII
READ/WRIT operations.
What's in this
Chapter?
Page
84
Format Specifiers
85
88
83
043505766 4/2006
www.barr-thorp.com
The ASCII messages used in the READ and WRIT instructions can be created via
your panel software using the format specifiers described below. Format specifiers
are character symbols that indicate:
z The ASCII characters used in the message
z Register content displayed in ASCII character format
z Register content displayed in hexadecimal format
z Register content displayed in integer format
z Subroutine calls to execute other message formats
Overview Format
Specifiers
Meaning
" "
Space indicator
()
Integer
Leading zeros
Alphanumeric
Octal
Binary
Hexadecimal
84
043505766 4/2006
www.barr-thorp.com
Format Specifiers
Format
Specifier /
Format
Specifier " "
Format
Specifier
None (defaults to 1)
Prefix
None (defaults to 1)
Input format
Output format
Outputs CR, LF
Prefix
None
Input format
Output format
Prefix
None (defaults to 1)
Input format
Output format Outputs number of upper and/or lower case printable characters specified by
the field width
Format
Specifier X
Space indicator, e.g., 14X indicates 14 spaces left open from the point where the
specifier occurs.
Field width
None (defaults to 1)
Prefix
1 ... 99 spaces
Input format
Output format
85
043505766 4/2006
www.barr-thorp.com
Format
Specifier ( )
Format
Specifier I
Repeat contents of the parentheses, e.g., 2 (4X, I5) says repeat 4X, I5
two times
Field width
None
Prefix
1 ... 255
Input format
Output format
1 ... 8 characters
Prefix
1 ... 99
Input format
Accepts ASCII characters 0 ... 9. If the field width is not satisfied, the most
significant characters in the field are padded with zeros
Output format Outputs ASCII characters 0 ... 9. If the field width is not satisfied, the most
significant characters in the field are padded with zeros. The overflow field
consists of asterisks.
Format
Specifier L
1 ... 8 characters
Prefix
1 ... 99
Input format
Accepts ASCII characters 0 ... 9. If the field width is not satisfied, the most
significant characters in the field are padded with zeros
Output format Outputs ASCII characters 0 ... 9. If the field width is not satisfied, the most
significant characters in the field are padded with zeros. The overflow field
consists of asterisks.
Format
Specifier A
None (defaults to 1)
Prefix
1 ... 99
Input format
Accepts any 8-bit character except reserved delimiters such as CR, LF,
ESC, BKSPC, DEL.
Output format
86
043505766 4/2006
www.barr-thorp.com
Format
Specifier O
Format
Specifier B
Format
Specifier H
1 ... 6 characters
Prefix
1 ... 99
Input format
Accepts ASCII characters 0 ... 7. If the field width is not satisfied, the most
significant characters are padded with zeros.
Output format
Outputs ASCII characters 0 ... 7. If the field width is not satisfied, the most
significant characters are padded with zeros. No overflow indicators.
1 ... 16 characters
Prefix
1 ... 99
Input format
Accepts ASCII characters 0 and 1. If the field width is not satisfied, the most
significant characters are padded with zeros.
Output format
Outputs ASCII characters 0 and 1. If the field width is not satisfied, the most
significant characters are padded with zeros. No overflow indicators.
1 ... 4 characters
Prefix
1 ... 99
Input format
Accepts ASCII characters 0 ... 9 and A ... F. If the field width is not satisfied,
the most significant characters are padded with zeros.
Output format Outputs ASCII characters 0 ... 9 and A ... F. If the field width is not satisfied,
the most significant characters are padded with zeros. No overflow
indicators.
87
043505766 4/2006
www.barr-thorp.com
To control and monitor the signals used in the messaging communication, specify
code 1002 in the first register of the control block (the register displayed in the top
node). Via this format, you can control the RTS and CTS lines on the port
used for messaging.
Note: In this format, only the local port can be used for messaging, i.e., a parent
PLC cannot monitor or control the signals on a child port. Therefore, the port
number specified in the fifth implied node of the control block must always be 1.
The first three registers in the data block (the displayed register and the first and
second implied registers in the middle node) have predetermined content.
Register
Content
Displayed
First implied
These three data block registers are required for this format, and therefore the
allowable range for the length value (specified in the bottom node) is 3 ... 255.
Control
Mask Word
Usage of word:
1
Bit
Function
2 - 15
Not used
16
1 = control RTS
0 = do not control RTS
10
11
12
13
14
15
88
16
043505766 4/2006
www.barr-thorp.com
Control Data
Word
Usage of word:
1
Status Word
Bit
Function
1 = take port
0 = return port
2 - 15
Not used
16
1 = activate RTS
0 = deactivate RTS
10
11
12
13
14
15
16
10
11
12
13
14
15
16
Usage of word:
1
Bit
Function
1 = port taken
3 - 13
Not used
14
1 = DSR ON
15
1 = CTS ON
16
1 = RTS ON
89
043505766 4/2006
www.barr-thorp.com
90
043505766 4/2006
www.barr-thorp.com
9
At a Glance
Introduction
In this chapter you will find information about Coils, Contacts, and Interconnects,
also called Shorts. Details of all the elements in the Ladder Logic Instruction Set
appear in an alphabetical listing.
What's in this
Chapter?
Page
Coils
92
Contacts
94
Interconnects (Shorts)
96
91
043505766 4/2006
www.barr-thorp.com
Coils
Definition
of Coils
A coil is a discrete output that is turned ON and OFF by power flow in the logic
program. A single coil is tied to a 0x reference in the PLCs state RAM. Because
output values are updated in state RAM by the PLC, a coil may be used internally in
the logic program or externally via the I/O map to a discrete output unit in the control
system. When a coil is ON, it either passes power to a discrete output circuit or
changes the state of an internal relay contact in state RAM.
There are two types of coils.
A normal coil
z A memory-retentive, or latched, coil
z
92
043505766 4/2006
www.barr-thorp.com
Normal Coil
WARNING
Forcing of Coils
When a discrete input (1x) is disabled, signals from its associated input field device
have no control over its ON/OFF state. When a discrete output (0x) is disabled, the
PLCs logic scan has no control over the ON/OFF state of the output. When a
discrete input or output has been disabled, you can change its current ON/OFF
state with the Force command.
There is an important exception when you disable coils. Data move and data matrix
instructions that use coils in their destination node recognize the current ON/OFF
state of all coils in that node, whether they are disabled or not. If you are expecting
a disabled coil to remain disabled in such an instruction, you may cause
unexpected or undesirable effects in your application.
When a coil or relay contact has been disabled, you can change its state using the
Force ON or Force OFF command. If a coil or relay is enabled, it cannot be forced.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
Retentive Coil
If a retentive (latched) coil is energized when the PLC loses power, the coil will come
back up in the same state for one scan when the PLCs power is restored.
To define a discrete reference for the coil, select it in the editor and click to open a
dialog box called Retentative coil (latch).
Symbol
L
93
043505766 4/2006
www.barr-thorp.com
Contacts
Definition of
Contacts
Contacts are used to pass or inhibit power flow in a ladder logic program. They are
discrete, i.e., each consumes one I/O point in ladder logic. A single contact can be
tied to a 0x or 1x reference number in the PLCs state RAM, in which case each
contact consumes one node in a ladder network.
Four kinds of contacts are available.
normally open (N.O.) contacts
z normally closed (N.C.) contacts
z positive transitional (P.T.) contacts
z negative transitional (N.T.) contacts
z
Contact
Normally Open
Contact
Normally Closed
Contact Pos
Trans
A positive transitional (PT) contact passes power for only one scan as it transitions
from OFF to ON.
To define a discrete reference for the PT contact, select it in the editor and click to
open a dialog called Positive transition contact.
Symbol
94
043505766 4/2006
www.barr-thorp.com
Contact Neg
Trans
A negative transitional (NT) contact passes power for only one scan as it transitions
from ON to OFF.
To define a discrete reference for the NT contact, select it in the editor and click to
open a dialog called Contact negative transition .
Symbol
95
043505766 4/2006
www.barr-thorp.com
Interconnects (Shorts)
Definition of
Interconnects
(Shorts)
Horizontal Short
Vertical Short
Symbol
96
043505766 4/2006
www.barr-thorp.com
Interrupt Handling
10
Interrupt Handling
Interrupt-related
Performance
Interrupt
Latency Time
The following table shows the minimum and maximum interrupt latency times you
can expect.
ITMR overhead
No work to do
60 ms/ms
Response time
Minimum
98 ms
155 ms
The PLC uses the following rules to choose which interrupt handler to execute in the
event that multiple interrupts are received simultaneously.
z An interrupt generated by an interrupt module has a higher priority than an
interrupt generated by a timer.
z Interrupts from modules in lower slots of the local backplane have priority over
interrupts from modules in the higher slots.
If the PLC is executing an interrupt handler subroutine when a higher priority
interrupt is received, the current interrupt handler is completed before the new
interrupt handler is begun.
97
043505766 4/2006
www.barr-thorp.com
Interrupt Handling
Instructions that
Cannot Be Used
in an Interrupt
Handler
Interrupt with
BMDI/ID/IE
Three interrupt mask/unmask control instructions are available to help protect data
in both the normal (scheduled) ladder logic and the (unscheduled) interrupt handling
subroutine logic. These are the Interrupt Disable (ID) instruction, the Interrupt
Enable (IE) instruction, and the Block Move with Interrupts Disabled
(BMDI) instruction.
An interrupt that is executed in the timeframe after an ID instruction has been solved
and before the next IE instruction has been solved is buffered. The execution of a
buffered interrupt takes place at the time the IE instruction is solved. If two or more
interrupts of the same type occur between the ID ... IE solve, the mask interrupt
overrun error bit is set, and the subroutine initiated by the interrupts is executed
only one time
The BMDI instruction can be used to mask both a timer-generated and local I/Ogenerated interrupts, perform a single block data move, then unmask the interrupts.
It allows for the exchange of a block of data either within the subroutine or at one or
more places in the scheduled logic program.
BMDI instructions can be used to reduce the time between the disable and enable
of interrupts. For example, BMDI instructions can be used to protect the data used
by the interrupt handler when the data is updated or read by Modbus, Modbus Plus,
Peer Cop or Distributed I/O (DIO).
98
043505766 4/2006
www.barr-thorp.com
Subroutine Handling
11
Subroutine Handling
JSR / LAB
Method
The example below shows a series of three user logic networks, the last of which is
used for an up-counting subroutine. Segment 32 has been removed from the orderof-solve table in the segment scheduler.
Scheduled Logic Flow
Segment 001
Network 00001
Subroutine Segment
Segment 032
Network 00001
Network 00002
10001
00001
JSR
00001
LAB
00001
40256
40256
00001
ADD
40256
40256
SUB
40256
RET
00001
40256
00010
SUB
40999
00001
JSR
00001
Segment 002
Network 00001
99
043505766 4/2006
www.barr-thorp.com
Subroutine Handling
When input 100001 to the JSR block in network 2 of segment 1 transitions from OFF
to ON, the logic scan jumps to subroutine #1 in network 1 of segment 32.
The subroutine will internally loop on itself ten times, counted by the ADD block. The
first nine loops end with the JSR block in the subroutine (network 1 of segment 32)
sending the scan back to the LAB block. Upon completion of the tenth loop, the RET
block sends the logic scan back to the scheduled logic at the JSR node in network
2 of segment 1.
100
043505766 4/2006
www.barr-thorp.com
Installation of DX Loadables
12
Installation of DX Loadables
How to install the
DX Loadables
The DX loadable instructions are only available if you have installed them. With the
installation of the Concept software, DX loadables are located on your hard disk.
Now you have to unpack and install the loadables you want to use as follows.
Step
Action
Press the command button Unpack... to open the standard Windows dialog box
Unpack Loadable File where the multifile loadables (DX loadables) can be
selected. Select the loadable file you need, click the button OK and it is inserted into
the list box Available:.
Now press the command button Install=> to install the loadable selected in the
list box Available:. The installed loadable will be displayed in the list box
Installed:.
Press the command button Edit... to open the dialog box Loadable
Instruction Configuration. Change the opcode if necessary or accept the
default. You can assign an opcode to the loadable in the list box Opcode in order
to enable user program access through this code. An opcode that is already
assigned to a loadable, will be identified by a *. Click the button OK.
101
043505766 4/2006
www.barr-thorp.com
Installation of DX Loadables
102
043505766 4/2006
www.barr-thorp.com
Instruction Descriptions (A to D)
II
At a Glance
Introduction
What's in this
Part?
Chapter Name
Page
13
105
14
AD16: Ad 16 Bit
109
15
ADD: Addition
113
16
117
17
123
18
127
19
131
20
135
21
139
22
143
23
CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block
151
24
157
25
163
26
167
27
Coils
171
28
175
29
179
30
Contacts
185
31
189
32
193
33
203
103
043505766 4/2006
www.barr-thorp.com
Instruction Descriptions (A to D)
Chapter
Chapter Name
Page
34
207
35
213
36
DIV: Divide
217
37
223
38
229
39
237
40
243
104
043505766 4/2006
www.barr-thorp.com
13
At A Glance
Introduction
What's in this
Chapter?
Page
106
107
105
043505766 4/2006
www.barr-thorp.com
The Input Simulation instruction provides a simple method to simulate 1xxxx and
3xxx input data values. This block is similar to a Block Move, the BLKM instruction.
When the Control Input receives power, the source table is copied to the destination
(input) table.
106
043505766 4/2006
www.barr-thorp.com
ACTIVE
destination
table
source table
1X3X
Table length: 1 - 100
Parameter
Description
length
Data Type
Top input
0x, 1x
None
destination table
(top node)
1x, 3x
INT
source table
(middle node
4x
INT
Contains source to be
moved to destination
INT
None
length
(bottom node
Top output
0x
Meaning
107
043505766 4/2006
www.barr-thorp.com
108
043505766 4/2006
www.barr-thorp.com
AD16: Ad 16 Bit
14
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
110
111
109
043505766 4/2006
www.barr-thorp.com
AD16: Ad 16 Bit
Short Description
Function
Description
The AD16 instruction performs signed or unsigned 16-bit addition on value 1 (its top
node) and value 2 (its middle node), then posts the sum in a 4x holding register in
the bottom node.
110
043505766 4/2006
www.barr-thorp.com
AD16: Ad 16 Bit
SUCCESSFUL COMPLETION
value 1
Max. Value
65535
value 2
Max. Value
65535
SIGNED VALUE
OVERFLOW
unsigned = 65535
signed = 32767 or < -32768
AD16
sum
Parameter
Description
State RAM
Reference
Data Type
Meaning
Top input
0x, 1x
None
Bottom input
0x, 1x
None
ON = signed operation
OFF = unsigned operation
value 1
(top node)
3x, 4x
INT, UINT
value 2
(middle node)
3x, 4x
INT, UINT
sum
(bottom node)
4x
INT, UINT
Top output
0x
None
Bottom output
0x
None
111
043505766 4/2006
www.barr-thorp.com
AD16: Ad 16 Bit
112
043505766 4/2006
www.barr-thorp.com
ADD: Addition
15
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
114
115
113
043505766 4/2006
www.barr-thorp.com
ADD: Addition
Short Description
Function
Description
The ADD instruction adds unsigned value 1 (its top node) to unsigned value 2 (its
middle node) and stores the sum in a holding register in the bottom node.
114
043505766 4/2006
www.barr-thorp.com
ADD: Addition
OVER FLOW
value 1
value 2
ADD
sum
Parameter
Description
Data Type
Meaning
Top input
0x, 1x
None
value 1
(top node)
3x, 4x
INT, UINT
value 2
(middle node)
3x, 4x
INT, UINT
sum
(bottom node)
4x
INT, UINT
Sum
Top output
0x
None
115
043505766 4/2006
www.barr-thorp.com
ADD: Addition
116
043505766 4/2006
www.barr-thorp.com
16
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
118
119
Parameter Description
121
117
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The AND instruction performs a Boolean AND operation on the bit patterns in the
source and destination matrices.
The ANDed bit pattern is then posted in the destination matrix, overwriting its
previous contents.
source
bits
AND
AND
AND
AND
destination
bits
WARNING
Overriding of any disabled coils within the destination matrix without
enabling them.
AND will override any disabled coils within the destination matrix without enabling
them.This can cause personal injury if a coil has disabled an operation for
maintenance or repair because the coils state can be changed by the AND
operation.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
118
043505766 4/2006
www.barr-thorp.com
ACTIVE
source
matrix
destination
matrix
AND
length
Parameter
Description
Meaning
Top input
0x, 1x
None
Initiates AND
source matrix
(top node)
BOOL,
WORD
destination matrix
(middle node)
0x, 4x
BOOL,
WORD
INT, UINT
None
length
(bottom node)
Top output
0x
119
043505766 4/2006
www.barr-thorp.com
An AND Example
When contact 10001 passes power, the source matrix formed by the bit pattern in
registers 40600 and 40601 is ANDed with the destination matrix formed by the bit
pattern in registers 40604 and 40605. The ANDed bits are then copied into registers
40604 and 40605, overwriting the previous bit pattern in the destination matrix.
source matrix
40600 = 1111111100000000 40601 = 1111111100000000
40600
10001
40604
AND
00002
Note: If you want to retain the original destination bit pattern of registers 40604 and
40605, copy the information into another table using the BLKM instruction before
performing the AND operation.
120
043505766 4/2006
www.barr-thorp.com
Parameter Description
Matrix Length
(Bottom Node)
The integer entered in the bottom node specifies the matrix length, i.e. the number
of registers or 16-bit words in the two matrices. The matrix length can be in the range
1 ... 100. A length of 2 indicates that 32 bits in each matrix will be ANDed.
121
043505766 4/2006
www.barr-thorp.com
122
043505766 4/2006
www.barr-thorp.com
17
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
124
125
123
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The BCD instruction can be used to convert a binary value to a binary coded decimal
(BCD) value or a BCD value to a binary value. The type of conversion to be
performed is controlled by the state of the bottom input.
124
043505766 4/2006
www.barr-thorp.com
ACTIVE
source
register
destination
register
BINARY/BCD
ERROR
BCD
On = BCD to Binary
Off = Binary to BCD
Parameter
Description
#1
Top input
0x, 1x
None
ON = enable conversion
Bottom input
0x, 1x
None
source
register
(top node)
3x, 4x
INT, UINT
destination
register
(middle node)
4x
INT, UINT
INT, UINT
#1
(bottom node)
Top output
0x
None
Bottom output
0x
None
125
043505766 4/2006
www.barr-thorp.com
126
043505766 4/2006
www.barr-thorp.com
18
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
128
129
127
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The BLKM (block move) instruction copies the entire contents of a source table to a
destination table in one scan.
WARNING
Overriding of any disabled coils within a destination table without
enabling them.
BLKM will override any disabled coils within a destination table without enabling
them. This can cause injury if a coil has been disabled for repair or maintenance
because the coils state can change as a result of the BLKM instruction.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
128
043505766 4/2006
www.barr-thorp.com
ACTIVE
source
table
destination
table
BLKM
Parameter
Description
table length
Top input
0x, 1x
None
source table
(top node)
ANY_BIT
destination
0x, 4x
table
(middle node)
ANY_BIT
table length
(bottom node)
INT, UINT
Table size (number of registers or 16bit words) for both the source and
destination tables; they are of equal
length. Range: 1 ... 100.
None
Top output
0x
129
043505766 4/2006
www.barr-thorp.com
130
043505766 4/2006
www.barr-thorp.com
19
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
132
133
Parameter Description
134
131
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The BLKT (block-to-table) instruction combines the functions of RoT and BLKM in
a single instruction. In one scan, it can copy data from a source block to a destination
block in a table. The source block is of a fixed length. The block within the table is of
the same length, but the overall length of the table is limited only by the number of
registers in your system configuration.
WARNING
All the 4x registers in your PLC can be corrupted with data copied from the
source block.
BLKT is a powerful instruction that can corrupt all the 4x registers in your PLC with
data copied from the source block. You should use external logic in conjunction
with the middle or bottom input to confine the value in the pointer to a safe range.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
132
043505766 4/2006
www.barr-thorp.com
MOVE COMPLETE
source
block
HOLD POINTER
ERROR
pointer
RESET POINTER
BLKT
Parameter
Description
block length
Data Type
Meaning
Top input
0x, 1x
None
middle input
0x, 1x
None
ON = hold pointer
bottom input
0x, 1x
None
source block
(top node)
4x
BYTE,
WORD
pointer
(middle node)
4x
BYTE,
WORD
INT, UINT
block length
(bottom node)
Top output
0x
None
ON = operation successful
Middle output
0x
None
133
043505766 4/2006
www.barr-thorp.com
Parameter Description
Middle and
Bottom Input
The middle and bottom input can be used to control the pointer so that source data
is not copied into registers that are needed for other purposes in the logic program.
When the middle input is ON, the value in the pointer register is frozen while the
BLKT operation continues. This causes new data being copied to the destination to
overwrite the block data copied on the previous scan.
When the bottom input is ON, the value in the pointer register is reset to zero. This
causes the BLKT operation to copy source data into the first block of registers in the
destination table.
Pointer (Middle
Node)
The 4x register entered in the middle node is the pointer to the destination table. The
first register in the destination table is the next contiguous register after the pointer,
e.g. if the pointer register is 400107, then the first register in the destination table is
400108.
Note: The destination table is segmented into a series of register blocks, each of
which is the same length as the source block. Therefore, the size of the destination
table is a multiple of the length of the source block, but its overall size is not
specifically defined in the instruction. If left uncontrolled, the destination table could
consume all the 4x registers available in the PLC configuration.
The value stored in the pointer register indicates where in the destination table the
source data will begin to be copied. This value specifies the block number within the
destination table.
134
043505766 4/2006
www.barr-thorp.com
20
At a Glance
Introduction
What's in this
Chapter?
Page
136
137
135
043505766 4/2006
www.barr-thorp.com
The BMDI instruction masks the interrupt, initiates a block move (BLKM) operation,
then unmasks the interrupts.
136
043505766 4/2006
www.barr-thorp.com
ACTIVE
source
table
destination
table
BMDI
Parameter
Description
table length
Data Type
Meaning
Top input
0x, 1x
None
source table
(top node)
INT, UINT,
WORD
destination
table
(middle node)
0x, 4x
INT, UINT,
WORD
INT, UINT
None
table length
(bottom node)
Top output
0x
137
043505766 4/2006
www.barr-thorp.com
138
043505766 4/2006
www.barr-thorp.com
21
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
140
141
Parameter Description
142
139
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The BROT (bit rotate) instruction shifts the bit pattern in a source matrix, then posts
the shifted bit pattern in a destination matrix. The bit pattern shifts left or right by one
position per scan.
WARNING
Overriding of any disabled coils within a destination matrix without
enabling them.
BROT will override any disabled coils within a destination matrix without enabling
them. This can cause injury if a coil has been disabled for repair or maintenance if
BROT unexpectedly changes the coils state.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
140
043505766 4/2006
www.barr-thorp.com
ACTIVE
source
matrix
DIRECTION (LEFT/RIGHT)
destination
matrix
SHIFT/ROTATE
BROT
Parameter
Description
length
Top input
0x, 1x
None
Middle input
0x, 1x
None
Bottom input
0x, 1x
None
source matrix
(top node)
ANY_BIT
destination matrix
(middle node)
0x, 4x
ANY_BIT
Top output
0x
None
Middle output
0x
None
043505766 4/2006
www.barr-thorp.com
Parameter Description
Matrix Length
(Bottom Node)
The integer value entered in the bottom node specifies the matrix length, i.e. the
number of registers or 16-bit words in each of the two matrices. The source matrix
and destination matrix have the same length. The matrix length can range from 1 ...
100, e.g. a matrix length of 100 indicates 1600 bit locations.
Result of the
Shift (Middle
Output)
The middle output indicates the sense of the bit that exits the source matrix (the
leftmost or rightmost bit) as a result of the shift.
142
043505766 4/2006
www.barr-thorp.com
22
AT A GLANCE
Introduction
What's in this
Chapter?
Page
144
145
148
143
043505766 4/2006
www.barr-thorp.com
The two MSBs of the top register are the Copro# in a multiple Copro system.
144
043505766 4/2006
www.barr-thorp.com
The content in this section applies specifically to the Immediate DX function of the
CALL instruction.
Symbol
COMPLETE
function
code
source
code
SCAN CALL
ERROR
CALL
Length: 1 - 255
length
145
043505766 4/2006
www.barr-thorp.com
Parameter
Description
Data Type
Meaning
Top input
0x, 1x
None
Bottom input
0x, 1x
None
value
(top node)
0x, 3x
INT, UINT
register
(middle node)
4x
length
(bottom node)
INT, UINT
INT, UINT
Top output
0x
None
Bottom output
0x
None
146
043505766 4/2006
www.barr-thorp.com
Immediate DX
Functions
Code
Function
f_config
500
f_2md_fl
501
f_fl_2md
502
f_4md_fl
503
f_fl_4md
504
f_1md_fl
505
f_fl_1m
506
f_exp
507
Exponential function.
f_log
508
Natural logarithm.
f_log10
509
Base 10 logarithm.
f_pow
510
Raise to a power.
f_sqrt
511
Square root.
f_cos
512
Cosine.
f_sin
513
Sine.
f_tan
514
Tangent.
f_atan
515
Arc tangent x.
f_atan2
516
f_asin
517
Arc sine.
f_acos
518
Arc cosine.
f_add
519
Add.
f_sub
520
Subtract.
f_mult
521
Multiply.
f_div
522
Divide.
f_deg_rad
523
f_rad_deg
524
f_swap
525
f_comp
526
f_dbwrite
527
f_dbread
528
147
043505766 4/2006
www.barr-thorp.com
The content in this section applies specifically to the Deferred DX function of the
CALL instruction.
Symbol
COMPLETE
function
code
DEFERRED DX MODE
SELECTED
ACTIVE
source
table
ERROR
CALL
Length: 1 - 255
length
148
043505766 4/2006
www.barr-thorp.com
Parameter
Description
Meaning
Top input
0x, 1x
None
Middle input
0x, 1x
None
value
(top node)
0x, 3x
INT, UINT
register
4x
(middle node)
INT, UINT
length
(bottom node)
INT, UINT
Top output
0x
None
Middle output
0x
None
Bottom output 0x
None
149
043505766 4/2006
www.barr-thorp.com
Deferred DX
Functions
Code
Function
f_config
500
f_d_dbwr
501
f_d_dbrd
502
f_dgets
515
f_dputs
516
f_sprintf
518
f_sscanf
519
f_egets
520
f_eputs
521
f_ectl
522
150
043505766 4/2006
www.barr-thorp.com
23
At A Glance
Introduction
What's in this
Chapter?
Page
Short Description: CANT - Interpret Coils, Contacts, Timers, Counters, and the
SUB Block
152
153
154
151
043505766 4/2006
www.barr-thorp.com
CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block
152
043505766 4/2006
www.barr-thorp.com
register #
ACTION CONTACT 2
data
register
ACTION CONTACT 1
CANT
delay
Parameter
Description
State RAM
Reference
Data Type
Meaning
Top input
0x, 1x
None
Action Contact 3
Please see the Note below.
Middle input
0x, 1x
None
Action Contact 2
Please see the Note below.
Bottom input
0x, 1x
None
Action Contact 1
Please see the Note below.
register #
top node
4x
INT, UINT
data register
middle node
4x
INT, UINT
INT, UINT
delay
bottom node
Note: When any of the above inputs are activated the CANT function block begins
to solve the routine. The bottom node specifies a delay time in 10ms increments
that the block uses to delay the start of the solve routine.
153
043505766 4/2006
www.barr-thorp.com
CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block
4x + 01
4x + 02
4x + 03
4x + 04
4x + 05
4x + 06
Rung #1:
Hi Byte = node state
Lo Byte = node type (opcode from node database)
4x + 07
4x + 08
4x + 09
4x + 10
4x + 11
4x + 12
4x + 13
4x + 14
4x + 15
Rung #5 Refer to 4x + 07
4x + 16
4x + 17
4x + 18
4x + 19
154
043505766 4/2006
www.barr-thorp.com
Programming
Each network can only contain one COIL and one CANT block, which must be
located in Column 10, Row 5. Column 9 of the BOTTOM rung contains the Power
Input for the triggers (Action Contacts) to the CANT block, which will provide more
space for your ladder logic programming.
Note: This is not at the top of the block as it usually is with DX blocks.
In any of the available row positions 5, 6 or 7 you may have up to 3 triggers which
must be a transitional type of either [P] or [N]. The CANT block node number will
default to 22 (hexadecimal) and not be changed.
Ladder
Node Setup
Row #6
][
()
4xxxx
4xxxx
CANT
1
]P[
]P[
Row #7
]P[
155
043505766 4/2006
www.barr-thorp.com
CANT - Interpret Coils, Contacts, Timers, Counters, and the SUB Block
MSTR Write
Data Setup
The purpose of the MSTR block is to send the 20 4x CANT registers to a PC based
"Action Monitor" program. This transmittal of registers is done using either MB+ or
an Ethernet TCP/IP Modbus.
Below is an example:
MSTR Statistics Control Registers
Register
Value
Description
400121
400122
400123
20
400124
40001
400125
22
400126
MB+ routing
400127
MB+ routing
400128
MB+ routing
400129
MB+ routing
Note: It is necessary to program a MSTR block for each receiving (PC) address if
you want to transmit data to more than one PC running "Action Monitor".
MSTR Setup
MSTR Setup
40121
40001
MSTR
20
20 registers to be
written out
]P[
1530
-()1530
156
043505766 4/2006
www.barr-thorp.com
24
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
158
159
Detailed Description
160
157
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
Note: This instruction is only available if you have unpacked and installed the DX
Loadables. For further information, see p. 101."
The logic in the CHS loadable is the engine that drives the Hot Standby capability in
a Quantum PLC system. Unlike the HSBY instruction, the use of the CHS instruction
in the ladder logic program is optional. However, the loadable software itself
must be installed in the Quantum PLC in order for a Hot Standby system to
be implemented.
158
043505766 4/2006
www.barr-thorp.com
ACTIVE
command
register
ERROR
COMMAND REGISTER
non transfer
area
ENABLE NON
TRANSFER AREA
Length: 4 - 8000 registers
Parameter
Description
CHS
length
Top input
0x, 1x
None
Middle input
0x, 1x
None
Bottom input
0x, 1x
None
command
register
(top node)
4x
nontransfer
area
(middle
node)
4x
0x
None
Middle output 0x
None
Bottom
output
None
length
(bottom
node)
Top output
0x
159
043505766 4/2006
www.barr-thorp.com
Detailed Description
Hot Standby
System
Configuration
via the CHS
Instruction
Program the CHS instruction in network 1, segment 1 of your ladder logic program
and unconditionally connect the top input to the power rail via a horizontal short (as
the HSBY instruction is programmed in a 984 Hot Standby system).
This method is particularly useful if you are porting Hot Standby code from a 984
application to a Quantum application. The structure of the CHS instruction is almost
exactly the same as the HSBY instruction. You simply remove the HSBY instruction
from the 984 ladder logic and replace it with a CHS instruction in the Quantum logic.
If you are using the CHS instruction in ladder logic, the only difference between it
and the HSBY instruction is the use of the bottom output. This output senses
whether or not method 2 has been used. If the Hot Standby configuration extension
screens have been used to define the Hot Standby configuration, the configuration
parameters in the screens will override any different parameters defined by the CHS
instruction at system startup.
For detailes discussion of the issues related to the configuration extension
capabilities of a Quantum Hot Standby system, refer to the Modicon Quantum Hot
Standby System Planning and Installation Guide.
Parameter
Description
Execute Hot
Standby
(Top Input)
When the CHS instruction is inserted in ladder logic to control the Hot Standby
configuration parameters, its top input must be connected directly to the power rail
by a horizontal short. No control logic, such as contacts, should be placed between
the rail and the input to the top node.
WARNING
Erratic behavior in the Hot Standby system
Although it is legal to enable and disable the nontransfer area while the Hot
Standby system is running, we strongly discourage this practice. It can lead to
erratic behavior in the Hot Standby system.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
160
043505766 4/2006
www.barr-thorp.com
Parameter
Description
Command
Register
(Top Node)
The 4x register entered in the top node is the Hot Standby command register; eight
bits in this register are used to configure and control Hot Standby system
parameters:
Usage of command word:
1
10
11
12
13
Bit
Function
1-5
Not used
9 - 11
Not used
12
13
14
15
16
14
15
16
Note: The Hot Standby command register must be outside of the nontransfer area
of state RAM.
161
043505766 4/2006
www.barr-thorp.com
Parameter
Description
Nontransfer Area
(Middle Node)
The 4x register entered in the middle node is the first register in the nontransfer area
of state RAM. The nontransfer area must contain at least four registers, the first
three of which have a predefined usage:
Register
Content
Displayed and first implied Reverse transfer registers for passing information from the
standby to the primary PLC
Second implied
10
11
12
13
14
15
16
Bit
Function
3 - 10
Not used
11
12
13 - 14
15 - 16
162
043505766 4/2006
www.barr-thorp.com
25
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
164
165
Parameter Description
166
163
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
Several PLCs that do not support Modbus Plus come with a standard checksum
(CKSM) instruction. CKSM has the same opcode as the MSTR instruction and is not
provided in executive firmware for PLCs that support Modbus Plus.
164
043505766 4/2006
www.barr-thorp.com
source
CHECKSUM COMPLETED
CKSM SELECT
1
result/count
CKSM SELECT
2
CKSM
Parameter
Description
length
State RAM
Reference
Top input
0x, 1x
None
Middle input
0x,1x
None
Bottom input
0x, 1x
None
CKSM select 2
(For expanded and detailed information please
see p. 166.)
source
(top node)
4x
INT, UINT
result/count
4x
(middle node)
INT, UINT
length
(bottom node)
INT
0x
None
Middle output 0x
None
Top output
165
043505766 4/2006
www.barr-thorp.com
Parameter Description
Inputs
Result / Count
(Middle Node)
The states of the inputs indicate the type of checksum calculation to be performed:
CKSM Calculation
Top Input
Middle Input
Bottom Input
Straight Check
ON
OFF
ON
ON
ON
CRC-16
ON
ON
OFF
LRC
ON
OFF
OFF
The 4x register entered in the middle node is the first of two contiguous 4x registers:
Register
Content
Displayed
First implied Posts a value that specifies the number of registers selected from the source
table as input to the calculation. The value posted in the implied register must
be d length of source table.
166
043505766 4/2006
www.barr-thorp.com
26
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
168
169
Parameter Description
170
167
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The CMPR instruction compares the bit pattern in matrix a against the bit pattern in
matrix b for miscompares. In a single scan, the two matrices are compared bit
position by bit position until a miscompare is found or the end of the matrices is
reached (without miscompares).
168
043505766 4/2006
www.barr-thorp.com
ACTIVE
matrix a
First register or
discrete address
of matrix
RESET POINTER
MISCOMPARE
pointer register
(matrix b)
STATE OF MISCOMPARE
CMPR
Parameter
Description
length
Top input
0x, 1x
None
Middle input
0x, 1x
None
matrix a
(top node)
ANY_BIT
pointer register
(middle node)
4x
WORD
length
(bottom node)
Top output
0x
None
Middle output
0x
None
ON = miscompare detected
Bottom output
0x
None
ON = miscompared bit in
matrix a is 1
OFF = miscompared bit in
matrix a is 0
169
043505766 4/2006
www.barr-thorp.com
Parameter Description
Pointer Register
(Middle Node)
The pointer register entered in the middle node must be a 4x holding register. It is
the pointer to matrix b, the other matrix to be compared. The first register in matrix
b is the next contiguous 4x register following the pointer register.
The value stored inside the pointer register increments with each bit position in the
two matrices that is being compared. As bit position 1 in matrix a and matrix b is
compared, the pointer register contains a value of 1; as bit position 2 in the matrices
are compared, the pointer value increments to 2; etc.
When the outputs signal a miscompare, you can check the accumulated count in the
pointer register to determine the bit position in the matrices of the miscompare.
Matrix Length
(Bottom Node)
The integer value entered in the bottom node specifies a length of the two matrices,
i.e. the number of registers or 16-bit words in each matrix. (Matrix a and matrix b
have the same length.) The matrix length can range from 1 ... 100, i.e. a length of 2
indicates that matrix a and matrix b contain 32 bits.
170
043505766 4/2006
www.barr-thorp.com
Coils
27
At A Glance
Introduction
What's in this
Chapter?
Page
172
173
171
043505766 4/2006
www.barr-thorp.com
Coils
Coil Types
A coil is a discrete output that is turned ON and OFF by power flow in the logic
program. A single coil is tied to a 0xxxx reference in the PLCs state RAM. Because
output values are updated in state RAM by the PLC, a coil may be used internally in
the logic program or externally via the I/O map to a discrete output unit in the control
system. When a coil is ON, it either passes power to a discrete output circuit or
changes the state of an internal relay contact in state RAM.
There are two types of coils:
Normal coil -( )A normal or non-retentive or normal coil looses state when power to controller
is lost.
When power is removed from a PLC, a normal coil will be turned OFF. Once
power is restored, the coil will always be in the OFF state on the first logic scan.
z Memory-retentive or latched coil -(M)- or -(L)A memory-retentive or latched coil does NOT loose state when power to
controller is lost.
If a memory-retentive (or latched) coil is ON at the time a PLC loses power, the
coil will come back up in an ON state when power is restored. The coil will
maintain that ON state for the first logic scan, and then the logic program will
take control.
z
Coils are referenced as 0xxxx. They may be disabled and forced ON or OFF.
Disabling a coil stops the user programmed logic from changing the state of the coil.
Note: Disabled Coils used as destinations in DX function blocks may have their
state overwritten by the function.
172
043505766 4/2006
www.barr-thorp.com
Coils
Enable/Disable
Capabilities for
Discrete Values
Via panel software, you may disable a logic coil or a discrete input in your
logic program.
A disable condition will cause the following:
z Input field device to have no control over its assigned 1x logic
z Logic to have no control over the disable 9x value
Memory protection in the PLC must be OFF before you disable or enable a coil or a
discrete input.
Note: There is an important exception that you need to be aware of when disabling
coils: Data transfer functions allow coils in their destination nodes to recognize the
current ON/OFF state of ALL coils, whether those coils are disabled or not, and
this recognition causes the logic to respond accordinglymaybe producing
unexpected and undesirable effects.
If you are expecting a disabled coil to remain disabled in the DX function, your
application may experience unexpected and undesirable effects.
Forcing
Discretes
ON and OFF
Most panel software also provides FORCE ON and FORCE OFF capabilities. When
a coil or discrete input is disabled, you can change its state from OFF to ON with
FORCE ON, and from ON to OFF with FORCE OFF.
When a coil or discrete input is enabled, it cannot be forced ON or OFF.
173
043505766 4/2006
www.barr-thorp.com
Coils
174
043505766 4/2006
www.barr-thorp.com
COMM - ASCII
Communications Function
28
At A Glance
Introduction
What's in this
Chapter?
Page
176
177
175
043505766 4/2006
www.barr-thorp.com
176
043505766 4/2006
www.barr-thorp.com
ACTIVE
control
block
ERROR
Source for writes/
Destination for reads
data
block
ABORT
SUCCESS
COMM
Parameter
Description
length
(3 ... 255)
Top input
0x, 1x
None
Bottom input
0x, 1x
None
control block
(top node)
4x
data block
4x
(middle node)
177
043505766 4/2006
www.barr-thorp.com
Parameters
length
(bottom node)
Register
Usage Table
(Top output)
0x
None
Middle output
0x
None
Bottom output 0x
None
ON = operation complete
(for one scan).
This table details the register usage for the top node.
Register
Usage
4xxxx + 0
Operation Code
4xxxx + 1
Error Status
4xxxx + 2
4xxxx + 3
4xxxx + 4
Reserved
4xxxx + 5
Port Number (1 for local, 2 for child #1, 3 for child #2, etc.
4xxxx + 6
Reserved
4xxxx + 7
Reserved
4xxxx + 8
Reserved
4xxxx + 9
178
043505766 4/2006
www.barr-thorp.com
29
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
180
181
Parameter Description
183
179
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The COMP instruction complements the bit pattern, i.e. changes all 0s to 1s and all
1s to 0s, of a source matrix, then copies the complemented bit pattern into a
destination matrix. The entire COMP operation is accomplished in one scan.
WARNING
Overriding of any disabled coils in the destination matrix without
enabling them.
COMP will override any disabled coils in the destination matrix without enabling
them. This can cause injury if a coil has been disabled for repair or maintenance
because the coils state can be changed by the COMP operation.
Failure to follow this instruction can result in death, serious injury, or
equipment damage.
180
043505766 4/2006
www.barr-thorp.com
ACTIVE
source
First register or
discrete address
of matrix
destination
First register or
discrete address
of matrix
COMP
Parameter
Description
length
Meaning
Top input
0x, 1x
None
source
(top node)
ANY_BIT
destination
0x, 4x
(middle node)
ANY_BIT
length
(bottom node)
INT, UINT
None
Top output
0x
181
043505766 4/2006
www.barr-thorp.com
A COMP
Example
When contact 10001 passes power, the bit pattern in the source matrix (registers
40600 and 40601) is complemented, then the complemented bit pattern is posted in
the destination matrix (registers 40602 and 40603). The original bit pattern is
maintained in the source matrix.
source matrix
40600 = 1111111100000000 40601 = 1111111100000000
40600
10001
40602
COMP
00002
182
043505766 4/2006
www.barr-thorp.com
Parameter Description
Matrix Length
(Bottom Node)
The integer value entered in the bottom node specifies a matrix length, i.e. the
number of registers or 16-bit words in the matrices. Matrix length can range from
1 ... 100. A length of 2 indicates that 32 bits in each matrix will be complemented.
183
043505766 4/2006
www.barr-thorp.com
184
043505766 4/2006
www.barr-thorp.com
Contacts
30
At A Glance
Introduction
What's in this
Chapter?
Page
186
Representation: Contacts
187
185
043505766 4/2006
www.barr-thorp.com
Contacts
Contacts are used to pass or inhibit power flow in a ladder logic program.
186
043505766 4/2006
www.barr-thorp.com
Contacts
Representation: Contacts
Function
Description
They are discrete, which means each consumes one I/O point in ladder logic. A
single contact can be tied to a 0x or 1x reference number in the PLCs state RAM,
in which case each contact consumes one node in a ladder network.
Four kinds of contacts are available:
z Normally open (N.O.) contacts
z Normally closed (N.C.) contacts
z Positive transitional (P.T.) contacts
z Negative transitional (N.T.) contacts
Referencing
Normally Open/
Normally Closed
Contacts
Normally open -| |- and normally closed -|\|- contacts may be referenced by inputs
(1xxxx) or coils (0xxxx).
Field Device state vs. Programmed Contact Flow
Field Device
-| |-
-| |-
-|\|-
Passes Power
-|\|-
Passes Power
-| |-
Passes Power
Passes Power
Referencing
Transitional
Contacts
-|n|-
Off to On
On
1 Scan Power
-|p|-
On to Off
Off
Flow Pulse
Note: A transitional contact will pass power continuously if the referenced coil is
skipped by a SKP instruction or by the segment scheduler. A transitional contact
may not pass power if it is referenced to an input that has been scheduled to read
from the I/O drop more than once per scan via the segment scheduler.
187
043505766 4/2006
www.barr-thorp.com
Contacts
188
043505766 4/2006
www.barr-thorp.com
31
At A Glance
Introduction
What's in this
Chapter?
Page
190
191
189
043505766 4/2006
www.barr-thorp.com
Binary to binary
BCD to binary (discrete to register)
Binary to BCD (register to discrete)
This block uses 12 bits in 12 bits out, but if the conversion is straight binary to binary,
bits 11 and 12 are forced off.
In converting discretes to a holding register, the source is specified as a constant
which implies a 1xxxx and the destination is specified as a constant which implies
a 4xxxx (for example, 00049 implies 40049).
In converting a register to output discretes, the source is specified as a holding
register (4xxxx) and the destination is specified as a constant which implies a 0xxxx.
For example 00032 implies 12 coils with 00032.
Important: Care should be taken when converting register data to discretes as coils
may inadvertently be activated.
Note: Available only on the 984-351 and 984-455 PLCs.
190
043505766 4/2006
www.barr-thorp.com
COMPLETE
source
CONVERSION
CONV
register #
ON = Binary
OFF = BCD
Parameter
Description
Meaning
Top input
0x, 1x
None
Bottom input
0x, 1x
None
ON = Binary
OFF = BCD
source
(top node)
4x
INT, UINT
register
3x
(bottom node)
INT, UINT
Top output
None
0x
Operation Successful
191
043505766 4/2006
www.barr-thorp.com
192
043505766 4/2006
www.barr-thorp.com
32
At A Glance
Introduction
What's in this
Chapter?
Page
194
195
196
193
043505766 4/2006
www.barr-thorp.com
The CTIF block is used by a parent PLC to access child functions over an I/O
expansion bus. The Parent function block will complete in the same scan. If multiple
blocks exist, the last one executed will be used.
The CTIF instruction is used with the Micro PLCs to set up the inputs for hard-wired
interrupt and/or hard-wired counter/timer operations. This instruction always starts
and finishes in the same scan. The CTIF instruction is a configuration/operation tool
for Modicon Micro PLCs that contain hardware interrupts (all models except the
110CPU311 Models). The actual counter/timer and interrupts are in the PLC
hardware, and the CTIF instruction is what is used to set up this hardware.
Note: The Counter, Timer, Interrupt function (CTIF) is only available on Micro 311,
411, 512, and 612 controllers.
194
043505766 4/2006
www.barr-thorp.com
ACTIVE
register #
ERROR
CTIF
Range: 1 ... 5
Parameter
Description
drop number
Top input
0x, 1x
None
register #
(top node)
4x
INT
INT
0x
None
Bottom output 0x
None
Error
drop number
(bottom node)
Top output
195
043505766 4/2006
www.barr-thorp.com
The top node holds four contiguous registers, 4x through 4x+3. This section
describes how those registers are used and configured in the top node.
First Register
(4x) Usage
The first register, 4x, gives you information either about the type of error generated
or about the type of operation being performed. When you configure the register you
need to consider both how the bits will be used, Bit Usage, and the results of ON/
OFF Combinations.
Here is a graphic demonstrating the Bit Usage for the first register (4x),
1
10
11
12
13
14
15
16
and the following table describes the Bit Usage for the first register (4x).
Bit
Usage
1-4
Reserved
5-8
9 - 14
Reserved
15
Set Mode
16
Get Mode
The following table describes the ON/OFF Combinations for bits 5 through 8 and
the error/operation type message generated by the first register (4x).
Bit
Description
No error detected
196
043505766 4/2006
www.barr-thorp.com
The following table describes Bit Usage and the ON/OFF Combinations for bits 15
and 16 of the first register (4x).
Bit
Second Register
(4x+1) Usage
15
16
Description
Set Mode
Get Mode
The second register, 4x+1, allows you to control the set-up for the Set Mode
operation. When you configure the register you need to consider both how the bits
will be used, Bit Usage, and the results of the ON/OFF Combinations.
Here is a graphic demonstrating the Bit Usage for the second register (4x+1).
1
10
11
12
13
14
15
16
The following tables describe both Bit Usage and the ON/OFF Combinations for
bits 1 through 16 of the second register (4x+1).
The following table describes Bit Usage and ON/OFF Combinations for bits 1 and
2 of the second register (4x+1).
Bit
Usage
Terminal-count loading
0 - Disable
1 - Enable
Reserved
The following table describes Bit Usage and ON/OFF Combinations for bits 3 and
4 of the second register (4x+1).
Bit
Description
The following table describes Bit Usage and ON/OFF Combinations for bits 5 and
6 of the second register (4x+1).
Bit
Description
197
043505766 4/2006
www.barr-thorp.com
The following table describes Bit Usage and ON/OFF Combinations for bits 7 and
8 of the second register (4x+1).
Bit
Description
The following table describes Bit Usage and ON/OFF Combinations for bits 9 and
10 of the second register (4x+1).
Bit
10
Description
The following table describes Bit Usage and ON/OFF Combinations for bits 11 and
12 of the second register (4x+1).
Bit
11
12
Description
The following table describes Bit Usage and ON/OFF Combinations for bits 13 and
14 of the second register (4x+1).
Bit
13
14
Description
The following table describes Bit Usage and ON/OFF Combinations for bits 15 and
16 of the second register (4x+1).
Bit
Third Register
(4x+2) Usage
15
16
Description
Counter Mode
Timer Mode
The third register, 4x+2, gives you the status for the Get Mode operation. When you
configure the register you need to consider both how the bits will be used, Bit
Usage, and the results of the ON/OFF Combinations.
Here is a graphic demonstrating the Bit Usage for the third register (4x+2).
1
10
11
12
13
14
15
198
16
043505766 4/2006
www.barr-thorp.com
The following table describes Bit Usage and ON/OFF Combinations for bits 1
through 16 for the third register (4x+2).
Fourth Register
(4x+3) Usage
Bit
Usage
5-9
Reserved
10
Interrupt 3
0 - Disabled
1 - Enabled
11
Interrupt 2
0 - Disabled
1 - Enabled
12
Interrupt 1
0 - Disabled
1 - Enabled
13
14
15
Counter/timer operation
0 - Stopped
1 - Started
16
0 - Counter Mode
1 - Timer Mode
The fourth register marks the current count value of the timer/counter interrupt.
The count value can be set either by the instruction block (set automatically) or
by the user.
z
z
Get Mode
Instruction block sets the current count
Set Mode
User sets the counter/timer
199
043505766 4/2006
www.barr-thorp.com
200
043505766 4/2006
www.barr-thorp.com
33
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
204
205
203
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The DCTR instruction counts control input transitions from OFF to ON down from a
counter preset value to zero.
204
043505766 4/2006
www.barr-thorp.com
ENABLE RESET
counter
preset
DCTR
OUTPUT CONDITION
DCTR: count = zero
OUTPUT CONDITION
count > zero
count
Top input
0x, 1x
None
None
counter
preset
(top node)
INT, UINT
accumulated 4x
count
(bottom
node)
INT, UINT
Top output
0x
None
ON = accumulated count = 0
Bottom
output
0x
None
3x, 4x
205
043505766 4/2006
www.barr-thorp.com
206
043505766 4/2006
www.barr-thorp.com
34
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
208
209
Parameter Description
211
207
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The DIOH instruction lets you retrieve health data from a specified group of drops
on the distributed I/O network. It accesses the DIO health status table, where health
data for modules in up to 189 distributed drops is stored.
208
043505766 4/2006
www.barr-thorp.com
ACTIVE
source
destination
DIO Health Table
Number of Drops
(1 - 64)
ERROR
DIOH
(1 ... 64)
209
043505766 4/2006
www.barr-thorp.com
Parameter
Description
Top input
0x, 1x
None
source
(top node)
destination
(middle node)
4x
length
(bottom node)
Top output
0x
None
Bottom output
0x
None
210
043505766 4/2006
www.barr-thorp.com
Parameter Description
Source Value
(Top Node)
The source value entered in the top node is a four-digit constant in the form xxyy,
where:
Digits
Meaning
xx
Decimal value in the range 00 ... 16, indicating the slot number in which the relevant
DIO processor resides. The value 00 can always be used to indicate the Modbus
Plus ports on the PLC, regardless of the slot in which it resides.
yy
Decimal value in the range 1 ... 64, indicating the drop number on the appropriate
token ring
For example, if you are interested in retrieving drop status starting at distributed drop
#1 on a network being handled by a DIO processor in slot 3, enter 0301 in the
top node.
Length of
Destination
Table (Bottom
Node)
The integer value entered in the bottom node specifies the length, i.e. the number of
4x registers, in the destination table. The length is in the range 1 ... 64.
Note: If you specify a length that excedes the number of drops available, the
instruction will return status information only for the drops available. For example,
if you specify the 63rd drop number (yy) in the top node register and then request
a length of 5, the instruction will give you only two registers (the 63rd and 64th drop
status words) in the destination table.
211
043505766 4/2006
www.barr-thorp.com
212
043505766 4/2006
www.barr-thorp.com
35
At A Glance
Introduction
What's in this
Chapter?
Page
214
215
213
043505766 4/2006
www.barr-thorp.com
214
043505766 4/2006
www.barr-thorp.com
DISABLED COILS
coils
DISABLED INPUTS
inputs
ACTIVE
DISA
Length: 1 - 100 regusters
length
Note: The NSUP loadable must be loaded prior to loading the DISA loadable.
Parameter
Description
State RAM
Reference
Top input
0x, 1x
None
coils
(top node)
4x
INT, UINT
4x+#
INT, UINT
inputs
(middle node)
4y
INT, UINT
4y+#
INT, UINT
INT, UINT
length
(bottom node)
Top output
0x
None
Middle output
0x
None
Bottom output
0x
None
215
043505766 4/2006
www.barr-thorp.com
216
043505766 4/2006
www.barr-thorp.com
DIV: Divide
36
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
218
219
Example
221
217
043505766 4/2006
www.barr-thorp.com
DIV: Divide
Short Description
Function
Description
The DIV instruction divides unsigned value 1 (its top node) by unsigned value 2 (its
middle node) and posts the quotient and remainder in two contiguous holding
registers in the bottom node.
218
043505766 4/2006
www.barr-thorp.com
DIV: Divide
SUCCESSFUL COMPLETION
value 1
DEC. REMAIN
Divisor
Max. 999 - 16 bit
Max. 9999 - 24 bit
Max. 65535 - *PLC
value 2
DIV
result/
remainder
219
043505766 4/2006
www.barr-thorp.com
DIV: Divide
Parameter
Description
Top input
0x, 1x
None
Middle input
0x, 1x
None
ON = decimal remainder
OFF = fraction remainder
value 1
(top node)
3x, 4x
value 2
(middle node)
3x, 4x
result /
remainder
(bottom node)
4x
Top output
0x
None
ON = division successful
Middle output
0x
None
ON = overflow:
if result > 9999*, a 0 value is returned
*Max. 999 - 16 bit Max. 9999 - 24 bit Max. 65535
- *PLC (See availability list above.)
Bottom output
0x
None
ON = value 2 = 0
220
043505766 4/2006
www.barr-thorp.com
DIV: Divide
Example
Quotient of
Instruction DIV
The state of the middle input indicates whether the remainder will be expressed as
a decimal or as a fraction. For example, if value 1 = 8 and value 2 = 3, the decimal
remainder (middle input ON) is 6666; the fractional remainder
(middle input OFF) is 2.
221
043505766 4/2006
www.barr-thorp.com
DIV: Divide
222
043505766 4/2006
www.barr-thorp.com
37
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
224
Representation: DLOG
225
Parameter Description
226
228
223
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
Note: This instruction is only available with the PLC family TSX Compact.
PCMCIA read and write support consists of a configuration extension to be
implemented using a DLOG instruction. The DLOG instruction provides the facility
for an application to copy data to a PCMCIA flash card, copy data from a PCMCIA
flash card, erase individual memory blocks on a PCMCIA flash card, and to erase
an entire PCMCIA flash card. The data format and the frequency of data storage are
controlled by the application.
Note: The DLOG instruction will only operate with PCMCIA linear flash cards that
use AMD flash devices.
224
043505766 4/2006
www.barr-thorp.com
Representation: DLOG
Symbol
ACTIVE
control
block
TERMINATE ACTIVE
DLOG OPERATION
data area
DLOG
OPERATION TERMINATED
UNSUCCESSFULLY
OPERATION SUCCESSFUL
length
Parameter
Description
State RAM
Reference
Top input
0x, 1x
None
Middle input
0x, 1x
None
control block
(top node)
4x
data area
(middle node)
4x
length
(bottom node)
Top output
0x
None
Middle output
0x
None
Bottom output
0x
None
225
043505766 4/2006
www.barr-thorp.com
Parameter Description
Control Block
(Top Node)
The 4x register entered in the top node is the first of five contiguous registers in the
DLOG control block.
The control block defines the function of the DLOG command, the PCMCIA flash
card window and offset, a return status word, and a data word count value.
Register
Function
Content
Displayed
Error Status
First implied
Operation Type
Second
implied
Window
(Block Identifier)
Third implied
Offset
(Byte Address
within the Block)
226
043505766 4/2006
www.barr-thorp.com
Data Area
(Middle Node)
Length
(Bottom Node)
The 4x register entered in the middle node is the first register in a contiguous block
of 4x word registers, that the DLOG instruction will use for the source or destination
of the operation specified in the top nodes control block.
Operation
Function
Write
4x
Source Address
Read
4x
Destination Address
Erase Block
none
None
Erase Card
none
None
The integer value entered in the bottom node is the length of the data area, i.e., the
maximum number of words (registers) allowed in a transfer to/from the PCMCIA
flash card. The length can range from 0 ... 100.
227
043505766 4/2006
www.barr-thorp.com
The displayed register of the control block contains the following DLOG
errors in Hex-code.
The count parameter of the control block > the DLOG block length
during a WRITE operation (01)
228
043505766 4/2006
www.barr-thorp.com
38
At a Glance
Introduction
This chapter describes the four double precision math operations executed by the
instruction DMTH. The four operations are Addition, Subtraction, Multiplication,
and Division.
What's in this
Chapter?
Page
230
231
229
043505766 4/2006
www.barr-thorp.com
The Double Precision Math (DMTH) instruction performs double precision addition,
subtraction, multiplication, or division (set by bottom node). DMTH uses 2 registers
appended together to form one operand.
Each DMTH instruction operates on the same two operands.
OP1 = 4x, 4x + 1 (top node)
z OP2 = 4y, 4y + 1 (middle node)
z
Function Codes
The DMTH instruction performs any one of four possible double precision math
operations. DMTH performs the operation by calling a function. To call the desired
function enter a function code in the bottom node. Function codes range from 1 ... 4.
Code DMTH Function
Function Performed
Result Registers
(4y + 3, 4y + 4)
Double Precision
Multiplication
Divide (OP1)\(OP 2)
(4y + 4, 4y + 5)
(4y + 2, 4y + 3) quotient
(4y + 4, 4y + 5) remainder
Notes
For numbers spread over more than one register, the least significant 4 digits are
stored in the highest holding register.
z Results, flags, and remainders are stored in the registers following OP2.
z Registers not used by the chosen math function may be used for other purposes.
z The Subtract Function uses the outputs to indicate the result of comparison
between Operands OP1 and OP2.
z
230
043505766 4/2006
www.barr-thorp.com
Symbol Addition
OPERATION SUCCESSFUL
operand 1
ERROR
operand 2
and sum
DMTH
1
Parameter
Description Addition
Top input
0x, 1x
None
operand 1
(top node)
4x
INT, UINT
043505766 4/2006
www.barr-thorp.com
Symbol Subtraction
Parameters
operand 2
and sum
(middle
node)
4x
INT, UINT
Top output
0x
None
ON = operation successful
Middle
output
0x
None
OPERAND 1 = OPERAND 2
operand 2/
difference
232
043505766 4/2006
www.barr-thorp.com
Parameter
Description Subtraction
Top input
0x, 1x
None
operand 1
(top node)
4x
INT, UINT
operand 2
difference
(middle
node)
4x
INT, UINT
Top output
0x
None
Middle output 0x
None
ON = operand 1 = operand 2
Bottom
output
None
0x
233
043505766 4/2006
www.barr-thorp.com
Symbol Multiplication
ON = OPERATION SUCCESSFUL
operand 1
ERROR
operand 2/
product
DMTH
3
Parameter
Description Multiplication
Top input
0x, 1x
None
operand 1
(top node)
4x
234
043505766 4/2006
www.barr-thorp.com
Symbol Division
operand 2/
product
(middle
node)
4x
INT, UINT
Top output
0x
None
ON = operation successful
Middle
output
0x
None
OPERATION
SUCCESS-
operand 1
REMAINDER
ERROR
operand 2
quotient
DMTH
DIVIDE BY 0 ATTEMPTED
235
043505766 4/2006
www.barr-thorp.com
Parameter
Description Division
Top input
0x, 1x
None
None
ON = decimal remainder
OFF = fractional remainder
operand 1
(top node)
4x
INT, UINT The first of two contiguous 4xxxx registers is entered in the top
node. The second 4xxxx register is implied. Operand 1 is stored
here. The second 4x register is implied.
Each register holds a value in the range 0000 through 9999, for
a combined double precision value in the range 0 through
99,999,999. The high-order half of operand 1 is stored in the
displayed register, and the low-order half is stored in the implied
register.
operand 2
quotient
remainder
(middle
node)
4x
INT, UINT The first of six contiguous 4x registers is entered in the middle
node.
The remaining five registers are implied:
z The displayed register and the first implied register store the
high-order and low-order halves of operand 2, respectively,
for a combined double precision value in the range 0 through
99,999,999
Note: Since division by 0 is illegal, a 0 value causes an error; an
error trapping routine sets the remaining middle-node registers
to 0000 and turns the bottom output ON.
z The second and third implied registers store an eight-digit
quotient
z The fourth and fifth implied registers store the remainder. If
the remainder is expressed as a fraction, it is eight digits long
and both registers are used, if the remainder is expressed as
a decimal, it is four digits long
and only the fourth implied
register is used
Top output
0x
None
ON = operation successful
Middle
output
0x
None
Bottom
output
0x
None
On = operand 2 is 0
236
043505766 4/2006
www.barr-thorp.com
39
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
238
Representation: DRUM
239
Parameter Description
241
237
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
Note: This instruction is only available if you have unpacked and installed the DX
Loadables. For further information, see p. 101."
The DRUM instruction operates on a table of 4x registers containing data
representing each step in a sequence. The number of registers associated with this
step data table depends on the number of steps required in the sequence. You can
pre-allocate registers to store data for each step in the sequence, thereby allowing
you to add future sequencer steps without having to modify application logic.
DRUM incorporates an output mask that allows you to selectively mask bits in the
register data before writing it to coils. This is particularly useful when all physical
sequencer outputs are not contiguous on the output module. Masked bits are not
altered by the DRUM instruction, and may be used by logic unrelated to
the sequencer.
238
043505766 4/2006
www.barr-thorp.com
Representation: DRUM
Symbol
ACTIVE
step pointer
NEXT STEP
LAST STEP
step data
table
RESET
Length:
Max. 255 - 16-bit PLC
Max. 999 - 24-bit PLC
Max. 65535 - *PLC
ERROR
DRUM
length
239
043505766 4/2006
www.barr-thorp.com
Parameter
Description
Top input
0x, 1x
None
Middle input
0x, 1x
None
None
step pointer
(top node)
4x
step data
table
(middle
node)
4x
length
(bottom
node)
Top output
0x
None
Middle
output
0x
None
Bottom
output
0x
None
ON = Error
240
043505766 4/2006
www.barr-thorp.com
Parameter Description
Step Pointer
(Top Node)
The 4x register entered in the top node stores the current step number. The value
in this register is referenced by the DRUM instruction each time it is solved. If the
middle input to the block is ON, the contents of the register in the top node are
incremented to the next step in the sequence before the block is solved.
The 4x register entered in the middle node is the first register in a table of step
data information.
The first six registers in the step data table hold constant and variable data
required to solve the block:
Register
Name
Content
Displayed
masked output Loaded by DRUM each time the block is solved; contains
data
the contents of the current step data register masked with
the outputmask register
First implied
current step
data
Second
implied
output mask
Loaded by user before using the block, DRUM will not alter
output mask contents during logic solve; contains a mask to
be applied to the data for each sequencer step
Third implied
machine ID
number
Fourth
implied
profile ID
number
Fifth implied
steps used
Loaded by user before using the block, DRUM will not alter
steps used contents during logic solve; contains between 1
... 999 for 24 bit CPUs, specifying the actual number of steps
to be solved; the number must be greater or less than the
table length in the bottom node
The remaining registers contain data for each step in the sequence.
241
043505766 4/2006
www.barr-thorp.com
Length
(Bottom Node)
The integer value entered in the bottom node is the length, i.e., the number of
application-specific registers used in the step data table. The length can range from
1 ... 999 in a 24-bit CPU.
The total number of registers required in the step data table is the length + 6. The
length must be greater or equal to the value placed in the steps used register in the
middle node.
242
043505766 4/2006
www.barr-thorp.com
40
At a Glance
Introduction
What's in this
Chapter?
Page
Short Description
244
245
Example
247
243
043505766 4/2006
www.barr-thorp.com
Short Description
Function
Description
The DV16 instruction performs a signed or unsigned division on the 16-bit values in
the top and middle nodes (value 1 / value 2), then posts the quotient and remainder
in two contiguous 4x holding registers in the bottom node.
244
043505766 4/2006
www.barr-thorp.com
SUCCESSFUL COMPLETION
value 1
ON = fractional remainder
OFF = decimal remainder
OVERFLOW
value 2
SIGNED
ERROR
DV16
Middle Node = 0
quotient
245
043505766 4/2006
www.barr-thorp.com
Parameter
Description
Data Type
Meaning
Top input
0x, 1x
None
Middle input
0x, 1x
None
Bottom input
0x, 1x
None
ON = signed operation
OFF = unsigned operation
value 1
(top node)
3x, 4x
INT, UINT
value 2
(middle node)
3x, 4x
INT, UINT
quotient
(bottom node)
4x
INT, UINT
Top output
0x
None
Middle output
0x
None
ON = overflow:
quotient > 65 535 in unsigned
operation
-32 768 > quotient > 32 767 in
signed operation
Bottom output
0x
None
ON = value 2 = 0
246
043505766 4/2006
www.barr-thorp.com
Example
Quotient of
Instruction DV16
The state of the middle input indicates whether the remainder will be expressed as
a decimal or as a fraction. For example, if value 1 = 8 and value 2 = 3, the
decimal remainder (middle input OFF) is 6666; the fractional remainder (middle
input ON) is 2.
247
043505766 4/2006
www.barr-thorp.com
248
043505766 4/2006
www.barr-thorp.com
Glossary
A
active window
The window, which is currently selected. Only one window can be active at any one
given time. When a window is active, the heading changes color, in order to
distinguish it from other windows. Unselected windows are inactive.
Actual parameter
Addresses
(Direct) addresses are memory areas on the PLC. These are found in the State RAM
and can be assigned input/output modules.
The display/input of direct addresses is possible in the following formats:
z Standard format (400001)
z Separator format (4:00001)
z Compact format (4:1)
z IEC format (QW1)
ANL_IN
ANL_IN stands for the data type "Analog Input" and is used for processing analog
values. The 3x References of the configured analog input module, which is specified
in the I/O component list is automatically assigned the data type and should
therefore only be occupied by Unlocated variables.
ANL_OUT
ANL_OUT stands for the data type "Analog Output" and is used for processing
analog values. The 4x-References of the configured analog output module, which is
specified in the I/O component list is automatically assigned the data type and
should therefore only be occupied by Unlocated variables.
ANY
In the existing version "ANY" covers the elementary data types BOOL, BYTE, DINT,
INT, REAL, UDINT, UINT, TIME and WORD and therefore derived data types.
xxxi
043505766 4/2006
www.barr-thorp.com
Glossary
ANY_BIT
In the existing version, "ANY_BIT" covers the data types BOOL, BYTE and WORD.
ANY_ELEM
In the existing version "ANY_ELEM" covers the elementary data types BOOL,
BYTE, DINT, INT, REAL, UDINT, UINT, TIME and WORD.
ANY_INT
In the existing version, "ANY_INT" covers the data types DINT, INT, UDINT and
UINT.
ANY_NUM
In the existing version, "ANY_NUM" covers the data types DINT, INT, REAL, UDINT
and UINT.
ANY_REAL
Application
window
The window, which contains the working area, the menu bar and the tool bar for the
application. The name of the application appears in the heading. An application
window can contain several document windows. In Concept the application window
corresponds to a Project.
Argument
ASCII mode
American Standard Code for Information Interchange. The ASCII mode is used for
communication with various host devices. ASCII works with 7 data bits.
Atrium
xxxii
043505766 4/2006
www.barr-thorp.com
Glossary
B
Back up data file
(Concept EFB)
The back up file is a copy of the last Source files. The name of this back up file is
"backup??.c" (it is accepted that there are no more than 100 copies of the source
files. The first back up file is called "backup00.c". If changes have been made on the
Definition file, which do not create any changes to the interface in the EFB, there is
no need to create a back up file by editing the source files (ObjectsoSource). If a
back up file can be assigned, the name of the source file can be given.
Base 16 literals
Base 16 literals function as the input of whole number values in the hexadecimal
system. The base must be denoted by the prefix 16#. The values may not be
preceded by signs (+/-). Single underline signs ( _ ) between figures are not
significant.
Example
16#F_F or 16#FF (decimal 255)
16#E_0 or 16#E0 (decimal 224)
Base 8 literal
Base 8 literals function as the input of whole number values in the octal system. The
base must be denoted by the prefix 3.63kg. The values may not be preceded by
signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example
8#3_1111 or 8#377 (decimal 255)
8#34_1111 or 8#340 (decimal 224)
Basis 2 literals
Base 2 literals function as the input of whole number values in the dual system. The
base must be denoted by the prefix 0.91kg. The values may not be preceded by
signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example
2#1111_1111 or 2#11111111 (decimal 255)
2#1110_1111 or 2#11100000 (decimal 224)
Binary
connections
Bit sequence
BOOL
BOOL stands for the data type "Boolean". The length of the data elements is 1 bit
(in the memory contained in 1 byte). The range of values for variables of this type is
0 (FALSE) and 1 (TRUE).
xxxiii
043505766 4/2006
www.barr-thorp.com
Glossary
Bridge
BYTE
BYTE stands for the data type "Bit sequence 8". The input appears as Base 2 literal,
Base 8 literal or Base 1 16 literal. The length of the data element is 8 bit. A numerical
range of values cannot be assigned to this data type.
C
Cache
The cache is a temporary memory for cut or copied objects. These objects can be
inserted into sections. The old content in the cache is overwritten for each new Cut
or Copy.
Call up
Coil
A coil is a LD element, which transfers (without alteration) the status of the horizontal
link on the left side to the horizontal link on the right side. In this way, the status is
saved in the associated Variable/ direct address.
Compact format
(4:1)
The first figure (the Reference) is separated from the following address with a colon
(:), where the leading zero are not entered in the address.
Connection
A check or flow of data connection between graphic objects (e.g. steps in the SFC
editor, Function blocks in the FBD editor) within a section, is graphically shown as a
line.
Constants
Constants are Unlocated variables, which are assigned a value that cannot be
altered from the program logic (write protected).
Contact
xxxiv
043505766 4/2006
www.barr-thorp.com
Glossary
D
Data transfer
settings
Data types
The overview shows the hierarchy of data types, as they are used with inputs and
outputs of Functions and Function blocks. Generic data types are denoted by the
prefix "ANY".
z ANY_ELEM
z ANY_NUM
ANY_REAL (REAL)
ANY_INT (DINT, INT, UDINT, UINT)
z ANY_BIT (BOOL, BYTE, WORD)
z TIME
z System data types (IEC extensions)
z Derived (from "ANY" data types)
With a Distributed Control Processor (D908) a remote network can be set up with a
parent PLC. When using a D908 with remote PLC, the parent PLC views the remote
PLC as a remote I/O station. The D908 and the remote PLC communicate via the
system bus, which results in high performance, with minimum effect on the cycle
time. The data exchange between the D908 and the parent PLC takes place at 1.5
Megabits per second via the remote I/O bus. A parent PLC can support up to 31
(Address 2-32) D908 processors.
DDE (Dynamic
Data Exchange)
The DDE interface enables a dynamic data exchange between two programs under
Windows. The DDE interface can be used in the extended monitor to call up its own
display applications. With this interface, the user (i.e. the DDE client) can not only
read data from the extended monitor (DDE server), but also write data onto the PLC
via the server. Data can therefore be altered directly in the PLC, while it monitors
and analyzes the results. When using this interface, the user is able to make their
own "Graphic-Tool", "Face Plate" or "Tuning Tool", and integrate this into the
system. The tools can be written in any DDE supporting language, e.g. Visual Basic
and Visual-C++. The tools are called up, when the one of the buttons in the dialog
box extended monitor uses Concept Graphic Tool: Signals of a projection can be
displayed as timing diagrams via the DDE connection between Concept and
Concept Graphic Tool.
xxxv
043505766 4/2006
www.barr-thorp.com
Glossary
Decentral
Network (DIO)
Declaration
Definition data
file (Concept
EFB)
The definition file contains general descriptive information about the selected FFB
and its formal parameters.
Derived data types are types of data, which are derived from the Elementary data
types and/or other derived data types. The definition of the derived data types
appears in the data type editor in Concept.
Distinctions are made between global data types and local data types.
Derived Function
Block (DFB)
A derived function block represents the Call up of a derived function block type.
Details of the graphic form of call up can be found in the definition " Function block
(Item)". Contrary to calling up EFB types, calling up DFB types is denoted by double
vertical lines on the left and right side of the rectangular block symbol.
The body of a derived function block type is designed using FBD language, but only
in the current version of the programming system. Other IEC languages cannot yet
be used for defining DFB types, nor can derived functions be defined in the current
version. Distinctions are made between local and global DFBs.
DINT
DINT stands for the data type "double integer". The input appears as Integer literal,
Base 2 literal, Base 8 literal or Base 16 literal. The length of the data element is 32
bit. The range of values for variables of this data type is from 2 exp (31) to 2 exp
(31) 1.
Direct display
A method of displaying variables in the PLC program, from which the assignment of
configured memory can be directly and indirectly derived from the physical memory.
Document
window
Dummy
An empty data file, which consists of a text header with general file information, i.e.
author, date of creation, EFB identifier etc. The user must complete this dummy file
with additional entries.
xxxvi
043505766 4/2006
www.barr-thorp.com
Glossary
DX Zoom
E
Elementary
functions/
function blocks
(EFB)
Identifier for Functions or Function blocks, whose type definitions are not formulated
in one of the IEC languages, i.e. whose bodies, for example, cannot be modified with
the DFB Editor (Concept-DFB). EFB types are programmed in "C" and mounted via
Libraries in precompiled form.
EN / ENO (Enable
/ Error display)
If the value of EN is "0" when the FFB is called up, the algorithms defined by the FFB
are not executed and all outputs contain the previous value. The value of ENO is
automatically set to "0" in this case. If the value of EN is "1" when the FFB is called
up, the algorithms defined by the FFB are executed. After the error free execution of
the algorithms, the ENO value is automatically set to "1". If an error occurs during
the execution of the algorithm, ENO is automatically set to "0". The output behavior
of the FFB depends whether the FFBs are called up without EN/ENO or with EN=1.
If the EN/ENO display is enabled, the EN input must be active. Otherwise, the FFB
is not executed. The projection of EN and ENO is enabled/disabled in the block
properties dialog box. The dialog box is called up via the menu commands Objects
oProperties... or via a double click on the FFB.
Error
When processing a FFB or a Step an error is detected (e.g. unauthorized input value
or a time error), an error message appears, which can be viewed with the menu
command OnlineoEvent display... . With FFBs the ENO output is set to "0".
Evaluation
The process, by which a value for a Function or for the outputs of a Function block
during the Program execution is transmitted.
Expression
xxxvii
043505766 4/2006
www.barr-thorp.com
Glossary
F
FFB (functions/
function blocks)
Collective term for EFB (elementary functions/function blocks) and DFB (derived
function blocks)
Field variables
Variables, one of which is assigned, with the assistance of the key word ARRAY
(field), a defined Derived data type. A field is a collection of data elements of the
same Data type.
FIR filter
Formal
parameters
Input/Output parameters, which are used within the logic of a FFB and led out of the
FFB as inputs/outputs.
Function (FUNC)
A Program organization unit, which exactly supplies a data element when executing.
A function has no internal status information. Multiple call ups of the same function
with the same input parameter values always supply the same output values.
Details of the graphic form of function call up can be found in the definition " Function
block (Item)". In contrast to the call up of function blocks, the function call ups only
have one unnamed output, whose name is the name of the function itself. In FBD
each call up is denoted by a unique number over the graphic block; this number is
automatically generated and cannot be altered.
Function block
(item) (FB)
xxxviii
043505766 4/2006
www.barr-thorp.com
Glossary
Function block
dialog (FBD)
One or more sections, which contain graphically displayed networks from Functions,
Function blocks and Connections.
Function block
type
Function counter
The function counter serves as a unique identifier for the function in a Program or
DFB. The function counter cannot be edited and is automatically assigned. The
function counter always has the structure: .n.m
n = Section number (number running)
m = Number of the FFB object in the section (number running)
G
Generic data
type
Generic literal
If the Data type of a literal is not relevant, simply enter the value for the literal. In this
case Concept automatically assigns the literal to a suitable data type.
Global derived
data types
Global Derived data types are available in every Concept project and are contained
in the DFB directory directly under the Concept directory.
Global DFBs
Global DFBs are available in every Concept project and are contained in the DFB
directory directly under the Concept directory.
Global macros
Global Macros are available in every Concept project and are contained in the DFB
directory directly under the Concept directory.
Groups (EFBs)
Some EFB libraries (e.g. the IEC library) are subdivided into groups. This facilitates
the search for FFBs, especially in extensive libraries.
xxxix
043505766 4/2006
www.barr-thorp.com
Glossary
I
I/O component
list
The I/O and expert assemblies of the various CPUs are configured in the I/O
component list.
IEC 61131-3
In the place of the address stands an IEC identifier, followed by a five figure address:
%0x12345 = %Q12345
z %1x12345 = %I12345
z %3x12345 = %IW12345
z %4x12345 = %QW12345
z
IEC name
conventions
(identifier)
An identifier is a sequence of letters, figures, and underscores, which must start with
a letter or underscores (e.g. name of a function block type, of an item or section).
Letters from national sets of characters (e.g. ,, , ) can be used, taken from
project and DFB names.
Underscores are significant in identifiers; e.g. "A_BCD" and "AB_CD" are
interpreted as different identifiers. Several leading and multiple underscores are not
authorized consecutively.
Identifiers are not permitted to contain space characters. Upper and/or lower case
is not significant; e.g. "ABCD" and "abcd" are interpreted as the same identifier.
Identifiers are not permitted to be Key words.
IIR filter
Initial step
(starting step)
The first step in a chain. In each chain, an initial step must be defined. The chain is
started with the initial step when first called up.
Initial value
The allocated value of one of the variables when starting the program. The value
assignment appears in the form of a Literal.
The 1/0 status of input bits is controlled via the process data, which reaches the CPU
from an entry device.
Note: The x, which comes after the first figure of the reference type, represents a
five figure storage location in the application data store, i.e. if the reference 100201
signifies an input bit in the address 201 of the State RAM.
Input parameters
(Input)
xl
043505766 4/2006
www.barr-thorp.com
Glossary
An input word contains information, which come from an external source and are
represented by a 16 bit figure. A 3x register can also contain 16 sequential input bits,
which were read into the register in binary or BCD (binary coded decimal) format.
Note: The x, which comes after the first figure of the reference type, represents a
five figure storage location in the user data store, i.e. if the reference 300201
signifies a 16 bit input word in the address 201 of the State RAM.
Instantiation
Instruction (IL)
Instruction
(LL984)
Instruction list
(IL)
INT
INT stands for the data type "whole number". The input appears as Integer literal,
Base 2 literal, Base 8 literal or Base 16 literal. The length of the data element is 16
bit. The range of values for variables of this data type is from 2 exp (15) to 2 exp
(15) 1.
Integer literals
Integer literals function as the input of whole number values in the decimal system.
The values may be preceded by the signs (+/-). Single underline signs ( _ ) between
figures are not significant.
Example
-12, 0, 123_456, +986
INTERBUS (PCP)
To use the INTERBUS PCP channel and the INTERBUS process data
preprocessing (PDP), the new I/O station type INTERBUS (PCP) is led into the
Concept configurator. This I/O station type is assigned fixed to the INTERBUS
connection module 180-CRP-660-01.
The 180-CRP-660-01 differs from the 180-CRP-660-00 only by a clearly larger I/O
area in the state RAM of the controller.
xli
043505766 4/2006
www.barr-thorp.com
Glossary
Item name
An Identifier, which belongs to a certain Function block item. The item name serves
as a unique identifier for the function block in a program organization unit. The item
name is automatically generated, but can be edited. The item name must be unique
throughout the Program organization unit, and no distinction is made between
upper/lower case. If the given name already exists, a warning is given and another
name must be selected. The item name must conform to the IEC name conventions,
otherwise an error message appears. The automatically generated instance name
always has the structure: FBI_n_m
FBI = Function block item
n = Section number (number running)
m = Number of the FFB object in the section (number running)
J
Jump
Element of the SFC language. Jumps are used to jump over areas of the chain.
K
Key words
Key words are unique combinations of figures, which are used as special syntactic
elements, as is defined in appendix B of the IEC 1131-3. All key words, which are
used in the IEC 1131-3 and in Concept, are listed in appendix C of the IEC 1131-3.
These listed keywords cannot be used for any other purpose, i.e. not as variable
names, section names, item names etc.
xlii
043505766 4/2006
www.barr-thorp.com
Glossary
L
Ladder Diagram
(LD)
In the terms Ladder Logic and Ladder Diagram, the word Ladder refers to execution.
In contrast to a diagram, a ladder logic is used by engineers to draw up a circuit (with
assistance from electrical symbols),which should chart the cycle of events and not
the existing wires, which connect the parts together. A usual user interface for
controlling the action by automated devices permits ladder logic interfaces, so that
when implementing a control system, engineers do not have to learn any new
programming languages, with which they are not conversant.
The structure of the actual ladder logic enables electrical elements to be linked in a
way that generates a control output, which is dependant upon a configured flow of
power through the electrical objects used, which displays the previously demanded
condition of a physical electric appliance.
In simple form, the user interface is one of the video displays used by the PLC
programming application, which establishes a vertical and horizontal grid, in which
the programming objects are arranged. The logic is powered from the left side of the
grid, and by connecting activated objects the electricity flows from left to right.
Landscape
format
Landscape format means that the page is wider than it is long when looking
at the printed text.
Language
element
Each basic element in one of the IEC programming languages, e.g. a Step in SFC,
a Function block item in FBD or the Start value of a variable.
Library
Collection of software objects, which are provided for reuse when programming new
projects, or even when building new libraries. Examples are the Elementary function
block types libraries.
EFB libraries can be subdivided into Groups.
Literals
Literals serve to directly supply values to inputs of FFBs, transition conditions etc.
These values cannot be overwritten by the program logic (write protected). In this
way, generic and standardized literals are differentiated.
Furthermore literals serve to assign a Constant a value or a Variable an Initial value.
The input appears as Base 2 literal, Base 8 literal, Base 16 literal, Integer literal, Real
literal or Real literal with exponent.
Local derived
data types
Local derived data types are only available in a single Concept project and its local
DFBs and are contained in the DFB directory under the project directory.
xliii
043505766 4/2006
www.barr-thorp.com
Glossary
Local DFBs
Local DFBs are only available in a single Concept project and are contained in the
DFB directory under the project directory.
Local link
The local network link is the network, which links the local nodes with other nodes
either directly or via a bus amplifier.
Local macros
Local Macros are only available in a single Concept project and are contained in the
DFB directory under the project directory.
Local network
nodes
Located variable
Located variables are assigned a state RAM address (reference addresses 0x,1x,
3x, 4x). The value of these variables is saved in the state RAM and can be altered
online with the reference data editor. These variables can be addressed by symbolic
names or the reference addresses.
Collective PLC inputs and outputs are connected to the state RAM. The program
access to the peripheral signals, which are connected to the PLC, appears only via
located variables. PLC access from external sides via Modbus or Modbus plus
interfaces, i.e. from visualizing systems, are likewise possible via located variables.
xliv
043505766 4/2006
www.barr-thorp.com
Glossary
M
Macro
Macros are created with help from the software Concept DFB.
Macros function to duplicate frequently used sections and networks (including the
logic, variables, and variable declaration).
Distinctions are made between local and global macros.
Macros have the following properties:
z Macros can only be created in the programming languages FBD and LD.
z Macros only contain one single section.
z Macros can contain any complex section.
z From a program technical point of view, there is no differentiation between an
instanced macro, i.e. a macro inserted into a section, and a conventionally
created macro.
z Calling up DFBs in a macro
z Variable declaration
z Use of macro-own data structures
z Automatic acceptance of the variables declared in the macro
z Initial value for variables
z Multiple instancing of a macro in the whole program with different variables
z The section name, the variable name and the data structure name can contain up
to 10 different exchange markings (@0 to @9).
MMI
Multi element
variables
Variables, one of which is assigned a Derived data type defined with STRUCT or
ARRAY.
Distinctions are made between Field variables and structured variables.
xlv
043505766 4/2006
www.barr-thorp.com
Glossary
N
Network
Network node
Node address
The node address serves a unique identifier for the network in the routing path. The
address is set directly on the node, e.g. with a rotary switch on the back of the
module.
O
Operand
Operator
Output
parameters
(Output)
A parameter, with which the result(s) of the Evaluation of a FFB are returned.
Output/discretes
(0x references)
An output/marker bit can be used to control real output data via an output unit of the
control system, or to define one or more outputs in the state RAM. Note: The x,
which comes after the first figure of the reference type, represents a five figure
storage location in the application data store, i.e. if the reference 000201 signifies
an output or marker bit in the address 201 of the State RAM.
Output/marker
words (4x
references)
xlvi
043505766 4/2006
www.barr-thorp.com
Glossary
P
Peer processor
The peer processor processes the token run and the flow of data between the
Modbus Plus network and the PLC application logic.
PLC
Programmable controller
Program
The uppermost Program organization unit. A program is closed and loaded onto a
single PLC.
Program cycle
A program cycle consists of reading in the inputs, processing the program logic and
the output of the outputs.
Program
organization unit
A Function, a Function block, or a Program. This term can refer to either a Type or
an Item.
Programming
device
Programming
redundancy
system (Hot
Standby)
Project
The data bank in the Programming device, which contains the projection
information for a Project.
Prototype data
file (Concept
EFB)
The prototype data file contains all prototypes of the assigned functions. Further, if
available, a type definition of the internal status structure is given.
xlvii
043505766 4/2006
www.barr-thorp.com
Glossary
R
REAL
REAL stands for the data type "real". The input appears as Real literal or as Real
literal with exponent. The length of the data element is 32 bit. The value range for
variables of this data type reaches from 8.43E-37 to 3.36E+38.
Note: Depending on the mathematic processor type of the CPU, various areas
within this valid value range cannot be represented. This is valid for values nearing
ZERO and for values nearing INFINITY. In these cases, a number value is not
shown in animation, instead NAN (Not A Number) oder INF (INFinite).
Real literal
Real literals function as the input of real values in the decimal system. Real literals
are denoted by the input of the decimal point. The values may be preceded by the
signs (+/-). Single underline signs ( _ ) between figures are not significant.
Example
-12.0, 0.0, +0.456, 3.14159_26
Real literals with exponent function as the input of real values in the decimal system.
Real literals with exponent are denoted by the input of the decimal point. The
exponent sets the key potency, by which the preceding number is multiplied to get
to the value to be displayed. The basis may be preceded by a negative sign (-). The
exponent may be preceded by a positive or negative sign (+/-). Single underline
signs ( _ ) between figures are not significant. (Only between numbers, not before
or after the decimal poiont and not before or after "E", "E+" or "E-")
Example
-1.34E-12 or -1.34e-12
1.0E+6 or 1.0e+6
1.234E6 or 1.234e6
Reference
Each direct address is a reference, which starts with an ID, specifying whether it
concerns an input or an output and whether it concerns a bit or a word. References,
which start with the code 6, display the register in the extended memory of the state
RAM.
0x area = Discrete outputs
1x area = Input bits
3x area = Input words
4x area = Output bits/Marker words
6x area = Register in the extended memory
xlviii
043505766 4/2006
www.barr-thorp.com
Glossary
Note: The x, which comes after the first figure of each reference type, represents
a five figure storage location in the application data store, i.e. if the reference
400201 signifies a 16 bit output or marker word in the address 201 of the State
RAM.
Register in the
extended
memory (6x
reference)
6x references are marker words in the extended memory of the PLC. Only LL984
user programs and CPU 213 04 or CPU 424 02 can be used.
Remote I/O provides a physical location of the I/O coordinate setting device in
relation to the processor to be controlled. Remote inputs/outputs are connected to
the consumer control via a wired communication cable.
RP (PROFIBUS)
RP = Remote Peripheral
RTU mode
Rum-time error
Error, which occurs during program processing on the PLC, with SFC objects (i.e.
steps) or FFBs. These are, for example, over-runs of value ranges with figures, or
time errors with steps.
S
SA85 module
The SA85 module is a Modbus Plus adapter for an IBM-AT or compatible computer.
Section
Separator format
(4:00001)
The first figure (the Reference) is separated from the ensuing five figure address by
a colon (:).
xlix
043505766 4/2006
www.barr-thorp.com
Glossary
Sequence
language (SFC)
The SFC Language elements enable the subdivision of a PLC program organizational unit in a number of Steps and Transitions, which are connected horizontally
by aligned Connections. A number of actions belong to each step, and a transition
condition is linked to a transition.
Serial ports
The source code data file is a usual C++ source file. After execution of the menu
command LibraryoGenerate data files this file contains an EFB code framework,
in which a specific code must be entered for the selected EFB. To do this, click on
the menu command ObjectsoSource.
Standard format
(400001)
The five figure address is located directly after the first figure (the reference).
Standardized
literals
If the data type for the literal is to be automatically determined, use the following
construction: Data type name#Literal value.
Example
INT#15 (Data type: Integer, value: 15),
BYTE#00001111 (data type: Byte, value: 00001111)
REAL#23.0 (Data type: Real, value: 23.0)
For the assignment of REAL data types, there is also the possibility to enter the
value in the following way: 23.0.
Entering a comma will automatically assign the data type REAL.
State RAM
The state RAM is the storage for all sizes, which are addressed in the user program
via References (Direct display). For example, input bits, discretes, input words, and
discrete words are located in the state RAM.
Statement (ST)
Status bits
There is a status bit for every node with a global input or specific input/output of Peer
Cop data. If a defined group of data was successfully transferred within the set time
out, the corresponding status bit is set to 1. Alternatively, this bit is set to 0 and all
data belonging to this group (of 0) is deleted.
Step
043505766 4/2006
www.barr-thorp.com
Glossary
Step name
The step name functions as the unique flag of a step in a Program organization unit.
The step name is automatically generated, but can be edited. The step name must
be unique throughout the whole program organization unit, otherwise an Error
message appears.
The automatically generated step name always has the structure: S_n_m
S = Step
n = Section number (number running)
m = Number of steps in the section (number running)
Structured text
(ST)
Structured
variables
Variables, one of which is assigned a Derived data type defined with STRUCT
(structure).
A structure is a collection of data elements with generally differing data types (
Elementary data types and/or derived data types).
SY/MAX
In Quantum control devices, Concept closes the mounting on the I/O population SY/
MAX I/O modules for RIO control via the Quantum PLC with on. The SY/MAX
remote subrack has a remote I/O adapter in slot 1, which communicates via a
Modicon S908 R I/O system. The SY/MAX I/O modules are performed when
highlighting and including in the I/O population of the Concept configuration.
Symbol (Icon)
Graphic display of various objects in Windows, e.g. drives, user programs and
Document windows.
T
Template data
file (Concept
EFB)
The template data file is an ASCII data file with a layout information for the Concept
FBD editor, and the parameters for code generation.
TIME
TIME stands for the data type "Time span". The input appears as Time span literal.
The length of the data element is 32 bit. The value range for variables of this type
stretches from 0 to 2exp(32)-1. The unit for the data type TIME is 1 ms.
Time span
literals
Permitted units for time spans (TIME) are days (D), hours (H), minutes (M), seconds
(S) and milliseconds (MS) or a combination thereof. The time span must be denoted
by the prefix t#, T#, time# or TIME#. An "overrun" of the highest ranking unit is
permitted, i.e. the input T#25H15M is permitted.
li
043505766 4/2006
www.barr-thorp.com
Glossary
Example
t#14MS, T#14.7S, time#18M, TIME#19.9H, t#20.4D, T#25H15M,
time#5D14H12M18S3.5MS
Token
The network "Token" controls the temporary property of the transfer rights via a
single node. The token runs through the node in a circulating (rising) address
sequence. All nodes track the Token run through and can contain all possible data
sent with it.
Traffic Cop
The Traffic Cop is a component list, which is compiled from the user component list.
The Traffic Cop is managed in the PLC and in addition contains the user component
list e.g. Status information of the I/O stations and modules.
Transition
The condition with which the control of one or more Previous steps transfers to one
or more ensuing steps along a directional Link.
U
UDEFB
UDINT
UDINT stands for the data type "unsigned double integer". The input appears as
Integer literal, Base 2 literal, Base 8 literal or Base 16 literal. The length of the data
element is 32 bit. The value range for variables of this type stretches from 0 to
2exp(32)-1.
UINT
UINT stands for the data type "unsigned integer". The input appears as Integer
literal, Base 2 literal, Base 8 literal or Base 16 literal. The length of the data element
is 16 bit. The value range for variables of this type stretches from 0 to (2exp16)-1.
Unlocated
variable
Unlocated variables are not assigned any state RAM addresses. They therefore do
not occupy any state RAM addresses. The value of these variables is saved in the
system and can be altered with the reference data editor. These variables are only
addressed by symbolic names.
Signals requiring no peripheral access, e.g. intermediate results, system tags etc,
should primarily be declared as unlocated variables.
lii
043505766 4/2006
www.barr-thorp.com
Glossary
V
Variables
Variables function as a data exchange within sections between several sections and
between the Program and the PLC.
Variables consist of at least a variable name and a Data type.
Should a variable be assigned a direct Address (Reference), it is referred to as a
Located variable. Should a variable not be assigned a direct address, it is referred
to as an unlocated variable. If the variable is assigned a Derived data type, it is
referred to as a Multi-element variable.
Otherwise there are Constants and Literals.
Vertical format
Vertical format means that the page is higher than it is wide when looking at the
printed text.
W
Warning
When processing a FFB or a Step a critical status is detected (e.g. critical input value
or a time out), a warning appears, which can be viewed with the menu command
OnlineoEvent display... . With FFBs the ENO output remains at "1".
WORD
WORD stands for the data type "Bit sequence 16". The input appears as Base 2
literal, Base 8 literal or Base 1 16 literal. The length of the data element is 16 bit. A
numerical range of values cannot be assigned to this data type.
liii
043505766 4/2006
www.barr-thorp.com
Glossary
liv
043505766 4/2006
www.barr-thorp.com
B
AC
Index
Numerics
3x or 4x register
entering in mathematical equation, 57
assignment operator, 59
Average Weighted Inputs Calculate, 803
B
A
ABS, 64
AD16, 109
ADD, 113
Add 16 Bit, 109
Addition, 113
AD16, 109
ADD, 113
Advanced Calculations, 782
algebraic expression
equation network, 54
algebraic notation
equation network, 51
Analog Input, 787
Analog Output, 799
Analog Values, 71
AND, 117
ARCCOS, 64
ARCSIN, 64
ARCTAN, 64
argument
equation network, 64
limits, 65
arithmetic operator, 59
ASCII Functions
READ, 937
WRIT, 1091
C
Calculated preset formula, 809
Central Alarm Handler, 793
Changing the Sign of a Floating Point
Number, 301
Check Sum, 163
lv
043505766 4/2006
www.barr-thorp.com
Index
CHS, 157
CKSM, 163
Closed Loop Control, 71
CMPR, 167
coil
equation network, 53
error messages, 53
Coils, 91
Communications
MSTR, 701
COMP, 179
Compare Register, 167
Complement a Matrix, 179
Comprehensive ISA Non Interacting PID,
831
conditional expression
equation network, 51, 61
conditional operator, 59
Configure Hot Standby, 157
constant
equation network, 51
constant data
floating point, 57
long (32-bit), 57
LSB (least signifcant byte), 57
mathematical equation, 57
Contacts, 91
Convertion
BCD to binary, 123
binary to BCD, 123
COS, 64
COSD, 64
Counters / Timers
T.01 Timer, 1049
T0.1 Timer, 1053
T1.0 Timer, 1057
T1MS Timer, 1061
UCTR, 1077
Counters/Timers
DCTR, 203
creating equation network, 52
D
data
mathematical equation, 56
data conversions
equation network, 66
Data Logging for PCMCIA Read/Write
Support, 223
DCTR, 203
Derivative Rate Calculation over a Specified
Time, 883
DIOH, 207
discrete reference
mathematical equation, 56
Distributed I/O Health, 207
DIV, 217
Divide, 217
Divide 16 Bit, 243
DLOG, 223
Double Precision Addition, 265
Double Precision Division, 347
Double Precision Multiplication, 395
Double Precision Subtraction, 447
Down Counter, 203
DRUM, 237
DRUM Sequencer, 237
DV16, 243
lvi
043505766 4/2006
www.barr-thorp.com
Index
E
EMTH, 259
EMTH Subfunction
EMTH-ADDDP, 265
EMTH-ADDFP, 271, 275
EMTH-ANLOG, 279
EMTH-ARCOS, 285
EMTH-ARSIN, 291
EMTH-ARTAN, 295
EMTH-CHSIN, 301
EMTH-CMPFP, 307
EMTH-CMPIF, 313
EMTH-CNVDR, 319
EMTH-CNVFI, 325
EMTH-CNVIF, 331
EMTH-CNVRD, 337
EMTH-COS, 343
EMTH-DIVDP, 347
EMTH-DIVFI, 353
EMTH-DIVFP, 357
EMTH-DIVIF, 361
EMTH-ERLOG, 365
EMTH-EXP, 371
EMTH-LNFP, 377
EMTH-LOG, 383
EMTH-LOGFP, 389
EMTH-MULDP, 395
EMTH-MULFP, 401
EMTH-MULIF, 405
EMTH-PI, 411
EMTH-POW, 417
EMTH-SINE, 423
EMTH-SQRFP, 429
EMTH-SQRT, 435
EMTH-SQRTP, 441
EMTH-SUBDP, 447
EMTH-SUBFI, 453
EMTH-SUBFP, 457
EMTH-SUBIF, 461
EMTH-TAN, 465
EMTH-ADDDP, 265
EMTH-ADDFP, 271
EMTH-ADDIF, 275
EMTH-ANLOG, 279
EMTH-ARCOS, 285
EMTH-ARSIN, 291
EMTH-ARTAN, 295
EMTH-CHSIN, 301
EMTH-CMPFP, 307
EMTH-CMPIF, 313
EMTH-CNVDR, 319
EMTH-CNVFI, 325
EMTH-CNVIF, 331
EMTH-CNVRD, 337
EMTH-COS, 343
EMTH-DIVDP, 347
EMTH-DIVFI, 353
EMTH-DIVFP, 357
EMTH-DIVIF, 361
EMTH-ERLOG, 365
EMTH-EXP, 371
EMTH-LNFP, 377
EMTH-LOG, 383
EMTH-LOGFP, 389
EMTHMULDP, 395
EMTH-MULFP, 401
EMTH-MULIF, 405
EMTH-PI, 411
EMTH-POW, 417
EMTH-SINE, 423
EMTH-SQRFP, 429
EMTH-SQRT, 435
EMTH-SQRTP, 441
EMTH-SUBDP, 447
EMTH-SUBFI, 453
EMTH-SUBFP, 457
EMTH-SUBIF, 461
EMTH-TAN, 465
enable contact
horizontal open, 53
horizontal short, 53
normally closed, 53
normally open, 53
Engineering Unit Conversion
and Alarms, 489
lvii
043505766 4/2006
www.barr-thorp.com
Index
equation network
ABS, 64
algebraic expression, 54
algebraic notation, 51
ARCCOS, 64
ARCSIN, 64
ARCTAN, 64
argument, 64
argument limits, 65
arithmetic operator, 59
assignment operator, 59
benchmark performance, 69
bitwise operator, 59
conditional expression, 51, 61
conditional operator, 59
constant, 51
content, 54
COS, 64
COSD, 64
creating, 52
data conversions, 66
enable contact, 53
entering function, 64
entering parentheses, 63
EXP, 64
exponentiation operator, 59
FIX, 64
FLOAT, 64
group expressions in nested layers of
parentheses, 51
LN, 64
LOG, 64
logic editor, 51
logical expression, 51
math operator, 51
mathematical, 55
mathematical function, 64
mathematical operation, 59
nested parentheses, 63
operator precedence, 62
output coil, 53
overview, 51
parentheses, 59, 63
relational operator, 59
result, 54
roundoff differences, 68
SIN, 64
SIND, 64
single expression, 61
size, 54
SQRT, 64
TAN, 64
TAND, 64
unary operator, 59
variable, 51
words consumed, 54
ESI, 469
EUCA, 489
Exclusive OR, 1145
EXP, 64
exponential notation
mathematical equation, 58
exponentiation operator, 59
expression
equation network, 61
Extended Math, 259
Extended Memory Read, 1133
Extended Memory Write, 1139
lviii
043505766 4/2006
www.barr-thorp.com
Index
F
Fast I/O Instructions
BMDI, 135
ID, 617
IE, 621
IMIO, 625
IMOD, 631
ITMR, 639
FIN, 503
First In, 503
First Out, 507
First-order Lead/Lag Filter, 851
FIX, 64
FLOAT, 64
Floating Point - Integer Subtraction, 453
Floating Point Addition, 271
Floating Point Arc Cosine of an Angle (in
Radians), 285
Floating Point Arc Tangent of an Angle (in
Radians), 295
Floating Point Arcsine of an Angle (in
Radians), 291
Floating Point Common Logarithm, 389
Floating Point Comparison, 307
Floating Point Conversion of Degrees to
Radians, 319
Floating Point Conversion of Radians to
Degrees, 337
Floating Point Cosine of an Angle (in
Radians), 343
Floating Point Divided by Integer, 353
Floating Point Division, 357
Floating Point Error Report Log, 365
Floating Point Exponential Function, 371
Floating Point Multiplication, 401
Floating Point Natural Logarithm, 377
Floating Point Sine of an Angle
(in Radians), 423
Floating Point Square Root, 429, 435
Floating Point Subtraction, 457
Floating Point Tangent of an Angle (in
Radians), 465
Floating Point to Integer, 513
Floating Point to Integer Conversion, 325
floating point variable, 56
G
group expressions in nested layers of
parentheses
equation network, 51
H
History and Status Matrices, 583
HLTH, 583
horizontal open
equation network, 53
horizontal short
equation network, 53
Hot standby
CHS, 157
lix
043505766 4/2006
www.barr-thorp.com
Index
I
IBKR, 603
IBKW, 607
ICMP, 611
ID, 617
IE, 621
IMIO, 625
Immediate I/O, 625
IMOD, 631
Indirect Block Read, 603
Indirect Block Write, 607
infix notation
equation network, 52
Input Compare, 611
Input Selection, 897
Installation of DX Loadables, 101
Instruction
Coils, Contacts and Interconnects, 91
Instruction Groups, 37
ASCII Communication Instructions, 39
Coils, Contacts and Interconnects, 50
Counters and Timers Instructions, 40
Fast I/O Instructions, 41
Loadable DX, 42
Math Instructions, 43
Matrix Instructions, 45
Miscellaneous, 46
Move Instructions, 47
Overview, 38
Skips/Specials, 48
Special Instructions, 49
Integer - Floating Point Subtraction, 461
Integer + Floating Point Addition, 275
Integer Divided by Floating Point, 361
Integer to Floating Point, 645
Integer x Floating Point Multiplication, 405
Integer-Floating Point Comparison, 313
Integer-to-Floating Point Conversion, 331
Integrate Input at Specified Interval, 827
Interconnects, 91
Interrupt Disable, 617
Interrupt Enable, 621
Interrupt Handling, 97
Interrupt Module Instruction, 631
Interrupt Timer, 639
J
JSR, 649
Jump to Subroutine, 649
L
LAB, 653
Label for a Subroutine, 653
Limiter for the Pv, 837
lx
043505766 4/2006
www.barr-thorp.com
Index
LL984
AD16, 109
ADD, 113
AND, 117
BCD, 123
BLKM, 127
BLKT, 131
BMDI, 135
BROT, 139
CHS, 157
CKSM, 163
Closed Loop Control / Analog Values, 71
CMPR, 167
Coils, Contacts and Interconnects, 91
COMP, 179
DCTR, 203
DIOH, 207
DIV, 217
DLOG, 223
DRUM, 237
DV16, 243
EMTH, 259
EMTH-ADDDP, 265
EMTH-ADDFP, 271
EMTH-ADDIF, 275
EMTH-ANLOG, 279
EMTH-ARCOS, 285
EMTH-ARSIN, 291
EMTH-ARTAN, 295
EMTH-CHSIN, 301
EMTH-CMPFP, 307
EMTH-CMPIF, 313
EMTH-CNVDR, 319
EMTH-CNVFI, 325
EMTH-CNVIF, 331
EMTH-CNVRD, 337
EMTH-COS, 343
EMTH-DIVDP, 347
EMTH-DIVFI, 353
EMTH-DIVFP, 357
EMTH-DIVIF, 361
EMTH-ERLOG, 365
EMTH-EXP, 371
EMTH-LNFP, 377
EMTH-LOG, 383
EMTH-LOGFP, 389
EMTH-MULDP, 395
EMTH-MULFP, 401
EMTH-MULIF, 405
EMTH-PI, 411
EMTH-POW, 417
EMTH-SINE, 423
EMTH-SQRFP, 429
EMTH-SQRT, 435
EMTH-SQRTP, 441
EMTH-SUBDP, 447
EMTH-SUBFI, 453
EMTH-SUBFP, 457
EMTH-SUBIF, 461
EMTH-TAN, 465
ESI, 469
EUCA, 489
FIN, 503
Formatting Messages for ASCII READ/
lxi
043505766 4/2006
www.barr-thorp.com
Index
WRIT Operations, 83
FOUT, 507
FTOI, 513
HLTH, 583
IBKR, 603
IBKW, 607
ICMP, 611
ID, 617
IE, 621
IMIO, 625
IMOD, 631
Interrupt Handling, 97
ITMR, 639
ITOF, 645
JSR, 649
LAB, 653
LOAD, 657
MAP 3, 661
MBIT, 677
MBUS, 681
MRTM, 691
MSTR, 701
MU16, 747
MUL, 751
NBIT, 755
NCBT, 759
NOBT, 763
NOL, 767
OR, 775
PCFL, 781
PCFL-AIN, 787
PCFL-ALARM, 793
PCFL-AOUT, 799
PCFL-AVER, 803
PCFL-CALC, 809
PCFL-DELAY, 815
PCFL-EQN, 821
PCFL-INTEG, 827
PCFL-KPID, 831
PCFL-LIMIT, 837
PCFL-LIMV, 841
PCFL-LKUP, 845
PCFL-LLAG, 851
PCFL-MODE, 855
PCFL-ONOFF, 859
PCFL-PI, 865
PCFL-PID, 871
PCFL-RAMP, 877
PCFL-RATE, 883
PCFL-RATIO, 887
PCFL-RMPLN, 893
PCFL-SEL, 897
PCFL-TOTAL, 903
PEER, 909
PID2, 913
R --> T, 929
RBIT, 933
READ, 937
RET, 943
SAVE, 961
SBIT, 965
SCIF, 969
SENS, 975
SRCH, 987
STAT, 993
SU16, 1021
SUB, 1025
Subroutine Handling, 99
T.01 Timer, 1049
T-->R, 1037
T-->T, 1043
T0.1 Timer, 1053
T1.0 Timer, 1057
T1MS Timer, 1061
TBLK, 1067
TEST, 1073
UCTR, 1077
WRIT, 1091
XMRD, 1133
XMWT, 1139
XOR, 1145
LN, 64
LOAD, 657
Load Flash, 657
Load the Floating Point Value of "Pi", 411
lxii
043505766 4/2006
www.barr-thorp.com
Index
Loadable DX
CHS, 157
DRUM, 237
ESI, 469
EUCA, 489
HLTH, 583
ICMP, 611
Installation, 101
MAP 3, 661
MBUS, 681
MRTM, 691
NOL, 767
PEER, 909
LOG, 64
Logarithmic Ramp to Set Point, 893
logic editor
equation network, 51, 52
Logical And, 117
logical expression
equation network, 51
Logical OR, 775
Look-up Table, 845
LSB (least significant byte)
constant data, 57
M
MAP 3, 661
MAP Transaction, 661
Master, 701
Math
AD16, 109
ADD, 113
BCD, 123
DIV, 217
DV16, 243
FTOI, 513
ITOF, 645
MU16, 747
MUL, 751
SU16, 1021
SUB, 1025
TEST, 1073
math coprocessor
roundoff differences, 68
math operator
equation network, 51
mathematical equation
constant data, 57
exponential notation, 58
values and data types, 55
mathematical function
ABS, 64
ARCCOS, 64
ARCSIN, 64
ARCTAN, 64
argument, 64
argument limits, 65
COS, 64
COSD, 64
entering in equation network, 64
equation network, 64
EXP, 64
FIX, 64
FLOAT, 64
LN, 64
LOG, 64
SIN, 64
SIND, 64
SQRT, 64
TAN, 64
TAND, 64
mathematical operation
arithmetic operator, 59
assignment operator, 59
bitwise operator, 59
conditional operator, 59
equation network, 59
exponentiation operator, 59
parentheses, 59
relational operator, 59
unary operator, 59
lxiii
043505766 4/2006
www.barr-thorp.com
Index
Matrix
AND, 117
BROT, 139
CMPR, 167
COMP, 179
MBIT, 677
NBIT, 755
NCBT, 759, 763
OR, 775
RBIT, 933
SBIT, 965
SENS, 975
XOR, 1145
MBIT, 677
MBUS, 681
MBUS Transaction, 681
Miscellaneous
CKSM, 163
DLOG, 223
EMTH, 259
EMTH-ADDDP, 265
EMTH-ADDFP, 271
EMTH-ADDIF, 275
EMTH-ANLOG, 279
EMTH-ARCOS, 285, 343
EMTH-ARSIN, 291
EMTH-ARTAN, 295
EMTH-CHSIN, 301
EMTH-CMPFP, 307
EMTH-CMPIF, 313
EMTH-CNVDR, 319
EMTH-CNVFI, 325
EMTH-CNVIF, 331
EMTH-CNVRD, 337
EMTH-DIVDP, 347
EMTH-DIVFI, 353
EMTH-DIVFP, 357
EMTH-DIVIF, 361
EMTH-ERLOG, 365
EMTH-EXP, 371
EMTH-LNFP, 377
EMTH-LOG, 383
EMTH-LOGFP, 389
EMTH-MULDP, 395
EMTH-MULFP, 401
EMTH-MULIF, 405
EMTH-PI, 411
EMTH-POW, 417
EMTH-SINE, 423
EMTH-SQRFP, 429
EMTH-SQRT, 435
EMTH-SQRTP, 441
EMTH-SUBDP, 447
EMTH-SUBFI, 453
EMTH-SUBFP, 457
EMTH-SUBIF, 461
EMTH-TAN, 465
LOAD, 657
MSTR, 701
SAVE, 961
SCIF, 969
XMRD, 1133
lxiv
043505766 4/2006
www.barr-thorp.com
Index
XMWT, 1139
mixed data types
equation network, 66
Modbus Functions, 1099
Modbus Plus
MSTR, 701
Modbus Plus Network Statistics
MSTR, 732
Modify Bit, 677
Move
BLKM, 127
BLKT, 131
FIN, 503
FOUT, 507
IBKR, 603
IBKW, 607
R --> T, 929
SRCH, 987
T-->R, 1037
T-->T, 1043
TBLK, 1067
MRTM, 691
MSTR, 701
Clear Local Statistics, 716
Clear Remote Statistics, 722
CTE Error Codes for SY/MAX and TCP/
IP Ethernet, 746
Get Local Statistics, 714
Get Remote Statistics, 720
Modbus Plus and SY/MAX Ethernet
Error Codes, 739
Modbus Plus Network Statistics, 732
Peer Cop Health, 724
Read CTE (Config Extension Table), 728
Read Global Data, 719
Reset Option Module, 727
SY/MAX-specific Error Codes, 741
TCP/IP Ethernet Error Codes, 743
TCP/IP Ethernet Statistics, 737
Write CTE (Config Extension Table), 730
Write Global Data, 718
MU16, 747
MUL, 751
Multiply, 751
Multiply 16 Bit, 747
Multi-Register Transfer Module, 691
N
NBIT, 755
NCBT, 759
nested layer
parentheses, 51
nested parentheses
equation network, 63
Network Option Module for Lonworks, 767
NOBT, 763
NOL, 767
Normally Closed Bit, 759
normally closed contact
equation network, 53
Normally Open Bit, 763
normally open contact
equation network, 53
O
ON/OFF Values for Deadband, 859
One Hundredth Second Timer, 1049
One Millisecond Timer, 1061
One Second Timer, 1057
One Tenth Second Timer, 1053
operator combinations
equation network, 66
operator precedence
equation network, 62
OR, 775
output coil
equation network, 53
P
parentheses
entering in equation network, 63
equation network, 51
nested, 63
nested layer, 51
using in equation network, 63
PCFL, 781
PCFL Subfunctions
General, 73
PCFL-AIN, 787
PCFL-ALARM, 793
lxv
043505766 4/2006
www.barr-thorp.com
Index
PCFL-AOUT, 799
PCFL-AVER, 803
PCFL-CALC, 809
PCFL-DELAY, 815
PCFL-EQN, 821
PCFL-INTEG, 827
PCFL-KPID, 831
PCFL-LIMIT, 837
PCFL-LIMV, 841
PCFL-LKUP, 845
PCFL-LLAG, 851
PCFL-MODE, 855
PCFL-ONOFF, 859
PCFL-PI, 865
PCFL-PID, 871
PCFL-RAMP, 877
PCFL-RATE, 883
PCFL-RATIO, 887
PCFL-RMPLN, 893
PCFL-SEL, 897
PCFL-Subfunction
PCFL-AIN, 787
PCFL-ALARM, 793
PCFL-AOUT, 799
PCFL-AVER, 803
PCFL-CALC, 809
PCFL-DELAY, 815
PCFL-EQN, 821
PCFL-INTEG, 827
PCFL-KPID, 831
PCFL-LIMIT, 837
PCFL-LIMV, 841
PCFL-LKUP, 845
PCFL-LLAG, 851
PCFL-MODE, 855
PCFL-ONOFF, 859
PCFL-PI, 865
PCFL-PID, 871
PCFL-RAMP, 877
PCFL-RATE, 883
PCFL-RATIO, 887
PCFL-RMPLN, 893
PCFL-SEL, 897
PCFL-TOTAL, 903
PCFL-TOTAL, 903
PEER, 909
Q
Quantum PLCs
roundoff differences, 68
R
R --> T, 929
Raising a Floating Point Number to an
Integer Power, 417
Ramp to Set Point at a Constant Rate, 877
RBIT, 933
READ, 937
MSTR, 712
Read, 937
READ/WRIT Operations, 83
Register to Table, 929
registers consumed
mathematical equation, 56
Regulatory Control, 782
relational operator, 59
Reset Bit, 933
result
equation network, 54
RET, 943
Return from a Subroutine, 943
roundoff differences
equation network, 68
lxvi
043505766 4/2006
www.barr-thorp.com
Index
S
SAVE, 961
Save Flash, 961
SBIT, 965
SCIF, 969
Search, 987
SENS, 975
Sense, 975
Sequential Control Interfaces, 969
Set Bit, 965
Set Point Vaiable, 72
signed 16-bit variable, 56
signed long (32-bit) variable, 56
SIN, 64
SIND, 64
single expression
equation network, 61
Skips / Specials
RET, 943
Skips/Specials
JSR, 649
LAB, 653
Special
DIOH, 207
PCFL, 781
PCFL-, 799
PCFL-AIN, 787
PCFL-ALARM, 793
PCFL-AVER, 803
PCFL-CALC, 809
PCFL-DELAY, 815
PCFL-EQN, 821
PCFL-KPID, 831
PCFL-LIMIT, 837
PCFL-LIMV, 841
PCFL-LKUP, 845
PCFL-LLAG, 851
PCFL-MODE, 855
PCFL-ONOFF, 859
PCFL-PI, 865
PCFL-PID, 871
PCFL-RAMP, 877
PCFL-RATE, 883
PCFL-RATIO, 887
PCFL-RMPLN, 893
PCFL-SEL, 897
PCFL-TOTAL, 903
PCPCFL-INTEGFL, 827
PID2, 913
STAT, 993
SQRT, 64
SRCH, 987
STAT, 993
Status, 993
SU16, 1021
SUB, 1025
Subroutine Handling, 99
Subtract 16 Bit, 1021
Subtraction, 1025
Support of the ESI Module, 469
lxvii
043505766 4/2006
www.barr-thorp.com
Index
T
T.01 Timer, 1049
T-->R, 1037
T-->T, 1043
T0.1 Timer, 1053
T1.0 Timer, 1057
T1MS Timer, 1061
Table to Block, 1067
Table to Register, 1037
Table to Table, 1043
TAN, 64
TAND, 64
TBLK, 1067
TCP/IP Ethernet Statistics
MSTR, 737
TEST, 1073
Test of 2 Values, 1073
Time Delay Queue, 815
Totalizer for Metering Flow, 903
WRIT, 1091
Write, 1091
MSTR, 710
X
XMRD, 1133
XMWT, 1139
XOR, 1145
U
UCTR, 1077
unary operator, 59
unsigned 16-bit variable, 56
unsigned long (32-bit) variable, 56
Up Counter, 1077
V
values and data types
mathematical equation, 55
variable
equation network, 51
variable data
mathematical equation, 56
Velocity Limiter for Changes in the Pv, 841
W
word
maximum in an equation network, 54
words consumed
constant data, 57
mathematical equation, 56
lxviii
043505766 4/2006
www.barr-thorp.com