L_IF1P_DeviceConnectionHandler

This FB can be used to establish or disconnect connections between functions (axes or encoders) and devices at runtime.

Whether a connection is to be established or disconnected depends on the value of the DeviceModuleHandler parameterized in the aScConnectionData array.

  • DeviceModuleHandler = 0:

    The connection is disconnected.

  • DeviceModuleHandler = valid DeviceModuleHandler:

    The connection is established if there is no connection yet or if xDisconnectExistingConnection = TRUE.

 

 

 

L_IF1P_DeviceConnectionHandler

 

 

 

BOOL

–

 

xExecute

xBusy

 

–

BOOL

L_IF1P_ConnectDeviceData

–

 

aScConnectionData

xDone

 

–

BOOL

BOOL

–

 

xDisconnectExistingConnection

xError

 

–

BOOL

 

 

 

 

eErrorId

 

–

L_IE1P_Error

 

 

 

 

 

 

 

 

Inputs

Name

Data type

Info/adjustment options

xExecute

BOOL

FALSE->TRUE Start execution of the FB. The commands parameterized at the FB input aScConnectionData are processed in the order of the array elements.

ascConnectionData

L_IF1P_ConnectDeviceData

Array of commands to be processed.

The sFunctionName, sDeviceName, eConnectionState and eErrorId elements of the L_IF1P_ConnectDeviceData structure are enriched with information at the time the command is executed

xDisconnectExistingConnection

BOOL

TRUE

When a connection is established, a previous connection is disconnected and the new connection is established.

 

FALSE

The old connection is retained when the connection is established.

Outputs

Name

Data type

Info/adjustment options

xBusy

BOOL

FB is executed

xDone

BOOL

Execution completed.

xError

BOOL

An error has occurred.

eErrorId

L_IE1P_Error

If xError = TRUE: Error number of the error that has occurred.