The function block FB_WriteDeviceParameter is used to write parameters to the IO-Link device.
The IO-Link protocol follows the big-endian layout. Depending on the read parameter type, consider a byte swap before processing the data from i_anyBuffer.
The maximum number of bytes that can be read with one execution are 232 bytes.
Up to 300 simultaneous function block executions for the read and write operations are supported.
WARNING | |
---|---|
Input |
Data type |
Range |
Description |
---|---|---|---|
i_xExecute |
BOOL |
– |
On rising edge, process is started. |
i_ifIoLinkMaster |
SE_IoLinkMaster.IF_IoLinkMaster |
– |
Interface of the IO-Link master.
NOTE: Provide the IoLink master instance of type FB_IoLinkMaster specified inside the Devices tree.
|
i_usiChannelNumber |
USINT |
1-4 |
Channel number of the IO-Link device. |
i_timTimeout |
TIME |
T#1s – T#60s |
Maximum time to establish the connection. Default value: T#10s In case the timeout is configured lower/higher than allowed by the range, it is automatically set to the minimum/maximum value allowed by the range.
NOTE: Take the fieldbus cycle, the task bus cycle, the bitrate of the IO-Link device (COM 1/2/3), and the minimum cycle time of the IO-Link device into account before setting the timeout.
|
i_stParameterAddress |
– |
Structure containing the parameter address. |
|
i_anyBuffer |
ANY |
– |
Application buffer in which the read data is copied. |
Output |
Data type |
Description |
---|---|---|
q_xDone |
BOOL |
Indicates that the execution process has been completed successfully. |
q_xBusy |
BOOL |
Indicates that the execution process is in progress. |
q_xError |
BOOL |
If this output is set to TRUE, an error has been detected. For details, refer to q_etResult and q_etResultMsg. |
q_etResult |
Provides diagnostic and status information as a numeric value. |
|
q_sResultMsg |
STRING [80] |
Provides additional diagnostic and status information as a text message. |