background image

Section 7.  Measurement Instructions 

7-22 

PulseCount (Dest, Reps, PSlot, PChan, PConfig, POption, Mult, Offset) 

This instruction should not be placed in a conditional or in a Slow Sequence 
Scan.   Sets up   pulse measurements using the twelve 16 bit counter channels 
on the CR9070 or the twelve 32 bit counters channels on the CR9071E 
Counter module. There are three pulse types or configurations that may be 
measured using these Counter modules: 

High Frequency:  All twelve pulse channels can be configured for high 

frequency inputs. This configuration is used for the higher 
frequency pulse inputs (up to 1 MHz). The pulse count is 
incremented when the signal rises from below 1.5 VDC to 
above 3.5 VDC.  Because of the input filter's  200 
nanosecond time constant, higher frequencies will require 
larger input transitions.  See section 3.4 for additional 
measurement information. The minimum pulse width that 

can be detected is 500 ns.  The maximum input voltage is 

± 

20 V.  

Low Level AC: 

The first 8 frequency input channels can be configured for 
low level ac inputs. This option is used to count the 
frequency of low level ac signals from such sensors as a 
magnetic pick up. The minimum input voltage that can be 
counted is 25 mV RMS.  At this minimum voltage, 
frequencies up to 10 kHz can be measured. For input 
voltage greater than 50 mV, frequencies up to 20 kHz can 
be measured.  Again, the maximum input voltage is 20 V.   

Switch Closure 

Channels 9 through 12 can be configured as Switch 
Closure inputs.  The switch closure (dry contact) should be 
connected between the pulse channel and ground.  When 
the contact is open, the pulse channel is pulled to 5 volts 
through a 100 kOhm pull up resistor.  When the contact is 
closed, the pulse channel is pulled to ground.  The count is 
incremented when the channel is pulled high.  The 
minimum switch close time is 5 msec.  The minimum 
switch open time is 5 msec.  The maximum bounce time 
without being counted is 1 msec open.    

Using the Poption, you can configure the output as Counts, Frequency over 
the scan interval, or as a running average frequency for a set duration. See 
section 3.4 for more pulse measurement details.  

 

Parameter 
& Data Type 

Enter 

                  PULSECOUNT INSTRUCTION

 

Dest 

Variable or 
Array

 

The Variable in which to store the results of the instruction.  When Reps are used the results are stored in 
an array with the variable name.  An array must be dimensioned to have elements for all the Reps.

 

Reps 

Constant

 

The number of repetitions for the measurement or instruction.

 

PSlot 

Constant

 

The number of the slot that holds the 9070/9071E Counter Timer Module for the measurement.

 

PChan 

Constant

 

The number of the pulse channel for the measurement.

 

Summary of Contents for CR9000

Page 1: ...INSTRUCTION MANUAL CR9000 Measurement and Control System Revision 5 05 C o p y r i g h t c 1 9 9 5 2 0 0 5 C a m p b e l l S c i e n t i f i c I n c ...

Page 2: ... of all other warranties expressed or implied including warranties of merchantability or fitness for a particular purpose CAMPBELL SCIENTIFIC INC is not liable for special indirect incidental or consequential damages Products may not be returned without prior authorization The following contact information is for US and International customers residing in countries served by Campbell Scientific In...

Page 3: ...irements and Options 1 3 1 2 1 Power Supply and Charging Circuitry 1 3 1 2 2 Connecting to Vehicle Power Supply 1 6 1 2 3 Solar Panels 1 7 1 2 4 External Battery Connection 1 7 1 2 5 Safety Precautions 1 8 1 3 Humidity Effects and Control 1 8 1 3 1 Desiccant 1 8 1 3 2 Nitrogen Purging 1 8 1 4 Recommended Grounding Practices 1 9 1 4 1 Protection from Lightning 1 9 1 4 2 Effect on Measurements Commo...

Page 4: ...Measurements 3 22 3 4 Pulse Count Measurements 3 25 4 CRBASIC Native Language Programming 4 1 4 1 Format Introduction 4 1 4 1 1 Mathematical Operations 4 1 4 1 2 Measurement and Output Processing Instructions 4 1 4 1 3 Inserting Comments Into Program 4 2 4 2 Programming Sequence 4 2 4 3 Example Program 4 3 4 3 1 Data Tables 4 4 4 3 2 The Scan Measurement Timing and Processing 4 5 4 4 Numerical Ent...

Page 5: ...alf Bridges 7 6 7 4 Full Bridges 7 9 7 5 Excitation Continuous Analog Output 7 10 7 6 Self Measurements 7 11 7 7 Peripheral Devices 7 12 7 8 Digital I O 7 21 7 9 CR9052DC Filter Module Measurements 7 26 8 Processing and Math Instructions 8 1 9 Program Control Instructions 9 1 A Keywords and Predefined Constants A 1 Index Index 1 ...

Page 6: ...CR9000 Table of Contents iv This is a blank page ...

Page 7: ...ules Up to nine I O modules are inserted to configure a system for specific applications The on board BASIC like programming language includes data processing and analysis routines PC9000 Windows Software provides program generation and editing data retrieval and realtime monitoring CR9000 AC AD APT OR FIGURE OV1 1 CR9000 Measurement and Control System OV1 Physical Description OV1 1 Basic System C...

Page 8: ...e AC power is available 100 240 volts to provide power to the CR9000 and charge its batteries The CR9011 has a relay that allows shutting off power under program control The Power Up inputs allow an external signal to awaken the CR9000 from a powered down state PowerOff Section 9 When the CR9000 is in this power off state the ON Off switch is in the on position but the internal relay is open The p...

Page 9: ...E Thermocouple Differential Voltage TCDiff Thermocouple Single Ended Voltage TCSE Bridge measurements also require CR9060 Excitation Module Full Bridge BrFull 6 Wire Full Bridge BrFull6W Half Bridge BrHalf 3 Wire Half Bridge BrHalf3W 4 Wire Half Bridge BrHalf4W Module Temperature ModuleTemp 9050 ANALOG INPUT W RTD SE DIF 1 1 H 2 L 2 3 H 4 L 3 5 H 6 L 4 7 H 8 L 5 9 H 10 L 6 11 H 12 L 7 13 H 14 L 8 ...

Page 10: ...ut ranges from 20 mV to 5 V Each input channel has current and voltage excitation options Measurement rates up to 50 kHz per channel are possible MEASUREMENTS VoltFilt FFTFilt CR9052DC MADE IN USA CR9052EC FILTER MODULE CONNECTOR DC EXCITATION MADE IN USA FIGURE OV1 7 CR9052DC CR9052IEPE Anti Alias Filter Module with DC Excitation The The CR9052IEPE module allows direct connection of Internal Elec...

Page 11: ...le DSP provides digital filtering MEASUREMENTS VoltDiff TCDiff CR9058E 60V ISOLATED ANALOG INPUT MODULE W RTD MADE IN USA CR9058EC 60V ISOLATED ANALOG INPUT CONNECTOR FOR CR9058E MADE IN USA FIGURE OV1 9 CR9058 CR9055 50 Volt Analog Input Module The CR9055 50 Volt Analog Input Module has 14 differential or 28 single ended inputs for measuring voltages up to 50 V Resolution on the most sensitive ra...

Page 12: ...ght digital control outputs 0 V low 5 V high MEASUREMENTS Excite PortSet Full Bridge BrFull 6 Wire Full Bridge BrFull6w Half Bridge BrHalf 3 Wire Half Bridge BrHalf3W 4 Wire Half Bridge BrHalf4W 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 3 6 8 2 4 5 7 9060 EXCITATION C A O SWITCHED EXCITATION DIGITAL CONTROL OUTPUT MADE IN USA FIGURE OV1 11 CR9060 CR9070 Counter Timer Digital I O Module Obsolete Fea...

Page 13: ...ents TimerI O CR9071E COUNTER MADE IN USA CR9071EC COUNTER DIGITAL I O MADE IN USA FIGURE OV1 13 CR9071E Data Storage Peripheral and Memory Module Contains slots for two type I II PCMCIA cards or one type III PCMCIA card A 9 pin serial I O port supports CSI peripherals The LEDs indicate the status of the cards in slots A and B Not lit no card detected green present and correctly formatted red pres...

Page 14: ...K cable can be up to 30 meters long Logan Utah TL925 CR9000 TO RS232 SERIAL INTERFACE MADE IN USA CR9000 RS422 COMPUTER RS232 S N 0004 FIGURE OV1 15 TL925 BLC100 Bus Link Card and Fiber Optic Link Interface Obsolete The BLC100 is an interface board that plugs into a half length card slot AT bus in the user s computer It can be used for either TLINK 8 wire up to 30 meters or for fiber optic separat...

Page 15: ...is available with the 9080 PAM Module OV2 2 Measurements Processing Data Storage The CR9000 divides datalogging and control between two entities The task sequencer manipulates the measurement and control hardware on a rigidly timed sequence The main processor an Inmos T805 Transputer processes and stores the resulting measurements and makes the decisions to actuate controls The Transputer is a 32 ...

Page 16: ...ed when running the program generator or when writing a datalogger program directly Table OV2 1 Typical Data Table TOA4 StnName Temp TIMESTAMP RECORD RefTemp_Avg TC_Avg 1 TC_Avg 2 TC_Avg 3 TC_Avg 4 TC_Avg 5 TC_Avg 6 TS RN DegC DegC DegC degC degC degC degC Avg Avg Avg Avg Avg Avg Avg 1995 02 16 15 15 04 61 278822 31 08 24 23 25 12 26 8 24 14 24 47 23 76 1995 02 16 15 15 04 62 278823 31 07 24 23 25...

Page 17: ...er e g a setup Enter The setup routine will prompt for disk 2 You may use the default directory of PC9000 or install the software in a different directory The directory will be created for you To abort the installation type Ctrl C or Break at any time OV3 3 PC9000 Software Overview This overview points out the main PC9000 functions and where to find them PC9000 has extensive on line help to guide ...

Page 18: ... by Program Generator View Data Collected from CR9000 Display Data in Tables Collected From CR9000 Graphing requires no special processing of the data and provides rapid feedback to the operator Display Data Graph 1 Display Data Graph 2 ID2000 Ctrl I CommLink Select Series Linked Station Select Parallel Linked Station Logger Clock Logger Status Download Logger Files Diagnostics PC to CR9000 commun...

Page 19: ...rator Guides the user through a series of menus to configure the measurement types thermocouple voltage bridge pulse counting frequency and others Creates a CR9000 program wiring diagram output table description and configuration file Program Editor Create programs directly or edit those created by the program generator or retrieved from the CR9000 Provides context sensitive help for the CR9000 s ...

Page 20: ...Ahr for the CR9000C capacity per charge EXTERNAL BATTERIES External 12 V batteries can be connected 9041 A D and AMPLIFIER MODULE A D Conversions 16 bit 100 kHz PC9000 C INTERFACES PLA100 TYPICAL CURRENT DRAIN 50 mA supplied by the CR9000 C SIZE excluding cabl e 2 25 x 0 5 x 4 0 5 7 x 1 3 x 10 2 cm CABLE LENGTH S p e c i f i e d i n fe e t by the user 50 ft maximum length WEIGHT 2 5 lb 0 11 kg TL9...

Page 21: ...Ave raging Resistance Vdc µV µV Kohms 2 10 2 10 000 20 100 20 88 9 60 300 60 269 ACCURAC Y 0 02 of Full Scale Range ove r 40 to 70 C MINIMUM SCAN TIME PER MODULE Vo l t D i f f 1285 µs 778 samples per second i n t e gr a t i o n t i m e for no input reversal Rev D i f f 0 or 2990 µs 334 samples per second i n t e gr ation time with input reversal RevDiff 1 T C D i f f range parameter set to V2C 25...

Page 22: ...CR9000 Overview OV 16 This is a blank page ...

Page 23: ...atch which could prevent a gas tight seal Note that there is a pressure release valve on the enclosure If you have difficulty removing the lid try pressing the release valve to equalize the pressure differential between the case and atmosphere 1 1 1 Connecting Sensors The CR9000 input modules use screw terminals for connecting sensor wires Figure 1 1 1 Terminals for individual wires provide the mo...

Page 24: ... When sensors are spread out over a large area a junction box provides a convenient method for changing sensors in one location quickly Junction boxes can also provide more localized protection against instrumentation damage as a result of lightning induced high voltages Junction boxes should be sealed adequately to limit air exchange and stocked with fresh desiccant Section 1 3 When used for ther...

Page 25: ...ater than 3 amps consult a Campbell Scientific applications engineer for information on the CR9011 Power Supply High Current modification The voltage is automatically stepped up to an adequate voltage for charging A temperature compensated charging regulator circuit regulates the charging voltage supplied to the lead acid batteries and the CR9000 The charging circuitry operates with the ON OFF swi...

Page 26: ...Section 1 Installation 1 4 CR9000 FIGURE 1 1 3 CR9000 Battery Pack ...

Page 27: ...scharge 550 cycles 30 depth of discharge 1200 cycles Number of batteries 4 CHARGING CIRCUIT Type Controlled voltage with temperature compensated voltage regulation Charging Current limited to 2 Amps max POWER SUPPLY TRANSFORMER Input Voltage 100 240 VAC 50 60 Hz Input Current 1 4 A maximum Output Voltage 17 5 VDC Output Current 3 5 A maximum At typical CR9000 current demand the batteries are 100 d...

Page 28: ...r Module As an example the current drain of a CR9000 System containing the base system CPU Module A D Module and Power Supply Module 410 mA 485 mA 1 9060 Excitation Module 108 mA 125 mA this does not include the current required for exciting the sensors 2 9070 Counter Timer Modules 0 mA 30 mA and 4 Analog Input Modules 0 mA 60 mA is about 518 mA between measurement scans and 700 mA during measurem...

Page 29: ...t is active less than 25 percent of the time Other panels are available for continuous operation Contact a Campbell Scientific application engineer for help in configuring a solar powered CR9000 installation 1 2 4 External Battery Connection An external battery may be used in place of the internal lead acid batteries of the CR9000 The external battery is connected using a special cable that is plu...

Page 30: ... Effects and Control The CR9000 system is designed to operate reliably under environmental conditions where the relative humidity inside its enclosure does not exceed 90 noncondensing Condensing humidity may result in damage to IC chips microprocessor failure and or measurement inaccuracies due to condensation on the various PC board runners Effective humidity control is the responsibility of the ...

Page 31: ...G or larger wire should be run from the grounding terminal on the right side of the I O Module case to a grounding rod driven far enough into the soil to provide a good earth ground A modem phone line connection to the CR9000 provides another pathway for transients to enter and damage the datalogger The phone lines should have proper spark gap protection at or just before the modem at the CR9000 T...

Page 32: ...ng Relays The digital control outputs on the 9060 Excitation Module and the I O channels on the CR9070 CR9071E Counter Timer Module may be used to actuate controls but because of current supply limitations the output ports are not used directly to drive a relay coil Relay driver circuitry is used to switch current from another source to actually power the relay These relays may be used for activat...

Page 33: ... CR9000 only looks for the data in flash memory or in the PC card when the oldest data are requested or if the data are not available in CPU memory In the CRBASIC program the DataTable instruction sets the size of the data table or buffer area A data table can be stored in a PC card by including the PAMOut instruction within the data table declaration A data table can be stored in internal flash m...

Page 34: ...rd and inserting it in a PC card slot in a computer Converting the data using the computer s PC card slot is much faster than retrieving it through the CR9000 using one of the communication links The CR9000 uses an MS DOS format for the PC cards Cards can be formatted in a PC or in the CR9000 TABLE 2 2 1 CR9000 DATA TYPES Data Type Size Range Resolution LONG 4 bytes 2 147 483 648 to 2 147 483 647 ...

Page 35: ... by transferring a PC card from the PC9000 to the computer There are three ways to collect data via a link to the CR9000 using the PC9000 software 1 The collect menu is used to collect any or all stored data Tables and is used for most archival purposes 2 In PC9000 s Field Monitor RealTime window there is a Disc file check box Data stored to the table while the box is checked are also stored to a ...

Page 36: ...lect Data Dialog Box 2 3 1 1 File Type ASCII With Time Click here to store the data as an ASCII TOA5 Section 2 4 file Each record will be date and time stamped Binary With Time Click here to store the data as a binary file TOB1 Section 2 4 Each record will be date and time stamped ASCII Without Time Click here to store the data as an ASCII file TOA5 Section 2 4 There will be no date and time stamp...

Page 37: ...d number The number in the file name is incremented to create the file name in which the data are stored Num of Recs Enabled when Number of Records Create New File is checked Enter the number of records back from the current record number to retrieve 2 3 1 3 Table Selection All Tables When the All Tables box is checked all data tables except the Public and Status tables are collected when collecti...

Page 38: ...ere to begin collecting data 2 3 1 5 Status Messages TABLE SIZE Shows the size in records of the table highlighted in the Table Name box above COLLECTION RANGE Displays the range of records to be collected More records than the last number in this range may actually be retrieved LOGGER MESSAGE Displays messages from the CR9000 2 3 2 RealTime Write File This feature is provided to allow the user to...

Page 39: ... the stored data 2 3 3 Logger Files Retrieve Logger Files under the PC9000 tools menu allows the user to check the programs stored in CPU Flash memory and the files stored on the PCMCIA cards Any of the files shown in logger files can be copied to the computer by highlighting the file and pressing the retrieve button Data files in the CR9000 CPU and Flash memory are not shown The retrieved data fi...

Page 40: ... inserted in a computer the data files can be copied to another drive or used directly from the PC card just as one would from any other disk In most cases however it will be necessary to convert the file format before using the data 2 3 4 2 Converting File Format The CR9000 stores data on PC cards in TOB2 Format TOB2 is a binary format that incorporates features to improve reliability of the PC C...

Page 41: ...2 4 1 is a sample header where the text in the header is a generic name for the information contained in the header The entries are described following the figure File Format Station Logger Serial No OS Ver DLD File DLD Sig Table Name TIMESTAMP RECORD Field Name Field Name Field Name TS RN Field Units Field Units Field Units Processing Processing Processing Field Data Type Field Data Type Field Da...

Page 42: ...able Name The data table name Field Name The name of the field in the data table This name is created by the CR9000 by appending underscore _ and a three character mnemonic for the output processing Field Units The units for the field in the data table Units are assigned in the program with the units declaration Field Processing The output processing that was used when the field was stored Smp Sam...

Page 43: ... of how the above data might look when imported into a spread sheet TOA5 Bob s9K CR9000 1048575 1 00 EXPLDAT DLD 4339 Temp TIMESTAMP RECORD RefTemp_Avg TC_Avg 1 TC_Avg 2 TC_Avg 3 TC_Avg 4 TS RN degC degC degC degC degC Avg Avg Avg Avg Avg 1995 09 19 14 31 43 84 458 29 94 25 6 25 36 25 48 25 4 1995 09 19 14 31 43 85 459 29 93 25 6 25 36 25 41 25 35 This is the same data table collected as ASCII wit...

Page 44: ...nary format has a header similar to the other formats TOB2 data is stored in fixed size frames that generally contain a number of records The size of the frames is a function of the record size The frames are time stamped allowing the calculation of time stamps for their records If there is a lapse in periodic interval records that does not occur on a frame boundary an additional time stamp is wri...

Page 45: ...10 µs The timing of the CR9000 measurements is precisely controlled by the task sequencer a combination of components that switches the measurement circuitry on a rigid schedule that is determined at compile time and loaded into the task sequencer s memory The basic tick of the task sequencer measurement clock may be thought of as 10 µs The minimum time between measurements is 10 µs When voltage s...

Page 46: ...nts Reversing the inputs of a differential measurement cancels offsets in the CR9000 measurement circuitry One measurement is made with the high input referenced to the low input and a second with the low referenced to the high 3 1 1 2 Delay When the CR9000 switches to a new channel or switches on the excitation for a bridge measurement there is a finite amount of time required for the signal to r...

Page 47: ...rements made For example the input noise on the 5000 mV range with no integration one measurement is 90 µV RMS integrating for 40 µs four measurements will cut this noise in half 90 4 45 One of the most common sources of noise is not random but is 60 Hz from AC power lines An integration time of 16 670 µs is equal to one 60 Hz cycle Integrating for one cycle will integrate the AC noise to 0 The in...

Page 48: ...n on the 5000 mV range is 160 µV A copper constantan thermocouple outputs a voltage of about 40 µV C difference in temperature between the measurement and reference junction The temperature resolution on the 50 mV range is 0 04 degrees 1 6 µV 40 µV 1 C the resolution on the 5000 mV range is 4 degrees 160 µV 40 µV C Because the smallest 50 mV range will allow a 1250 degree difference 0 05 V 0 00006...

Page 49: ... connected to the excitation over ranging voltage ranges up to 200 mV and causing Not a Number NAN to be returned for the result Check common mode range R option e g mV1000R After making the differential measurement appropriate single ended measurements are made on the H and L inputs to determine if the differential measurement was within common mode range The result of the differential measuremen...

Page 50: ... signal must rise to its correct value 2 A small transient caused by switching the analog input into the measurement circuitry must settle 3 When a resistive bridge measurement is made using a switched excitation channel a larger transient caused when the excitation is switched must settle MINIMIZING SETTLING ERRORS When long lead lengths are mandatory the following general practices can be used t...

Page 51: ... oC and adds this voltage to the measured thermocouple voltage The temperature of the measuring junction is then calculated from a polynomial approximation of the NIST TC calibrations 3 1 4 1 Error Analysis The error in the measurement of a thermocouple temperature is the sum of the errors in the reference junction temperature the thermocouple output deviation from standards published in NIST Mono...

Page 52: ...he CR9000 is subjected to rapid temperature changes Figure 3 4 1 shows the thermocouple temperature errors experienced on different channels of the analog module when the CR9000 was subjected to an abrupt change in temperature 40ºC to 60ºC in approximately 12 minutes Thermocouple Limits of Error The standard reference which lists thermocouple output voltage as a function of temperature reference j...

Page 53: ...ange i e the reference junction at 0 C is relatively close to the temperature being measured so the absolute error the product of the temperature difference and the slope error should be closer to the percentage error than the fixed error Likewise because thermocouple calibration error is a slope error accuracy can be increased when the reference junction temperature is close to the measurement te...

Page 54: ...example assume type K chromel alumel thermocouples are used to measure temperatures around 1300 oC The TC output is on the order of 52 mV requiring the 200 mV input range At 1300 oC a K thermocouple outputs 34 9 µV per oC The possible slope error in the voltage measurement is 0 0007x52 mV 36 4 µV or 1 04 oC 36 4 34 9 An A D count on the 200 mV range is worth 6 3 µV or 0 18 oC Thus the possible err...

Page 55: ...re over the range covered by each thermocouple type Table 3 4 3 gives error limits for the thermocouple polynomials TABLE 3 4 3 Limits of Error on CR9000 Thermocouple Polynomials Relative to NIST Standards TC Type Range oC Limits of Error oC T 270 to 400 270 to 200 18 270 200 to 100 0 08 100 to 100 0 001 100 to 400 0 015 J 150 to 760 0 008 100 to 300 0 002 E 240 to 1000 240 to 130 0 4 130 to 200 0...

Page 56: ...he temperature calculated by the CR9000 would be 262 4 oC 27 6 oC low TABLE 3 4 4 Reference Temperature Compensation Range and Polynomial Error Relative to NIST Standards Type Range oC Limits of Error oC T 100 to 100 0 001 J 150 to 296 0 005 E 150 to 206 0 005 K 50 to 100 0 01 Error Summary The magnitude of the errors described in the previous sections illustrate that the greatest sources of error...

Page 57: ... Module used as the reference junction Extension grade thermocouple wire has a smaller temperature range than standard thermocouple wire but meets the same limits of error within that range The only situation where it would be necessary to use extension grade wire instead of a external measuring junction is where the junction box temperature is outside the range of reference junction compensation ...

Page 58: ...ly be the sensors and those labeled Rf would normally be fixed resistors Circuits other than those diagrammed could be measured provided the excitation and type of measurements were appropriate All of the bridge measurements have the option RevEx to make one set of measurements with the excitation as programmed and another set of measurements with the excitation polarity reversed The offset error ...

Page 59: ... L H L X result w mult 1 offset 0 X V V R R s f 2 1 R R X R R X s f f s BrFull H L BrFull6W H L H L X result w mult 1 offset 0 X V V R R R R R R x 1000 1000 1 3 3 4 2 1 2 X result w mult 1 offset 0 X V V R R R R R R 1000 1000 2 1 3 3 4 2 1 2 X X R R R R R X X R R X X X X R R R R R X X R R X X 1 3 3 4 1 2 1 1 2 1 1 1 2 2 1 2 3 4 2 2 4 3 2 2 1000 1 1 1000 1 1 FIGURE 3 5 1 Circuits Used with Bridge M...

Page 60: ...ther 10 µs when the second measurement is held i e reverse the excitation 10 µs delay no integration A switched excitation channel 7 16 on the 9060 Module should be used when AC excitation is required because it will be switched out as soon as the measurement is completed The continuous excitation channels 1 6 on the 9060 Module should not be used because they retain the last voltage programmed i ...

Page 61: ...r taking 10 000 measurements per second or one measurement sample per 100 microseconds The effective resolution at this sample rate is 18 7 bits or 9 4 microvolts when using the 2 Volt range because of the inherent noise of the A D converter and noise from other sources The effective resolution can be dramatically improved through filtering and or integrating multiple measurements Thus noise reduc...

Page 62: ...he Settle time parameter is unused The minimum scan time when using the VoltDiff instruction without input reversal for the CR9058E is 1290 microseconds for integration times under 200 microseconds If the integration time is greater than 200 microseconds then the minimum scan interval is 1090 integration time microseconds When using the VoltDiff instruction with input reversal and integration unde...

Page 63: ... and they don t all have the same Integ time parameter then the Integration time for all of that module s channels will be set by the value of the Integ time parameter of the last measurement instruction tied to that module within the scan The Integ parameter in the VoltDiff and TCDiff instructions within the constraints listed above can be used to adjust the measurement frequency response For exa...

Page 64: ...d The CR9058E has a digital signal processor that performs sync n filtering of the analog to digital converter results to reduce noise At compile time the CR9058E computes the order of the sync n filter based on the integration time and Scan interval The more samples available the higher the order of sync n filter is implemented up to an order of five The equation used to calculate the filter is S...

Page 65: ...r frequency components of the input signal This could result in higher frequency signals being aliased back to lower frequencies While the 5th order sync filter does a fairly good job filtering out higher order frequencies the trade off is that it also attenuates the signal at lower frequencies as can be seen in Chart 3 2 CHART 3 2 FR EQ UENCY R ESP O NSE O F SY NC FILTER O R DERS 1 THRO UG H 5 0 ...

Page 66: ...a to the CR9000X s main processor The CR9052 can burst measurements to its on board 8 million sample buffer at 50 000 measurements per second per channel Using the FFT spectrum analyzer mode the module s DSP can provide real time spectra from seamless anti aliased 50 kHz 2048 point time series snapshots for each of its six analog input channels The decimated data can be downloaded to an appropriat...

Page 67: ...age step to discharge while with the 5 second time constant it would take 5 seconds Chart 3 3 Step Discharge Rate The 5 0 second time constant will not result in lower frequencies being attenuated as much 3 dB at 0 03 Hz as the 0 5 second time constant 3 dB at 0 3 Hz Chart 3 4 Frequency Response 0 0 2 0 4 0 6 0 8 1 1 2 1 0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 S E C O N...

Page 68: ...e Hanning window and 4 Kaiser Bessel betas Table 3 3 1 Spectral Leakage vs Resolution BETA MAXIMUM LEAKAGE dB SPECTRAL RESOLUTION BINS 8 63 2 25 10 74 2 50 12 95 2 75 14 110 3 00 CHART 3 5 COMPARISION OF SPECTRAL RESOLUTION FOR VARIOUS WINDOWING FUNCTIONS 0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 1 0 253 254 255 256 257 258 259 260 261 FREQUENCY BIN PEAK SIGNAL No Window Hanning Window Kaiser Window...

Page 69: ...R9000X offer numerous measurement and data processing possibilities For example this combination allows users to mix high speed anti aliased measurements and spectra from accelerometers strain gages and microphones with slower measurements from thermocouples pressure transducers and serial data streams The general purpose programmability of the CR9000X allows users to process their data before sav...

Page 70: ...count However a slight variation in the frequency might cause 2 counts within one interval and none in the next causing the result to vary from 0 to 4000 RPM The POption parameter in the PulseCount instruction can be used to set an interval period for a running average computation of the frequency output from the sensor Example Scan Rate of 10 mSec is for other measurements The output from the Pul...

Page 71: ...uit when VIn is the input voltage VOut must be at minimum 1 volt for the Schmitt circuit to trigger an output Chart 3 6 Required Transition Voltage for High Frequency Pulse Chart 3 6 plots the trace for the minimum transition voltage about 2 5 volts against the input signal frequency To demonstrate how to use this plot for a input frequency of 1 MHz the voltage signal centered about 2 5 volts must...

Page 72: ...Section 3 CR9000 Measurement Details 3 28 This is a blank page ...

Page 73: ... individual temperatures are TCTemp 1 TCTemp 2 TCTemp 3 TCTemp 50 The array notation allows compact code to perform operations on all the variables For example to convert ten temperatures in a variable array from C to F For I 1 to 10 TCTemp I TCTemp I 1 8 32 Next I 4 1 2 Measurement and Output Processing Instructions Measurement instructions are procedures that set up the measurement hardware to m...

Page 74: ...the start time array 4 2 Programming Sequence The following table describes the structure of a typical CR9000 program Declarations Make a list of what to measure and calculate Declare constants Within this list include the fixed constants used Declare Public variables indicate the values that the user is able to view while the program is running Dimension variables the number of each measurement t...

Page 75: ...if necessary NextScan Loop back and wait if necessary for the next scan End Program 4 3 Example Program Const RevDiff 1 Const Del 0 Const Integ 0 Const Mult 1 Const Offset 0 Public RefTemp Public DIM TC 6 Units RefTemp degC Units TC degC DataTable Temp 1 2000 DataInterval 0 10 msec 10 Average 1 RefTemp fp2 0 Average 6 TC fp2 0 EndTable BeginProg Scan 1 MSEC 0 0 ModuleTemp RefTemp 1 4 0 TCDiff TC 6...

Page 76: ...the FieldNames instruction can be used to override the default names The data table header also has a row that lists units for the output values The units must be declared for the CR9000 to fill this row out e g Units RefTemp degC The units are strictly for the user s documentation the CR9000 makes no checks on their accuracy The above table is the result of the data table description in the examp...

Page 77: ...a table In the example several averages are output Average Reps Source DataType DisableVar Average 1 RefTemp fp2 0 Average 6 TC 1 fp2 0 Average is an output processing instruction that will output the average of a variable over the output interval The parameters are repetitions the number of elements in an array to calculate averages for the Source variable or array to average the data format to s...

Page 78: ...instruction following NextScan A count of 0 means to continue looping forever or until ExitScan In the example the scan is 1 millisecond measurements are processed as they are made and the measurements and output continue indefinitely 4 4 Numerical Entries In addition to entering regular base 10 numbers there are 3 additional ways to represent numbers in a program scientific notation binary and he...

Page 79: ...ther if the expression is false For example If X 5 then Y 0 will set the variable Y to 0 if X is greater than or equal to 5 The CR9000 will also evaluate multiple expressions linked with and or or For example If X 5 and Z 2 then Y 0 will only set Y 0 if both X 5 and Z 2 are true If X 5 or Z 2 then Y 0 will set Y 0 if either X 5 or Z 2 is true see And and Or in Section 9 A condition can include mul...

Page 80: ...variable array with the name Flag when the option to display flag status is used in one of the real time screens 4 7 Parameter Types Instructions parameters allow different types of inputs these types are listed below and specifically identified in the description of the parameter in the following sections or in PC9000 CRBasic help Constant Variable Variable or Array Constant Variable or Expressio...

Page 81: ... the correct calibration to each sensor If the multiplier and offset are not arrays the same multiplier and offset are used for each repetition VoltSE Dest Reps Range ASlot SEChan Delay Integ Mult Offset Calibration factors Mult 1 0 123 Offset 1 0 23 Mult 2 0 115 Offset 2 0 234 Mult 3 0 114 Offset 3 0 224 VoltSE Pressure 3 mV1000 6 1 1 100 Mult Offset 4 8 Program Access to Data Tables Data stored ...

Page 82: ...nds into the current day timestamp 5 n microseconds into the current hour timestamp 6 n microseconds into the current minute timestamp 7 n microseconds into the current second Tablename eventend 1 1 is only valid for a data table using the DataEvent instruction Tablename eventend 1 1 1 if the last record of an event occurred the last time the table was called 0 if the data table did not store a re...

Page 83: ...Temp 1 CoolantT Alias TCTemp 2 ManifoldT Alias TCTemp 3 ExhaustT Alias TCTemp 4 CatConvT CONST Declares symbolic constants for use in place of values Syntax Const constantname expression constantname expression Remarks The Const statement has these parts Part Description constantname Name of the constant expression Expression assigned to the constant It can consist of literals such as 1 0 other co...

Page 84: ...nsions of an array variable You can declare multiple dimensions The argument subscripts has the following syntax size size size In CRBasic the Option Base is always 1 This means the lowest number in a dimension is 1 and not 0 Dim A 8 3 The maximum number of array dimensions allowed in a Dim statement is 3 If a program uses a subscript that is greater than the dimentioned value a subscript out of b...

Page 85: ...ssign a unit name to a field associated with a variable Syntax Units Variable UnitName Remarks Units allows assigning a unit name to a field Units are displayed on demand in the real time windows of PC9000 The unit name also appears in the header of the output files and in the Data Table Info file of PC9000 The unit name is a text field that allows the user to label data When the user modifies the...

Page 86: ... into some of the variables If a constant is passed the variable it is passed to becomes a constant and cannot be changed by the subroutine If constants will be passed the subroutine should be written to not try to change the value of the variables they will be passed into statementblock Any group of statements that are executed within the body of the Subroutine Exit Sub Causes an immediate exit f...

Page 87: ...C FP2 0 EndTable Subroutine to convert temperature in degrees C to degrees F Sub ConvertCtoF Tmp Tmp Tmp 1 8 32 EndSub BeginProg Scan 1 Sec 3 0 Measure Temperatures module 4 thermocouples in deg C ModuleTemp RefT 1 1 250 TCDiff TC 4 mV50C 1 1 TypeT RefT True 0 250 1 0 0 Call Output Table for C CallTable TempsC Convert Temperatures to F using Subroutine Call ConvertCtoF RefT Subroutine call using C...

Page 88: ...Section 5 Program Declarations 5 6 This is a blank page ...

Page 89: ...arameters Name Name The name for the data table The table name is limited to eight characters TrigVar The name of the variable to test for the trigger Trigger modifiers add additional conditions Constant Value Result Variable or 0 Do not trigger Expression 0 Trigger Size Constant The size to make the data table The number of data sets records to allocate memory for in static RAM Each time a variab...

Page 90: ...inutes from noon where the 720 minute 12 hour interval is set relative to midnight 00 00 Enter 0 to keep output on the even interval Interval driven data allows a more efficient use of memory because it is not necessary to store time with each record The CR9000 still stores time but on a fixed spacing only about once per 1 K of memory used for the table As each new record is stored time is checked...

Page 91: ...use the table was not called or another trigger condition was not met The CR9000 resets the processing the next time that the table is called after an output interval is skipped If this next call to the table is on a scheduled interval it will not output Output will resume on the next interval If Sample is the only output processing instruction in the table data will be output any time the table i...

Page 92: ...le The number of records before the start trigger and the number of records after the stop trigger can also be set A filemark Section 8 is automatically stored in the table between each event Parameter Data Type Enter DataEvent Parameters PreTrigRecs Constant The number of records to store before the Start Trigger StartTrig The variable or expression test to Trigger copying the pre trigger records...

Page 93: ...he scan DataEvent 20 TC 1 30 TC 1 29 10 20 records before TC 1 30 after TC 1 29 store 10 more records Sample 1 RefTemp IEEE4 Sample the reference temperature Sample 5 TC IEEE4 Sample the 5 thermocouple temperatures EndTable BeginProg Scan 500 mSec 0 0 ModuleTemp RefTemp 1 5 30 TCDiff TC 5 mV50C 5 9 TypeT RefTemp RevDiff Del Integ 1 0 CallTable Event NextScan EndProg FillStop Data Tables are by def...

Page 94: ...n the program to call the worst case tables see example Parameter Data Type Enter WorstCase Parameters TableName name The name of the data table to clone The length of this name should be 4 characters or less so the complete names of the worst case tables are retained when collected see NumCases NumCases The number of worst cases to store This is the number of clones of the data table to create Th...

Page 95: ...put to cancel offsets Const Del 0 Use default delay Const Integ 0 Use default Integration Const NumCases 5 Number of Worst Cases to save Const Max 1 Public RefTemp Declare the variable used for reference temperature Public TC 5 Declare the variable used for thermocouple measurements Public I NumAbove30 Declare index and the ranking variable Units RefTemp degC Units TC degC DataTable Evnt 1 125 Dat...

Page 96: ...ize Used to store data in Flash memory Used inside DataTable to indicate the table is stored in Flash memory Flash Memory is always fill and stop FlashOut cannot be used in a DataTable that uses the WorstCase instruction Parameter Data Type Enter FlashOut Parameters Size Constant The size to make the data table The number of data sets records to allocate memory for in Flash Memory Each time a vari...

Page 97: ...es with a negative value for size The partitioning algorithm attempts to have the tables fill at the same time 6 4 Output Processing Instructions Average Reps Source DataType DisableVar This instruction stores the average value over the output interval for the source variable or each element of the array specified Parameter Data Type Enter Average Parameters Reps Constant The number of averages to...

Page 98: ...mpbell Scientific 2 byte floating point DisableVar Constant A non zero value will disable intermediate processing When the disable variable is 0 the current input is not included in the Covariance Variable or Value Result Expression 0 Process current input 0 Do not process current input NumCov Constant The number of covariances to calculate The maximum number of covariances is Z 2 Z 1 Where Z NumV...

Page 99: ... is magnitude Amplitude and Phase Spectrum The output is N 2 pairs of magnitude and phase with Acos wt φ A is amplitude φ is phase π π Power Spectrum The output is N 2 values normalized to give a power spectrum With Acos wt φ the power is A2 2 The summation of the N 2 values yields the total power in the time series signal Power Spectral Density PSD The output is N 2 values normalized to give a po...

Page 100: ...2 T only half the power is represented in the FFT bins below N 2 with the exception of DC Hence DC does not have the factor of 2 The Inverse FFT option assumes that the data array input is the transform of a real time series Filtering is performed by taking an FFT on a data set zeroing certain frequency bins and then taking the Inverse FFT Interpolation is performed by taking an FFT zero padding t...

Page 101: ...le DataTable power 1 1 fft x fp2 SIZE_FFT 10 msec 3 EndTable DataTable PSD 1 1 fft x fp2 SIZE_FFT 10 msec 4 EndTable DataTable FFT 1 1 fft x IEEE4 SIZE_FFT 10 msec 0 EndTable DataTable IFFT 1 1 inverse FFT fft y IEEE4 SIZE_FFT 10 msec 5 EndTable BeginProg Scan 10 msec 0 SIZE_FFT i i 1 X i DC Sin PI 8 2 PI CYCLESperT i SIZE_FFT AMPLITUDE Sin PI 2 PI i Next Scan CallTable Amp CallTable AmpPhase Call...

Page 102: ...emp 1 IEEE4 FieldNames IntakeT CoolerT The 4 values from the variable array Temp are stored in the output table with 2 individual names and the remainder of the default array Temp IntakeT CoolerT Temp 3 and Temp 4 Sample 4 Temp 1 IEEE4 FieldNames IntakeT 2 The 4 values from the variable array Temp are stored in the output table with IntakeT an array of 2 and the remainder of the default array Temp...

Page 103: ...of the sub ranges to the overall weighted value A common use of a closed form weighted value histogram is the wind speed rose Wind speed values the weighted value input are accumulated into corresponding direction sectors bin select input To obtain the average of the weighted values that occurred while the bin select value was within a particular sub range the weighted value output must be divided...

Page 104: ... Form Constant The Form argument is 3 digits ABC Code Form A 0 Reset histogram after each output A 1 Do not reset histogram B 0 Divide bins by total count B 1 Output total in each bin C 0 Open form Include outside range values in end bins C 1 Closed form Exclude values outside range 101 means Do not reset Divide bins by total count Closed form WtVal Constant or Variable The variable name of the we...

Page 105: ...00 Histogram4D Bin FP2 0 2 4 0 0 001 100 12 14 25 0 0 0 0 0 EndTable DataTable VALUES 1 100 Trigger buffer of 100 Records DataInterval 0 100 mSec 100 Synchronous 100 lapses Average 1 Volts FP2 0 Reps Source Type Average 1 mAmps FP2 0 Reps Source Type EndTable PROGRAM BeginProg Scan 1 mSec 0 0 Battery Volts 0 main battery volts Battery mAmps 1 main battery current Bin 1 Volts Bin 2 mAmps CallTable ...

Page 106: ...an the level to less than the level 2ndDim Constant The second dimension of the histogram The total number of bins output NumLevels 2ndDim Enter 1 for a one dimensional histogram consisting only of the number of level crossings If 2ndDim is greater than 1 the element of the source array following the one tested for level crossing is used to determine the second dimension Crossing Array Arrayt The ...

Page 107: ...ple of the level crossing algorithm assume we have a one dimension 3 bin level crossing histogram the second dimension 1 and are counting crossings on the rising edge The crossing levels are 1 1 5 and 3 Figure 6 4 1 shows some example data Going through the data point by point Point Source Action Bin 1 level 1 Bin 2 level 1 5 Bin 3 level 3 1 0 5 First value no counts 0 0 0 2 1 2 Add one count to f...

Page 108: ... bin the signal crossed 1 Histogram 2D 1 25 1 25 2D 2 25 2 25 2D 3 25 Cross 1 0 1 0 Cross 1 5 0 0 0 Cross 3 0 0 0 3 1 4 7 No levels crossed no counts 4 0 3 7 Crossed a level but was falling edge no counts 5 3 3 2 7 Add one count to first second and third crossing bins in the third 2D bin the signal crossed 1 1 5 and 3 Histogram 2D 1 25 1 25 2D 2 25 2 25 2D 3 25 Cross 1 0 1 1 Cross 1 5 0 0 1 Cross ...

Page 109: ... element bin of the histogram can be either the actual number of times the signal crossed the level associated with that bin or it can be the fraction of the total number of crossings counted that were associated with that bin i e number of counts in the bin divided by total number of counts in all bins The hysteresis determines the minimum change in the input that must occur before a crossing is ...

Page 110: ...ion which is selected by entering the appropriate code for Parameter Data Type Enter Minimum Parameters Reps Constant The number of minimum values to determine When repetitions are greater than 1 the source must be an array Source Variable The name of the Variable that is the input for the instruction DataType A code to select the data storage format Constant Alpha Code Numeric Code Data Format IE...

Page 111: ... the amplitude of a stress strain cycle into The width of each subrange is equal to the HiLimit LowLimit divided by the number of bins LowLim Constant The lower limit of the input signal and the Mean Bins UpLim Constant The upper limit of the input signal and the Mean Bins MinAmp Constant The minimum amplitude that a stress strain cycle must have to be counted Form Constant The Form code is 3 digi...

Page 112: ... bins In this case the first bin is for cycles which have a mean value M 100 M 110 the second bin 110 M 120 etc If Cm a is the count for mean range m and amplitude range a and M and N are the number of mean and amplitude bins respectively then the output of one repetition is arranged sequentially as C1 1 C1 2 C1 N C2 1 C2 2 CM N Multiple repetitions are sequential in memory Shown in two dimensions...

Page 113: ...here δ x is the standard deviation of x and N is the number of samples Parameter Data Type Enter StdDev Parameters Reps Constant The number of standard deviations to calculate When repetitions are greater than 1 the source must be an array Source Variable The name of the Variable that is the input for the instruction DataType A code to select the data storage format Constant Alpha Code Numeric Cod...

Page 114: ...he input for the instruction DataType A code to select the data storage format Constant Alpha Code Numeric Code Data Format IEEE4 24 IEEE 4 byte floating point FP2 7 Campbell Scientific 2 byte floating point DisableVar Constant Variable or Expression A non zero value will disable intermediate processing Normally 0 is entered so all inputs are processed For example when the disable variable is 0 th...

Page 115: ...mistors potentiometers strain gages and pressure and force transducers 7 3 Half Bridges BrHalf Half Bridge 7 6 BrHalf3W Three Wire Half Bridge 7 7 BrHalf4W Four Wire Half Bridge 7 7 7 4 Full Bridges BrFull Four Wire Full Bridge 7 9 BrFull6W Six Wire Full Bridge 7 9 7 5 Excitation Continuous Analog Output Excite Set Excitation 7 10 7 6 Self Measurements Battery Measures Battery Voltage or Current 7...

Page 116: ... PulseCountReset Resets Pulse Counters and Running Averages Used in Pulse Count Instruction 7 23 ReadIO Reads State of Digital I O Ports on CR9070 CR9071E Module 7 23 TimerIO Measures Time Between Edges on CR9070 CR9071E Counter and Digital I O Module 7 24 WriteIO Sets Digital Outputs on CR9070 CR9071E Module 7 26 7 9 9052DC Filter Module Measurements VoltFilt 7 27 SubScan 7 29 FFTFilt 7 33 FFTSam...

Page 117: ...input with respect to ground With a multiplier of one and an offset of 0 the result is in millivolts or volts depending on the range selected 7 2 Thermocouple Measurements TCDiff Dest Reps Range ASlot DiffChan TCType TRef RevDiff SettlingTime Integ Mult Offset Diff Chanel H Diff Chanel L Thermocouple This instruction measures a thermocouple with a differential voltage measurement and calculates th...

Page 118: ...lt Analog Input Module CR9058E Isolation Module Alpha Code Num Code R Option Code Voltage Range mV Alpha Code Num Code R Option Code Voltage Range Alpha Code Num Code R Option Code Voltage Range mV5000 0 100 5000 V50 6 N A 50 V V60 24 N A 60 V mV1000 1 101 1000 V10 7 N A 10 V V20 25 N A 20 V mV200 4 104 200 V2 10 N A 2 V V2 10 N A 2 V mV50 5 105 50 mV500 11 N A 500 mV V2C 22 N A 2 V mV200C 16 116 ...

Page 119: ...its For example the TCDiff instruction measures a thermocouple and outputs temperature in degrees C A multiplier of 1 8 and an offset of 32 will convert the temperature to degrees F R Place an R at the end of the range code ex 50mVCR in order to perform a common mode range check before making the measurement If the input is out of common mode range a NAN will be returned See section 3 2 2 for more...

Page 120: ...tting up a measurement switching to the channel setting the excitation and making the measurement 10 microsecond resolution Entry Voltage Range Delay CR9055 Voltage Range Delay 0 50 mV 20 µS default 500 mV 40 µS default 0 200 mV 20 µS default 2 V 40 µS default 0 1000 mV 10 µS default 10 V 30 µS default 0 5000 mV 10 µS default 50 V 30 µS default 0 All Truncate to closest 10 µS all Truncate to close...

Page 121: ...irst on the reference resistor and the second on the voltage sensing wire from the sensor The two measurements are used to calculate the resulting value multiplier 1 offset 0 that is the ratio of the voltage across the sensor to the voltage across the reference resistor BrHalf4W Dest Reps Range1 Range2 ASlot DiffChan ExSlot ExChan MesPEx ExmV RevEx RevDiff SettlingTime Integ Mult Offset X result w...

Page 122: ...t the excitation voltage set by the instruction unless a subsequent instruction changes their voltage 7 16 Switched excitation channels are switched to the excitation voltage for the measurement and switched off between measurements MesPEx Constant The number of sensors to excite with the same excitation channel before automatically advancing to the next excitation channel To excite all the sensor...

Page 123: ... to a full bridge and makes a differential voltage measurement of the bridge output The resulting value multiplier 1 offset 0 is the measured voltage in millivolts divided by the excitation voltage in volts i e millivolts per volt BrFull6W Dest Reps Range1 Range2 ASlot DiffChan ExSlot ExChan MesPEx ExmV RevEx RevDiff SettlingTime Integ Mult Offset X result w mult 1 offset 0 X V V R R R R R R 1000 ...

Page 124: ...slot that holds the Analog Input Module to be used for the measurement DiffChan Constant The differential channel number on which to make the first measurement When Reps are used subsequent measurements will be automatically made on the following differential channels ExSlot Constant The slot that holds the Excitation Module for the measurement ExChan Enter the excitation channel number to excite ...

Page 125: ...pe Enter BATTERY MODULETEMP PARAMETERS Dest Variable or Array The Variable in which to store the results of the instruction When Reps are used the results are stored in an array with the variable name An array must be dimensioned to have elements for all the Reps BattOpt The code indicating the desired measurement Constant Code Measurement 0 Main battery voltage volts 1 Main battery current millia...

Page 126: ...rrent compensation is not adjusted correctly the current could rise as high as 100 nanoamps The major factor affecting the bias current is temperature When there is adequate time for all measurements BiasComp and Calibrate are typically run in a scan in the SlowSequence section of the program to provide continuous adjusting of the bias current compensation and the calibration as temperature change...

Page 127: ... Each AM25T must have it s own unique Reset line ChanExcite Constant The Excitation Channel number on the CR9060 Module that will be used to provide excitation for the PRT reference temperature measurement This example demonstrates using the AM25T thermocouple multiplexer with the CR9000 VARIABLES and CONSTANTS Const AM25TChan 1 starting channel in AM25T Const CardAnlg 5 9050 module slot AM25T con...

Page 128: ...iable array in which to store the results of the measurement It must be an array of sufficient size to hold all of the values that will be returned by the function chosen defined by the DataType parameter SDMAddress Constant The address of the SDM CAN with which to communicate Valid SDM addresses are 0 through 15 TimeQuanta Constant Three time segments are used to set the bit rate and other timing...

Page 129: ... Overwrite existing data 10 Signed integer least significant byte first Overwrite existing data 11 4 byte IEEE floating point number most significant byte first Overwrite existing data 12 4 byte IEEE floating point number least significant byte first Overwrite existing data 13 Unsigned integer most significant byte first Logical OR with existing data 14 Unsigned integer least significant byte firs...

Page 130: ... I O interrupts pulsed mode 2 Enable I O interrupts fast mode 3 7 Currently not used 8 Place the SDM CAN into low power stand by mode 9 Leave switch setting unchanged D 0 Listen only error passive mode CAN transmissions are not confirmed 1 Transmit once Data will not be retransmitted in case of error or loss of arbitration Frames received without error are acknowledged 2 Self reception A frame tra...

Page 131: ...igh This allows data to be stored in the datalogger tables faster than the program execution interval This interrupt function is enabled by entering a negative value for this parameter Note This parameter may be overridden by a fixed number of bits depending upon the data type selected NumVals The number of values beginning with the value stored in the Dest array that will be transferred to or fro...

Page 132: ...alues will be loaded into the array in the sequence of all of the time ordered events captured from the lowest programmed channel to the time ordered events of the highest programmed channel Address Constant The INT8 is addressable using internal jumpers The jumpers are set at the factory for address 00 See Appendix A of the INT8 manual for details on changing the INT8 address Config8_5 Config4_1 ...

Page 133: ... The values are returned in the sequence of the channels 1 to 16 Note the destination array must be dimensioned large enough to hold all the functions requested OutputOpt Code to select one of the five different output options The Output Option that is selected will be applied to the data collection for all of the INT8 channels The numeric code for each option is listed below with a brief explanat...

Page 134: ... measurement description for the units of the raw result a multiplier of one and an offset of 0 are necessary to output in the raw units For example the TCDiff instruction measures a thermocouple and outputs temperature in degrees C A multiplier of 1 8 and an offset of 32 will convert the temperature to degrees F SDMSpeed SDMSpeed Changes the rate that the CR9000 uses to clock the SDM data Slowing...

Page 135: ...2 Send Receive Port 2 5 Send to all four ports global 3 Send Receive Port 3 Command FirstOp SecOp Constants1 Commands to SDM SIO4 See SDM SIO4 Manual ValuesPerRep Constant How many values to send or receive Mult Offset Constant Variable Array or Expression A multiplier and offset by which to scale the results A multiplier of one and an offset of 0 are necessary to store the values as received For ...

Page 136: ...m voltage frequencies up to 10 kHz can be measured For input voltage greater than 50 mV frequencies up to 20 kHz can be measured Again the maximum input voltage is 20 V Switch Closure Channels 9 through 12 can be configured as Switch Closure inputs The switch closure dry contact should be connected between the pulse channel and ground When the contact is open the pulse channel is pulled to 5 volts...

Page 137: ...ion The CR9071E s 32 bit counters can count up to 4 29 billion before over ranging This should never occur because at the maximum input frequency of 1 MHz it would take almost 72 minutes before it fills while the CR9000 s maximum scan rate is 1 minute With each scan the CR9000 reads the counts accumulated since the last scan and then resets the counter If the scans stop as in burst operation or in...

Page 138: ...ital I O Module as well as on the Pulse channels on the CR9071E module The transitions can be either on the rising edge low to high or falling edge high to low of the signal The states are nominally 0 V low and 5 V high When TimerIO is the only measurement in a scan and the time since previous channel is measured on 4 channels the fastest interval is approximately 140 microseconds Instruction cann...

Page 139: ...ts represent the channels in descending order left to right For example 00000101 in the second edge parameter means channels 1 and 3 count rising edges and channels 2 and 4 8 are to count falling edges this could also be specified as 101 the leading zeros do not need to be entered Separate instructions are required when programming both I O and Pulse channels for TimerIO functions See PulseCount i...

Page 140: ... the mask indicates 1 should not be changed Examples WriteIO 5 B100 B100 Set port 3 on the 9070 in slot 5 high WriteIO 5 Hff00 Y 256 Write Y to upper 8 ports 9 16 Parameter Data Type Enter WRITEIO INSTRUCTION PARAMETERS PSlot Constant The number of the slot that holds the CR9070 CR9071E Counter Timer Module for the measurement Mask Constant The Mask allows the read or write to only act on certain ...

Page 141: ...052 Filter Module in much the same way as the VoltDiff instruction is used with the CR9050 module The program scan interval or the SubScan Interval see SubScan determines the filter module output interval Data are passed from the Filter Module to the CR9000 CPU for processing and final storage at this scan interval There is the option of turning on a fixed excitation 10V 5V or 10 mA No ratiometric...

Page 142: ...ass filter relative the sample rate FSAMPLE The sample rate is the inverse the scan interval in the CRBASIC program FiltOption must be the same for all channels of a single CR9052 Filter Module Out of range measurements may be replaced by the analog to digital converter saturation value by adding 1000 to the FiltOption codes shown below NumericCode Sampling Ratio FPASS FSTOP 2 2 5 FSAMPLE 2 5 FSAM...

Page 143: ...2DC inputs at one rate and measurements on other modules at a slower rate all within the same scan Parameter Data Type Enter SUBSCAN INSTRUCTION PARAMETERS SubInterval Constant The time interval at which to run the subscan The interval must be one of the valid intervals for the CR9052 module 20 40 100 200 or 400 microseconds or 1 2 4 10 20 40 100 or 200 milliseconds When used with the CR9052 Filte...

Page 144: ...ic Flt_in 6 units Flt_in mV Public Alg_in 2 units Alg_in mV Public flag 1 Filter Module Filter Option const SmplRat_2_5 2 Fpass Fsr 2 5 1 T_scan 2 5 Data Tables DataTable FiltData flag 1 1 save to final storage if flag 1 True Sample 6 Flt_in 1 IEEE4 EndTable DataTable AlgData flag 1 1 save to final storage if flag 1 True Sample 2 Alg_in 1 IEEE4 EndTable Program BeginProg Scan 100 msec 0 0 VoltDiff...

Page 145: ...0 mV range with triggered burst buffering on a PCMCIA card Burst trigger when channel 1 exceeds 4000 mV or when flag 1 is on Subsequent recordings are appended to end of preceding recording const pam_slot 4 const cr9052_slot 8 const sample_len 1000 record 1000 samples for each trigger const scans_past_trig sample_len 200 this makes the trigger the 200th sample point Public Flt_in 5 units Flt_in mV...

Page 146: ...ffer at the subscan rate Once a trigger has occurred and the CR9052DC has recorded the appropriate number of scans after the trigger the CPU collects and processes the stored burst data from the CR9052DC memory The following example program uses the SubScan instruction to buffer measurements into the CR9052DC burst memory CR9052 example program 4 Measure 6 channels on the CR9050 at 25 kHz on the 5...

Page 147: ...erval determines the rate at which individual measurements are passed to the CPU With FFTFilt the Scan interval is how often an entire spectrum for each channel is sent to the CPU The sample rate for the FFT time series is set within the instruction FFTFilt can provide spectra from seamless time series snapshots if the Scan interval is set equal to it s minimum value the FFT length divided by the ...

Page 148: ...nts will be automatically made on the following differential channels FiltOption Constant The sample ratio for the measurement how many measurements are made within one cycle of the highest frequency in the pass band The sample ratio determines the top of the pass band FPASS and the beginning of the stop band FSTOP of the anti aliasing low pass filter relative the sample rate FSAMPLE The sample ra...

Page 149: ... in samples per second at which the CR9052 will collect time series data before performing the FFT FsampRate must be the same for all channels in a CR9052 module FsampRate Sample Rate Sample Interval 50000 50 kHz 20 µs 25000 25 kHz 40 µs 10000 10 kHz 100 µs 5000 5 kHz 200 µs 2500 2 5 kHz 400 µs 1000 1 kHz 1 ms 500 500 Hz 2 ms 250 250 Hz 4 ms 100 100 Hz 10 ms 50 50 Hz 20 ms 25 25 Hz 40 ms 10 10 Hz ...

Page 150: ... is enabled Dest must be dimensioned large enough to hold this additional time series data If Reps is more than one the CR9000X places the spectrum for the first channel in Dest followed by the time series for the first channel Next the CR9000X places the spectrum for the second channel in Dest followed by the time series for the second channel etc FRef Constant Reference Frequency for Logarithmic...

Page 151: ...dditional processing Next the CR9052 subtracts the mean from each point of the original time series and then multiplies the mean subtracted time series by the selected window function The CR9052 then computes the standard deviation of this windowed time series The CR9052 then computes the FFT of the windowed time series and multiplies each ac component of the complex spectrum by the ratio of the s...

Page 152: ...mber of values returned by FFTFilt The amplitude of a sinusoid represented by t A ω cos is A The CR9052DC computes the amplitude from N i r 2 2 2 for all components except the dc and Nyquist components The dc and Nyquist components are computed from N i r 2 2 N is the length of the original time series FFTLen The units of the amplitude spectrum are mV Amplitude and Phase The amplitude and phase op...

Page 153: ...ed from SR f N i r 2 2 2 The integral of the PSD over all of the ac components gives the variance of the original time series The units of the PSD are Hz mV 2 RMS Amplitude The RMS root mean square amplitude is computed from the square root of the power spectrum for all spectral components or equivalently the amplitude spectrum divided by the 2 for all ac components The dc component of RMS amplitu...

Page 154: ... values i e Real and Imaginary Each of these bins represents a frequency range Let i be the bin number ranging from 0 for the DC component to N 2 for the highest frequency range The center frequency of each range is i N f i f SR c where SR f is the sample rate of the time series processed by the FFT parameter FSampRate and N is the length of the FFT parameter FFTLen 0 c f is the center frequency o...

Page 155: ... bins containing spectra beyond the stop frequency The total number of spectral components spectral pairs for real and imaginary or amplitude and phase spectral options loaded into the destination array by FFTFilt is IHigh ILow 1 Note that the bin numbers ILow and IHigh are not the same as the array index numbers of the destination array For example with a single 1Rep 1024 point Amplitude FFT if a...

Page 156: ... beyond pass f However the fewer calculations required for the same maximum frequency pass f f max when using a sampling ratio of 2 5 vs a sampling ratio of 20 may make the difference between seamless and intermittent FFTs if the FFT length has to be increased at the higher sample rate to obtain the desired minimum frequency Minimum Frequency Once FsampRate is selected to include the highest frequ...

Page 157: ...um type SpectOption Amplitude RMS amplitude and dB spectra are combined by summing the power in the adjacent bins and then converting this summed power to the desired spectrum type amplitude RMS amplitude or dB Power spectral density PSD functions are combined by averaging adjacent frequency normalized bins into to give the frequency normalized result Combining Real and Imaginary or Amplitude and ...

Page 158: ...e upper end of the spectrum users select a maximum frequency of interest high f and then set IHigh to 2 1 1 round bin SR high bin S f f N S The total number of spectral components returned by the FFTFilt instruction is IHigh ILow 1 Logarithmic Spectral ReBinning 1 n Octave Analyses Logarithmic spectral rebinning combines the spectral components from a variable number of adjacent bins into a single...

Page 159: ... not to say that bin 0 is always a valid output The valid frequency bins to output are determined by frequency range of the original FFT and the values entered for Sbin and Fref e g if the original sample rate FSampRate was 1kHz and Fref was entered as 1 kHz bin 0 1 kHz center frequency could not be output because the highest frequency in the original FFT is 500 Hz The minimum i is 2 1 2 log log c...

Page 160: ...ts the FFT programming from the FFTFilt instruction and stores this processing information in the header of the data table Without the processing information PC9000 would not be able to automatically detect and plot the FFT Parameter Data Type Enter FFTSAMPLE INSTRUCTION PARAMETERS Source Variable The variable that in the FFTFilt Destination array that contains the start of the spectrum returned b...

Page 161: ...its unsigned magnitude For example ABS 1 and ABS 1 both return 1 Abs Function Example The example finds the approximate value for a cube root It uses Abs to determine the absolute difference between two numbers Dim Precision Value X X1 X2 Declare variables Precision 00000000000001 Value Volt 3 Volt 3 will be evaluated X1 0 X2 Value Make first two guesses Loop until difference between guesses is le...

Page 162: ...se AND is a bit wise operation it is possible to AND two non zero numbers e g 2 and 4 and get 0 The binary representation of 1 has all bits equal 1 Thus any number AND 1 returns the original number That is why the pre defined constant True 1 The predefined constant True 1 The predefined constant False 0 If number1 is AND number2 is The result is 1 Any number number2 1 NAN not a number NAN 0 Any nu...

Page 163: ...t confuse Atn with the cotangent which is the simple inverse of a tangent 1 tangent Atn FunctionExample The example uses Atn to calculate Pi By definition Atn 1 is 45 degrees 180 degrees equals Pi radians Dim Pi Declare variables Pi 4 Atn 1 Calculate Pi Spatial Average Computes the spatial average of a measurement Syntax AvgSpa Dest Swath Source Remarks Find the average of the values in the given ...

Page 164: ... back from the most recent Parameter Data Type Enter AvgRun Parameters Dest Variable or Array The variable or array in which to store the average s Reps Constant When the source is an array this is the number of variables in the array to calculate averages for When the source is not an array or only a single variable of the array is to be averaged reps should be 1 Number Constant The number of val...

Page 165: ...es Cos to calculate the cosine of an angle with a user specified number of degrees Dim Degrees Pi Radians Ans Declare variables BeginProg Pi 4 Atn 1 Calculate Pi Degrees Volts 1 Get value to convert Radians Degrees Pi 180 Convert to radians Ans Cos Radians The Cosine of Degrees EndProg Spatial Covariance The CovSpa instruction computes the covariance s of sets of data that are loaded into arrays S...

Page 166: ...t contains the data set s for calculating the covariance with the CoreSet When multiple covariances are calculated the data sets have to be loaded consecutively into one array The array must be dimensioned to at least the value of NumOfCov multiplied by SizeOfSets For example if each set of data has 100 elements SizeOfSets and there are 4 covariances NumOfCov to be calculated then the DatArray nee...

Page 167: ...dicate what values to calculate and output Constant Code Result 0 1 2 3 4 5 FFT The output is N 2 complex data points i e the real and imaginary parts of the FFT The first pair is the DC component and the Niquist component This first pair is an exception because the DC and niquist components have no imaginary part Amplitude spectrum The output is N 2 magnitudes With Acos wt A is magnitude Amplitud...

Page 168: ...quency N 2 T only half the power is represented in the FFT bins below N 2 with the exception of DC Hence DC does not have the factor of 2 The Inverse FFT option assumes that the data array input is the transform of a real time series Filtering is performed by taking an FFT on a data set zeroing certain frequency bins and then taking the Inverse FFT Interpolation is performed by taking an FFT zero ...

Page 169: ...ime TintoInt Interval Units The IfTime function returns True 1 or False 0 based on the scan clock Time is kept internally by the datalogger as the elapsed time since January 1 1990 at 00 00 00 hours The interval is synchronized with this elapsed time i e the interval is true when the Interval divides evenly into this elapsed time The time into interval allows an offset to the interval The IfTime i...

Page 170: ...sed on the datalogger s real time clock If the TintoInt is set to 0 the IfTime statement is True at the top of the hour Interval constant The Interval is how often IfTime will be True Units The time units for TintoInt and Interval Constant Alpha Code Numeric Code Units Sec 2 seconds Min 3 minutes Hr 4 hours Day 5 days IIF The IIF function evaluates a variable or expression and returns one of two r...

Page 171: ...on Example This example illustrates the use of Int and Fix Dim A B C D Declare variables BeginProg A Int 99 8 Returns 100 B Fix 99 8 Returns 99 C Int 99 8 Returns 99 D Fix 99 8 Returns 99 EndProg Log Function Returns the natural logarithm of a number Syntax Log number Remarks The argument number can be any valid numeric expression that results in a value greater than 0 The natural logarithm is the...

Page 172: ...um value in a swath of variables in an array Syntax MaxSpa Dest Swath Source Remarks Find the maximum value in the given array and place the result in the array named in Dest The Source must be a particular element in an array e g Temp 1 it is the first element in the array Parameter Data Type Enter MaxSpa Parameters Dest Array The array in which to store the maximum value The next element in the ...

Page 173: ...element of the source array in which to start looking for the minimum MinSpa Function Example This example uses MinSpa to find the minimum value of the five elements Temp 6 through Temp 10 and store the results in MinTemp 1 and MinTemp 2 MinSpa MinTemp 1 5 Temp 6 Mod Divides two numbers and returns only the remainder Syntax result operand1 Mod operand2 Remarks The modulus or remainder operator div...

Page 174: ...t or instruction Move Function Example The example uses the Move function Move x 20 y 20 move array y into array x Move x 20 0 0 1 fill x with 0 0 NOT The NOT function is used to perform a bit wise negation on a number Syntax result NOT number The NOT operator inverts the bit values of any variable and sets the corresponding bit in result according to the following truth table If bit is The result...

Page 175: ...conditions The CR200 decides if something is true or false on the criteria that 0 is false and any non zero number is true Section 4 5 In the CR200 the pre defined constant True 1 The binary representation of 1 has all bits equal 1 Thus any number OR 1 returns 1 Any number AND 1 returns the original number The predefined constant True 1 The predefined constant False 0 If number1 is Number2 is The ...

Page 176: ...g changevar Reps 1 and is set to 1 true when a new peak or valley is detected and set to 0 false when none are detected Reps Constant The number inputs to track the peaks and valleys for Each input is tracked independently When reps are greater than 1 the source and DestPV arrays must be dimensioned to at least the number of repetitions DestChange must be dimensioned to Reps 1 Source Variable or A...

Page 177: ...80 to the International Electrotechnical Commission standard The range of linearization is 200 C to 850 C The error in the linearization is less than 0 001 C between 200 and 300 C and is less than 0 003 C between 180 and 830 C The error T calculated T standard is 0 006 at 200 C and 0 006 at 850 C Parameter Data Type Enter PRT Parameters Dest Variable or Array The variable in which to store the tem...

Page 178: ... statement is remarked the results will be exactly the same Public rTime 9 declare as public and dimension rTime to 9 Alias rTime 1 Year assign the alias Year to rTime 1 Alias rTime 2 Month assign the alias Month to rTime 2 Alias rTime 3 Day assign the alias Day to rTime 3 Alias rTime 4 Hour assign the alias Hour to rTime 4 Alias rTime 5 Minute assign the alias Minute to rTime 5 Alias rTime 6 Seco...

Page 179: ...element and the Y value in the next element of the array Example In the following example a counter Deg is incremented from 0 to 360 degrees The cosine and sine of the angle are taken to get X and Y in rectangular coordinates RectPolar is then used to convert to polar coordinates Dim XY 2 Polar 2 Deg AnglDeg Const Pi 4 ATN 1 Alias XY 1 X Alias XY 2 Y Alias Polar 1 Length Alias Polar 2 AnglRad Data...

Page 180: ...s of the array to include in the RMS calculation Source Array The name of the variable array that is the input for the instruction RmsSpa Function Example The example uses the RmsSpa function to StrainCalc Converts the output of a bridge measurement instruction to microstrain Syntax StrainCalc Dest Reps BrConfig Source Zero GF v Remarks Calculates microstrain µ from the appropriate formula for the...

Page 181: ...gauge one gage parallel to ε the other parallel to ε µε 2 10 6 V GF r 4 Full bridge strain gage 2 gages parallel to ε the other 2 parallel to ε µε 10 6 V GF r 5 Full bridge strain gage half the bridge has 2 gages parallel to ε and ε the other half νε and νε µε ν 2 10 1 6 V GF r 6 Full bridge strain gage one half ε and νε the other half νε and ε µε ν ν 2 10 1 1 6 V GF V r r Source The source variab...

Page 182: ...10 mSec 0 100 Scan 100 times BrFull ZStrain 1 mV50 5 1 6 7 1 5000 1 0 0 100 1 0 Count Count 1 Increment Counter used By DataTable CallTable ZERO_1 Zero_1 outputs on last scan Count 100 Next Scan ZStrain ZERO_1 ZStrain_Avg 1 1 Set ZStrain averaged value Flag 2 True End Sub BeginProg Scan 10 mSec 0 0 Scan 10 mSecs If Not Flag 2 Then Zero BrFull StMeas 1 mV50 5 1 6 7 1 5000 1 0 0 100 1 0 StrainCalc S...

Page 183: ... upperbound is the highest number in the range and lowerbound is the lowest number in the range Rnd Function Example The example uses the Rnd function to generate random integer values from 1 to 9 Each time this program is run Randomize generates a new random number sequence Dim Wild1 Wild2 Declare variables Randomize Seed random number generator Wild1 Int 9 Rnd 1 Generate first random value Wild2...

Page 184: ...arentheses The input must be in radians Sin Function Example The example uses Sin to calculate the sine of an angle from a Volt input Dim Degrees Pi Radians Ans Declare variables Pi 4 Atn 1 Calculate Pi Degrees Volt 1 Get input Radians Degrees Pi 180 Convert to radians Ans Sin Radians The Sine of Degrees Sqr Function Returns the square root of a number Syntax Sqr number Remarks The argument number...

Page 185: ...e instruction Tangent Function Returns the tangent of an angle Syntax Tan angle Remarks The argument angle can be any valid numeric expression measured in radians Tan takes an angle and returns the ratio of two sides of a right triangle The ratio is the length of the side opposite an angle divided by the length of the side adjacent to the angle To convert degrees to radians multiply degrees by Pi ...

Page 186: ...osecant Cosec 1 Sin X Cotangent Cotan 1 Tan X Inverse Sine Arcsin Atn X Sqr X X 1 Inverse Cosine Arccos Atn X Sqr X X 1 1 5708 Inverse Secant Arcsec Atn X Sqr X X 1 Sgn Sgn X 1 1 5708 Inverse Cosecant Arccosec Atn X Sqr X X 1 Sgn X 1 1 5708 Inverse Cotangent Arccotan Atn X 1 5708 Hyperbolic Sine HSin Exp X Exp X 2 Hyperbolic Cosine HCos Exp X Exp X 2 Hyperbolic Tangent HTan Exp X Exp X Exp X Exp X...

Page 187: ...ied number of times through the scan are complete The count in the Scan instruction determines the total number of scans stored in the burst buffer The measurements start as soon as the scan is executed and stop as soon as the specified number of scans are complete Processing is delayed until after all measurements are complete When BeginBurstTrigger is inserted into a burst scan the scan continue...

Page 188: ...rigger While other measurements in burst scan are buffered the processing for the instructions between BeginBurstTrigger and EndBurstTrigger or EndBurstTriggerSequence is completed as the scans are occurring These instructions must be kept to a minimum to avoid processing overruns The maximum rate at which the trigger is evaluated is 400 microseconds this allows some time to complete the processin...

Page 189: ...loops through the instructions in the scan the number of times specified in the count pulling data for measurements from the burst buffer EndBurstTriggerSequence The EndBurstTriggerSequence instruction can be used to output a variable number of scans per burst up to the number entered for count in the scan instruction When the scan starts only the StartTrigger is tested Once the StartTrigger tests...

Page 190: ...e the trigger StartTrigger If the StartTrigger condition is true nonzero all measurements in the scan are executed until the StopTrigger evaluates as true and the ScansAfterTrigger have been completed Constant Value Result Variable or 0 Do not trigger Expression 0 Trigger StopTrigger The variable or expression to test for the trigger Once the StopTrigger is true nonzero measurements in the scan ar...

Page 191: ...Var Records DataTable ACCEL True 100000 Trigger 100000 records DataInterval 0 0 0 1000 Synchronous 1000 lapses _______________________ Bridge Blocks _______________________ Sample BREP1 BBlk1 FP2 2 Reps Source Res EndTable End of table ACCEL PROGRAM BeginProg Program begins here Do Loop to allow scan on flag repeat Do Until Flag 1 Loop Loop Until Flag 1 is pressed Scan RATE RUNITS 1 10000 Scan 100...

Page 192: ...in If a constant is passed to one of the subroutine declared variables that variable becomes a constant and its value cannot be changed by the subroutine You are never required to use the Call keyword when calling a subroutine If you use the Call keyword to call a procedure that requires arguments the arguments list must be enclosed in parentheses If you omit the Call keyword you also must omit th...

Page 193: ...ad to transfer the values to variables Data 1 2 3 4 5 data for x Data 6 7 8 9 10 data for y For I 1 To 5 Read x I Next I For I 1 To 5 Read y I Next I This next example uses Restore to read 1 2 3 4 into both X and Y variables Data 1 2 3 4 For I 1 To 4 Read X I Next I Restore For I 1 To 4 Read Y I Next I ClockSet Source Sets the CR9000 clock from the values in an array The most likely use for this i...

Page 194: ...elay Function Example This example uses Delay to cause the program to pause for 20 milliseconds Delay 20 msec Do Repeats a block of statements while a condition is true or until a condition becomes true Syntax 1 Do While Until condition statementblock Exit Do statementblock Loop Syntax 2 Do statementblock Exit Do statementblock Loop While Until condition The Do Loop statement has these parts Part ...

Page 195: ...s are nested control is transferred to the Do Loop that is one nested level above the loop in which the Exit Do occurs Loop Ends a Do Loop Do Loop Statement Example The example creates an infinite Do Loop that can be exited only if Volt 1 is within a range Dim Reply Declare variable Do Reply Volt 1 If Reply 1 And Reply 9 Then Check range Exit Do Exit Do Loop End If Loop Alternatively the same thin...

Page 196: ...age CPU TEMPS DLD 4 4 means Run Now FileMark TableName Parameter Data Type Enter TableName name The name of the data table in which to insert the filemark FileMark is used to insert a filemark into a data file The filemark can be used by the decoding software to indicate that a new file should be started at the mark This capability to create multiple files only exists in the binary to ASCII conver...

Page 197: ...For Next loop Often used with the evaluation of some condition for example If Then Exit For transfers control to the statement immediately following the Next Next Ends a For Next loop Causes increment to be added to counter The Step value controls loop execution as follows When Step is Loop executes if Positive or 0 counter end Negative counter end Once the loop has been entered and all the statem...

Page 198: ...tatement Allows conditional execution based on the evaluation of an expression Syntax 1 If condition Then thenpart Else elsepart Syntax 2 If condition1 Then statementblock 1 ElseIf condition2 Then statementblock 2 Else statementblock n End If Syntax 1 Description The single line form is often useful for short simple conditional tests Syntax 1 has these parts Part Description If Begins the simple I...

Page 199: ...more CRBasic statements executed if condition1 is true ElseIf Keyword indicating that alternative conditions must be evaluated if condition1 is not satisfied condition2 Same as condition used in the single line form shown above statementblock 2 One or more CRBasic statements executed if condition2 is true Else Keyword used to identify the actions taken if none of the previous conditions are satisf...

Page 200: ...n have nothing but spaces in front of them The block If must end with an End If statement For Example If a 1 And a 100 Then ElseIf a 200 Then End If Tip Select Case may be more useful when evaluating a single expression that has several possible actions If Then Else Statement Example The example illustrates the various forms of the If Then Else syntax Dim X Y Temp 5 Declare variables X Temp 1 If X...

Page 201: ...ignated time Syntax PowerOff StartTime Interval Units Parameter Data Type Enter Start Time Array The name of a six element array that contains the start time Year month day hour minutes and seconds respectively Interval Constant Enter the time interval on which the CR9000 is to be powered up Units The units for the time parameters Constant Alpha Code Numeric Code Units SEC 2 seconds MIN 3 minutes ...

Page 202: ...a second for two minutes At the end of that time it powers down It is programmed to wake up on a 4 minute interval After the first PowerOff it will wake up every four minutes count for 2 minutes and turn itself off You can load this program and use the Power On inputs on the 9011 Module to wake the CR9000 before the interval is up A program for an actual application would have measurements within ...

Page 203: ...e program is to become the program that runs on power up and or if it is to replace the current program and run when the instruction is executed Bit Decimal Description bit 0 1 not used bit 1 2 Run On Power Up bit 2 4 Run Now Only bit1 and bit2 are available for this function For example RunDLDFile CPU TEMPS DLD B100 means to load TEMPS DLD from CPU flash memory and run it Whatever DLD file is cur...

Page 204: ... Constant Enter the time interval at which the scan is to be executed The interval may be in µs ms s or minutes whichever is selected with the Units parameter The maximum scan interval is one minute When followed by Wait Digital Trigger 0 may be entered to ensure there is no delay before looking for the trigger Units The units for the time parameters Constant Alpha Code Numeric Code Units USEC 0 m...

Page 205: ...r until ExitScan If option 1 or 2 measurements inside Scan Next Scan are buffered for number of scans then number of scans are processed Scan Example This example uses Scan and Next Scan in a simple program Scan 10 usec 0 2000 Record 2000 samples VoltSE CallTable Next Scan Select Case Statement Executes one of several statement blocks depending on the value of an expression Syntax Select Case test...

Page 206: ...pression listed in the Case clauses matches testexpression program execution continues at the statement following End Select End Select Ends the Select Case Must appear after all other statements in the Select Case control structure The argument expression list has these parts Part Description expression Any numeric expression To Keyword used to specify a range of values If you use the To keyword ...

Page 207: ...the primary scan interval The CR9000 tags on measurement instructions from the slow sequence scan to the normal scan as time allows At least one A D conversion from the slow sequence scan is added to each normal scan the appropriate settling time occurs before the A D conversion Thus the primary scan interval must be long enough to make the primary scan measurements plus the longest single measure...

Page 208: ...of a timer Syntax Timer TimNo Units TimOpt Remarks Timer is a function that returns the value of a timer TimOpt is used to start stop reset and start stop and reset or read without altering the state running or stopped Multiple timers each identified by a different number TimNo may be active at the same time Syntax variable Timer 1 usec 2 Parameter Data Type Enter TimNo Constant Variable or Expres...

Page 209: ...Scan the task sequencer will delay until the digital trigger occurs Mask and word are in terms of the binary number represented by the 16 digital I O channels Mask is used to determine which digital inputs to read Word is the digital input pattern to match When the input matches the word the scan takes place Parameter Data Type Enter PSlot Constant The number of the slot in the CR9000 card frame t...

Page 210: ...n rate is set at 2 seconds but the trigger is activated every 4 seconds the time stamp will still increment only 2 seconds every time the trigger activates the scan increment value will be off by a factor of 2 Parameter Data Type Enter Dest Variable or array Variable or array in which to store the value s received over the link This instruction does not require that any values be stored If Reps ar...

Page 211: ...processing DataEvent output processing DataInterval output processing DataTable output processing day 5 predefined constant Delay program control DIM declaration Do program control DSP4 output control Else program control ElseIf program control End program control EndBurstTrigger program control EndBurstTriggerSequence program control EndIf program control EndProg program control EndSelect program...

Page 212: ... control Restore processing RMSSpa processing RND function RunDldFile program control Sample output processing Scan program control SDMSpeed measurement SDMTrigger measurement sec 2 predefined constant Select program control SerialInput measurement SetDac calibration SGN function SIN function SIO4 measurement SlotModules CSI testing SlowSequence program control SQR function StationName program con...

Page 213: ...nstruction 7 14 Case 9 20 CaseElse 9 20 ClockSet Instruction 9 7 Common Mode Check Option 3 5 Common Mode Range 1 9 3 4 Connectors 1 1 Const Instruction 5 1 Constant Declaration 5 1 Continuous Analog Output 7 10 Control Ports Setting 7 21 Convert Data File 2 8 COS Cosine Instruction 8 6 Covariance Output Instruction 6 10 COVSPA Spatial Covariance Instruction 8 6 CR9011 OV 2 CR9031 OV 1 CR9041 OV 2...

Page 214: ...h Memory 2 1 FlashOut Instruction 6 8 For Next Loop 9 11 FP2 Data Format Resolution 2 2 2 3 FRAC Fractional Instruction 8 9 G GetRecord Instruction 8 10 Ground Loop effects 3 17 H Hamming Window Function 3 24 7 37 Hanning Window Function 3 24 7 37 HighPriority 9 15 Histogram Output Instruction 6 15 Histogram4D Instruction 6 16 Historical Data Viewing OV 14 Humidity Concerns 1 8 I I O Ports 7 26 IE...

Page 215: ...0 Application Software OV 10 PeakValley Instruction 8 17 PLA100 L Parallel Link Interface OV 8 Platinum Resistance Thermometer Measurement 8 18 Polar Coordinates 8 21 PortSet Instruction 7 21 Power Requirements 1 3 1 6 Power External Battery 1 7 Power Using Solar Panels 1 7 Power Using Vehicle 1 6 PowerOff Instruction 9 16 Print Instruction 9 17 Processing OV 8 Program Control 9 18 Programming Str...

Page 216: ...uction 7 3 TCSE Instruction 7 4 Thermocouple Accuracy TypeB 3 9 3 10 TypeE 3 9 3 10 TypeJ 3 9 3 10 TypeK 3 9 3 10 TypeR 3 9 3 10 TypeS 3 9 3 10 Thermocouple Measurements 3 7 Thermocouple Reference Temperature 7 11 Thermocouple Differential Measurement 7 3 Thermocouple Single Ended Instruction 7 4 Time Datalogger 8 10 Timer Instruction 9 23 TimerIO Instruction 9 24 TL925 OV 7 TOA5 Data File Format ...

Page 217: ...This is a blank page ...

Page 218: ... campbellsci com br suporte campbellsci com br Campbell Scientific Canada Corp CSC 11564 149th Street NW Edmonton Alberta T5M 1W7 CANADA www campbellsci ca dataloggers campbellsci ca Campbell Scientific Ltd CSL Campbell Park 80 Hathern Road Shepshed Loughborough LE12 9GX UNITED KINGDOM www campbellsci co uk sales campbellsci co uk Campbell Scientific Ltd France Miniparc du Verger Bat H 1 rue de Te...

Reviews: