Extended instructions
9.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
415
You can determine the operating mode of the PRVREC instruction with the input parameter
MODE. This step is explained in the following table:
0 Check whether a request for making a data record available exists
If a request from a higher-level controller for making a data record available exists on the I-device, the instruc-
tion only writes to the NEW, SLOT, SUBSLOT, INDEX, and RLEN outp
ut parameters. If you call the instruction
several times with MODE = 0, then the output parameter only refers to one and the same request.
1 Receiving a request for making a data record available for any subslot of the I-device
If such a request from a higher-level controller for any subslot of the I-device exists on the I-device, the instruc-
tion writes to the output parameter.
2 Receiving a request for making a data record available for a specific subslot of the I-device
If such a request from a higher-level controller for a specific subslot of the I-device exists on the I-device, the
instruction writes to the output parameter.
3 Make the data record available and send a positive answer to the higher-level controller
The instruction checks the request of the higher-level controller to make a data record available, makes the
request data record available to RECORD, and sends a positive acknowledgement to the higher-level control-
4 Sending a negative answer to the higher-level controller
The instruction checks the request of the higher-level controller to make a data record available, rejects this
request, and sends a negative acknowledgement to the higher-level controller. Enter the reason for the rejec-
tion in the input parameters CODE1 and CODE2.
Note
After the receipt of a request (NEW = 1), you must call the PRVREC instruction twice to
ensure complete processing. You must do this in the following order:
First call with MODE = 1 or MODE = 2
Second call with MODE = 3 or MODE = 4