Data logger call-back

Call-back is the ability of a remote site to initiate a call to LoggerNet and have LoggerNet call back to collect data. Call-back is supported in networks consisting of RF451/RF452s as the single communications device.

In a mixed-communications devices network, for example, phone to RF451/RF452, the base site makes the transition between communications types. Call-back is NOT supported when the base RF451/RF452s Active Interface is configured as CS I/O ME Master. The RF451/RF452 Active Interface is configured as CS I/O ME Master when the CS I/O port is used for direct connection to an ME device such as a COM220 or MD485). The connection is done by using an A100.

In this example, the RF451/RF452s are set up as described in RF451/RF452 radio communications with one or more data loggers. In the following program the data logger will send a variable named Callback to LoggerNet (PakBus address 4094) when the CallbackFlag variable is true. After LoggerNet receives the variable Callback it will begin collecting data from the data logger and store it into a file based on the data collection settings in the LoggerNet Setup screen. Note that the PakBus Port in the LoggerNet Setup screen must have PakBus Port Always Open selected.

CRBasic call-back program

'Declare Public Variables

Public counter, Result

Public CallbackFlag As Boolean

Dim scratch  'this variable is a place-holder it is not used

 

'Define Data Tables

DataTable (OneMin,true,-1)

  DataInterval (0,1,Min,10)

  Sample (1,counter,FP2)

EndTable

 

'Main Program

BeginProg

  'Configure the data logger CS I/O port to match the SDC address and baud rate

  'set in the RF451/RF452

  SerialOpen (ComSDC7,-115200,0,0,10000)

  Scan (1,Sec,0,0)

    counter = counter + 1

    If CallbackFlag = true Then

      SendVariables (Result,ComSDC7,0,4094,0000,0,"Public","Callback",Scratch,1)

      CallbackFlag = false

    EndIf

    'Call Output Tables

    CallTable OneMin

  NextScan

EndProg