beautypg.com

2 voltage, Crbasic example 63. time stamping with system time – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 274

background image

Section 8. Operation

274 

 

 

basic code requirements. The DataTime() instruction is a more recent
introduction that facilitates time stamping with system time. See Data Table
Declarations

(p. 475)

and CRBasic Editor Help for more information.

CRBasic Example 63. Time Stamping with System Time 

'Declare Variables

Public

value

'Declare data table

DataTable

(Test,True,1000)

Sample

(1,Value,FP2)

EndTable

SequentialMode

BeginProg

Scan

(1,Sec,10,0)

'Delay -- in an operational program, delay may be caused by other code

Delay

(1,500,mSec)

'Measure Value -- can be any analog measurement

PanelTemp

(Value,0)

'Immediately call SlowSequence to execute CallTable()

TriggerSequence

(1,0)

NextScan

'Allow data to be stored 510 ms into the Scan with a s.51 time stamp

SlowSequence

Do

WaitTriggerSequence

CallTable

(Test)

Loop

EndProg

 

Other time-processing CRBasic instructions are governed by these same rules.
Consult CRBasic Editor Help for more information on specific instructions.

8.1.2 Voltage

The CR1000 incorporates a programmable gain input instrumentation amplifier
(PGIA), as illustrated in figure PGI Amplifier

(p. 275).

The voltage gain of the

instrumentation amplifier is determined by the user-selected range code associated
with voltage-measurement instructions. The PGIA can be configured to measure
either single-ended (SE) or differential (DIFF) voltages. For SE measurements,
the voltage to be measured is connected to the H input while the L input is
internally connected to signal ground (

). CRBasic instructions BrHalf(),

BrHalf3W(), TCSE(), Therm107(), Therm108(), Therm109(), and VoltSE()
perform SE voltage measurements. For DIFF measurements, the voltage to be
measured is connected between the H and L inputs on the PGIA. CRBasic