TIA PORTAL TUTORIAL STEP BY STEP FOR BEGNINNERS [ RCVREC: Receive data record] PART-32
PLC AND HMI CENTER
0:00 / 0:00
TIA PORTAL TUTORIAL STEP BY STEP FOR BEGNINNERS [ RCVREC: Receive data record] PART-32
15 просмотров · 14 ч назад
PLC AND HMI CENTER
1,7 тыс. подписчиков
15 просмотров · 14 ч назад
Description
An I-device can receive a data record from a superordinate controller. The receipt takes place in the user program with the instruction "RCVREC" (receive record).
The instruction has the following operating modes:
Check whether the I-device has a request for a data record receipt.
Make the data record available to the output parameters.
Send an answer to the superordinate controller.
You can determine the operating mode executed by the instruction using the input parameter MODE (see below).
The I-device must be in the operating mode RUN or STARTUP.
With MLEN, you specify the maximum number of bytes you want to receive. The selected length of the destination area RECORD should have at least the length of MLEN bytes.
If a data record was received (MODE=1 or MODE=2), the output parameter NEW will indicate that the data record was stored in RECORD. Note that RECORD has a sufficient length. The output parameter LEN contains the actual length of the data record received in bytes.
Set CODE1 and CODE2 to zero for the positive answer to the superordinate controller. If the received data record is to be rejected, enter the negative answer to the superordinate controller in Error Code 1 of the CODE1 and in Error Code 2 of the CODE2.
Note
If the I-device has received a request for a data record receipt, you must recognize the delivery of this request within a certain duration. After recognition, you must send an answer to the superordinate controller within this time period. Otherwise the I-device will experience a timeout error which causes the operating system of the I-device to send a negative answer to the superordinate controller. For information on the value for the time period, please refer to the specifications of your CPU.
The output parameter STATUS receives the error information after the occurrence of an error