Sunteți pe pagina 1din 27

Marlon D. Ranas nolram52@yahoo.


: -ab e Controller
-l ^ir 03/95

o2 t.4AKr'e hi K&J$&S
Marlon D. Ranas
lnstalling the 55-g,u
s5-90U ss-gou Getting Ready to Program the 55-90U

1.3.3 Guidelines for the planning and lnstallation of the product

2 Getting Ready to Program the 55-90U
The following are instructions for installation and start_up of the product that
require particular attention: Before you n put you r prog ram i nto the 55-90U, you must prepare the
controllerto acceptthe program- Then you can connect a SIMATIC Programmer
or a personal computer to the S5-90U and start programming.

. Follow strictlythe safety and a((identprevention rulerthat apply in each parti<ular

2.1 Preparing the 55-90U for Program lnput
. gqyipment wirh a permanent power conne<tion which i5 not pro_ To prepare the S5-9OU to accept a new program, you must erase the contents of
vroed.wtth 9fan isolating rwit(h and/or fuses which dir<onne(t all poles. d suitable thecontoller'smemory. Thisprocedureiscalledanoverall reset. Youcandothis
rsorafing swtt<h or fuses mu5t be provided in the building wirinq
(distribution b@rq). Fudhermore, the equip-ent,urt 5" .on,i".ied
syrtem with or without a programmer. lf you want to use a programmer to perform the
tectrve 9round (pE) (ondudor.
to a pro_ overall reset, see your programmer manual for instructions. lf you want to
.8efo-reswitchtngontheequipment,make5urethatthevoltagerangesettingon perform this f unction without using a programmer, proceed as follows:
the equiphent corretponds to the loaal powefiyrtem voltaqe:
a ln
<ase of equipfrent operating on 24 V DC, make sure that proper
1. Setthe "RUN/STOP" switch on the S5-90U to "sToP."
rsolation is provided betueen the mains ,upply ard the 24 V
supply. Only
-' -'use power 2. Disconnect the battery cable from the 55-90U.
orHD384.o4.4iiVoeOroop".rar6l' 3. Disconnect the power to the 55-90U for approximately 'l 5 seconds.
be effective in all operating hodes of the automation equipment.
4. Reconnect the power to the S5-90U.
i"r"iti"q tl,"
eme19ency olf device must not result in any uncontrolled oi undefined 5. Reconnect the battery cable to the S5-90U.
rest-an of
the equipment.
. Automation equipmentand itsoperating elefrents must be installed in
such a
manner as to prevent unintentional operation. 2.2 Connecting a SlMATIC Programmer

You can connect any SlMAT|C programmer to the S5-90U. Before you connect
the programmer, it is recommended that the following conditions exist:

r The 55-90U is plugged into a power source.

o The "RUN/STOP" switch issetto "sToP."
r The red "STOP" LED is on.

lf there is no battery in the S5-90U, you will lose your user program
when you turn off the power.

Marlon D. Ranas

EWA4NEB 812606,4-02a EwA4NEB 812 604-02a 2-1
Getting Ready to program the s5-g0u s5-90u Fu nda m enta ls of Prog ra m m i ng

Now you n connect you r program mer to th e 55-90U as fol lows:


lf the cable for your programmer js not permanently connected to the

3 Fundamentals of Programming
programmer, connect the appropriate end of the cable to the programmer.
To communicate with the 55-90U, you must use the STEP 5 programming
2. Plug the programmer cable connector into the appropriate socket on the 55- language. This programming language specifies words (statements), their correcl
90U (see the fold-out page at the front of this g uide). form, and their syntax. You use these words to write a statement list (sTL). This
3. Lock the connector into place.
statement list is your program. The S5-90U carries outthe instructions ofthe
The 55-90U supplies the power to the programmer. you can connect or statement list. lf you have a programmerwith a displayscreen or an IBM or IBM-
d iscon nect the prog ram mer i ndependent of the power status or th e setti
ng of compatible personal computer, you can also use a ladder diagram to
the "RUN/STOP" switch ofthe 55-90U. communicate with the 55-90U. A ladder diagram and a statement list are two
representationformsforprograms. Thischaptertellsyouhowtoconvertacircuit
diagram to a statement list and explains the format and components of a
2.3 Connecting a Personal Computer statement. This chapter also explains linear programming and provides
programming examples for the operations with which the 55-90U works.
lnstead of a S|MAT|C programmer, you can connect an IBM or IBM-compatible
personal computer to the S5-90U. With this conf guration, you ca n run STEp 5

programs and a ladder diagramming program developed especially for the 3.'l Converting a Circuit Diagram to a Statement List (STL)
55-90U (STEP 5 LAD 90). You need a special cable for your personaicomputer to
Suppose you were asked to devise a plan to turn on a signal lamp. lf you did not
usethis ladderdiagramming program (seeAppendix F). Beforeyou connectthe
have a programmable controller, you would have to make a circuit diagram as
personal computer, it is recommended that the followng conditions exist:
shown in Figure 3-1.
The 55-90U is plugged into a power source.
The "RUN/STOP" switch is set to "STOP.,,
The red "STOP" LED is on.
tt L When a normally open contact (s1) is activated and
s2 I a normally closed contact (S2) is not activated,

Note tt I a srqnal lamp (H1) goes on.

rhe-load culrent (signal lamp) flows over contacts s1 and 52.
lfthere is no battery in the 55-90U, you will lose your user program
when you turn off the power. Figure 3-!. CircuitDiagram(Hardwired)
Now you ca n connect your persona I com puter to the 55-90U as fol lows:
However, since you do have an 55-90U to do this job for you, you do not need to
l. Make sure that the personal computer is turned off.
make the circuitdiagram. To communicate with the S5-90U, you mustusethe
2. Connect the appropriate socket of the personal computer cable to the
STEP 5 programming language.
connector pl ug for the seria I i nterface/V.24 (RS-232-C) on the computer.
3. Plug the connector of the personal computer cable into the appropriate
socket on the 55-90U (see the fold-out page at rhe front of this guide).
4. Lock the connector into place.
5. Turn on the personal computer.
Plug in the connector ofthe personal computer cable or unplug it only when the
personal computer is turned off.

Marlon D. Ranas

2-2 tWA 4NE B 81 2 6064'02a EWA 4NEB 81 2 6064,02a 3-1
Funda mentals of Prog ra m mi ng s5-90u F undamenta ls of Prog ra m m ing

The result ofthis AND operation (result of logic operation, RLO) is assigned ln the
The diagram shows the connection of sensors 51 program to output Q 32.5. ln thestatement list, the equalssign (=) infrontof
and 52 to terminals for digital inputs and the Q 32.5 indicates this assignment. lnthe ladderdiagram, the-(f symbol atthe
connection of the signal lamp to a terminal for end of the series circuit indicates this assignment.
digital output. The 55-90U detects whether
voltage is present at its inputs (indicated by signal To enter your statement list in the S5-90U, you use a SIMATIC@ programmer or an
state "1") orwhethervoltage is absent(indicated l8M or IBM-compatible personal computer and proceed as lollows:
by signal state "0"). However, the S5-9OU cannot 1. Store the statement I ist in organization block'l (OB 1). For the correct
determine whether an input is assigned to a proced u re, see the ma nual for you r prog ra m mer or the progra m mi ng
normally open contact or to a normally closed manual for your personal computer. (See also section 3.3.)
contact. You must indicate this assignment in 2. Transfer your program from your programmer or personal computer to the
your program. You must also indicate the S5-90U. Forthecorrect procedure,see the manual foryour programmeror
conditions underwhich the lamp at output Q 32.5 the programming manual for your personal computer.
is switched on. 3. lf you want to test your program, use the si mulator (see subsection 1.3.2).
FiEure 3-2. Terminal Conn€dion Diagram (piogrammable Control)

3.2 Setting Up a STEP 5 Statement

Your program consists of statements directed to the S5-90U. you must create a
statement Iist (sTL). lf you have a programmer with a display screen or an IBM A statement is the smallest unit of a STEP 5 program. The 55-90U cannot work
or IBM-compatible personal computer, you can also enter the statements as a without statements. One statement generally takes up two bytes of the program
ladder diagram (LAD, see Figure 3-3). memo ry.
ln the example in Figure 3-3, signal lamp H1 is supposed to light up when a
normally open contact (51) is activated and a normally closed contact (S2) is not Statement List
activated. ln this case, both inputs I 32.0 and I 32.1 carry voltage. Both carry A statement list (STL) is a form of representation of a STEP 5 program. This list
signal state "1." For this example, you must combine the two inputs through represents a prog ram as a sequence statements. The statements consist of a
logic AND in your program. ln your statement list, you indicate this with the series of abbreviationsthatyou must enter in a specificsequence. Figure 3-4
letter "A" (AND operation). lf you are usin g a ladder d iagrarnlyou indicate the explains the format of a STEP 5 statement.
AND operation with the series connection of the symbols j E- (these symbols
indicate scanning for signal state "1"). Figure 3-3 provides an example of a Operation (What i5 the task?)
statement list and a ladde r d iag ram. Operand (what should the
S5-90U use to accomplish the
+ task?)
Para meter
tT[, [AF b$hnrtio-n Operand lD
A I 32.0 AND lnput 32.0 Relative address of the statement in a particular block
32.1 AND Input 32.1
= Q 32.5 = Output 32.5 Figure 3-4. Format of a STEP 5 Statement

Figure3-3. BinaryLogi<Operation in Snand LAD

Marlon D. Ranas
EwA 4NER 81 2 6064-02a EWA 4NEB 81 2 6064-02a
Fu ndamentals of P rog ram m i ng 55-90U s5-90u Fu nda me nta ls of Prog ra m m i ng

ThestatementinFigure3-4illustratesscanningoftheinputsignalatinput 132.0. 3.4 Block Types

The operation tells the S5-90U what it should do with the operand. The
parameter indicates the add ress o{ an operand. The programmer inserts the The S5-90U works with the {ollowing block types:
relativeaddressofthestatementautomatically- Thisaddressisinsignificant for
the format of the statement. Appendix D lists all operations and operands. r Organization blocks (OBs) - OBs manage the control program. Theyform
the interface between the operating system and the control program.
3.3 Creating a Linear Program . Program blocks (PBs) - PBs arrange the control program according to
functional or technical aspects.
For processing simple automation tasks, you can program individual operations in
one block. Forthe 55-90U, this is organization block 1 (OB1).
. Function blocks (FBs) - FBs are special blocks for programming frequently
recurring or especially complex program parts (e'g., arithmetic functions)-
They have an extended set of operations (e.g., Jump operations within a
The 55-90U processes OB1 cyclically. The controller processes each statement.
block, see Appendix D).
When it reaches the block end statement (BE), it returns to the first statement
and continues processing- This is called cyclical programming (see Figure 3-5).
r Data blocks (DBs) - DBs store data needed to process a control program'
Actual values, limiting values, and text are examples of data.

3.5 ProgrammingExamples

You can carry out many operations with the S5-90U. This section discusses the
following operations and provides an example for each one:

. set/reset
Figure 3-5. Linear Programming in OB1 . Edge evaluation
o Timer
When programming OB 1, note the following: . Counter
a You enter OB'l on your programmer or personal computer. To do this, you . Comparison
must call up OBl (see the manual for your programmer or personal
com puter). You can use a simulator to test all the examples in this section (see
a One statement normally takes up two bytes in the program memory. Some subsection 1.3.2). Subsections 3.5.1 and 3.5.2 provide practical examPles
operations require two-word statements (e.g., the operation "load a 5ubsections 3.5.3 through 3.5.8 provide theoretical examples.
constant"). You must count these operations twice when figuring the Iength
of your program.
. You must end OB1 with the BE statement.
o After you enter OB1 on your programmer or personal computer, transfer it to
the S5-90U (see the ma nual for your prog rammer or persona I co mputer).
Structured programming is also available. Structured programming handles
more complex tasks tha n I inear progra m mi ng (see the 55-90UlS 5-95U System

Marlon D. Ranas

3-4 EWA 4NE 8 81 2 6064-O2a EwA 4NEB 81 2 6064'02a
Fu ndamentals of p rog ramm i ng
55-90U Fundamenta ls of Prog ra m m i ng

lnterrupt Processing with Counter and Off-Delay Timer The system consists of a hopper, a counting arm, a motorized conveyor belt, a
Operations light barrier, a buzzer, and an 55-90U. The counting arm is wired to input I 33. 1

on the S5-90U. The motor is wired to output Q 32. 1 via a contactor. The buzzer is
The following example illustrates interrupt processing with counter and off_delay
wired to output Q 32.4.
timer operations.
When the packing supervisorturns on the motor (input I 32.2), the outlet at the
The shipping department of a spare parts factory has an automated system
for bottom of the hopper is released (output Q 32.0) and the cogwheels drop one by
packing 100 stainless steel cogwheels to a box (see Figure 3_6).
one onto the belt. lt takes 30 seconds for one part to reach a packing box at the
end of the belt.

Each time a part passes through the hopper outlet, the counting arm sends a
counting pulse to counter input I 33.1. The counter counts up by one. The
supervisor has programmed DB1 to activate counter input I 33.1 and has
programmed OB3 to reset output Q 32.0 (see Figure 3-7 and section 4.4). When
the count reaches '100, the S5-90U resets output Q 32.0, closing the hopper outlet
im medi ately. The 55-90U also sta rts a n off-d elay ti mer that resets output Q 32.1
after 30 seconds, shutting off the motor. By this time, all the parts have reached
the packing box.

l When another packing box is ready to be filled, the supervisor can restart the
o32 0
motor. The supervisor can use the "OFF" switch to stop the packing procedure at
any time ( input 132.3) .

t32.3 _
A light barrier at the end of the conveyor belt ensures that a packing box is in
322 place to receive the cogwheels while the belt is running. The light barrier is wired
to input I 33.0. lf the packing box is pushed out of position while the belt is
running, the light barrier triggers an interrupt. The S5-90U calls OB3
automatically. The packing supervisor has programmed DB1 to activate interrupt
L ghr
Barier (LB)
input I 33.0 and has programmed OB3 to shut off the motor immediately and
sound a buzzer (see Figure 3-7 and section 4.3). When the buzzer sounds, he can
then put the box back in place before any of the cogwheels hit the floor.
Fig ure 3-8 shows the STL prog ram for the above exa m ple.

0| KS ='DB1 0*I I lF 0' : ; 0{e,:,


lzt *, - 'n1P::,r:d0,:: : sL1: SLN 1 ' :

Figure 3-7. Dg1 with lnterruptandCounterlnputtAdivated

Figure 3-6. Syitem for packing Spare pa rts (Gear Wheeli)

Marlon D. Ranas
EWA 4NEB 812 6064-02a EWA 4NEB 812 606'4'02a 3-7
Fu nda m e nta I s of P rog ra m m i ng s5-90u s5-90u Fu nda m e nta ls of Prog ra m m i ng

3.5.2 On-Delay Timer Operation

$r,E Ilrpla,natibn
The following example illustrates an on-delay timer operation.
33.0 ls the box in place?
R F 64.0
ln the automated packing system described in subsection 3.5.1, it takes 30
lf yes, then reset the flag.
R Q 32,4 seconds for each part to reach a packing box at the end of the belt. When the
Turn the buzzer off.
A I 32.2 packing supervisor turns on the motor (input I 32.2), the motor requires 5 seconds
Set the switch to "On."
AN F 64.0 to reach its normal speed. So the supervisor has included an on-delay timer (T2)
The box is in place.
s Q 32.1 in his program forthe S5-90U. When he turns on the motor, the on-delay timer is
Turn the motor on.
s Q 32.0 Open the hopper.
triggered. After 5 seconds, the timer runs out and releases the hopper outlet
A Q 32.0 (output Q 32.0). By the time the first stainless steel cogwheel drops from the
lf the hopper is closed,
L (T 300. 1 hopper to the belt, the belt has reached its normal speed. Figure 3-9 shows the
load the time value.
SF T STL program for the above example.
1 Start the off-delay timer.
ANIl When the time runs out,
R Q 32.1 turn the motor off. sTt FxpHratioin:
A I 32.3 Set the switch to "Off-"
R Q 32.0 Close the hopper. AI 32.2 Set th e switch to "On ".
R Q 32.1 Turn the motor off. AN F 64.0 The box is in place.
BE Block End s Q 32.1 Turn the motor on.

A Q 32.1 lf the motor is on,

083 Did the counter overflow? L KT 500.0 load the time value.
I 35.0 lf yes, reset the diagnostic bit. SDT2 Start the on-delay timer.
R I 35.0 Close the hopper. A l2 When the time runs out,
R Q 32.0 End ifthe counter overflowed. = 0 32.0 open the hopper.
lf the box is not in place,
I 35.4 reset the diagnostic bit.
Figu.e 3-9. On-Delay Tide. Operation
R I 35.4 set a flag as an lD that the box is not in
s F 64.0 place.
R Q 32.0 Close the hopper.
R Q 32.1 Turn the motor off.
s Q 32.4 Turn the buzzer on.
Block End

Figure 3-8. lnteruptP.o(esring with Counter and Off-Delaylimer Operationg

Marlon D. Ranas j-9

EWA 4NEB 81 2 6064-02a EwA 4NER 81 2 6054-02a
Fun da m e nta I s of P rog ra m m i ng s5-90u 55-90U Fu nd a me nta ls of Prog ra m m i ng

3.5.3 AND Operation ln Figure 3-1 1, output Q 32.5 carries signal state "'1 " when at least one of the
AND operation inputs carriessignal state "1." OutputQ 32.5 carries signal state "0" when all
Th e sca ns to see if vari ous cond itio ns a re satisfi ed si multa neously
(see Figure 3-10). inputs carrysignal state "0" simultaneously. The numbero{scansand the
sequence of their programming are optional.

€iicsit Eirgram sTI LAD
3.5.5 Set/Reset Operations

r 32.0 set/reset operations store the result of logic operation (RLO) that is formed in the
1 32.1 I
r rz,o r 32.t r 32.2 o ,r.u I processor. The stored RLO represents the signal state of the addressed operand.
r 32.2 Storage can be dynamic (assig n ment) or stati c (set a nd reset, see Fig u re 3- 1 2).
\ r sz.r i Q
I 32.2 Ciftuit Diagfafili srt LAg l:!lr0 l:32:ll Qr'll;8

Q 32.5 1 0 1

A I32.0
0 1 0
s Q32.5
Figure 3-10. AND Operation
A I32.1 0 0 change
ln Figure 3-'l0, output Q 32.5 carries signal state " 1 " when aII three inputs carry
signalstate"1." Theoutputcarriessignalstate"0"ifatleastoneinputcarries R Q32. 5
Q 32.5
signal state "0." The number of scans and the sequence of the logic statements
r{oP 0. 1 0
are optional.
Figure l-12. Set/Reset Operation
3.5.4 OR Operation
The OR operation scans to see if one o{ two (or more) conditions has been ln Figure 3-12, a set/reset operation is used to simplify a latching relay. Output
satisfied (see Figure 3-1 1). Q 32.5 is supposed to be switched on by a short signal " l " at setting input I 32.0.
The output is supposed to stay switched on until resetting input I 32.1 carries
circuirFifl$rr rl tEt .LAtr signalstate"l." lfbothinputscarrysignalstate"'l,"theoutputcontinuestostay
switched off.

0 I 32.0 lr 32.0 Q 32 . You can also implement a set/reset flip flop using flags (see subsection 3.5.6).
t 32.0 I 32.1 32
0 32.1

Q 32.5
)' 0 r
Figure 3-11. OROperation NOP 0 is required, when the program ln LAD is to be output on CRT-based prograhmers-
When you program in LAD, such NOP 0 operations are assigned automatically.

Marlon D. Ranas

3-t 0 EWA 4NEB 812 6064-02a EwA 4NEB 812 6064-02a 3-1 1
F unda m e nta ls of Prog ra m m i ng
Fu nd a m e nta I s of P rog ram m i ng 55-90U s5-90u

3.5.5 Edge Evaluation Table 3-1. signal state Change at lnputl 32'1

As explained in section 3.1, signal state "l " indicates thatvoltage is present and koirnmr.:ri: signaf etata Current ' Sid th'e,ii$nal.i, ix,n,i€n{tion
signal state "0" indicates that voltage is absent. The term "edge" indicates the pfore3iihE {.rom thg: :l siufirtstat* sitate thtng€ tibiqt d]:
transition from one signal state to another signal state. from n01 t;'1 *
-tlbi:i::':::;::::i] F dvloq;
A leading edge (also called a positive edge) indicates the transition from signal tycki. stored (psslUve
state "0" to signal state "1." A trailing edge (also called a negative edge) edeeF
indicates the transition from signal state "1 " to signal state "0" (see Figure 3-13)
inaflag :

The flag is No No.

1 empty. 0
Leading Edge Trailing Edge Yes.
2 0 'l Yes.

Signal State "0"

'l [-sienarstate"l"
u' ,.,

Siqnal State "0"


4 0
0 No.



- 5 1 No. No.
Time in sec.

Figure 3-13. Leading and Trailing Edge

The S5-90U can detect a leading edge and evaluate it for specific purposes.
fftcuit Ojngrnm :sll I,AD
You can write your program to react to changes in signal state. The program can
check the program memory during each cycle to see if a particular signal state has
changed sincethe last cycle (e.9., the program can checkthe signal state of input A I 32.1 Ir:z.r F64.0 ,,o I

I 32. 1, see Table 3- 1 ). The program must compare a signal state f rom one cycle to F 64.0
f-l --:,r--11-1

a signal state in the next cycle. The program stores the signal state from the F 2.0
previous cycle in a flag. During the next cycle, the program compares the current I32.1 l,,r.t rolo
signal tothesignalfromthepreviouscycle(thesignal thatisstoredintheflag). lf -l* F 64.0 I tr


th e signal state changes from "0" to " 1, "the S5-90U detects the cha nge and ca n
reactto it. Figure 3-14 provides an example of edge evaluation as used in a
F-\' ' o

momenta ry-contact relay.

Figure 3-14. Edge Evaluation

Marlon D. Ranas ) 12

3-1 2 EWA 4NE B 81 2 6064-O2a EWA 4NEB 81 2 6064'02a
Fu nda m e nta I s of p rog ram m i ng 55-90U S1-qOU F u n d a m e nta ls of P rog ra m m i ng

ln Fig u re 3-'14, the AND cond ition "A I 32.1 and AN F 64.0,' is satisf ied on each
Explanation of the Timer Operations
leading edge of the signal at input I 32.1. The RLO is', 1.,, This sets f lags F 64.0
and F 2.0 (edge flags).

ln th e next processing cycle, the AND cond ition ,,A I 32.,l a nd AN F 64.0,, is not
satisfied since flag F 64.0 has already been set. Flag F 2.0 is reset.
Therefore, lag F 2.0 carries signal state " 1', for only one program run. When
in put I 32.1 is switched off, flag F 64.0 is reset. Th is resetting prepa res the way for
a Constant time value (KT)
evaluation ofthe next leading edge ofthe signal at input t:i.t. a Constanttimevalue is l00. You can entervaluesfrom
0 to 999.

3.5,7 Timer Operations a The key to the coded time base is as follows
'I 0=0.01s 2:1s
The S5-90U uses the following timer operations to implement a nd monitor 3:1os
chronological sequences: I Use the smallesttime base possible'
r On-delay timer (SD)
KT 100. 0 (KT 100.0 : 100 x 0.0'ls)
r Off-delay timer (SF)
o Pulse timer (SP)
. Extended pulse timer (SE)
. Stored on-delay timer (SS)
Start of a timer.
- You can use any of the other timer operations (SF, 5P, SE, 55, or R) in place
. Resettimer(R)
of SD (start an on-delaY timer).

a Timer 2 (internal clock) starts the timer.

| - you can program 32 timers (T0 to T3'l).


Figure 3-1 5. Explanation of th€ Components of a Time. Operation

Marlon D. Ranas

3-14 EWA 4NE 8 81 2 6064-02a 3-15
EwA ANEB A1 2 6064-O2a
Funda me ntals of p rog ram m i ng

Starting an On-Delay Timer (5D) Starting a Pulse Timer (5P)

ln Figure 3-16, output e 32.0 is supposed to switch on 5 seconds after input I ln Figure 3-17, an output issupposed to switch on when the signal state at input
is switched o-n..The output is supposed to stay on as long as
the jnput carries I 32.0 changes from "0" to " 1 . "
signal state " 1." The output is supposed to stay on as long asthe input carries signal state',.l,,, but
no lonqer than 40 seconds.
Ciirrit DiASia{n rim*indOiadrnm
€ircrit Fiagrarn Timing,,Eingrarlr
Signal State
Si gnal State


Q 32.0
Time in sec
--)j 5 :<- --+: 5 :<--

sT[ LA*
A I 32.2
L KT 500 .0


A E 32.0
AT2 L KT 400. 1

= o 32.0 sP12


Figure 3-16. StaftinganOn-DelayTim€r NOP O

= o 32.5

Fiqure 3-17. Stadinq a Pulse Timer

l- 16
Marlon D. Ranas
EWA 4NER 8l 2 6054-02e EWA 4NFB 81 2 6054-02a 3-1 7
Fu nda me nta I s of P rog ra m m i ng s5-90u s5-90u P rog r a m ma b le Fu nct i ons

3.5.8 CounterOperations 4 Programmable Functions

The S5-90U uses counter operations (software counters) to handle counting jobs
directly. ln Figure 3-18, counter 1 is setto the count 7 when the signal state at
r The 55-90U has the following functions that you can program according to your
input l 32. l changes f rom " O" lo " l." Output Q 32.2 now carries signal state " l."
Every time input I 32.0 is switched on, the count is decremented by 1 (count
down). The output is set to "0" when the count is "0."
. lnterrupt input (see section 4.3)
. Counter input (see section 4.4)

ciit{r:ir:niigtern ri$i:rg:Diagfntn
4.1 Default Settings in DB1
To make programming easierfor you, data block 1 (DB1) is integrated into the
S5-90U with preset values (default parameters). After performing an overall
reset, you can load this default DB1 from the 55-90U into your programmer or
personal computer and display it on the screen (see Figure 4-1).

0| Kc ='081 08n:i ; $p{,i

Lzt KC .'CAP N ; #dilr sLN 1

24: KC =' SF 082 Dll.,0 EF D83

36: KC ='Drt0 KBE M8100
48: KC ='KBS M8101 PGN 1 i#
60: KC =' ENo ' ;

figure 4-1. DB'l with DefaultParameteE

Q X2.2 Count

This default DB t has one parameter block f or each f unction. Each parameter
5Tr block begins with a block lD that identifies the function (shown in Figure 4-1 with
a shaded background). This block lD is followed by a colon. The individual
A I 32.0 parameters for each function are centralized in these parameter blocks. Section
cDcl 4.2 explains the significance of each block lD.
A I 32.1
= A 32.2

Figure 3-18. Countet Operationt

Marlon D. Ranas

3-18 EWA 4NEB 81 2 6064-02a EWA 4NEB 812 5O&-O2a 4-l
P rog ra m m a bl e Fu nctio ns s5-90u 55-90U P rog r a m m a b le Fu nct i o n s

t 4.2
4.1.1 Rules for Assigning Parameters Reference Tables for Programming DB1

youmustobservethefollowingruleswhenchangingoraddingtodefaultDBl: I Oef ParametersoftheS5-9OU

. Make surethat the character string "DB1 " is in front of the first parameter Table 4-1. DB1 Parameters of the 55-90u
block, followed by at least one filler (such as a blank space or a comma). Pbr{r|retrr Y5,llic E*p.lhilatitil;
r Make su re that each para meter block beg ins with a block lD followed by a
colon and at least one filler (such as a blank space or a comma). Eltxklil:rOAl: ,Onbd.idr:iifttgf rtrpt
. Put a filler (such as a blank space or a comma) after each parameter and each
value that you enter (see Figure 4-1). IP 0 lnterrupt, positive edge, I 33.0
. Make sure there is a semicolon (;) at the end of each parameter block
followed by a f iller (such as a blank space or a comma). Bliic* lSr:Ol{: O.!bo6rd:Co*nt€i
r lf a parameter block is enclosed between comment characters (#), it will not CAP p/N Counter, positive edge, comparison value p
be interpreted by the PLC. lfthe parameter block is to be interpreted by the
PLC, overwrite the comment characters in front of the block identifier and at p = 0 to 65536 N/n = not activated
the end ofthe relevant parameter block (i) with a space.
r Makesurethattheword "END" is attheend of the last parameterblock, ,9iN5C Li
followed by a filler Guch as a blank space or a comma). "144,:19'1f,1":l:r
SLN p Slave number
5F Location of the SEND mailbox
EF ) or* o*u Location of the REcElvE mailbox
Note KBE I or MBz' Location of the RECEIVE coordination byte

lf th e 55-90U detects a progra mm ing error n DB 1, the controll er wi ll

Location of the SEND coordination byte
Programmer bus number
remain in the "STOP" mode even after you set the " RUN/sTOP"
switch to "RUN." (The red tED lights up.) p=1to30 x=2to63 y=Oto255 z=Oto127
Blfift tDlEftTl Fitor Fetjno

4.'1.2 Howto Program DB1 ERR DBw DWx,

MBy or MWz
Location of the parameterization error code

To ch ange or add to the default val ues i n DB 1 , proceed as fol lows:

w=2to63 x=Oto255 y=0to127 z=Oto'126
1. DisplaythedefaultDBl on yourprogrammeror personal computer.
2. Move the cursor to the desired parameter block.
3. Change or add to the parameter (see section 4.2 for the significance and
TheERT(ErrorReturn) blockidentifierisnotcontainedindefaultDB'1;itcan,
possible values of the parameters).
however, be aded in DB1 .
4. Transferthe altered DB1 to the s5-90U.
5. Movethe"RUN/STOP" switch onthe55-90Ufrom "sTOP"to "RUN." I

The 55-90U accepts the altered data.

Marlon D. Ranas
4-2 EwA 4NEB 812 6064 02a EwA 4NEB 812 604-02a
Prog ra m m ab I e F u ncti o ns s5-90u Prog ra m m a b le Fu nct i on s

4.3 Using the lnterrupt lnput 4.4 Using the Counter lnput
The S5-90U has a counter input (24V DC) for very rapid count pulses (max. 1 kHz).
lnterrupt-driven processing occurs when a signal from the Process causes the
It counts the positive edgesthat enter at programmed counter input I 33.1 (see
S5-90U to interruptcyclicscanning and process a specificprogram. Forthe
subsec-tion 3.5.6). The counter counts up only. lt does not countdown. To use
55-90U, a signal state change from "0" to " 1 " (positive edge) at input I 33'0
the counter input, proceed as follows:
triggers an interrupt. The is-gOU then interrupts cyclic scanning in OB1 and
jrmps to OB3. When the controller f inishes processi ng OB3, it iumps back to the
point of interruption in OB1 and resumes processing. 1. Wire counter input I 33.1 (see section 1.3.1).
2. ln O83, program the interrupt reaction that is to be triggered when the
To use input I 33-0 for interruPt-controlled program processing, proceed as counter reaches the value that you program in DB 1.
follows: 3. Activate the counter input in defaultDBl asfollows:
a. Display default DB1 of the 55-90U on your programmer or personal
1. Wire interruptinputl 33.0(seesection 1.3.1). computer.
b. Alter pa ra meter b lock 'OBC:_ _CAP_N_ _ _ _; _ ' as indicated in Ta ble 4-3.
2. Program an interrupt reaction in OB3.
c. Transferthe altered DB1 to the 55-90U.
3. Activate the interrupt input in default DB1 asfollows:
a. Display default DBI of the S5-9OU on your proqrammer or personal d. Move the "RUN/STOP" switch on the 55-90U from "STOP" to "RUN."
Closing the hopper outlet in the exa mple in subsection 3.5. 1 is a reaction that you
b. Alter parameter block'OBl:------; -' as indicated in Table 4-2'
c- Transfer the altered DB 1 to the S5-90U.
could proqram in OB3.
d. Move the "RUN/STOP" switch on the S5-90U from "STOP" to "RUN "
until it reaches its proqrammed comparison value (counter
The counter counts
Subsection 3.5.'l provides an example of programming a reaction in OB3'
OB3. Table4-3 providesan exampleforactivating counter input I 33.1.
Table 4-2 provides an example for activating interrupt input I 33.0.
Table 4-1. Changing the D€Jault Pa.ameter for the Coudter
Table 4-2. Changing the€ lnterrupt lnput

asrighing a Farameter
Aitidnidg a Faiame{€r fxFbnaiion Exglanation
to:th€.Couni6r trr$,'
to, thG f itiiruil( tnf ut,

lnterrupt input I 33.0 reacts to 12: KS ='CAP 100 : SL1: SLN The counter counts positive edges
0 s ='DB1 031 Tp 0 oBc: a 1

positive edge. The comparison value is 100.

Scanning an lnterrupt lnput

The i nterrupt input is located at input byte 33. You can scan the interrupt input
in your usei program using the statement "L PY 33." The value that is read in
corresponds to the current signal state.

Marlon D. Ranas

EwA 4NEB 81 2 6064-02a 6064'02a
4NEB 81 2 4-5
P rog ra m m a bl e Fu n ctio ns ss-gou 55_90U Loading, Testing, and Backing Up the program

5canning the Counter Status 5 Loading, Testing, and Backing Up the program
The couiter input is located at inputword IW36. You can scanthe countvalue in
your user program using the statement L lw 36 or L PW 35. After you have written your program, you must transfer it to the 55-90U so that
you ca n test the program. you can load your program into the
S5-9OU f rom your
Setting the Counter Status to Zero (0) programmer or personal computer, or from a memory submodule.
You can set the counter status to zero in your user program only by a direct K/O
access: T PW 36. You ca n test you r prog ram by displayi ng the signal status a nd RLO of va rious
The value that is in ACCU 1 immediately prior to the execution of this operation, operands. After you have tested the program Jnd made any necessary
will then be the new comparison value for the counter. corrections, you may wantto back up your program on a memory submodule.
Th e actua I va lue is a utomatica lly set to zero every time there is a STOP+RU N you have backed up your program on this memory submodule, your
program will
transition and on every POWER ON+POWER OFF. be saved even ifthe powerfails while there is no battery in your 55_90U.

5.1 Loading Your program into the S5-90U

You can transfer your program to the memory of the S5-90U as follows:

r You load your program f rom a SIMATIC programmer or f rom an tBM or IBM_
compatible personal computer.
r You load your program f rom a memory submodule.

Loss of program and/or process control.
Can cause personal in.jury or property damage.

Disconnect the power to the 55-90U before you insert or remove a

memory submodule.

Marlon D. Ranas

EwA 4NEB 81 2 6064-02a aWA 4NEB 81 2 6064-02a
55-90U s5-90u Loading, festing, and Backing t|p the program
Loading, Testing, and Backing Up the Program

program from a memory 5.2 Testing Your program

Figure 5-1 illustrates the procedure for loading your
submodule. Programmers offervariousfunctionsthat you can usetotestyour
program. One
of these functions is "STATUS.,, This function displ"y, th.
cur'rent progr"m-
dependentsignal status and the result of logic operation (niOl
Battery inserted and of individual
overall resetof PLc operands during program processing. you can use this f unction
to f ind logical
error in program processing (for additional test functions, se elhe S5_g0u/SS_95U
System Manual\.

5.2.1 Calling the Test Function .STATUS',

To call the test function "STATUS,,, you must set the ,,RUN/5TOP,,
switch of the
lnsert memory submodule S5-90U to "RUN." See your programmer manual for
ju information on calling this
into the PLc. nctio n.

5.2.2 Displaying "STATUS" on a programmer

Afte r you select the " STATUS" fu ncti on, the fol owi ng appea
I rs on th e d isplay:

. ln the upper left-hand corner, the relative step address

counter (SAC, see
Table 5-3), followed by a colon
. To the right of the colon, the first statement of the block you
r The RLO, followed by the signal states of the operands.
T'heir location on the
screen depends on the programmer you are using.
. Additional information, depending on the progrir*"ryo, are
using. See
you r prog ram mer man ual for the s ig n if icance of any
additional information
that might appear.

Carry out errot diagnosti<t

-he significance of the RLO is as follows:
(see ChaPter 6).
Red LEDisfli(kering while
program ii being loaded. o 0: The logical condition has not been met.
r 1: The logical condition has been met.

Figure 5-1. Pro<edure forLoading a Program intothe 55-901J

Marlon D. Ranas

EWA4NEB A126064-O2a ?ilA4NEB Bt2 6064_O2a
the Program
55-90U S5-90U Loading, Testing, and Eacking Up the Program
Loading, Testing, and Backing up

is as follows:
5.3.'l Backing Up the Program on a Memory Submodule
The signi{icance of the signal state (EEPROM)
(relay contacts open)'
o 0: No voltage is present You can store your program only if you have a back-up battery in the S5-90U. To
r '1: Voltage is present irelay contacts closed)' back up the program, copy itfrom the program memory ofthe 55-90U into a
the next memory submodule. Only valid blocks are backed up (see Figure 5-2).
one operation' you can display
once vou have displayed the status of > kev on prosrammer'
;I:;;i;;;Tv tn" lennow
J*'ins ooWN vour
there a functional
battery in the PLC?

5.2.3 Ending the'STATUS" Display

on your programmer'

5.3 Backing UPthe Program

it from loss' you need a memory
To store vour program and protect
and a baitery for the S5-90U'
Connect S5-90U to supply mains

r- Make sure You turn on the 55 an overall

,"pi*" otherwise you will have to perform
,"i"i ""1.vo, ,u1n 6n thg controller' in the s5-90U i5 at least
. "t "t
i"n'"-r"*nJ',fl o] a new lithium tattery
on" y""t. Replace the battery after one year'
No/wron9 submodule inserted.
No prografr loaded in PLC.

Carry out error diagnostics

for s5-90U (see ChaDter 6)
The red LED is flickering while
Explosionand/orfire - -^ rithiumbatterytocatchfireand
lmproperhandling can cause a^ I

iTlXl?".n"rn". lithium batterv Keep it awav f rom
iitl" r). put ut"a batteries in hazardous
tigure 5-2. ProGdure for a Program on a Memory Submodule

Marlon D. Ranas

EwA 4NEB 8126064'02a EwA4NEB 812 6064-02a 5-5
Loading, Testing, and Backing Up the Program
s5-90u 55-90U Diagnosing Errors

5.3.2 Retaining the lnternal Memory with a Back-Up Battery 5 Diagnosing Errors
power f rom the
when there is a power failure or when you disconnect the LEDS on the 55-90U indicate whether the controller is in the "RUN" or the "sTOP"
if the s5-90U has a
ii-ggu, th".oni"nts of the internal memory are retained only the
mode. They also alert you if there is a problem in your program or in your
U".f"ri l",i"tv. ln this case, the following iontents are available when controller. You can use the interrupt stack to diagnose these problems.
power is restored:
. Control Program and data blocks 6.1 Error Messages from LEDs
. Retentive flags and counters
. Th" .ont"ntr-of the interrupt stack (ISTACK' see section 6'2) LEDS on the control panel of the 55-90U indicate whether the controller is in the
Table 5-1 lists the retentive and nonretentive operands' "RUN" or the "STOP" mode. The green LED indicates the "RUN" mode and the
red LED indicates the "STOP" mode. These LED5 also alert you if the controller is
not f unctioning properly (see Table 6-1 ).
6pEichd *drEl'rhtc f,lbnrqtertirP
Table G1. LED Error Mesege5 and Erro. Analysis
Flags 0.0 to 63.7 64.0 to 127 .7
qofilitiqn,.nf Sls
8to31 LfF:Stiitor
Cou nters 0to7 :::t:::!,:i::r::3&90"U: !::r!r: ::::r
Timers 0 to 3'l The 55-90U is in the The red LED is lit The problem is in the S5-90U.
"5TOP" mode. consta ntly. Analyze the interrupt stack (see
section 6.2).
The 55-90U is in the The red LED is Error in loading or saving of
"STOP" mode. flash i ng. program. Use the programmer to
analyze the interrupt stack.

The S5-90U is in the The green LED is The problem is in the program or in
"RUN" mode but is lit constantly. one of the peripherals. Analyze
operatinq improperly. the problem (see lhe 55-90U/
55-95U System Manuaf.

Marlon D. Ranas

EWA 4NEB 81 2 6064'02a EWA 4NEB 8t 2 6064'02a 6-1
Diagnosing Errors
S5-9AU SS-qOU Diagnosing Errors

6.2 Handling Problems in the 55-90U Analyzing Errors Using the ISTACK Display on a programmer or personal
lf you determine from the LEDS on the 55-90U that there is a
problem' you can
diagnose errors using the interruptstack (ISTACK) Depending on the type of programmer or personal computer you use, the
appea ra nce of th e ISTACK d iffers as f ollows:

6.2.1 Analyzing Errors with the "ISTACK" Function . Program mer without a screen
The ISTACK display shows a byte number and its eight-digit bit pattern.
The interrupt stack (lsTAcK) is an internal reg ister of the 55-90u'
The 55-90U The status of each bit is either " O" or " 1." lf the status is,,l,,, the bit is set.
stoiesthecausesof errorsinthisregister. lf aproblemoccurs'theS5-90Usetsa A set bit indicates a problem in your program or in the S5-90U. you can use
bit in the appropriate byte of the lSTAcK. You can use your programmer this information to find out what the problem is as follows:
'1. call upthe "tsTAcK"
personal computer to read this register byte by byte' function.
2. Using the cursor keys, scroll up or down in the display until you discover
To see how to find an error, use your programmer or personal
computer to aset bit in a byte. Fortheexample inTable6-2, bit4of byte gwould be
You will need to
tmnsier the faulty program shown in Table 6-2 to the S5-90U set.
create data block-4(D84). (See the manual foryour programmer or 3. UseTable6-3tofindthe nameof theset bit. Fortheexamplein
.";p"i;r.t ihre protlem with the program is explained following Table 6-3' Table 6-2, bit4of byte9 would be set. This bit is called,,TRAF.,, tt
indicates a transfer error.
Proceed as follows: 4. Use Table 6-4to see the possible reasons whythe TRAF bit is set and how
you can remedy the error. Table 6-4 Iists the most important ISTACK bits
1. Using your Programmer or personal computer, transfer the
faulty program in alphabetical order.
shown in Table 5-2 to the S5-90U.
setthe "RUN/STOP" switch on the S5-g0U tothe "RUN" position' The r
2. "STOP" mode'
Personal computer or programmer with a screen
should remain in the "RUN" mode briefly and then enterthe The ISTACK display lists the names of the bits in the ISTACK register. The
3. Call upthe ISTACK on your programmer or personal computer' status of each bit is either " 0" or " 1." lf the status is,, l,,, the bit is set. An
"x" underthe name of a bit indicatesthatthis bit is set. Aset bit indicates
Table 5-2. Programming Example for lSTAGK Evaluation a problem in your program or in theS5-90U. you can usethis information
to f ind out what the problem is as follows:
FSt OBrll 1. Call upthe "ISTACK" function.
2. Check the display screen to see wh ich bit is marked with an,,x.,, For the
JU P82 C DB4 01 KH=0000 example in Table 5-2, theTRAF bitwould be marked.
BE L IW32 1: KH=0000 3- Use Table 6-4 to see the possible reasons why the TRAF bit is set and how
T Dt,i1 you can remedy the error. Table 6-4 lists the most important ISTACK bits
L Ol,]2 in alphabetical order.
T Ql,l32

Marlon D. Ranas

EwA 4NEa 81 2 6064'02a :WA 4NEB 81 2 6064-02a
6-2 6-3

Diagnosing Errors 55-90U 55-90U Diagnosing Errors

Table 6-4. ISTACK

Table 5-3. ISTACK Di5play. Bytes 5 to 26 (Exterpt)

Bit 4 3 2 0 ISTA{X
7 6 5 Btrrc Csrrsc of'tfibr Brri6dlt
Bvte sl#hy
NINEU 5 Faulty program in S5-90U memory becaule: Perform an overall
. Power failure interrupted ore of following: reset and reload the
9 SIOP5 rRAF - The "COMPRE55" fundion proqram.
5YS - Block transmi5sion from prograftmer or
ZYK PEU BAU ASPFA personal computer to the 55-90U or from
the memory submodule to the 55-9OU
- Overall reset of the S5,90u
25 Step Address Counter (High)
. Baftery was removed while powe.was off.
26 Step Address Counter (Low)* NNN 9 . A nondecodable operationwa! . Fix the operation.
transmifted. a Redu(e nesting
* The step addre55 counter indicates the absolute address of the next 5tatement to
be pro(essed or
. The nesting level was exceeded_ level.
the block start address of the faulty block. a The parameterwas exceeded a Reduce the value.

PEU 10 . Expansion module with no connedion a Connect module.

The error in the example in Table 6-2: There is no DW2 in DB4' . Peripheral bus dirturbance . Elifrinate problem
. Maximum length of the shift register has . Reduce number of
Tabl€ 6-4. lSIACK Analysis been ex(eeded. analog modules.
. An unknown tubmodule is conneded to . Repla(e submod-
the 55-90u. ule with right one.
ISTACX Ctr*eio{,,[],ror F€hi6dy
ulaniii STOPS 9 ''RUN/STOP' swit(h isin'STOp' position. Setswitch to "RUN."

ASPFA and 10 An error occurred during Shofren the Program 5TS 9 a "STP" statement <au5ed a software stop . Che(k the pro(ess.
KEIN AS and 6 transmission from the prollrammer and/or (ompress the "STOP" was requested from a p,ojram'me, . lJse programmerto
9 or personal .ohPuter to the S5-90U memory. or personal computer. switch to "RUN."
NNN and
SAC - FFFFr 25 and 26 The internal program memory STUE 9 The blo(k stack overflowed. The maximum Reduce ne5ting
overf lowed during transfer.
nesting deprh (1 6) was ex(eeded. depth.
BAU 10 This error o((urs when the Program Replace the banery and
recreate or reload the
sYS FEHT 10 fhere is a parameter error in DB 1 Corre.t DBl
is being loaded automati.allY and
there ir no baftery, orthe battery is program.
TRAT 9 Transfererror caused by one of the following Eliminate the
dead, and there is no valid Program . A programmed DB operation with DW prografrming error
in the mehory submodule number largerthan DB length (see the manual for
Rertore the Power o A programmed DB operation without your proqrammer).
NAU 10 There i5 an interruPtion rn the
previous opening of a DB
power suPPlY to the s5-90U or the
lM 90 interface module. ZYK l0 5<antimewasexceeded. Program pro(esJing check the program
l'l time exceeded scan monitoring time becauje for continuou5 loops
* fhe sAC is the Step Address Counter. |STACK bytes 25 and 26 are " l l 1 1 1 1(FF) "
. Theprogram istoo long. or shoden the
. The program <ontainl too many interrupts. Program.
r sYS fEH is displayed only on the PG 605U or pc 6t 5U programmers

Marlon D. Ranas

6-4 EWA 4NEB 81 2 6064-02a atva 4N E B 81 2 6064'02a
Diagnosing Errors
55-90U Ss-sou Tech n ica I Spec if i c at io n s

6.2.2 Errors That Can Occur When You €opy the Program A Technical Specifications
lf th e red LED flashes continuously after you put the 55-9OU nto the i " RU N
Oimensions and Weight Me(hani@l Environmental Conditions ((ont.)
mode, use Table 6-5 to diagnose the error.
DimensionsWxHxD(mm) 145x135x91 Shock*
Table 6-5. Errors That Can o((ur When You Copy a Program Weaght-Ss-gou approx. 1 kg - Tested to IEC 68-2-27
weight-memoryrubm. approx.0.02kg Typeofrho(k Halfsine
Strength of rho<k
lsTACKbjidCy, Cacra:sf ,trtof *ffBpdy.
Climatic Environmental Conditionr
I 5 g peak value,
I 1 ms duration

ASPFA The program stored on the memory shoften or correct the Dire.tion of shock 2shocks in ea<h of
program on the Tempe€turc the 3 axes vertical to
rubmodule is too long for the program Operating each other
memory of the s5-90u. memory submodule.
' horizontaidesign 0to+60'C
The program on the memory submodule - vertical design 0 to +40'C Electromagnetic compatibility (EMC)
contains illegal blo(k numbers. Nonoperating -40'to +70"C Noire lmmuniw
the memory Temperature change
ASPFA The EEPROM memory submodule i5 Replace
- operating Electrostati( d is(harge
max. 10" C / h te5t
defective or too tmall for the program in the submodule or use a to IEC 801-2
larger EEPROM
nonoperating max. 20" C / h - Test voltage 2.5 kV
memory otthe 55-90U. Relativ€ humidity to DtN 40040
memory submodule (Rel. humidity
1 5 to 95% (indoor),
30 ro 95% )
The lnt€rnal program memory overflowed Shorten the Program. Atnosph€ri( prersure
ASPFA and KEIN AS Radiated electromagnetic to tEC 801-3
during transfer. - operatinq 860 to 1060 hPa
and NNN
* - nonoperating 650 to 1060 hPa
field test Field strength 3 V/m
and SAZ = FFFF
- SOr < 0.5 ppm,
Fast transient bu6t to 801,4
" The SAC is the Step Addrets Counter' Limit Class ll
(rel. humidity< 600/0,
ISTACK bytes25and 25are "1 1 1 1 I1 11(FF) " noncondensing)
- B:S < 0.1 ppm,
Emitted interf€ren<e fo VDE 0871
Limit Clasi A
(rel. humidity < 50%
6.3 The Last Resort IEC/VDE Safety lnformation

" mode after you attem pt to of protedion to IEC 529

lf you ca nnot get the 55-90U to enter the " RUN
Vibrationr - Iype lP 20
Jilg""i" the problem may be that you.i nserted a battery in the s5-90u ' Tested to IEC68-2-5 - Class I to IEC 536
whije it was switched off . ln this case, proceed as f ollows: l0 to 57 Hz, const. ampl. 0.075 mn lnsulation rating to VDE 0160
57 to 1 50 Hz, const. a<cel. I g (0s.1988)
- between electri(ally
1. Perform anoverall reset(seesection 2 1)' Mode of vibration Frequency sweeps
with a sweep rate of independent circuits
2. Reload your Program. 1 octave/min and with circuits
Periodof or<illation l0frequencysweeps connected to a central to VDE 0160
lf this action does not help, replace the 55-90U per axir in each of the grounding point (05.1988)
3 axes vertical to each
other Test voltage sine, 50 Hz
Free-fall to IEC 68-2-32 for a rated voltage V .o,i
- tested height of fall 50 mm of the circuits (AC / DC)
V;"o,q= 0to 50V 500V

r Appropriatemeasuresmustbetakentoavoidvibration,shockandcontinuouslhock_

Marlon D. Ranas

EwA 4NEB 812 6064'02a ,WA 4NEB gt 2 6064-O2a A-l
Tech n ical Specif icati ons s5-90u 55-90U Tec h n i ca I Spec if icat i on s

lnternal Techni(al Specif i(ations Output voltage For inte.rupt input: I For digital outpub:
-V1({orexternall/O) +24V Floating yes* | Ourputs Relay outputr,
M€mory capacity - V 2 (for programmer) + 5.2 V inputs I
lnput voltage and .urrent as for digital contact
- internal RAM 2 K rtatefrentr OutPut (urrent (see Specific Onboard l/O Data) | wiring,Varittor
- EPROM / EEPROM submodule -fromvl <100mA Response time I slov-s1 0-K275
Exe(ution time -ft6mv2 <100mA - from "0" to "1" typ.4ouse(. I Floating yes
- per binary approx. 2 Usec. fron'1'to"O" typ.t8oprec. l-isolatedingroupsof 1
Short-(ircuitprotection electroni<
Pulsedurationforsignal Continuout(urrenrlth 3A
Scan time monitoring approx.300 mtec. clasr of prote<tion cla5s I '' o" ot " 1"
Relay type
> 5oo p5ec. Dold ows6g9
Flags 1 024 (51 2 re- Floating V'l yet I
Cablelengthunshielded 50m(164.05ft.) | Switchingcapacityofthecontacts
tentive) Floating V2 no
- resistive load max. 3 A at 250 V AC
Time6: number/range 32/ 0.01 to 9990 se( (ounterinputt: I .ax. 1.5 Aat 30V DC
Eack-up battery Lithium bat-
Floating yes"
Count€6i number/range 32 (8 retenlive) / tery (3.4 V/ I inductrveload max.O.5Aat25oVAc
lnputvoltageand(urrentasfordigitalinputs I max.O.sAat30VDC
0 to 999 8s0 mAh)
{see Spe<ific Onboard l/O Data) Operating cycles ofthe contacts according to
Inputs/outputs (onboard): -ba(k-uptime min. I Year
Response time
Digital inputs I 'seryice life (at 25"C) approx. 5 years
VDE 0660,section 200
' from "0" to " 1 typ. 40 Fse(. -AC-11 1x106
lnterrupt input* 1
Power losses of the module typ. 10.5W -from"1"to"0" typ.180plec. - DC-1 1 0.5x106
Counter input* 1 Counterfrequency max. I kHz switching frequency max. 10 Hz
Digital outputs 6
Mains buffering > 20 ms Pulse duration for signal Cable length unshielded max. 100 m
or maximum conf iguration)
(f "0" ot "1" 500 !se(. (328.1 ft)
lnputs/outputs (€xt€rnal l/O)l Cable length unrhielded 50 m (164.05 ft.)
Digital inputs/outputs -total max. 192
Spe(ifi( Onboard l/O Oata
Analoginputs/outputs-totalmax. 16

Permi!sibl€ blocks: tordigital inputsl All inputs are nonfloating in relation to one another
Organizationblocks 1,3,21,22 Floating
Program blocks 0 to 53 (optocoupler)
Function blo(ks 0 to 63 - irolated in qroups of 10
Data blocks 2 to 63 lnputvoltage L+
- rated value 24VDC
- at "0" signal 0to5VDC
Power Supply (lnternal) -at"1"signal l3to30VDc
lnput current
lnput voltage -at "1" signal typ.8.5 mA
'ratedvalue 115V/230VAC (at 24V DC)
-permi5siblerange 93to127V/187to253\
Response tihe
Line frequency - {rom "0" to " 1 " typ. 2.8 msec
- Permiss. range 47 to 63Hz
- from '1 " to '0" typ. 3.6 msec
cuftent (onsumption 230 V Connedion of 2-wire
for the 55-90U 40 mA SERO proximity switches postible
lnrush current Quiescent current
1-5 mA
, 230vac
at 1 A cable length unshielded max. 100 m
- at 115VAC (328.1 ft.)
You can also use this input as a digital input.
All inputs are nonfloating in relation to one another

Marlon D. Ranas

A-2 EWA 4NEB 812 6064-02a EWA 4NEB 81 2 6064-02a A-3
D List of Operations E forfunction blocks (re)

D.1 Basic Operations Oper-

S for organization blockr (oB) I forfunction blocks (FB)
X for program blocki (PB) (srL)

Oper. Permisiible RLO* Exe(!tion Tim€ Fundion Boolean Logic Operations (Cont.)
ation operands in F5e(.
(srl) z 3 onboard I Ext.l/o Close parenthesis ((onclusion of a
parenthetical expression)
Boolean Logic Operations
t.o N Y N 1to2 I 3to5 Scan operand for " 1 " and <ombine
with RLOthrough logi( AND.
N Y N 3to5
N Y N 6to 10

c N N 3to6
AN LO N N 2 | 3to5 s(an operand for "0" and (ombine
with RLO through logic AND.
N N 3to5
T N N 6to 10

c N N 3to6
Ito2 ..@ fr m!- !){e -rf h* rrr fti
o I,Q N Y N | 3to5 scan operand for "1 " and combine
!:: - ril
with RLO through logic OR.
N Y N Ito5
T N Y N 6to 10

c N Y N 3to6 Load an input @.c -a- * >

ON I,Q N N 2 I 3to5 scan operand for "0" and combine into AccuM 1: byte r acc!ul
(bits 8-1 5)j byte n + 1+ ACCUM l
with RLO through logic OR.
F N N Ito5 (bits 0-7)

T N N 6to 10
Load an output word from the PIQ
c N N Ito6 into ACCUM 1 :
byte n+ACCUMl (bits 8-15);
o N Y 2to5 Combine AND operations through byte n + l+ACCUMl (bits 0-7)
logic OR.
Load an input byte ofthe onboard
A( N Y 4to8 combine expressions enclo5ed in digital inputs into ACCUM I
parenth. (6 levels) thr. logi( AND
Load an input word of the onboard
o( N Y 4to8 combine expressions en(loted in digital inputs into ACCUM 1
parenth. {6 levels) thr. loqic OR.

I RLO-dependent ? 2 RLO affected ? 3 RLo reloaded ? ! RLO-dependent ? 3 RLO reloaded ?

Marlon D. Ranas

EWA 4NEB 81 2 6064-02a EWA 4NEB 812 6064-02a
List of Operations

Oper- Permissible Rto. Exe(ution lime Function

ation op€randi in pset.
(srr) 2 3 Onboaid I Ext. to
Load Operations (Cont.) Load Operations (Cont.)
FY N N N tl Load a flag byte into ACCUM I

L N N N ts Load a flag word into ACCUM 1

byte n+AccuM 1 (bib 8-1 5); Load a time or (ount (in binary
byte n+1+ACCUM l(batr 0-7) code) into AccuM 1
DL N N N 33 Load a data word (left-hand byte) Load timer or counti (in 8CD) into
of the <urrent data blo<k into ACCUM 1

DR N N N 35 Load a data word (right-hand

byte) of the current data block
into ACCUM 'l
DW N N N 35 Loed a data word of the current
data block into ACCUM t:
byte n,ACCUM r(bits 8-1 5);
byte n+I+ACCUM I (biti0-7) --?lEEtu:mf;q::Utr
K8 N N N 5 Load a conrtant (1-byte number)
!r l"w@ roftql
into ACCUM 1
Aaf-Vr b6!-".",@r-'
L KS N N N 5 Load a constant (2 charaders in
ASCIIformat) into ACCUM 1
to an outFrt 6c (i@ rhE qQ|
F N N 5 Load a (onstant (fixed-point ACCUM 1 (bic &15)+b't! a;
number) into ACCUM 1 ACCUM I (bits0-7) *byte o-l
L KH N N N 5 Load a constant (hexade<imal Transf er the contents of ACCUM I
code) into ACCUM 1 with updating of the PIQ to the
onboard di gital output.
L KM N N N 5 Load a constant (bit pattern) into Pw 3236 lNlN N
ACCUM 1 Transfer the contentr of ACCUM I
with updating of the PIQ to the
L KY N N N Load a constant (2-byte number) onboard digital output.
into ACCUM 1
Transf er the content! of ACCUM 1

to a flag byte
L KT N N N 5 Load a constant (time in BcD) into
Transfer th€ contentq ofACCUM I
1 RLo-dependent ? 2 RLO affeded ? I RLO reloaded ? to a flag word (into the PIQ):
AcCUM I (bits 8-1 5)+byte n;
AccUM I (bir!o-7)-byte n+1

Marlon D. Ranas

D-j EWA 4NEB 812 606442a
List of Operations s5-90u s5-90u Lirt of Operations

Oper" Permii5ible RLO' Exe(ution Time Fun(tion

ation operands in us€(.
(srt) 2 3 onboard I Ext.t/o
Transf er Operations (Cont.)

T DL N N N 25 Transfer the (ontent5 of ACCUM 1

Add two fixed-point numberr:
to a data word (left-hand byte) ACCUM 1 + ACCUM 2; CC1/CC0/OV
are aftected
T DR N N N 26 Transfer the (ontent! of ACCUM 1
Subtract tuo fixed-point numbers:
to a data word (right-hand byte)
are affected
T N N N 1A Transferthe (ontents ofACCUM I
to a data word

TN8 Parameter N N N 52 6 Field transfer byte by byte (nufrber .L-F-

Compare tuo fixed,rci.t
n=0to 255 of bytes 0 to 255) for "rcual to': j ACC - \, :=
ACCLr/ . :-€ ?-: 5 '-.
Timer Operations

SP T Y N Y u Start timer (in ACCUM t ) as pulse ::r?_a:€ iBrg.'t,r tr,lj"'"@:

(rignal (ontracting) on poritive r{=lLim::
?'ffsE !'
edoeofthe RLo
{:-m- tuL: e"-"
T Yt N Y u Staft timer (in ACCUM 1) ar eften- * i-Jmffi
ded pulse (5ignal contracting and
stretching) on poritive edge ofthe -.@m1d@mtutltffi
RLO i.r-gwm' r.gglt, t
ACC!rI: ftR:6""
SD T Yi N 65 Start timer (in ACCUM 1 ) as on-
CC! (CDa.F,€ffi
delay on positive edge of the RLO

Stad timer (in ACCUlvl 1) ar stored

ss T YI N Y 65
for -grefi€rtlBn d €qEl b'; ,f
on'delay on po!itive edqe of the
"1 ". CC1 /cco are affeded
SF T N u stan timer (in ACCUM I ) as off-
delav on neqative €dqe of the RLO Compare two fixed-point numbers
R I Y N Y ResettimerifRLO = "1" for " le$ than": if ACCUM 2 <
ACCUM 1, the RLO is "1 ".
Counter Operations CCI /CCo are affected

CU C Yl N 35 Counter counts up 1 on leading Cohpare two fixed-point numberi

edge ofthe RLO Jor "les than or equal to": if

Counter counti down I on leading

ACCUM 2 < ACCUM 1, the RLO ii
CD c N 40 "1 ". CC1 /CCo are affected.
edqe of the RLo

5 c N 62 Setcounter if RLO = "1" 1 Rlo-dependent ? 2 RLO affeded ? 3 RLO reloaded ?

R c N 7 Reset <ounter if RLO = "1"

1 Rlo-dependent ? 2 RLO affeded ? 3 RLO reloaded ?

Marlon D. Ranas

D-5 EWA 4NEB 8l 2 6064-02a EWA 4NEB 81 2 6064-02a D-6
List of Operations s5-90u 55-90U List of Operations

Oper- Permisiible RLO' ExecutionTim€ Function

ation operands in use<,
(srL) 2 3 onboa.d I Ext. Uo

Block Call Operations

IU PB/PY N N Y 63 Un<onditional jumP to a Program Display generation operation for
blo<k the programmer: Generate blank
line by Carriage Return
JU F8 N N Y 65 Unconditional jumP to a function
blo<k Display generation operation for
th€ programmer: Switch over to
lc P8/PY Y 54 Conditional jumP to a Program statement lirt (STL)
Display qeneration operation for
lc F8 Y Yl) Y 57 conditional jump to a function the programmer: swit(h over to

call a data block

Ditplaygere.*€i cE€_-'
c DB N N N 30
:l€ soqra--e idr- rs _;

Return Operations

8E N N Y 37 Block end (termination of a block)

BEC Yl) Y 38 Slock end, <onditional

BEU N N 37 Block end, un<onditional I RLqepdddft ? 2 RLO rfkd ? I nLO!M'

(<annot be used in organization

"No" Operations
NOP O N N N 0 No operation; all bit! = "0"

NOP 1 N N N 0 No operation; all bits = " 1

Stop Operation

STP N N N Stop: Scanninq rycle is Jtill

(ompleted; STS error identifier in
the ISTACK is set.

* 1 Rlo-dependent? 2 Rloaffected? 3 RLO reloaded ?

Yr) RLo is setto " r"

Marlon D. Ranas

D-7 EwA 4NEB 81 26064-02a EWAANEB A12 6064-O2a D-8
List of Operations 55-90U 55-90U List of Operations

O.2 SupplementaryOperations
Permis3ible E@oTiE
! fororqanizationblo(ks(oB) X forfuncionblocks(FB) oDerardi - f<
I I for proqram blo(kr (P8)
Oper- Pe.mirsible RLO' ExecutionTine Fundion
ation operandi in uec.
fsr I 1 2 3 onboard I Ext. uo
Boolean Logic Operations
N N N 16 Cohbine contents of ACCUM 2 and Conditional jump to symbolic addr
ACCUM 1 (word operation) (ifth€ RLO="0", it issetto "l")
through logic AND: result i5 sto.ed
in ACCUM 1. CCI /CCo are affected Jump if lhe rerult is zero: the iu mP
is only made if CCI - 0 and
ow N N N l6 Combine contents of aCCUM 2 and CCo=o.The RLO i5 6ot .ha^,:{
ACCUM 1 (word operation)
through logi< oR: result is stored in
AccuM 1. CCI /CCo are affeded

XOW N N N 15 combine contents of AccUM 2 and

ACCUM 1 (word operation) .!r: _ft gUi []lr!!#rff
throuqh EXCLUSIVE-OR: result is sft.ffEmsr@r
stored in ACCUM 1. CC1/CCo are ::-="m:-j=[-mt-: dM
affeded srrgE
Conversion Operations j]uro;fr.g*s@+rff:E
L'c_r@ !m rdbri::=[
cFw N N N 4 Form the one's complement of #c3='_aEL36@
ACCUM 1. dr&gd-
csw N N N l9 Form the Mo'5 complement of lumpon or.flw: ttEiunp 6otrlt
ACCUM 1. made if the ovERRow m iisL
cc1 /cco and OV are affected The RLO ir not changed.
Shift Operations

5LW Parameter N N N l2+n.8 Shiftthe (ontents of ACCUM 1 to

n=0to 15 the left by the value specified in the
Positions be(oming va<ant are
padded with zero5.
CC1 /CCo are affect€d

5RW Pa rameter N N N 12+ 8 shift the contents of AccUM 1 to 1 Rlo-dependent ? 2 RLO atfected ? 3 RLO reloaded ?
n=0to 15 the right by the value spe(ified in
the parameter. Positions be<oming
vacaht are padded with zeros.
cc1 /CCo are affeded
1 Rlo-dependent ? 2 RLO affected ? 3 RLO reloaded ?

Marlon D. Ranas

D-9 EWA 4NEB 81 2 6064-02a EWA 4NEB 812 6064-02a D-10