SDM-SIO4 User Guide

6.3.2 CR10X Program Example

A typical CR10X datalogger program to work with the above formatter is shown below.

The program assumes that the SDM-SIO4 is set to address 0, the sensor is connected to port 1 of the SDM-SIO4 and the port settings, baud rate etc have been set. The output from the SDM-SIO4 is every second:

*Table 1 Program

01: 1.0 Execution Interval (seconds)

;Transmit formatter string 100, which includes the calculated CRC16 to port 1

1:SDM-SIO4 (P113)

1: 1

Reps

2: 0

Address

3:

1

Send/Receive Port 1

4:

2304

Command

5:9100 1st Parameters

6:0 2nd Parameters

7:0 Values per Rep

8:0000 Loc [ _________ ]

9:

1

Mult

10:

0

Offset

*Table 2 Program

02:0.0000 Execution Interval (seconds)

*Table 3 Subroutines

End Program

The program shown above will output to port 1 the string ‘123456789BB3D’.

6.3.3 Alternative CR10X Program

The earlier formatter example assumes the signature/CRC is calculated and completed in one formatter string, which also means it will all be done within one P113 datalogger instruction. This is not the only way to do it. It is possible to calculate a CRC/signature across a number of formatter strings and therefore a number of P113 Datalogger instructions. This could be done by using command line commands and a datalogger program as shown below.

Formatter strings stored by using the command line.

FMTST 100 “g1”

FMTST 101 “i[some data]”

FMTST 102 “f6:2 G8”

6-8

Page 64
Image 64
Campbell Hausfeld SDM-SIO4 manual Alternative CR10X Program, Fmtst 100 g1 Fmtst 101 isome data Fmtst 102 f62 G8