The following system and standard blocks are available for setting and resetting a memory area with MCR dependency switched on:
b SETP Set I/O area bit by bit b RESETP Reset I/O area bit by bit
b SET Set process image and memory area bit by bit b RESET Reset process image and memory area bit by bit b SETI Set process image and memory area byte by byte b RESETI Reset process image and memory area byte by byte
The representation is made with EN/ENO boxes in the case of LAD and FBD, and as a function call with or without function value in the case of STL. The function of the master control relay is not implemented with SCL.
Fig. 13.4 shows the general graphic representation of these functions.
SETP Set peripheral output area bit by bit RESETP Reset peripheral output area bit by bit
SETP sets the bits in a continuous area of the peripheral outputs to signal state “1”.
RESETP resets the bits in a continuous area of the peripheral outputs to signal state “0”.
You call SETP and RESETP in an MCR zone. The system blocks only work with MCR dependency switched on; if MCR dependency is switched off, calling of SETP or RESETP has no effect.
Fig. 13.4 Graphic representation of the set and reset functions with MCR dependency SETP
SET
SETI
RESETP
RESET
RESETI SFC 79
Set peripheral outputs bit by bit
FC 83
Set process image and bit memory bit by bit
FC 101 Set peripheral outputs byte by byte
SFC 80
Reset peripheral outputs bit by bit
FC 82
Reset process image and bit memory bit by bit
FC 100
Reset peripheral outputs byte by byte Control memory areas with MCR dependency
N
S_BIT
S_BYTE N
N
N
S_BIT
S_BYTE N
N
RET_VAL RET_VAL
SA SA
Setting and resetting of the I/O bits results in simultaneous updating of the process image outputs. The I/O is influenced byte by byte. The bits in the first and last bytes which have not been selected by the system blocks are assigned the signal states currently present in the process image output.
You use the N parameter to define the number of bits to be controlled and the SA parameter to define the first bit (data type POINTER). RET_VAL is used by the system blocks to signal any errors.
SET Set process image and bit memory address area bit by bit RESET Reset process image and bit memory address area bit by bit
SET sets the bits in a continuous memory area or in the process image inputs and outputs to signal state “1”.
RESET resets the bits in a continuous memory area or in the process image inputs and outputs to signal state “0”.
You call SET and RESET in an MCR zone. The system blocks only work with the MCR dependency switched on; if the MCR dependency is switched off, calling of SET or RESET has no effect.
The bits in the first and last bytes which have not been selected by the system blocks retain the current signal states.
You use the N parameter to define the number of bits to be controlled and the S_BIT parameter to define the first bit (data type POINTER with cross-area, register-indirect addressing). If the S_BIT parameter does not point to the memory area or process image, the bits are not influenced and the ENO output has signal state “0”.
SETI Set peripheral output bits byte by byte RESETI Reset peripheral output bits byte by byte
SETI sets the bits in a continuous area of the peripheral outputs to signal state “1”.
RESETI resets the bits in a continuous area of the peripheral outputs to signal state “0”.
You call SETI and RESETI in an MCR zone. The system blocks only work with the MCR dependency switched on; if the MCR dependency is switched off, calling of SETI or RESETI has no effect.
You use the N parameter to define the number of bits to be controlled, which must be a multiple of eight. You use the S_BYTE parameter to define the first byte (data type POINTER with cross-area, register-indirect addressing and bit address = 0). If the S_BYTE parameter does not point to the peripheral output area, if the bit ad- dress is not zero, and if the number N is not a multiple of eight, the bits are not in- fluenced and the ENO output has signal state “0”.
The corresponding bits are not updated in the process image output.