S]EMENS
: -ab e Controller-l ^ir 03/95
t.4AKr'e hi K&J$&So2
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
The following are instructions for installation and start_up of the product thatrequire particular attention:
. Follow strictlythe safety and a((identprevention rulerthat apply in each parti<ularca5e,
. ll_af_".:::: 9f gqyipment wirh a permanent power conne<tion which i5 not pro_vroed.wtth an isolating rwit(h and/or fuses which dir<onne(t all poles. d suitablersorafing swtt<h or fuses mu5t be provided in the building wirinq syrtem(distribution b@rq). Fudhermore, the equip-ent,urt 5" .on,i".ied to a pro_tectrve 9round (pE) (ondudor.
.8efo-reswitchtngontheequipment,make5urethatthevoltagerangesettingonthe equiphent corretponds to the loaal powefiyrtem voltaqe:
a ln .the
<ase of equipfrent operating on 24 V DC, make sure that proper ele<tri(alrsolation is provided betueen the mains ,upply ard the 24 V supply. Only use powersupplyunitsto,Ec364-4,41 orHD384.o4.4iiVoeOroop".rar6l' -' -'
. Emergencytrippingdevi(esanaccordan(ewjthEN6O2O4/tEC2O4(VDEO1j3)mustbe effective in all operating hodes of the automation equipment. i"r"iti"q tl,"eme19ency olf device must not result in any uncontrolled oi undefined rest-an ofthe equipment.
. Automation equipmentand itsoperating elefrents must be installed in such amanner as to prevent unintentional operation.
2 Getting Ready to Program the 55-90U
Before you ca n put you r prog ram i nto the 55-90U, you must prepare thecontrollerto acceptthe program- Then you can connect a SIMATIC Programmeror a personal computer to the S5-90U and start programming.
2.1 Preparing the 55-90U for Program lnput
To prepare the S5-9OU to accept a new program, you must erase the contents ofthecontoller'smemory. Thisprocedureiscalledanoverall reset. Youcandothiswith or without a programmer. lf you want to use a programmer to perform theoverall reset, see your programmer manual for instructions. lf you want toperform this f unction without using a programmer, proceed as follows:
1. Setthe "RUN/STOP" switch on the S5-90U to "sToP."2. Disconnect the battery cable from the 55-90U.3. Disconnect the power to the 55-90U for approximately 'l 5 seconds.4. Reconnect the power to the S5-90U.5. Reconnect the battery cable to the S5-90U.
2.2 Connecting a SlMATIC Programmer
You can connect any SlMAT|C programmer to the S5-90U. Before you connectthe 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.
Note
lf there is no battery in the S5-90U, you will lose your user programwhen you turn off the power.
EwA4NEB 812 604-02aEWA4NEB 812606,4-02a 2-1
Getting Ready to program the s5-g0u s5-90u F u nda m enta ls of Prog ra m m i ng
3 Fundamentals of Programming
To communicate with the 55-90U, you must use the STEP 5 programminglanguage. This programming language specifies words (statements), their correclform, and their syntax. You use these words to write a statement list (sTL). Thisstatement list is your program. The S5-90U carries outthe instructions ofthestatement list. lf you have a programmerwith a displayscreen or an IBM or IBM-compatible personal computer, you can also use a ladder diagram tocommunicate with the 55-90U. A ladder diagram and a statement list are tworepresentationformsforprograms. Thischaptertellsyouhowtoconvertacircuitdiagram to a statement list and explains the format and components of a
statement. This chapter also explains linear programming and providesprogramming examples for the operations with which the 55-90U works.
3.'l Converting a Circuit Diagram to a Statement List (STL)
Suppose you were asked to devise a plan to turn on a signal lamp. lf you did nothave a programmable controller, you would have to make a circuit diagram as
shown in Figure 3-1.
-r-tt L When a normally open contact (s1) is activated ands2 I a normally closed contact (S2) is not activated,
I a srqnal lamp (H1) goes on.tt P rhe-load culrent (signal lamp) flows over contacts s1 and 52.
Figure 3-!. CircuitDiagram(Hardwired)
However, since you do have an 55-90U to do this job for you, you do not need tomake the circuitdiagram. To communicate with the S5-90U, you mustusetheSTEP 5 programming language.
Now you ca n connect you r program mer to th e 55-90U as fol lows:
1. lf the cable for your programmer js not permanently connected to theprogrammer, connect the appropriate end of the cable to the programmer.
2. Plug the programmer cable connector into the appropriate socket on the 55-90U (see the fold-out page at the front of this g uide).
3. Lock the connector into place.
The 55-90U supplies the power to the programmer. you can connect ord iscon nect the prog ram mer i ndependent of the power status or th e setti ng ofthe "RUN/STOP" switch ofthe 55-90U.
2.3 Connecting a Personal Computerlnstead of a S|MAT|C programmer, you can connect an IBM or IBM-compatiblepersonal computer to the S5-90U. With this conf i guration, you ca n run STEp 5programs and a ladder diagramming program developed especially for the55-90U (STEP 5 LAD 90). You need a special cable for your personaicomputer tousethis ladderdiagramming program (seeAppendix F). Beforeyou connectthepersonal computer, it is recommended that the followng conditions exist:
r The 55-90U is plugged into a power source.. The "RUN/STOP" switch is set to "STOP.,,r The red "STOP" LED is on.
Note
lfthere is no battery in the 55-90U, you will lose your user programwhen you turn off the power.
Now you ca n connect your persona I com puter to the 55-90U as fol lows:
l. Make sure that the personal computer is turned off.2. Connect the appropriate socket of the personal computer cable to the
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 thepersonal computer is turned off.
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
The diagram shows the connection of sensors 51and 52 to terminals for digital inputs and theconnection of the signal lamp to a terminal fordigital output. The 55-90U detects whethervoltage is present at its inputs (indicated by signalstate "1") orwhethervoltage is absent(indicatedby signal state "0"). However, the S5-9OU cannotdetermine whether an input is assigned to anormally open contact or to a normally closedcontact. You must indicate this assignment inyour program. You must also indicate theconditions underwhich the lamp at output Q 32.5is switched on.
s5-90u F undamenta ls of Prog ra m m ing
The result ofthis AND operation (result of logic operation, RLO) is assigned ln theprogram to output Q 32.5. ln thestatement list, the equalssign (=) infrontofQ 32.5 indicates this assignment. lnthe ladderdiagram, the-(f symbol attheend of the series circuit indicates this assignment.
To enter your statement list in the S5-90U, you use a SIMATIC@ programmer or anl8M or IBM-compatible personal computer and proceed as lollows:
1. Store the statement I ist in organization block'l (OB 1). For the correctproced u re, see the ma nual for you r prog ra m mer or the progra m mi ngmanual for your personal computer. (See also section 3.3.)
2. Transfer your program from your programmer or personal computer to theS5-90U. Forthecorrect procedure,see the manual foryour programmerorthe programming manual for your personal computer.
3. lf you want to test your program, use the si mulator (see subsection 1.3.2).
3.2 Setting Up a STEP 5 Statement
A statement is the smallest unit of a STEP 5 program. The 55-90U cannot workwithout statements. One statement generally takes up two bytes of the programmemo ry.
Statement ListA statement list (STL) is a form of representation of a STEP 5 program. This listrepresents a prog ram as a sequence statements. The statements consist of a
series of abbreviationsthatyou must enter in a specificsequence. Figure 3-4explains the format of a STEP 5 statement.
Operation (What i5 the task?)
FiEure 3-2. Terminal Conn€dion Diagram (piogrammable Control)
Your program consists of statements directed to the S5-90U. you must create astatement Iist (sTL). lf you have a programmer with a display screen or an IBMor IBM-compatible personal computer, you can also enter the statements as aladder diagram (LAD, see Figure 3-3).ln the example in Figure 3-3, signal lamp H1 is supposed to light up when anormally open contact (51) is activated and a normally closed contact (S2) is notactivated. ln this case, both inputs I 32.0 and I 32.1 carry voltage. Both carrysignal state "1." For this example, you must combine the two inputs throughlogic AND in your program. ln your statement list, you indicate this with theletter "A" (AND operation). lf you are usin g a ladder d iagrarnlyou indicate theAND operation with the series connection of the symbols j E- (these symbolsindicate scanning for signal state "1"). Figure 3-3 provides an example of astatement list and a ladde r d iag ram. Operand (what should the
S5-90U use to accomplish the
+ task?)Para meterOperand lD
Relative address of the statement in a particular block
Figure 3-4. Format of a STEP 5 Statement
l-2 EwA 4NER 81 2 6064-02a EWA 4NEB 81 2 6064-02a
tT[, [AF b$hnrtio-n
A I 32.0A I 32.1= Q 32.5
AND lnput 32.0AND Input 32.1
= Output 32.5
Figure3-3. BinaryLogi<Operation in Snand LAD
Fu ndamentals of P rog ram m i ng 55-90U
ThestatementinFigure3-4illustratesscanningoftheinputsignalatinput 132.0.The operation tells the S5-90U what it should do with the operand. Theparameter indicates the add ress o{ an operand. The programmer inserts therelativeaddressofthestatementautomatically- Thisaddressisinsignificant forthe format of the statement. Appendix D lists all operations and operands.
3.3 Creating a Linear ProgramFor processing simple automation tasks, you can program individual operations inone block. Forthe 55-90U, this is organization block 1 (OB1).
The 55-90U processes OB1 cyclically. The controller processes each statement.When it reaches the block end statement (BE), it returns to the first statementand continues processing- This is called cyclical programming (see Figure 3-5).
Figure 3-5. Linear Programming in OB1
When programming OB 1, note the following:
a You enter OB'l on your programmer or personal computer. To do this, youmust call up OBl (see the manual for your programmer or personalcom puter).
a One statement normally takes up two bytes in the program memory. Someoperations require two-word statements (e.g., the operation "load aconstant"). You must count these operations twice when figuring the Iengthof 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 handlesmore complex tasks tha n I inear progra m mi ng (see the 55-90UlS 5-95U SystemManual).
s5-90u F u nda me nta ls of Prog ra m m i ng
3.4 Block Types
The S5-90U works with the {ollowing block types:
r Organization blocks (OBs) - OBs manage the control program. Theyformthe interface between the operating system and the control program.
. Program blocks (PBs) - PBs arrange the control program according tofunctional or technical aspects.
. Function blocks (FBs) - FBs are special blocks for programming frequentlyrecurring or especially complex program parts (e'g., arithmetic functions)-
They have an extended set of operations (e.g., Jump operations within a
block, see Appendix D).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 thefollowing operations and provides an example for each one:
. set/reset
. Edge evaluationo Timer. Counter. Comparison
You can use a simulator to test all the examples in this section (see
subsection 1.3.2). Subsections 3.5.1 and 3.5.2 provide practical examPles
5ubsections 3.5.3 through 3.5.8 provide theoretical examples.
r ANDoOR
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
The system consists of a hopper, a counting arm, a motorized conveyor belt, a
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
wired to output Q 32.4.
When the packing supervisorturns on the motor (input I 32.2), the outlet at thebottom of the hopper is released (output Q 32.0) and the cogwheels drop one by
one onto the belt. lt takes 30 seconds for one part to reach a packing box at theend 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. Thesupervisor has programmed DB1 to activate counter input I 33.1 and hasprogrammed OB3 to reset output Q 32.0 (see Figure 3-7 and section 4.4). Whenthe count reaches '100, the S5-90U resets output Q 32.0, closing the hopper outletim 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 reachedthe packing box.
When another packing box is ready to be filled, the supervisor can restart themotor. The supervisor can use the "OFF" switch to stop the packing procedure atany time ( input 132.3) .
A light barrier at the end of the conveyor belt ensures that a packing box is inplace to receive the cogwheels while the belt is running. The light barrier is wiredto 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 interruptinput I 33.0 and has programmed OB3 to shut off the motor immediately andsound a buzzer (see Figure 3-7 and section 4.3). When the buzzer sounds, he canthen 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
EWA 4NEB 812 606'4'02a
lnterrupt Processing with Counter and Off-Delay TimerOperations
The following example illustrates interrupt processing with counter and off_delaytimer operations.
The shipping department of a spare parts factory has an automated system forpacking 100 stainless steel cogwheels to a box (see Figure 3_6).
l
o32 0
t32.3 _
322ON
L ghrBarier (LB)
Figure 3-6. Syitem for packing Spare pa rts (Gear Wheeli)
3-6EWA 4NEB 812 6064-02a 3-7
$r,E Ilrpla,natibn
081
AN I 33.0R F 64.0R Q 32,4A I 32.2AN F 64.0s Q 32.1s Q 32.0A Q 32.0L (T 300. 1
SF T 1
ANIlR Q 32.1A I 32.3R Q 32.0R Q 32.1BE
083
R
R
I 35.0I 35.0Q 32.0
I 35.4I 35.4F 64.0Q 32.0Q 32.1Q 32.4
BEC
R
s
R
R
s
BF
ls the box in place?lf yes, then reset the flag.Turn the buzzer off.Set the switch to "On."The box is in place.Turn the motor on.Open the hopper.lf the hopper is closed,load the time value.Start the off-delay timer.When the time runs out,turn the motor off.Set the switch to "Off-"Close the hopper.Turn the motor off.Block End
Did the counter overflow?lf yes, reset the diagnostic bit.Close the hopper.End ifthe counter overflowed.lf the box is not in place,reset the diagnostic bit.set a flag as an lD that the box is not inplace.Close the hopper.Turn the motor off.Turn the buzzer on.Block End
Figure 3-8. lnteruptP.o(esring with Counter and Off-Delaylimer Operationg
F u nda m e nta I s of P rog ra m m i ng s5-90u s5-90u F u nda m e nta ls of Prog ra m m i ng
II
3.5.2 On-Delay Timer Operation
The following example illustrates an on-delay timer operation.
ln the automated packing system described in subsection 3.5.1, it takes 30seconds for each part to reach a packing box at the end of the belt. When thepacking supervisor turns on the motor (input I 32.2), the motor requires 5 secondsto reach its normal speed. So the supervisor has included an on-delay timer (T2)
in his program forthe S5-90U. When he turns on the motor, the on-delay timer is
triggered. After 5 seconds, the timer runs out and releases the hopper outlet(output Q 32.0). By the time the first stainless steel cogwheel drops from thehopper to the belt, the belt has reached its normal speed. Figure 3-9 shows theSTL program for the above example.
sTt FxpHratioin:
AI 32.2AN F 64.0s Q 32.1
A Q 32.1L KT 500.0SDT2A l2= 0 32.0
Set th e switch to "On ".The box is in place.Turn the motor on.
lf the motor is on,load the time value.Start the on-delay timer.When the time runs out,open the hopper.
Figu.e 3-9. On-Delay Tide. Operation
EWA 4NEB 81 2 6064-02a EwA 4NER 81 2 6054-02a j-9
F u n da m e nta I s of P rog ra m m i ng
3.5.3 AND OperationTh e AND operation sca ns to see if vari ous cond itio ns a re satisfi ed si multa neously(see Figure 3-10).
Figure 3-10. AND Operation
ln Figure 3-'l0, output Q 32.5 carries signal state " 1 " when aII three inputs carrysignalstate"1." Theoutputcarriessignalstate"0"ifatleastoneinputcarriessignal state "0." The number of scans and the sequence of the logic statementsare optional.
3.5.4 OR OperationThe OR operation scans to see if one o{ two (or more) conditions has beensatisfied (see Figure 3-1 1).
3-t 0 EWA 4NEB 812 6064-02a
Ciftuit Diagfafili srt LAg l:!lr0 l:32:ll Qr'll;8
Q 32.5
A I32.0
s Q32.5
A I32.1
R Q32. 5
r{oP 0.
1
0
0
1
0
1
0
1
0
Nochange
0
F u nd a me nta ls of Prog ra m m i ng
ln Figure 3-1 1, output Q 32.5 carries signal state "'1 " when at least one of theinputs carriessignal state "1." OutputQ 32.5 carries signal state "0" when allinputs carrysignal state "0" simultaneously. The numbero{scansand thesequence of their programming are optional.
3.5.5 Set/Reset Operations
set/reset operations store the result of logic operation (RLO) that is formed in theprocessor. The stored RLO represents the signal state of the addressed operand.Storage can be dynamic (assig n ment) or stati c (set a nd reset, see Fig u re 3- 1 2).
Figure l-12. Set/Reset Operation
ln Figure 3-12, a set/reset operation is used to simplify a latching relay. OutputQ 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 carriessignalstate"l." lfbothinputscarrysignalstate"'l,"theoutputcontinuestostayswitched off.
You can also implement a set/reset flip flop using flags (see subsection 3.5.6).
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.
EwA 4NEB 812 6064-02a 3-1 1
s5-90u 55-90U
€iicsit Eirgram sTI LAD-T;\ r sz.r
l
I 32.2
Q 32.5
r 32.01 32.1r 32.2Q 32.5i
I r rz,o r 32.t r 32.2 o ,r.u
I
r-F-lH)-"]
circuirFifl$rr rl tEt .LAtr
Q 32.5
32
)'I 32.1t 32.0
0
0
0
I 32.0I 32.1r 32.2Q 32.5
lrt-:lr
E
32.0 Q 32 .
'lFigure 3-11. OROperation
F u nd a m e nta I s of P rog ram m i ng
3.5.5 Edge Evaluation
As explained in section 3.1, signal state "l " indicates thatvoltage is present andsignal state "0" indicates that voltage is absent. The term "edge" indicates thetransition from one signal state to another signal state.A leading edge (also called a positive edge) indicates the transition from signalstate "0" to signal state "1." A trailing edge (also called a negative edge)indicates the transition from signal state "1 " to signal state "0" (see Figure 3-13)
Leading Edge
55-90U s5-90u
EWA 4NE B 81 2 6064-O2a EWA 4NEB 81 2 6064'02a
F unda m e nta ls of Prog ra m m i ng
) 12
Trailing Edge
\ [-sienarstate"l" ---.1 ,.,'l t u'
Signal State "0" I L- Siqnal State "0" -
Time in sec.
Figure 3-13. Leading and Trailing Edge
The S5-90U can detect a leading edge and evaluate it for specific purposes.
You can write your program to react to changes in signal state. The program cancheck the program memory during each cycle to see if a particular signal state haschanged sincethe last cycle (e.9., the program can checkthe signal state of inputI 32. 1, see Table 3- 1 ). The program must compare a signal state f rom one cycle toa signal state in the next cycle. The program stores the signal state from theprevious cycle in a flag. During the next cycle, the program compares the currentsignal tothesignalfromthepreviouscycle(thesignal thatisstoredintheflag). lfth e signal state changes from "0" to " 1, "the S5-90U detects the cha nge and ca nreactto it. Figure 3-14 provides an example of edge evaluation as used in amomenta ry-contact relay.
3-1 2
Table 3-1. Evaluati.ga signal state Change at lnputl 32'1
koirnmr.:ri:pfore3iihE-tlbi:i::':::;::::i]
signaf etata{.rom thg: :l
F dvloq;tycki. storedinaflag :
Current 'siufirtstat*
Sid th'e,ii$nal.i,sitate thtng€from n01 t;'1 *(psslUveedeeF
ix,n,i€n{tiontibiqt d]:
1
The flag is
empty. 0No No.
2 0 'l Yes. Yes.
3 0 No. No
4 0 Yes. Yes.
5 1 No. No.
fftcuit Ojngrnm :sll I,AD
-l*F-\' ' o
I 32.1F 64.0F 2.0I32.1F 64.0
A
AN
BE
Ir:z.r F64.0 ,,o I
f-l --:,r--11-1l,,r.t rolo
I
I tr { l----..1
l" \'/ I
Figure 3-14. Edge Evaluation
F u nda m e nta I s of p rog ram m i ng
3-14
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 Operationsleading edge of the signal at input I 32.1. The RLO is', 1.,, This sets f lags F 64.0and 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, f lag F 2.0 carries signal state " 1', for only one program run. Whenin put I 32.1 is switched off, flag F 64.0 is reset. Th is resetting prepa res the way forevaluation ofthe next leading edge ofthe signal at input t:i.t.
3.5,7 Timer Operations
The S5-90U uses the following timer operations to implement a nd monitorchronological sequences:
r On-delay timer (SD)r Off-delay timer (SF)o Pulse timer (SP)
. Extended pulse timer (SE)
. Stored on-delay timer (SS)
. Resettimer(R)
KT 100. 0 (KT 100.0 : 100 x 0.0'ls)
Start of a timer.- You can use any of the other timer operations (SF, 5P, SE, 55, or R) in place
of SD (start an on-delaY timer).
a Timer 2 (internal clock) starts the timer.| - you can program 32 timers (T0 to T3'l).
IT2
Figure 3-1 5. Explanation of th€ Components of a Time. Operation
Load
a Constant time value (KT)
a Constanttimevalue is l00. You can entervaluesfrom0 to 999.
a The key to the coded time base is as follows
' 0=0.01s 2:1sI t=o.tr 3:1osI Use the smallesttime base possible'
I
EWA 4NE 8 81 2 6064-02a EwA ANEB A1 2 6064-O2a 3-15
Funda me ntals of p rog ram m i ng
Starting an On-Delay Timer (5D)
ln Figure 3-16, output e 32.0 is supposed to switch on 5 seconds after input I 32.2is switched o-n..The output is supposed to stay on as long as the jnput carriessignal state " 1."
Starting a Pulse Timer (5P)
ln Figure 3-17, an output issupposed to switch on when the signal state at inputI 32.0 changes from "0" to " 1 . "The output is supposed to stay on as long asthe input carries signal state',.l,,, butno lonqer than 40 seconds.
€ircrit Fiagrarn Timing,,Eingrarlr
Si gnal State
STL LAO
A E 32.0L KT 400. 1
sP12NOP O
NOP O
NOP O
AT2= o 32.5
Fiqure 3-17. Stadinq a Pulse Timer
EWA 4NFB 81 2 6054-02a 3-1 7EWA 4NER 8l 2 6054-02e
Ciirrit DiASia{n rim*indOiadrnm
Signal State
132.2
Q 32.0
Time in sec--)j 5 :<- --+: 5 :<--
sT[ LA*
A I 32.2L KT 500 .0SDf2NOP O
NOP O
NOP O
AT2= o 32.08F
Figure 3-16. StaftinganOn-DelayTim€r
l- 16
F u nda me nta I s of P rog ra m m i ng
3.5.8 CounterOperations
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 atinput 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 (countdown). The output is set to "0" when the count is "0."
s5-90u s5-90u P rog r a m ma b le Fu nct i ons
i
4 Programmable Functions
r The 55-90U has the following functions that you can program according to yourneeds:
. lnterrupt input (see section 4.3)
. Counter input (see section 4.4)
4.1 Default Settings in DB1
To make programming easierfor you, data block 1 (DB1) is integrated into theS5-90U with preset values (default parameters). After performing an overallreset, you can load this default DB1 from the 55-90U into your programmer orpersonal computer and display it on the screen (see Figure 4-1).
0| Kc ='081 08n:i ; $p{,iLzt 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
This default DB t has one parameter block f or each f unction. Each parameterblock begins with a block lD that identifies the function (shown in Figure 4-1 witha shaded background). This block lD is followed by a colon. The individualparameters for each function are centralized in these parameter blocks. Section4.2 explains the significance of each block lD.
EWA 4NEB 81 2 6064-02a EWA 4NEB 812 5O&-O2a
ciit{r:ir:niigtern ri$i:rg:Diagfntn
Q X2.2 Count
5Tr
A I 32.0cDclA I 32.1L KC7sctACl= A 32.2
Figure 3-18. Countet Operationt
3-18 4-l
P rog r a m m a b le F u nct i o n sP rog ra m m a bl e F u nctio ns s5-90u 55-90U
4.1.1 Rules for Assigning ParametersIt 4.2 Reference Tables for Programming DB1
youmustobservethefollowingruleswhenchangingoraddingtodefaultDBl: I Oef ParametersoftheS5-9OU
. Make surethat the character string "DB1 " is in front of the first parameterblock, followed by at least one filler (such as a blank space or a comma).
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).. Put a filler (such as a blank space or a comma) after each parameter and each
value that you enter (see Figure 4-1).. 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).r lf a parameter block is enclosed between comment characters (#), it will not
be interpreted by the PLC. lfthe parameter block is to be interpreted by thePLC, overwrite the comment characters in front of the block identifier and atthe end ofthe relevant parameter block (i) with a space.
r Makesurethattheword "END" is attheend of the last parameterblock,followed by a filler Guch as a blank space or a comma).
Note
lf th e 55-90U detects a progra mm ing error i n DB 1, the controll er wi ll
remain in the "STOP" mode even after you set the " RUN/sTOP"
switch to "RUN." (The red tED lights up.)
I
4.'1.2 Howto Program DB1
To ch ange or add to the default val ues i n DB 1 , proceed as fol lows:
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
possible values of the parameters).4. Transferthe altered DB1 to the s5-90U.5. Movethe"RUN/STOP" switch onthe55-90Ufrom "sTOP"to "RUN."
The 55-90U accepts the altered data.
EwA 4NEB 812 6064 02a
TheERT(ErrorReturn) blockidentifierisnotcontainedindefaultDB'1;itcan,however, be aded in DB1 .
EwA 4NEB 812 604-02a
Ii
t
4-2
Table 4-1. DB1 Parameters of the 55-90u
Pbr{r|retrr Y5,llic E*p.lhilatitil;
Eltxklil:rOAl: ,Onbd.idr:iifttgf rtrpt
IP 0 lnterrupt, positive edge, I 33.0
Bliic* lSr:Ol{: O.!bo6rd:Co*nt€i
CAP p/N Counter, positive edge, comparison value p
p = 0 to 65536 N/n = not activated
"144,:19'1f,1":l:r
,9iN5C Li
SLN5F
EF
KBE
KBSPGN
p
) or* o*uI or MBz')
p
Slave numberLocation of the SEND mailboxLocation of the REcElvE mailboxLocation of the RECEIVE coordination byteLocation of the SEND coordination byteProgrammer bus number
p=1to30 x=2to63 y=Oto255 z=Oto127
Blfift tDlEftTl Fitor Fetjno
ERR DBw DWx,MBy or MWz
Location of the parameterization error code
w=2to63 x=Oto255 y=0to127 z=Oto'126
I
Prog ra m m a b I e F u ncti o ns s5-90u
4.3 Using the lnterrupt lnput
lnterrupt-driven processing occurs when a signal from the Process causes the
S5-90U to interruptcyclicscanning and process a specificprogram. Forthe55-90U, a signal state change from "0" to " 1 " (positive edge) at input I 33'0
triggers an interrupt. The is-gOU then interrupts cyclic scanning in OB1 andjrmps to OB3. When the controller f inishes processi ng OB3, it iumps back to thepoint of interruption in OB1 and resumes processing.
To use input I 33-0 for interruPt-controlled program processing, proceed as
follows:
1. Wire interruptinputl 33.0(seesection 1.3.1).
2. Program an interrupt reaction in OB3.3. Activate the interrupt input in default DB1 asfollows:
a. Display default DBI of the S5-9OU on your proqrammer or personal
computer.b. Alter parameter block'OBl:------; -' as indicated in Table 4-2'
c- Transfer the altered DB 1 to the S5-90U.d. Move the "RUN/STOP" switch on the S5-90U from "STOP" to "RUN "
Subsection 3.5.'l provides an example of programming a reaction in OB3'
Table 4-2 provides an example for activating interrupt input I 33.0.
Prog ra m m a b le F u nct i on s
4.4 Using the Counter lnput
The S5-90U has a counter input (24V DC) for very rapid count pulses (max. 1 kHz).It counts the positive edgesthat enter at programmed counter input I 33.1 (seesubsec-tion 3.5.6). The counter counts up only. lt does not countdown. To usethe counter input, proceed as follows:
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
counter reaches the value that you program in DB 1.
3. Activate the counter input in defaultDBl asfollows:a. Display default DB1 of the 55-90U on your programmer or personal
computer.b. Alter pa ra meter b lock 'OBC:_ _CAP_N_ _ _ _; _ ' as indicated in Ta ble 4-3.c. Transferthe altered DB1 to the 55-90U.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 youcould proqram in OB3.
The counter counts until it reaches its proqrammed comparison value (counteroverflow,seesubsection3.5.l).TheS5-90UresetsthecountertozeroandcallsupOB3. Table4-3 providesan exampleforactivating counter input I 33.1.
Table 4-1. Changing the D€Jault Pa.ameter for the Coudter
asrighing a Farameterto:th€.Couni6r trr$r.tt,' :
Exglanation
12: KS ='CAP 100 : SL1: SLN 1 The counter counts positive edgesThe comparison value is 100.
tWA 4NEB 81 2 6064'02a
Scanning an lnterrupt lnput
The i nterrupt input is located at input byte 33. You can scan the interrupt inputin your usei program using the statement "L PY 33." The value that is read in
corresponds to the current signal state.
EwA 4NEB 81 2 6064-02a 4-5
Table 4-2. Changing the DefaultParametetfo.th€ lnterrupt lnput
Aitidnidg a Faiame{€rto, thG f itiiruil( tnf ut,
fxFbnaiion
0 s ='DB1 031 Tp 0 oBc: lnterrupt input I 33.0 reacts to apositive edge.
ss-gou 55_90U Loading, Testing, and Backing Up the programP rog ra m m a bl e F u n ctio ns
5canning the Counter StatusThe 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.
Setting the Counter Status to Zero (0)
You can set the counter status to zero in your user program only by a direct K/O
access: T PW 36.The value that is in ACCU 1 immediately prior to the execution of this operation,will then be the new comparison value for the counter.Th e actua I va lue is a utomatica lly set to zero every time there is a STOP+RU N
transition and on every POWER ON+POWER OFF.
5 Loading, Testing, and Backing Up the program
After you have written your program, you must transfer it to the 55-90U so thatyou ca n test the program. you can load your program into the S5-9OU f rom yourprogrammer or personal computer, or from a memory submodule.
You ca n test you r prog ram by displayi ng the signal status a nd RLO of va riousoperands. After you have tested the program Jnd made any necessarycorrections, you may wantto back up your program on a memory submodule. lfyou have backed up your program on this memory submodule, your program willbe saved even ifthe powerfails while there is no battery in your 55_90U.
5.1 Loading Your program into the S5-90UYou 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.
A warnino4--lLoss 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 amemory submodule.
EwA 4NEB 81 2 6064-02a aWA 4NEB 81 2 6064-02a 5-l
55-90U s5-90u Loading, festing, and Backing t|p the programLoading, Testing, and Backing Up the Program
Figure 5-1 illustrates the procedure for loading your program from a memory
submodule.
Figure 5-1. Pro<edure forLoading a Program intothe 55-901J
5.2 Testing Your program
Programmers offervariousfunctionsthat you can usetotestyour program. Oneof these functions is "STATUS.,, This function displ"y, th. cur'rent progr"m-dependentsignal status and the result of logic operation (niOl of individualoperands during program processing. you can use this f unction to f ind logicalerror in program processing (for additional test functions, se elhe S5_g0u/SS_95USystem Manual\.
5.2.1 Calling the Test Function .STATUS',
To call the test function "STATUS,,, you must set the ,,RUN/5TOP,, switch of the
S5-90U to "RUN." See your programmer manual for information on calling thisju nctio n.
5.2.2 Displaying "STATUS" on a programmerAfte r you select the " STATUS" fu ncti on, the fol I owi ng appea rs on th e d isplay:
. ln the upper left-hand corner, the relative step address counter (SAC, seeTable 5-3), followed by a colon
. To the right of the colon, the first statement of the block you selectedr The RLO, followed by the signal states of the operands. T'heir location on thescreen depends on the programmer you are using.
. Additional information, depending on the progrir*"ryo, are using. Seeyou r prog ram mer man ual for the s ig n if icance of any additional informationthat might appear.
-he significance of the RLO is as follows:
o 0: The logical condition has not been met.r 1: The logical condition has been met.
EWA4NEB A126064-O2a ?ilA4NEB Bt2 6064_O2a 5-35-2
Battery inserted andoverall resetof PLc
lnsert memory submoduleinto the PLc.
Carry out errot diagnosti<t(see ChaPter 6).
Red LED isfli(kering whileprogram ii being loaded.
Loading, Testing, and Backing up the Program55-90U S5-90U Loading, Testing, and Eacking Up the Program
5.3.'l Backing Up the Program on a Memory Submodule(EEPROM)
You can store your program only if you have a back-up battery in the S5-90U. Toback up the program, copy itfrom the program memory ofthe 55-90U into amemory submodule. Only valid blocks are backed up (see Figure 5-2).
tigure 5-2. ProGdure for Sto.ing a Program on a Memory Submodule
EwA4NEB 812 6064-02a
The signi{icance of the signal state is as follows:
o 0: No voltage is present (relay contacts open)'
r '1: Voltage is present irelay contacts closed)'
once vou have displayed the status of one operation' you can display the next
;I:;;i;;;Tv J*'ins tn" lennow ooWN > kev on vour prosrammer'
5.2.3 Ending the'STATUS" Display
Youcanexittheprogrammerfunction"sTATUs"bypressingthe<BREAK>keyon your programmer'
5.3 Backing UPthe Program
To store vour program and protect it from loss' you need a memory submodule
and a baitery for the S5-90U'
EwA 4NEB 8126064'02a 5-5
r Make sure You turn on the 55- ,"pi*"
""1. otherwise you will have to perform an overall
,"i"i "t "t
vo, ,u1n 6n thg controller'
. i"n'"-r"*nJ',fl o] a new lithium tattery in the s5-90U i5 at least
on" y""t. Replace the battery after one year'
ls there a functionalbattery in the PLC?
Connect S5-90U to supply mains
No/wron9 submodule inserted.No prografr loaded in PLC.
Carry out error diagnosticsfor s5-90U (see ChaDter 6)
The red LED is flickering whileExplosionand/orfire - -^ ^ rithiumbatterytocatchfireandlmproper handling can cause a I
iTlXl?".n"rn". lithium batterv Keep it awav f rom waterand
ooenflame.Oonotexposeittoi"*p"""'"tgreaterthanl00'Ciitl" r). put ut"a batteries in hazardous waste'
5-4
Loading, Testing, and Backing Up the Program
5.3.2 Retaining the lnternal Memory with a Back-Up Battery
when there is a power failure or when you disconnect the power f rom the
ii-ggu, th".oni"nts of the internal memory are retained only if the s5-90U has a
U".f"ri l",i"tv. ln this case, the following iontents are available when the
power is restored:
. Control Program and data blocks
. Retentive flags and counters
. Th" .ont"ntr-of the interrupt stack (ISTACK' see section 6'2)
Table 5-1 lists the retentive and nonretentive operands'
s5-90u 55-90U
EWA 4NEB 81 2 6064'02a EWA 4NEB 8t 2 6064'02a
Diagnosing Errors
5 Diagnosing Errors
LEDS on the 55-90U indicate whether the controller is in the "RUN" or the "sTOP"mode. They also alert you if there is a problem in your program or in yourcontroller. You can use the interrupt stack to diagnose these problems.
6.1 Error Messages from LEDs
LEDS on the control panel of the 55-90U indicate whether the controller is in the"RUN" or the "STOP" mode. The green LED indicates the "RUN" mode and thered LED indicates the "STOP" mode. These LED5 also alert you if the controller is
not f unctioning properly (see Table 6-1 ).
Table G1. LED Error Mesege5 and Erro. Analysis
qofilitiqn,.nf Sls:::t:::!,:i::r::3&90"U: !::r!r: ::::r
LfF:Stiitor!n*a1:xre$it
The 55-90U is in the"5TOP" mode.
The red LED is litconsta ntly.
The problem is in the S5-90U.Analyze the interrupt stack (see
section 6.2).
The 55-90U is in the"STOP" mode.
The red LED isflash i ng.
Error in loading or saving ofprogram. Use the programmer toanalyze the interrupt stack.
The S5-90U is in the"RUN" mode but is
operatinq improperly.
The green LED is
lit constantly.The problem is in the program or inone of the peripherals. Analyzethe problem (see lhe 55-90U/55-95U System Manuaf.
6-15-6
6pEichd *drEl'rhtc f,lbnrqtertirP
Flags 0.0 to 63.7 64.0 to 127 .7
Cou nters 0to7 8to31
Timers 0 to 3'l
Diagnosing Errors S5-9AU SS-qOU Diagnosing Errors
6.2 Handling Problems in the 55-90U
lf you determine from the LEDS on the 55-90U that there is a problem' you can
diagnose errors using the interruptstack (ISTACK)
6.2.1 Analyzing Errors with the "ISTACK" Function
The interrupt stack (lsTAcK) is an internal reg ister of the 55-90u' The 55-90U
stoiesthecausesof errorsinthisregister. lf aproblemoccurs'theS5-90Usetsabit in the appropriate byte of the lSTAcK. You can use your programmer or
personal computer to read this register byte by byte'
To see how to find an error, use your programmer or personal computer to
tmnsier the faulty program shown in Table 6-2 to the S5-90U You will need to
create data block-4(D84). (See the manual foryour programmer or personal
.";p"i;r.t ihre protlem with the program is explained following Table 6-3'
Proceed as follows:
1. Using your Programmer or personal computer, transfer the faulty program
shown in Table 5-2 to the S5-90U.
2. setthe "RUN/STOP" switch on the S5-g0U tothe "RUN" position' The 55-90U
should remain in the "RUN" mode briefly and then enterthe "STOP" mode'
3. Call upthe ISTACK on your programmer or personal computer'
Analyzing Errors Using the ISTACK Display on a programmer or personalComputer
Depending on the type of programmer or personal computer you use, thea ppea ra nce of th e ISTACK d iffers as f ollows:
. Program mer without a screenThe ISTACK display shows a byte number and its eight-digit bit pattern.The status of each bit is either " O" or " 1." lf the status is,,l,,, the bit is set.A set bit indicates a problem in your program or in the S5-90U. you can usethis information to find out what the problem is as follows:'1. call upthe "tsTAcK" function.2. Using the cursor keys, scroll up or down in the display until you discover
aset bit in a byte. Fortheexample inTable6-2, bit4of byte gwould beset.
3. UseTable6-3tofindthe nameof theset bit. FortheexampleinTable 6-2, bit4of byte9 would be set. This bit is called,,TRAF.,, ttindicates a transfer error.
4. Use Table 6-4to see the possible reasons whythe TRAF bit is set and howyou can remedy the error. Table 6-4 Iists the most important ISTACK bitsin alphabetical order.
r Personal computer or programmer with a screenThe ISTACK display lists the names of the bits in the ISTACK register. Thestatus 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 indicatesa problem in your program or in theS5-90U. you can usethis informationto f ind out what the problem is as follows:1. Call upthe "ISTACK" function.2. Check the display screen to see wh ich bit is marked with an,,x.,, For the
example in Table 5-2, theTRAF bitwould be marked.3- Use Table 6-4 to see the possible reasons why the TRAF bit is set and how
you can remedy the error. Table 6-4 lists the most important ISTACK bitsin alphabetical order.
Table 5-2. Programming Example for lSTAGK Evaluation
oEtl FSt OBrll
JU P82
BE
C DB4
L IW32T Dt,i1
L Ol,]2
T Ql,l32
8E
0 1 KH=0000
1: KH=0000
6-36-2EwA 4NEa 81 2 6064'02a :WA 4NEB 81 2 6064-02a
a-
55-90U 55-90U Diagnosing ErrorsDiagnosing Errors
Table 5-3. ISTACK Di5play. Bytes 5 to 26 (Exterpt)
* The step addre55 counter indicates the absolute address of the next 5tatement to be pro(essed or
the block start address of the faulty block.
The error in the example in Table 6-2: There is no DW2 in DB4'
Table 6-4. ISTACK
6-4
BitBvte
7 6 5 4 3 2 0
6KE INAS NINE U
9 SIOP5 rRAF NNN sTs STtI E
10 NAU ZYK5YSFEH PEU BAU ASPFA
25 Step Address Counter (High)
26 Step Address Counter (Low)*
ISTA{Xsl#hy Btrrc Csrrsc of'tfibr Brri6dlt
NINEU 5 Faulty program in S5-90U memory becaule:. Power failure interrupted ore of following:
- The "COMPRE55" fundion- Block transmi5sion from prograftmer or
personal computer to the 55-90U or fromthe memory submodule to the 55-9OU
- Overall reset of the S5,90u. Baftery was removed while powe.was off.
Perform an overallreset and reload theproqram.
NNN 9 . A nondecodable operationwa!transmifted.
. The nesting level was exceeded_a The parameterwas exceeded
. Fix the operation.a Redu(e nesting
level.a Reduce the value.
PEU 10 . Expansion module with no connedion. Peripheral bus dirturbance. Maximum length of the shift register has
been ex(eeded.. An unknown tubmodule is conneded to
the 55-90u.
a Connect module.. Elifrinate problem. Reduce number of
analog modules.. Repla(e submod-
ule with right one.
STOPS 9 ''RUN/STOP' swit(h isin'STOp' position. Setswitch to "RUN."
5TS 9 "STP" statement <au5ed a software stop"STOP" was requested from a p,ojram'me,or personal computer.
a . Che(k the pro(ess.. lJse programmerto
switch to "RUN."
STUE 9 The blo(k stack overflowed. The maximumnesting deprh (1 6) was ex(eeded.
Reduce ne5tingdepth.
sYS FEHT 10 fhere is a parameter error in DB 1 Corre.t DBl
TRAT 9 Transfererror caused by one of the following. A programmed DB operation with DW
number largerthan DB lengtho A programmed DB operation without
previous opening of a DB
Eliminate theprografrming error(see the manual foryour proqrammer).
ZYK l0 5<antimewasexceeded. Program pro(esJingtime exceeded scan monitoring time becauje. Theprogram istoo long.. The program <ontainl too many interrupts.
check the programfor continuou5 loopsor shoden theProgram.
r sYS fEH is displayed only on the PG 605U or pc 6t 5U programmers
Tabl€ 6-4. lSIACK Analysis
ISTACXulaniii B.YIB Ctr*eio{,,[],ror F€hi6dy
ASPFA andKEIN AS and
NNN andSAC - FFFFr
10
69
25 and 26
An error occurred duringtransmission from the prollrammer
or personal .ohPuter to the S5-90U
The internal program memoryoverf lowed during transfer.
Shofren the Programand/or (ompress thememory.
BAU 10 This error o((urs when the Programis being loaded automati.allY and
there ir no baftery, orthe battery is
dead, and there is no valid Programin the mehory submodule
Replace the banery and
recreate or reload theprogram.
NAU 10 There i5 an interruPtion rn thepower suPPlY to the s5-90U or thelM 90 interface module.
Rertore the Power
* fhe sAC is the Step Address Counter. |STACK bytes 25 and 26 are " l l l'l 1 1 1 1(FF) "
EWA 4NEB 81 2 6064-02a atva 4N E B 81 2 6064'02a
Diagnosing Errors
6.2.2 Errors That Can Occur When You €opy the Program
lf th e red LED flashes continuously after you put the 55-9OU i nto the " RU N "
mode, use Table 6-5 to diagnose the error.
Table 6-5. Errors That Can o((ur When You Copy a Program
" The SAC is the Step Addrets Counter'
ISTACK bytes25and 25are "1 1 1 1 I1 11(FF) "
6.3 The Last Resort
lf you ca nnot get the 55-90U to enter the " RUN " mode after you attem pt to
Jilg""i" "r.;t, the problem may be that you.i nserted a battery in the s5-90u
whije it was switched off . ln this case, proceed as f ollows:
1. Perform anoverall reset(seesection 2 1)'
2. Reload your Program.
lf this action does not help, replace the 55-90U
55-90U Ss-sou
A Technical Specifications
EwA 4NEB 812 6064'02a ,WA 4NEB gt 2 6064-O2a
Tech n ica I Spec if i c at io n s
A-l5-6
lsTACKbjidCy, Cacra:sf ,trtof *ffBpdy.
ASPFA The program stored on the memoryrubmodule is too long for the programmemory of the s5-90u.The program on the memory submodule
contains illegal blo(k numbers.
shoften or correct theprogram on thememory submodule.
ASPFA The EEPROM memory submodule i5
defective or too tmall for the program in the
memory otthe 55-90U.
Replace the memorysubmodule or use a
larger EEPROM
memory submodule
ASPFA and KEIN AS
and NNNand SAZ = FFFF *
The lnt€rnal program memory overflowedduring transfer.
Shorten the Program.
Oimensions and Weight Me(hani@l Environmental Conditions ((ont.)
DimensionsWxHxD(mm) 145x135x91Weaght-Ss-gou approx. 1 kgweight-memoryrubm. approx.0.02kg
Shock*- Tested to IEC 68-2-27Typeofrho(k HalfsineStrength of rho<k I 5 g peak value,
I 1 ms durationDire.tion of shock 2 shocks in ea<h of
the 3 axes vertical toeach other
Climatic Environmental Conditionr
Tempe€turcOperating
' horizontaidesign 0to+60'C- vertical design 0 to +40'CNonoperating -40'to +70"CTemperature change- operating max. 10" C / hnonoperating max. 20" C / h
Relativ€ humidity to DtN 400401 5 to 95% (indoor),non(ondensing
Atnosph€ri( prersure- operatinq 860 to 1060 hPa- nonoperating 650 to 1060 hPaPollutants- SOr < 0.5 ppm,
(rel. humidity< 600/0,
noncondensing)- B:S < 0.1 ppm,
(rel. humidity < 50%noncondensing)
Electromagnetic compatibility (EMC)Noire lmmuniw
Electrostati( d is(hargete5t to IEC 801-2- Test voltage 2.5 kV
(Rel. humidity30 ro 95% )
Radiated electromagnetic to tEC 801-3field test Field strength 3 V/m
Fast transient bu6t to IEC 801,4Limit Class ll
Emitted interf€ren<e fo VDE 0871Limit Clasi A
IEC/VDE Safety lnformation
Vibrationr' Tested to IEC68-2-5
l0 to 57 Hz, const. ampl. 0.075 mn57 to 1 50 Hz, const. a<cel. I g
Mode of vibration Frequency sweepswith a sweep rate of1 octave/min
Periodof or<illation l0frequencysweepsper axir in each of the3 axes vertical to eachother
Free-fall to IEC 68-2-32- tested with height of fall 50 mm
Deg.ee of protedion to IEC 529- Iype lP 20- Class I to IEC 536
lnsulation rating to VDE 0160(0s.1988)
- between electri(allyindependent circuitsand with circuitsconnected to a central to VDE 0160grounding point (05.1988)
Test voltage sine, 50 Hzfor a rated voltage V .o,iof the circuits (AC / DC)V;"o,q= 0to 50V 500V
r Appropriatemeasuresmustbetakentoavoidvibration,shockandcontinuouslhock_
lnternal Techni(al Specif i(ations Output voltage-V1({orexternall/O) +24V- V 2 (for programmer) + 5.2 V
OutPut (urrent-fromvl <100mA-ft6mv2 <100mA
Short-(ircuitprotection electroni<clasr of prote<tion cla5s IFloating V'l yetFloating V2 no
Eack-up battery Lithium bat-tery (3.4 V/8s0 mAh)
-ba(k-uptime min. I Year'seryice life (at 25"C) approx. 5 years
Power losses of the module typ. 10.5W
Mains buffering > 20 ms
(f or maximum conf iguration)
M€mory capacity- internal RAM 2 K rtatefrentr- EPROM / EEPROM submoduleExe(ution time- per binary operation approx. 2 Usec.
Scan time monitoring approx.300 mtec.Flags 1 024 (51 2 re-
tentive)Time6: number/range 32/ 0.01 to 9990 se(
Count€6i number/range 32 (8 retenlive) /0 to 999
Inputs/outputs (onboard):Digital inputs Ilnterrupt input* 1
Counter input* 1
Digital outputs 6
lnputs/outputs (€xt€rnal l/O)lDigital inputs/outputs -total max. 192Analoginputs/outputs-totalmax. 16
Permi!sibl€ blocks:Organizationblocks 1,3,21,22Program blocks 0 to 53
Function blo(ks 0 to 63
Data blocks 2 to 63
Spe(ifi( Onboard l/O Oata
tordigital inputslFloating
- irolated in qroups oflnputvoltage L+- rated value- at "0" signal-at"1"signallnput current-at "1" signal
(optocoupler)10
24VDC0to5VDC
l3to30VDc
typ.8.5 mA(at 24V DC)
Response tihe- {rom "0" to " 1 " typ. 2.8 msec
- from '1 " to '0" typ. 3.6 msec
Connedion of 2-wireSERO proximity switches postible
Quiescent current = 1-5 mA
cable length unshielded max. 100 m(328.1 ft.)
Power Supply (lnternal)
lnput voltage'ratedvalue 115V/230VAC-permi5siblerange 93to127V/187to253\
Line frequency- Permiss. range 47 to 63Hz
cuftent (onsumption f.om 230 Vfor the 55-90U 40 mAlnrush current, at 230vac 1 A- at 115VAC 2A
Tech n ical Specif icati ons
You can also use this input as a digital input.All inputs are nonfloating in relation to one another
s5-90u 55-90U Tec h n i ca I Spec if icat i on s
A-3A-2 EWA 4NEB 812 6064-02a
All inputs are nonfloating in relation to one another
EWA 4NEB 81 2 6064-02a
For inte.rupt input: I For digital outpub:Floating yes* | Ourputs Relay outputr,lnput voltage and .urrent as for digital inputs I contact(see Specific Onboard l/O Data) | wiring,VarittorResponse time I slov-s1 0-K275- from "0" to "1" typ.4ouse(. I Floating yes
fron'1'to"O" typ.t8oprec. l-isolatedingroupsof 1
Pulsedurationforsignal I Continuout(urrenrlth 3A'' o" ot " 1" > 5oo p5ec. I Relay type Dold ows6g9Cablelengthunshielded 50m(164.05ft.) | Switchingcapacityofthecontacts
- resistive load max. 3 A at 250 V AC(ounterinputt: I .ax. 1.5 Aat 30V DCFloating yes" I inductrveload max.O.5Aat25oVAclnputvoltageand(urrentasfordigitalinputs I max.O.sAat30VDC{see Spe<ific Onboard l/O Data)Response time' from "0" to " 1 " typ. 40 Fse(.-from"1"to"0" typ.180plec.Counterfrequency max. I kHzPulse duration for signal"0" ot "1" 500 !se(.Cable length unrhielded 50 m (164.05 ft.)
Operating cycles ofthe contacts according toVDE 0660,section 200-AC-11 1x106- DC-1 1 0.5x106switching frequency max. 10 HzCable length unshielded max. 100 m
(328.1 ft)
D
D.1
List of OperationsBasic Operations
E forfunction blocks (re)
S for organization blockr (oB)X for program blocki (PB)
I forfunction blocks (FB)
Oper.ation
(srl)
Permisiibleoperands
RLO* Exe(!tion Tim€in F5e(.
Fundion
z 3 onboard I Ext.l/o
Boolean Logic Operations
t.o N Y N 1to2 I 3to5 Scan operand for " 1 " and <ombinewith 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 (ombinewith RLO through logic AND.
N N 3to5
T N N 6to 10
c N N 3to6
o I,Q N Y N Ito2 | 3to5 scan operand for "1 " and combinewith RLO through logic OR.
N Y N Ito5
T N Y N 6to 10
c N Y N 3to6
ON I,Q N N 2 I 3to5 scan operand for "0" and combinewith RLO through logic OR.
F N N Ito5T N N 6to 10
c N N Ito6
o N Y 2to5 Combine AND operations throughlogic OR.
A( N Y 4to8 combine expressions enclo5ed inparenth. (6 levels) thr. logi( AND
o( N Y 4to8 combine expressions en(loted inparenth. {6 levels) thr. loqic OR.
Oper-ation
(srL)
Boolean Logic Operations (Cont.)
Close parenthesis ((onclusion of aparenthetical expression)
Load an output word from the PIQinto ACCUM 1 :
byte n+ACCUMl (bits 8-15);byte n + l+ACCUMl (bits 0-7)
Load an input byte ofthe onboarddigital inputs into ACCUM I
Load an input word of the onboarddigital inputs into ACCUM 1
..@ fr m!- !){e -rf h* rrr fti!:: - ril
Load an input @.c -a- * >into AccuM 1: byte r acc!ul(bits 8-1 5)j byte n + 1+ ACCUM l(bits 0-7)
I RLO-dependent ? 2 RLO affected ? 3 RLo reloaded ? ! RLO-dependent ?
EWA 4NEB 812 6064-02a
3 RLO reloaded ?
EWA 4NEB 81 2 6064-02a
List of Operations
D-j
1 RLo-dependent ? 2 RLO affeded ? I RLO reloaded ?
EWA 4NEB 812 606442a
Oper-ation
(srr)
Permissibleop€randi
Rto. Exe(ution limein pset.
Function
2 3 Onboaid I Ext. toLoad 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);
byte n+1+ACCUM l(batr 0-7)
DL N N N 33 Load a data word (left-hand byte)of the <urrent data blo<k intoACCUM 1
DR N N N 35 Load a data word (right-handbyte) of the current data blockinto ACCUM 'l
DW N N N 35 Loed a data word of the currentdata block into ACCUM t:byte n,ACCUM r(bits 8-1 5);
byte n+I+ACCUM I (biti0-7)
K8 N N N 5 Load a conrtant (1-byte number)into ACCUM 1
L KS N N N 5 Load a constant (2 charaders inASCII format) into ACCUM 1
F N N 5 Load a (onstant (fixed-pointnumber) into ACCUM 1
L KH N N N 5 Load a constant (hexade<imal
code) into ACCUM 1
L KM N N N 5 Load a constant (bit pattern) intoACCUM 1
L KY N N N Load a constant (2-byte number)into ACCUM 1
L KT N N N 5 Load a constant (time in BcD) intoACCUM I
Load Operations (Cont.)
Load a time or (ount (in binarycode) into AccuM 1
Load timer or counti (in 8CD) intoACCUM 1
Transf er the contents of ACCUM Iwith updating of the PIQ to theonboard di gital output.
Pw 3236 lNlN N Transfer the contentr of ACCUM Iwith updating of the PIQ to theonboard digital output.
Transf er the content! of ACCUM 1
to a flag byte
Transfer th€ contentq ofACCUM Ito a flag word (into the PIQ):AcCUM I (bits 8-1 5)+byte n;AccUM I (bir!o-7)-byte n+1
--?lEEtu:mf;q::Utr!r l"w@ roftqlA:C-U'hrG+"9.-."rcrAaf-Vr b6!-".",@r-'
Tcnjf*ft@t&a-d'to an outFrt 6c (i@ rhE qQ|ACCUM 1 (bic &15)+b't! a;ACCUM I (bits0-7) *byte o-l
List of Operations s5-90u s5-90u Lirt of Operations
Oper"ation
(srt)
Permii5ibleoperands
RLO' Exe(ution Timein us€(.
Fun(tion
2 3 onboard I Ext.t/o
Transf er Operations (Cont.)
T DL N N N 25 Transfer the (ontent5 of ACCUM 1
to a data word (left-hand byte)
T DR N N N 26 Transfer the (ontent! of ACCUM 1
to a data word (right-hand byte)
T N N N 1A Transferthe (ontents ofACCUM Ito a data word
TN8 Parametern=0to 255
N N N 52 6 Field transfer byte by byte (nufrberof bytes 0 to 255)
Timer Operations
SP T Y N Y u Start timer (in ACCUM t ) as pulse(rignal (ontracting) on poritiveedoeofthe RLo
T Yt N Y u Staft timer (in ACCUM 1) ar eften-ded pulse (5ignal contracting andstretching) on poritive edge oftheRLO
SD T Yi N 65 Start timer (in ACCUM 1 ) as on-delay on positive edge of the RLO
ss T YI N Y 65 Stad timer (in ACCUlvl 1) ar storedon'delay on po!itive edqe of theRLO
SF T N u stan timer (in ACCUM I ) as off-delav on neqative €dqe of the RLO
R I Y N Y 21 ResettimerifRLO = "1"
Counter Operations
CU C Yl N 35 Counter counts up 1 on leadingedge ofthe RLO
CD c N 40 Counter counti down I on leadingedqe of the RLo
5 c N 62 Setcounter if RLO = "1"
R c N 7 Reset <ounter if RLO = "1"
Add two fixed-point numberr:ACCUM 1 + ACCUM 2; CC1/CC0/OVare aftected
Subtract tuo fixed-point numbers:ACCUM 2 - ACCUM l; CC1/CCo/OVare affected
Compare two fixed-point numbersfor " le$ than": if ACCUM 2 <ACCUM 1, the RLO is "1 ".CCI /CCo are affected
Cohpare two fixed-point numberiJor "les than or equal to": ifACCUM 2 < ACCUM 1, the RLO ii"1 ". CC1 /CCo are affected.
Compare tuo fixed,rci.t .L-F-for "rcual to': j
ACC - \, : =ACCLr/ . :-€ ?-: 5 '-.
::r?_a:€ iBrg.'t,r tr,lj"'"@:?'ffsE !' r{=lLim::{:-m- tuL: e"-"* i-Jmffi
-.@[email protected]' r.gglt, tACC!rI: ftR:6""CC! (CDa.F,€ffi
CmpaetrcfteO-pm!11.[6for -grefi€rtlBn d €qEl b'; ,fACCUM 2 > ACCUM 1, t}E RIO b"1 ". CC1 /cco are affeded
EWA 4NEB 8l 2 6064-02a
1 Rlo-dependent ? 2 RLO affeded ?
EWA 4NEB 81 2 6064-02a
3 RLO reloaded ?
1 Rlo-dependent ? 2 RLO affeded ? 3 RLO reloaded ?
D-6D-5
List of Operations s5-90u 55-90U List of Operations
Oper-ation
(srL)
Permisiibleoperands
RLO' ExecutionTim€in use<,
Function
2 3 onboa.d I Ext. Uo
Block Call Operations
IU PB/PY N N Y 63 Un<onditional jumP to a Programblo<k
JU F8 N N Y 65 Unconditional jumP to a functionblo<k
lc P8/PY Y 54 Conditional jumP to a Programblock
lc F8 Y Yl) Y 57 conditional jump to a functionblo<k
c DB N N N 30 call a data block
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(<annot be used in organizationblo<ks)
"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.
Display generation operation forthe programmer: Generate blankline by Carriage Return
Display generation operation forth€ programmer: Switch over tostatement lirt (STL)
Display qeneration operation forthe programmer: swit(h over to
Ditplaygere.*€i cE€_-':l€ soqra--e idr- rs _;
EwA 4NEB 81 26064-02a
I RLqepdddft ? 2 RLO rfkd ?
EWAANEB A12 6064-O2a
I nLO!M'
* 1 Rlo-dependent? 2 Rloaffected?Yr) RLo is setto " r"
D-7
3 RLO reloaded ?
D-8
List of Operations 55-90U 55-90U
3 RLO reloaded ?
List of Operations
D-10
O.2 SupplementaryOperations
! fororqanizationblo(ks(oB) X forfuncionblocks(FB)I I for proqram blo(kr (P8)
1 Rlo-dependent ? 2 RLO affected ? 3 RLO reloaded ?
EWA 4NEB 81 2 6064-02a
1 Rlo-dependent ? 2 RLO atfected ?
EWA 4NEB 812 6064-02aD-9
Oper-ation
fsr I
Pe.mirsibleoperandi
RLO' ExecutionTinein uec.
Fundion
1 2 3 onboard I Ext. uo
Boolean Logic Operations
N N N 16 Cohbine contents of ACCUM 2 andACCUM 1 (word operation)through logic AND: result i5 sto.edin ACCUM 1. CCI /CCo are affected
ow N N N l6 Combine contents of aCCUM 2 andACCUM 1 (word operation)through logi< oR: result is stored inAccuM 1. CCI /CCo are affeded
XOW N N N 15 combine contents of AccUM 2 andACCUM 1 (word operation)throuqh EXCLUSIVE-OR: result is
stored in ACCUM 1. CC1/CCo areaffeded
Conversion Operations
cFw N N N 4 Form the one's complement ofACCUM 1.
csw N N N l9 Form the Mo'5 complement ofACCUM 1.
cc1 /cco and OV are affected
Shift Operations
5LW Parametern=0to 15
N N N l2+n.8 Shiftthe (ontents of ACCUM 1 tothe left by the value specified in theparameter.Positions be(oming va<ant arepadded with zero5.CC1 /CCo are affect€d
5RW Pa rametern=0to 15
N N N 12+ 8 shift the contents of AccUM 1 tothe right by the value spe(ified in
the parameter. Positions be<oming
vacaht are padded with zeros.cc1 /CCo are affeded
Permis3ible l.tf E@oTiEoDerardi - f<
Conditional jump to symbolic addr(ifth€ RLO="0", it issetto "l")
Jump if lhe rerult is zero: the iu mP
is only made if CCI - 0 andCCo=o.The RLO i5 6ot .ha^,:{
.!r: _ft gUi []lr!!#rffsft.ffEmsr@r::-="m:-j=[-mt-: dMsrrgE
j]uro;fr.g*s@+rff:EL'c_r@ !m rdbri::=[#c3='_aEL36@dr&gd-
lumpon or.flw: ttEiunp 6otrltmade if the ovERRow m iisLThe RLO ir not changed.