rfbcGetConfig (Function)

Top  Previous  Next

Architecture:

X32 / NX32L

Device support:

AX9 pro, CX1 pro/pro-c/warp/warp-c, SX1, AX9 turbo, NX-900, LX5

Firmware version:

2.60 / 1.51.00


This function will return the current configuration used when communication with other devices through the RFBC protocol.

To change configuration parameters, use rfbcSetConfig.

Configuration will be remembered between rfbcClose and rfbcOpen but not through a device reset.

 

When the interface is first opened, it will have a default configuration based on the serial number of the device.

 

 

Input:

None.

 

Output:

id : DINT

The unique ID used when communicating with other devices to tell who sent the message and whether it is for this device and should be replied.

Only messages which are sent to this id or broadcasted will be reported.

 

serialNumber : STRING

Serial number used when processing pairing requests.

 

pairMode : SINT

This defines how incoming pairing requests are handled.

'0'

-

Rejects all.

'1'

-

Accepts all.

 

acknowledge : BOOL (default : TRUE)

If true, then a confirmation is sent back when a message addressed to the RTCU is received.

 

 

Returns: INT

0

-

Successful.

-1

-

Interface is not open (see rfbcOpen).

-4

-

RF communication is not available.

 

Declaration:

FUNCTION rfbcGetConfig : INT;
VAR_INPUT
  id             : ACCESS DINT;
  serialNumber   : ACCESS STRING;
  pairMode       : ACCESS SINT;
  acknowledge    : ACCESS BOOL;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM example;
VAR
  myId             : DINT;
  mySerialNumber   : STRING;
  myPairMode       : SINT;
  myAcknowledge    : BOOL;
END_VAR;
 
rfbcOpen();
rfbcGetConfig(id := myId, serialnumber := mySerialNumber, pairmode := myPairMode, acknowledge := myAcknowledge);
 
BEGIN
  ...
END;
END_PROGRAM;