Professional Documents
Culture Documents
Technologies
andDivision
Drives
PH Main Software
(Sum-Of-Products Notation)
DriveAutomation
Technologies
andDivision
Drives
Table of Contents
Content Page
Content of the Compact Flash Card ........................................................................................... 4
Reverse Compiling a SOP-Program (.hex .dis / .sop)............................................................ 5
Material needed to understand the SOP Operation..................................................................... 6
Directory DRCTRY.ngn.............................................................................................................. 7
Common Structure of a SOP-Program........................................................................................ 8
UserSOP-file.hex (old style)........................................................................................................ 9
Combined Source / Hex File (> FW 2.4)..................................................................................... 10
Initialization Flags within the “Command Generator Diagram“.................................................... 11
Rules and Elements of the Programming Language................................................................... 12
Basic Boolean Functions and Rules........................................................................................... 13
System Variables as Switchable Connections............................................................................ 14
Counters, Timers, Alias (Symbolic Variable).............................................................................. 15
TempFlags, Comparators, User Defined Faults.......................................................................... 16
Frequently used “User Activated Faults”..................................................................................... 17
SOP-Analysis “Speed Reference”, “Auto Display”....................................................................... 18
Keypad Flags / Fault Reset / Analysis “Xformer Temp. Logic”.................................................... 19
Table of Contents
Content Page
Examples of Programming (Ladder, Logic, Function Block)........................................................ 20
SOP-Program “Running the Drive” as Function Diagram............................................................ 21
SOP-Program “Running the Drive”............................................................................................. 22
Checking Logic State and Properties of System Variables.......................................................... 23
Preparatory Settings of the SOP-Editor....................................................................................... 24
Functions of the SOP-Editor....................................................................................................... 25
Programming with the SOP-Editor.............................................................................................. 26
Color Code of System Variables................................................................................................. 27
Compiling a SOP-Program (.hex .dis / .sop).......................................................................... 28
Selecting a SOP-Program (Transfer CFC RAM)..................................................................... 29
SOP Processing.......................................................................................................................... 30
Compiler Error Messages............................................................................................................ 31
Lab-Work on SOP....................................................................................................................... 39
DriveAutomation
Technologies
andDivision
Drives
Compact Flash
system
program
“SOP“
operation
file
“Current“
default
file
“Defaults“
Essentially
Essentially the
the Compact
Compact Flash
Flash Card
Card contains
contains the
the Operating
Operating System,
System, the
the Booting-
Booting- and
and the
the User-Program
User-Program
As a standard, the User-SOP is provided on the CFC as a “.sop” file and can directly be edited (as a copy of the original) if
required. If a User-SOP of the type “.hex” has to be edited it has to be reverse compiled to type “.dis” first ( Legacy Control).
source:
source: CFC
CFC
open
OR
OR
DriveAutomation
Technologies
andDivision
Drives
Dictionary
Reverse compiled Drctry.ngn
Customer drawings file.sop / file.dis
Directory DRCTRY.ngn
The
The declaration
declaration directory
directory ”drctry.ngn”
”drctry.ngn” lists
lists all
all system
system variables
variables which
which are
are available
available for
for aa specific
specific generation
generation of
of
control
control hardware
hardware (Legacy
(Legacy Control,
Control, Next
Next Gen.
Gen. Control)
Control) and
and aa particular
particular version
version of
of the
the ”Eagle
”Eagle Code”.
Code”.
The
The SOP-program
SOP-program usesuses exclusively
exclusively system
system variables
variables of
of the
the declaration
declaration directory
directory specified
specified for #NEXTGEN..
for #NEXTGEN
The
The given
given syntax
syntax is
is to
to be
be observed,
observed, writing
writing inin small
small or
or capital
capital letters
letters is
is at
at will.
will.
DriveAutomation
Technologies
andDivision
Drives
Fixed
Fixed assignment
assignment ofof the
the status
status
value
value of
of system
system variables:
variables:
-- TRUE
TRUE == closed
closed contact
contact (“H”)
(“H”)
-- FALSE = open contact
FALSE = open contact (“L”) (“L”)
Assignments of the type “ = FALSE”
are unnecessary since variables not
listed act as if declared “ = FALSE”.
One
One of
of typically
typically several
several ”PLC”-
”PLC”-
programs
programs forfor sequence
sequence control
control
using
using available
available system
system variables
variables
DriveAutomation
Technologies
andDivision
Drives
Beginning with FW 2.4, compilation creates the true hex- Compiled UserFile.hex (> FW 2.4)
file, but carries on the source-file format as well;
hex-files can be read (even thought not be edited).
Unnecessary statement!
Variables not listed act
as if declared “= FALSE”.
no no
nc nc
DriveAutomation
Technologies
andDivision
Drives
M P24
AND NOT
M P24
OR
The SOP (Sum-Of-Products notation) uses basic Boolean functions (AND, OR, NOT). The logic to be programmed
can be drawn in ladder diagrams or with function blocks; the ladder diagram leads directly to the programming syntax.
A B Z A
& Z Z = A * B
A B A*B A+B A
B
A Z 0 0 0 0 1
A
B >1 Z Z = A + B 0 1 0 1 1
B
1 0 0 1 0
A Z
1 1 1 1 0
A Z Z = /A
precedence of operations The syntax of programming has follow both “General rules” and “Boolean laws”:
General rules: A* 0 = 0 A+ 0 = A A+A*B =A
A* 1 = A A+ 1 = 1 A * (A + B) =A
NOT AND OR A* A = A A+ A = A (A + B) * (A + C) =A+B*C
A*/A = 0 A+/A = 1 A+/A*B =A+B
Boolean laws: A+B = B+A (commutative)
A + (B + C) = (A + B) + C (associative)
A * (B + C) = A * B + A* C (distributive)
DriveAutomation
Technologies
andDivision
Drives
either or
SpeedRampMenu1_O = SpeedRampMenu2_O =
InternalDigitaInput0a_I * /InternalDigitaInput0a_I * switchable
switchable
connection
connection
/IternalDigitalInput1a_I; IternalDigitalInput1a_I;
switch 1 switch 2
If several connections are possible (e.g. either “SpeedRampMenu1_O“ or “SpeedRampMenu2_O“) and if more
than one connection is selected (via … = TRUE), signals are routed according to an internally defined priority:
e.g. ...Menu1 ( SR1) has priority versus …Menu2 ( SR2).
DI3 DO7
S Q Symbolic
Symbolic Variable
Variable (Alias)
(Alias)
DI4 MenuTimer1
P24 DO8 $DI3 = InternalDigitalInput3b_I;
DI5 >1 R M $DI4 = ... ; $DI5 = ... ;
1s
Counter07 $DO7 = InternalDigitalOutput6_O;
DO9
$DO8 = ... ; $DO9 = ... ;
7s
Timer04
Counter
Counter (bi-stable
(bi-stable element)
element) Timer
Timer (time
(time definition
definition via
via menu
menu only
only // menu
menu based
based -Timer)
-Timer)
DriveAutomation
Technologies
andDivision
Drives
TempFlag
TempFlag
Comparator
Comparator
InternalDigitalOutput4_O = Comparator1_I;
User
User defined
defined fault
fault message
message
DriveAutomation
Technologies
andDivision
Drives
(4)
(5)
(1)
(2)
(3)
(1) if Counter03 is set, the keypad (up-, down-arrows) provides the speed demand
(2) at the same time the input from the analog source is disconnected
(3) if Counter03 is not set, the display of the keypad signals AUTO
(4) Counter03 is set, if the analog speed demand signal drops below a monitoring limit (e.g. 3.9 mA) . . . . . . OR
if the Local/Remote selector is in position Local (assuming the standard hardware wiring is provided)
(5) Counter03 is reset, if the analog speed demand signal is larger than the monitoring limit . . . . . . . . . . . . . AND
if the Local/Remote selector is in position Remote (standard hardware wiring!) . . . . . . . . . . . . . . . . . . . . AND
if the keypad button Automatic has been pushed.
FAULT
RESET
KeypadFaultReset_I
AUTO-
MATIC
KeypadAuto_I
DriveAutomation
Technologies
andDivision
Drives
F
F G H + F * /G * /H
G &
H
speed A
& S Q >1
A>B=H
55 % B
=1 R
Comparator2
Counter00
MAN. >1
STOP
=1
Stop DI01b
H
E-Stop
H
Local DI01d
H
MAN. &
START & S Q
&
=1 & S Q
Start DI01a
R The SOP program implementing
H
Counter02 above function is given next page
DriveAutomation
Technologies
andDivision
Drives
The
The “Run
“Run Request”
Request” isis an
an absolutely
absolutely essential
essential part
part of
of any
any SOP-programming.
SOP-programming. Since
Since itit is
is adapted
adapted to
to local
local requirements
requirements itit
will
will differ
differ from
from site
site to
to site;
site; the
the program
program below
below is
is but
but one
one example
example given
given to
to study
study the
the general
general setup
setup to
to “Run
“Run the
the Drive”.
Drive”.
In troubleshooting SOP-programs or in analyzing the currently active structure of a SOP-programmed function, access to
the logic state of system variables is required.
Organized in menus the “Debug Tool” offers quick and comprehensive information of the system variables’ properties.
A
A project
project in
in ”Debug
”Debug Tools”
Tools” isis created
created by
by
assigning
assigning aa name
name and
and the
the IP-address.
IP-address.
DriveAutomation
Technologies
andDivision
Drives
Extensive
Extensive SOP-programming
SOP-programming is
is considerably
considerably supported
supported using
using the
the Software-Tool
Software-Tool ”SOP-Editor”.
”SOP-Editor”.
In
In ”Program”
”Program” the
the SOP-type
SOP-type to
to
be
be programmed
programmed (Gen(Gen IVNxg)
IVNxg)
has
has toto be
be selected
selected
The
The ”Default
”Default Directory
Directory File”
File” has
has to
to be
be
selected
selected in
in accordance
accordance with
with the
the control
control
hardware
hardware and
and firmware
firmware version
version (
( CFC)
CFC)
The
The ”Directory
”Directory Configuration
Configuration File”
File” is
is
located
located in
in the
the same
same drive
drive (C,
(C, D,
D, ...),
...), in
in
which
which the
the “SOP-editor”
“SOP-editor” has
has been
been installed.
installed.
go to line number
open directory file
System
System variables
variables are
are easily
easily located
located by by entering
save SOP file
entering
print SOP file
their
their full
full name
name oror aa fragment
fragment of of their
their name.
name.
find text
select all
Program
Program lines
lines are
are called
called up
up directly
directly (number).
paste
(number).
clear
copy
cut
Basic
Basic functions
functions for
for the
the file
file management
management can can be
be called
called upup via
via
textual
textual access
access (in
(in the
the upper
upper text
text line)
line) as
as well
well as
as via
via icons.
icons.
DriveAutomation
Technologies
andDivision
Drives
logic negation
end of line
logic AND
comment
logic OR
FALSE
TRUE
System
System variables
variables are
are arranged
arranged in
in function
function packages.
packages. By
By aa single
single click
click on
on aa system
system By
By aa single
single click
click on
on aa system
system
variable
variable itit is
is entered
entered inin the
the operation
operation itit is
is entered
entered inin the
the
The
The sequential
sequential arrangement
arrangement of of these
these function
function groups
groups SOP-program
SOP-program on on the
the position
position SOP-program
SOP-program on on the
the position
position
offers
offers quick
quick access
access to
to the
the individual
individual system
system variables.
variables. marked
marked byby the the cursor.
cursor. marked
marked byby the
the cursor.
cursor.
is used as input
System
System variables
variables which
which are
are used
used already
already are
are color-coded:
color-coded:
BLUE
BLUE used
used as
as input
input variable
variable (type
(type ...._I
...._I ))
RED
RED used
used as
as output
output variable
variable (type
(type ...._O
...._O ))
GREEN
GREEN used used as
as input
input and
and as
as output
output variable
variable
The
The generic
generic file
file indicates
indicates which
which application
application is
is assigned
assigned to
to
the
the system
system variables
variables within
within this
this file.
file.
options
used
used in in the
the program)
program) thethe command
command ”update
”update SOP
SOP flags”
flags” updates
updates the
the color
color code
code within
within
the
the list
list of
of variables
variables (i.e.
(i.e. from
from green/blue/red
green/blue/red to
to white).
white).
DriveAutomation
Technologies
andDivision
Drives
Before
Before downloading
downloading aa SOP-SOP-
program
program itit has
has toto be
be com-
com-
piled
piled from
from “disassembled”
“disassembled” DIS- (SOP-) file to be compiled
(.dis
(.dis or
or .sop)
.sop) to
to aa code
code the
the
CPU
CPU cancan read
read (.hex).
(.hex).
NXG
Control
target:
target: CFC
CFC
On
On the
the Compact
Compact Flash
Flash Card
Card any
any number
number of
of User
User SOP-programs
SOP-programs maymay be
be available.
available.
For
For current
current operation
operation one
one of
of these
these has
has to
to be
be selected
selected via
via parameter
parameter to
to become
become active
active in
in the
the CPU.
CPU.
DriveAutomation
Technologies
andDivision
Drives
SOP Processing
input phase
User SOP on CompactFC
input variables (InternalDigitalInput02b_I, FatalFault_I)
statements independent are filled with current system data coming in
on system data from hardware (24 VDC on terminal J9:3) or
RawDemandKeypad_O from software (Fatal Fault state as eagle code processed)
= TRUE;
evaluation phase
statements dependent
on system data - embedded logic is executed in the order of statements
DriveFaultReset_O - outputs must be listed with one equation only
= KeypadFaultReset_I; - counters and timers have to be defined as outputs
RampStop_O before using them as inputs
= TempFlag02_O; Counter07(1) = DigitalInput02b_I;
DigitalOutput4_O = Counter07;
- counters have to be defined before defining resets
Counter07(1) = ... _I;
User SOP on RAM ... _O = Counter07;
CounterReset07 = … _I;
the output of one statement is immediately available as
executed only once
RawDemandKeypad_O an input to any following statements; evaluation order
= TRUE;
during system
may be critical
program initiation
output variables are determined
continuously exe- output phase
DriveFaultReset_O cuted with a typical
= KeypadFaultReset_I; scan time of 20 to output variables (InternalDigitalOutput4_O, setpoint6_O)
RampStop_O 50 ms (dependent are transferred with their determined value
= TempFlag02_O; on length and to hardware (relay contacts on terminal J3:4-6) or
complexity) to software (setpoint 6 is evaluated in CGD);
statements processed during evaluation take effect
DriveAutomation
Technologies
andDivision
Drives
DriveAutomation
Technologies
andDivision
Drives
DriveAutomation
Technologies
andDivision
Drives
DriveAutomation
Technologies
andDivision
Drives
Lab-Work on SOP
Ladder Diagram for “Run Stop Logic” using a “single input switch” for “Local - / Remote Operation”
KeypadManualStop_I Network1RunRequest
Cr_3
FatalFault_I
RunRequestLatch RunRequest_O
DriveAutomation
Technologies
andDivision
Drives
LAB 1 Write the SOP Program for the “Run Stop Logic” as represented by the ladder diagram on the
previous page.
LAB 2 Instead of the “single input switch” for “Local - / Remote Operation” as programmed in the SOP, the
drive’s “Local - / Remote Operation” is selected via a switch with one n.o.- and one n.c.-contact as
shown below (the section shown below is copied from the plant diagrams, sheet 21).
RunRequestLatch
input output
reset
DriveAutomation
Technologies
andDivision
Drives
LAB 1 Write the SOP Program for the “Run Stop Logic” as represented by the ladder diagram on the
previous page.
RunRequest_O = RunRequestLatch;
LAB 2 Instead of the “single input switch” for “Local - / Remote Operation” as programmed in the SOP, the
drive’s “Local - / Remote Operation” is selected via a switch with one n.o.- and one n.c.-contact as
shown below (the section shown below is copied from the plant diagrams, sheet 21).