GetGain / SetGain / RNtfGain

GetGain

GetGain / SetGain / RNtfGain 1:

The GetGain method is used to query the properties Gain, GainMAX and GainMIN of the OCA object. If the query was successful, the result is output in the properties stGain, stGainMAX and stGainMIN.

GetGain / SetGain / RNtfGain 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;
   bExecute : BOOL;
END_VAR

GetGain / SetGain / RNtfGain 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.

SetGain

GetGain / SetGain / RNtfGain 4:

Use the SetGain method to set the gain of an OCA object in dB. If the method was executed successfully, the result is output in the property stGain.

GetGain / SetGain / RNtfGain 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;
   bExecute : BOOL;
   fGain    : REAL;
   eCmdMode : E_OcaMessageTypeCmd;
END_VAR

GetGain / SetGain / RNtfGain 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.

fGain

REAL

Gain value in dB to which the OCA object is to be set.

eCmdMode

E_OcaMessageTypeCmd

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

RNtfGain

GetGain / SetGain / RNtfGain 7:

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

GetGain / SetGain / RNtfGain 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

GetGain / SetGain / RNtfGain 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.