SAMPLETM: Sample time
Original instructions
Function description
With this function block the function blocks of the control mechanism are released under time control.
To control, the Q output of the SAMPLETM function block is connected with the EN input of the function block to be controlled.
The Q output is activated for one program cycle after the stated time at the INTERVAL input has expired.
The DELSCAN input was created to prevent the simultaneous start of more than one sample time dependent FFB which are controlled by various SAMPLETM function blocks. At this input the number of cycles is stated according to which the activation of Q after a cold start is delayed. Therefore it is possible to release sample time dependent function blocks step by step to reduce the load on the CPU during the start cycle.
EN and ENO can be configured as additional parameters.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL SAMPLETM_Instance (INTERVAL:=ScanTime, 
    DELSCAN:=NoOfDelayCycles, Q=>Enable)
Representation in ST
Representation:
SAMPLETM_Instance (INTERVAL:=ScanTime, 
    DELSCAN:=NoOfDelayCycles, Q=>Enable) ;
Parameter description
Description of input parameters:
Parameter
Data type
Description
INTERVAL
Sample time for connected control mechanism function block
DELSCAN
Number of delay cycles after a cold start
Description of output parameters:
Parameter
Data type
Description
Q
Release of control mechanism function block
Runtime error
For a list of all block error codes and values, see Controller.