Software implementation
8.1
Counting module operating modes
How counting modules behave in the different operating modes
General z z
The counting modules operate in specific ways according to the different PLC operating modes. Knowing about these specific ways is important for programming and debugging the application.
General principles for dealing with operating modes are described: in the set up manual for Premium - TSX 57 PLCs, (TSX DM 57 xx E), the reference manual (See: PL7 Junior, Pro; Reference manual), PL7 Micro/
Junior/Pro (TLX DR PL7 xxE).
Summary table The table below shows the special features of counting modules in different operating modes.
Cold start Warm restart STOP
1 unchanged
0 unchanged
Reconfiguring in online mode
1 initial values
Invalid measurement bit
Adjustment parameters: set points, thresholds, preset, measurement period (speed), output period (frequency)
%MDxy.i.r
Commands (direct software actions, various actions, event unmasking)
%Qxy.i.r, %QWxy.i.r
Information and module data -> processor
%IDxy.i.r, %IWxy.i.r, %Ixy.i.r
Forced objects
Switches (as a result of Invalid measurement )
Outputs
1 initial values
0 unchanged if no power outage unforced
0
0 unchanged unchanged if no power outage unchanged
0
0 unchanged, new commands not sent sent unchanged unchanged fallback mode unchanged unchanged unchanged
0
0
The paragraphs below show the essential properties of these operating modes, seen from a module.
152
35015371 00 May 2007
Software implementation
Cold start
Warm restart
A cold start occurs when the application first starts running, when some power is restored, when initialization takes place from a PL7, or when the Reset button on the processor is pressed.
Parameters are initialized at their set initial values using the configuration editor. The current counter measurement cannot be used ( Invalid measurement bit set to 1).
If the module has not had a power outage, the current value of the counter is unchanged although the Invalid measurement bit is set.
The user must set the procedure to be carried out from a cold start (See How to deal
with an invalid measurement, p. 100 ).
The program starts again from the program element where the power outage took place, but the outputs remain at 0 until refreshed by the task.
The values of counting application-specific function objects are not changed by a warm restart, except for those involved with the Invalid measurement bit.
If the module has not had a power outage, the current value of the counter is unchanged although the Invalid measurement bit is set.
The user must define the processing procedure to be carried out on a warm restart.
Power outage and restart
STOP mode
When there is a power outage, the application context and time of the outage are stored.
When the power is restored the saved context is compared with that in progress: z if the application context has changed (i.e. loss of system context or new z application), the PLC initializes the application: see cold start , if the application context is the same, the PLC carries out a warm restart .
In STOP mode the user program is not run. However the application-specific counting function does operate: the counter advances according to the status of the physical inputs ( IA , IB , IPres or IReset , IEna , ICapt ).
Reconfiguring in online mode
This mainly involves debugging an application.
Changes must be confirmed.
35015371 00 May 2007 153