4 analog output to strip chart – Campbell Scientific CR7 Measurement and Control System User Manual

Page 86

Advertising
background image

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-4

Input Location Assignments:

1:TEMP DEG C
10:30 SEC 0

*

1

Table 1 Programs

01:

.5

Sec. Execution Interval

01:

P18

Time

01:

0

Tenths of seconds into minute
(maximum 600)

02:

300

Mod/by

03:

10

Loc [:30 SEC 0 ]

02:

P17

Panel Temperature

01:

1

IN Card

02:

1

Loc [:REF TEMP ]

03:

P14

Thermocouple Temp (DIFF)

01:

1

Rep

02:

13

15 mV fast Range

03:

1

IN Card

04:

2

IN Chan

05:

2

Type E (Chromel-Constantan)

06:

1

Ref Temp Loc REF TEMP

07:

2

Loc [:TC TEMP ]

08:

1

Mult

09:

0

Offset

04:

P

89 If X<=>F

01:

10

X Loc 30 SEC 0

02:

4

<

03:

.5

F

04:

10

Set high Flag 0 (output)

05:

P

71 Average

01:

1

Rep

02:

2

Loc TC TEMP

06:

P

End Table 1

8.4 ANALOG OUTPUT TO STRIP

CHART

This example illustrates the use of the Analog
Output Instruction 21 to output 2 analog
voltages to strip chart.

While of questionable value because of power
requirements and strip chart reliability, some
archaic regulations require strip chart backup
on weather data. Instruction 21 may be used
with the CR7 to provide two continuous analog

outputs for strip charts. The output values in
this example are wind speed and wind direction.

The following program measures the sensors
every five seconds. The readings are moved to
another two locations and scaled to a 0 to 1000
millivolt output for the strip chart. Wind direction
is changed from a 0-360 degree input to output
representing 0 to 540 degrees. This conversion
is done in a subroutine which is described in the
next example.

The example also includes instructions to
output wind vector every hour.

Input Location Assignments:

01:WS
02:0-360 WD
03:0-540 WD
04:WS output
05:WD output

*

1

Table 1 Programs

01:

3

Sec. Execution Interval

01:

P3

Pulse

01:

1

Rep

02:

5

IN Card

03:

1

Pulse Input Chan

04:

22

Switch closure; Output Hz.

05:

1

Loc [:WS ]

06:

1.789

Mult

07:

1

Offset

02:

P4

Excite,Delay,Volt(SE)

01:

1

Rep

02:

16

500 mV fast Range

03:

2

IN Card

04:

1

IN Chan

05:

1

EX Card

06:

1

EX Chan

07:

1

Meas/EX

08:

2

Delay (units .01sec)

09: 1000

mV Excitation

10:

2

Loc [:0-360 WD ]

11:

.72

Mult

12:

0

Offset

03:

P86

Do

01:

1

Call Subroutine 1

Advertising