FB_WriteMasterUserParameter - Functional Description

Overview

Type:

Function block

Available as of:

V1.0.0.0

Functional Description

The function block FB_WriteMasterUserParameter is used to write user parameters to the IO-Link master connected. Depending on the user parameter to be written, the corresponding enumeration must be assigned to the generic input i_dwValue, for example for ET_UserParameter.OperatingMode the enumeration ET_OperationMode.

NOTE: If the IO-Link master is connected by Sercos protocol, the Sercos state must be in state 2, 3 or 4 and the outputs of the bus coupler enabled to initiate that which is required for the communication to the IO-Link master and devices and to use this function block.

Interface

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 and the task bus cycle into account before setting the timeout.

i_etUserParameter

ET_UserParameter

Structure containing the parameter address.

i_dwValue

DWORD

Value to write.

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

ET_Result

Provides diagnostic and status information as a numeric value.

q_sResultMsg

STRING [80]

Provides additional diagnostic and status information as a text message.