Type
| Function block |
Description
| Writes the PDI objects of local Axioline modules.Writing is started in the cycle in which the rising edge is detected at the REQ input. The duration of the write operation depends, among other things, on the bus structure, the type of the object written, etc. Once the write operation is complete the DONE output is set to 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 or DONE output is set to FALSE. The user can now set the REQ input to FALSE to prepare the next write operation. In the following cycle the next write 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 SD_1 or STATUS, the ERROR output is set to TRUE and, if possible, 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
| 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.
Tip: Phoenix Contact provides function block libraries free of charge which simplify the handling of specific Axioline modules. You can download these libraries from the controller's web page ('Downloads' tab) under www.phoenixcontact.com. |
Parameters
| Inputs
REQ
Data type: | BOOL |
Description: | A rising edge at the REQ input starts writing the PDI object. The preparation of a new write operation is done with a falling edge at this input. |
SLOT
Data type: | WORD |
Description: | Specifies the slot of the Axioline module whose PDI object is to be written. |
SUBSLOT
Data type: | BYTE |
Description: | Specifies the subslot of the Axioline module whose PDI object is to be written. |
INDEX
Data type: | WORD |
Description: | Specifies the index of the PDI object to be written. |
SUBINDEX
Data type: | BYTE |
Description: | Specifies the subindex of the PDI object to be written. |
DAT_CNT
Data type: | BYTE |
Description: | Specifies the number of bytes to be sent from the SD_1 transmit buffer. |
Input/Output
SD_1
Data type: | ARRAY OF BYTE / ARRAY OF WORD |
Description: | Represents the transmit buffer of the function block. This array contains the data that is to be written to the addressed PDI object. |
STATUS
Data type: | ARRAY OF WORD[2] |
Description: | Provides the error code in the event of an error (see "Error codes" below). The Error_Code of the negative confirmation of the PDI write request (Error_Code and Add_Info) is used, or, in case of internal errors a code generated by the function block. Only valid for ERROR = TRUE. |
Outputs
DONE
Data type: | BOOL |
Description: | A rising edge at the DONE output indicates that the PDI write operation has been completed successfully. |
ERROR
Data type: | BOOL |
Description: | If an error occurs during the PDI write 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. |
|
Error codes
| Error codes at the STATUS output
Only valid for ERROR = TRUE.
The following table shows the possible error codes caused by the function block itself and their meaning.
STATUS[0] | STATUS[1] | Meaning |
0x090B | 0x000A | The variable connected to SD_1 is not of the correct type (no array or invalid array type). |
0x090B | 0x0009 | Invalid value at DATA_CNT input. The value is either greater than the array connected to SD_1, greater than the maximum allowed length (245 bytes) or equal to zero. |
0x090B | 0x000E | Timeout. No response to the sent PDI_WRITE request received. |
0x090B | 0x000F | An internal error has occurred. |
0x090B | 0x0011 | Connection to the service manager or subscription to the service failed |
0x090B | 0x0013 | Too many function block instances for acyclic Axio services created. The sum of PDI_WRITE and PDI_READ function blocks must not be greater than 32. |
0x090B | 0x0014 | Connection to the driver could not be established. |
0x090B | 0x0015 | Failed to send the request to the driver |
0x090B | 0x0016 | Failed to receive the response from the driver. |
When receiving a negative confirmation as response to a PDI_WRITE request, the Axioline module directly copies the received error code (Error_Code and Add_Info) to STATUS[0] or STATUS[1]. These error codes are module-specific. For a description see the respective module documentation.
|