GetPosition / SetPosition / RNtfPosition

GetPosition

GetPosition / SetPosition / RNtfPosition 1:

The GetPosition method is used to query the Position, PositionMAX, and PositionMIN properties of the OCA object. If the query was successful, the result is output in the properties stPosition, stPositionMAX and stPositionMIN.

GetPosition / SetPosition / RNtfPosition 2:

Cyclic method call

Since several PLC cycles may pass between sending and the response from the device, this method should be executed cyclically.

Syntax

VAR_INPUT
   pLink    : POINTER TO ST_Link; //Pointer to address of the structure which links the OCA objects to the OCA device
   bExecute : BOOL; //The Method is triggered by a rising edge at this input.
END_VAR

GetPosition / SetPosition / RNtfPosition 3: Inputs

Name

Type

Description

pLink

POINTER TO ST_Link

Pointer for establishing a connection between OCA objects and the OCA device

bExecute

BOOL

The method is executed with a positive edge at the bExecute input.

SetPosition

GetPosition / SetPosition / RNtfPosition 4:

The SetPosition method can be used to set the switch position of an OCA object. If the method was executed successfully, the result is output in the property stPosition.

GetPosition / SetPosition / RNtfPosition 5:

Cyclic method call

Since several PLC cycles may pass between sending and the response from the device, this method should be executed cyclically.

Syntax

VAR_INPUT
   pLink     : POINTER TO ST_Link; //Pointer to address of the structure which links the OCA objects to the OCA device
   bExecute  : BOOL; //The Method is triggered by a rising edge at this input.
   nPosition : UINT;
   eCmdMode  : E_OcaMessageTypeCmdbLock;
END_VAR

GetPosition / SetPosition / RNtfPosition 6: Inputs

Name

Type

Description

pLink

POINTER TO ST_Link

Pointer for establishing a connection between OCA objects and the OCA device.

bExecute

BOOL

The method is executed with a positive edge at the bExecute input.

nPosition

UINT

Switch position for the OCA object.

eCmdMode

E_OcaMessageTypeCmdbLock

Depending on whether confirmation is required or not, this input variable is set to E_OcaMessageTypeCmd.OcaCmdRrq or
E_OcaMessageTypeCmd.OcaCmd.

RNtfPosition

GetPosition / SetPosition / RNtfPosition 7:

If the OCA object was prompted to notify changes (using the Subscription method), incoming notifications are read using the RNtfPosition method.

GetPosition / SetPosition / RNtfPosition 8:

Cyclic method call

Since several PLC cycles may pass between sending and the response from the device, this method should be executed cyclically.

Syntax

VAR_INPUT
   pLink           : POINTER TO ST_Link;
   bEnable         : BOOL;
   nSubscribtionNo : UDINT;
END_VAR

GetPosition / SetPosition / RNtfPosition 9: Inputs

Name

Type

Description

pLink

POINTER TO ST_Link

Pointer for establishing a connection between OCA objects and the OCA device.

bExecute

BOOL

The method is executed with a positive edge at the bExecute input.

nSubscribtionNo

UDINT

Unique number for localizing the respective subscription.