Type
| Function block |
Description
| Sends firmware services to an Axioline master.Sending the firmware service request saved in SD_1 is started in the cycle in which the rising edge is detected at the REQ input. The duration of the read operation depends on the current system utilization. Once the response to the service request has been received, the NDR output is set to TRUE. The receive data saved in RD_1 is only valid and readable during the cycle in which NDR is TRUE.
In the event of an error, the ERROR output is set to TRUE. The corresponding error code can be read at the STATUS output. The error information saved in the STATUS array is only valid and readable during the cycle in which the ERROR output is set to TRUE. In the following cycle the ERROR output is set to FALSE. The user can now set the REQ input to FALSE to prepare the next send operation. In the following cycle the next send operation can be executed with a rising edge at the REQ input.If an invalid variable type or an array with an invalid length is applied to RD_1 or SD_1, the ERROR output is set to TRUE and the corresponding error code is output at the STATUS output. In this case the ERROR output remains TRUE until the error has been eliminated. While ERROR = TRUE, the corresponding error code can be read at the STATUS output. |
Notes
|
- The firmware services PDI_READ_OBJECT and PDI_WRITE_OBJECT are sent with the function blocks PDI_READ and PDI_WRITE.
- A negative confirmation received as response to a sent service request does not generate an error at the ERROR output. Any confirmation, either positive or negative, is copied to the RD_1 array without evaluating the content and the NDR output is set to TRUE accordingly. The evaluation of the response has to be done by the user. The ERROR output only indicates general internal function block errors.
- Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
|
Parameters
| Input
REQ
Data type: | BOOL |
Description: | A rising edge at the REQ input starts sending the firmware services. The preparation of a new send operation is done with a falling edge at this input. |
Input/Output
SD_1
Data type: | ARRAY OF BYTE / ARRAY OF WORD |
Description: | Represents the transmit buffer of the function block. The complete firmware service according to the DDI (Device Driver Interface) specification (incl. service code, etc.) to be transmitted must be copied to the transmit buffer. |
RD_1
Data type: | ARRAY OF BYTE / ARRAY OF WORD |
Description: | Represents the receive buffer of the function block. The complete confirmation is copied to the receive buffer after sending a firmware service according to the DDI specification. The array must be adequately dimensioned to be able to save the requested data. If the array is too small, a corresponding error is output at the ERROR output. |
Outputs
NDR
Data type: | BOOL |
Description: | A rising edge at the NDR (New Data Received) output signals that the send operation has been completed successfully and that the received data in array RD_1 can be read. The output remains TRUE for only one cycle. Only in this cycle the data saved in the array RD_1 is valid. |
ERROR
Data type: | BOOL |
Description: | If an error occurs during the send operation, the ERROR output is set to TRUE. The corresponding error code can be read at the STATUS output. The ERROR output remains TRUE for only one cycle. Only in this cycle the data saved in the STATUS array is valid.
Negative confirmations generated by sent firmware services are not indicated here.
|
STATUS
Data type: | WORD |
Description: | Provides the error code in the event of an error (see "Error codes" below). Only valid for ERROR = TRUE. |
|
Error codes
| Error codes at the STATUS output
Only valid for ERROR = TRUE.
Error code (hex) | Meaning |
0x0905 | Parameter error. It is tried, for example, to send a non-permitted service using the function block (PDI_READ or PDI_WRITE) or the length specified in the request saved to SD_1 is invalid (length too long). |
0x090A | The variable connected to SD_1 is invalid (no array or invalid array type). |
0x090B | The array connected to RD_1 is too small to save the received response. |
0x090C | The variable connected to RD_1 is invalid (no array or invalid array type). |
0x090E | Timeout. No response to the sent service request received. |
0x090F | An internal error has occurred. |
|