Technical data

Technology functions
CPU 317T: Technology Functions
A5E00251798-03
6-227
Output parameters
Parameter Data type Start value Description
DataValid BOOL FALSE TRUE: Valid data available for reading
(set at the first successful
read operation)
Busy BOOL FALSE TRUE: Command is busy
Error BOOL FALSE
TRUE: Command initiation
with error.
The command is not executed; the cause
is found in the ErrorID.
FALSE: Command initiation
without error
ErrorID WORD 0
ErrorID of the Error output parameter.
Note
The runtime of command
execution in the integrated technology plus the runtime of
the OBx cycle in which MC_ReadPeriphery is called may lead to a considerable
length of reaction times. You should therefore connect the I/O requiring a quick
reaction to the MPI/DP interface of your Technology CPU.
MC_ReadPeriphery - Example
The example shown in the diagram shows the time-based relationship when
reading or loading the I/O image DP(DRIVE).
At the start of each command execution cycle, the signal status of inputs is loaded
from the position controller and written to the I/O image of inputs. This load
operation is independent of the "MC_ReadPeriphery" technology function. The
"MC_ReadPeriphery" technology function accesses this I/O image and provides
these data to the user program.
The I/O image is read to the controller, initiated by the first call of
MC_ReadPeriphery with Enable = TRUE. Output parameter Busy is set TRUE in
time with this operation. The MC_ReadPeriphery command is processed as new
command within the first command execution cycle (new commands are processed
at the start of the command execution.) The I/O image of inputs is written to the
PLC inputs with the next call of MC_ReadPeriphery, and output parameter
DataValid reports a TRUE status.
The current MC_ReadPeriphery command is tracked, starting at the second
command execution cycle (current commands are processed at the end of
command execution, whereby the most recent command is processed last.) With
the third call of MC_ReadPeriphery, the I/O image of inputs of the second
command execution cycle is transferred to the PLC.
The DB update is triggered by the subsequent IPO cycle. This is not concluded
until the next position controller cycle is completed and is interrupted by the
position controller. The time slice for the third command execution is available after
the DB update. Due to the delayed start of command execution, this is interrupted
by the next position controlled and by the subsequent IPO. An updated I/O image
is therefore not available at the time of the fourth call of MC_ReadPeriphery.
Hence, the I/O image of call 3 is transferred to the PLC.