Parameters | Inputs
REQ
Data type: | BOOL |
Description: | A rising edge at the REQ input (REQ = Request) starts the execution of the function block. A falling edge at the input prepares the function block for a restart. |
ID
Data type: | INT |
Description: | This parameter is the designation of the communication connection previously established using the PCP_CONNECT function block. |
Input/Output
ADD_ERROR
Data type: | ARRAY OF WORD with 2 elements |
Description: | If an error occurs, the error code is written into ADD_ERROR. The error codes represent PCP error messages. These are described in the PCP manual. If an incorrect format is used, the function block returns an error (ERROR=TRUE).
Note
The error codes stored in ADD_ERROR are only valid in the cycle in which ERROR changes from FALSE to TRUE. |
|
VAR_1
Data type: | ARRAY OF WORD |
Description: | VAR_1 contains the index of the corresponding PCP object in the first word and the subindex in the second word. |
RD_1
Data type: | ARRAY OF WORD or ARRAY OF BYTE |
Description: | RD_1 represents the receive buffer of the function block. The data can be of each predefined or user defined data type. The function block is only able to receive all data correctly, if RD_1 is greater or equal than the received data. |
Outputs
NDR
Data type: | BOOL |
Description: | With a rising edge, this output (New Data Received) displays the availability of data (acknowledgment) which are read from the RD_1 receive buffer. If NDR=TRUE, you can read the data from the receive buffer.
Note
The data stored in RD_1 are only valid in the cycle in which NDR changes from FALSE to TRUE. |
|
DATA_CNT
Data type: | INT |
Description: | DATA_CNT displays the number of read data bytes in the receive buffer RD_1. |
ERROR
Data type: | BOOL |
Description: | With a rising edge, this output displays that an error has occurred. Within the cycle, in which the rising edge occurs, the error code can be read from ADD_ERROR. |
|