background image

Appendix A.  CR5000 Status Table

A-4

CommActive - A variable signaling whether or not communications is
currently active (increments each time the autobaud detect code is executed).

ProgErrors - The number of compile (or runtime) errors for the current pro-
gram.

ErrorCalib - A counter that is incremented each time a bad calibration value is
measured. The value is discarded (not included in the filter update) and this var
is incremented.

VarOutOfBound - Flags whether an array was accessed out of bounds.

SkippedRecord - Variable that tells how many records have been shipped for
a given table. Each table has its own entry in this array.

SecsPerRecord - Output interval for a given table. Each table has its own
entry in this array.

SrlNbr - Machine specific serial number. Stored in FLASH memory.

Rev - Hardware revision number. Stored in FLASH memory.

CalVolts - Factory calibration numbers. This array contains twenty values
corresponding to the 20 integration / range combinations. These numbers are
loaded by the Factory Calibration and are stored in FLASH.

CalGain - Calibration table Gain values. Each integration / range combination
has a gain associated with it. These numbers are updated by the background
slow sequence if the running program uses the integration / range.

CalSeOffset - Calibration table single ended offset values. Each integration /
range combination has a single ended offset associated with it. These numbers
are updated by the background slow sequence if the running program uses the
integration / range.

CalDiffOffset - Calibration table differential offset values. Each integration /
range combination has a differential offset associated with it. These numbers
are updated by the background slow sequence if the running program uses the
integration / range.

CardStatus - Contains a string with the most recent card status information.

CompileResults - Contains any error messages that were generated by
compilation or during run time.

Содержание CR5000

Страница 1: ...CR5000 Measurement and Control System Revision 11 06 C o p y r i g h t 2 0 0 0 2 0 0 6 C a m p b e l l S c i e n t i f i c I n c ...

Страница 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...

Страница 3: ...2 PC9000 Installation OV 6 OV3 3 PC9000 Software Overview OV 7 OV4 KEYBOARD DISPLAY OV4 1 Data Display OV 12 OV4 2 Run Stop Program OV 16 OV4 3 File Display OV 17 OV4 4 Configure Display OV 19 OV5 SPECIFICATIONS OV 20 1 INSTALLATION AND MAINTENANCE 1 1 Protection from the Environment 1 1 1 2 Power Requirements 1 1 1 3 CR5000 Power Supplies 1 2 1 4 Solar Panels 1 4 1 5 Direct Battery Connection to ...

Страница 4: ...l Expression Evaluation 4 7 4 6 Flags 4 8 4 7 Parameter Types 4 9 4 8 Program Access to Data Tables 4 10 5 PROGRAM DECLARATIONS 5 1 6 DATA TABLE DECLARATIONS AND OUTPUT PROCESSING INSTRUCTIONS 6 1 Data Table Declaration 6 1 6 2 Trigger Modifiers 6 2 6 3 Export Data Instructions 6 8 6 4 Output Processing Instructions 6 11 7 MEASUREMENT INSTRUCTIONS 7 1 Voltage Measurements 7 3 7 2 Thermocouple Meas...

Страница 5: ... pc card status G G 12V 12V Hm A B C D E F J K L G H I M N O T U V P R S W X Y Spc Cap Q Z _ 1 2 PgUp ENTER BKSPC SHIFT ESC PgDn End Del Ins Graph char 3 4 5 6 7 8 9 0 CURSOR ALPHA POWER IN 11 16 VDC H L 19 37 38 H L 20 39 40 SE VX1 VX2 VX3 VX4 CAO1 CAO2 IX1 IX2 IX3 IX4 IXR P1 P1 C1 C2 C3 C4 G C6 C5 C7 C8 G G 2 0V 0 8V 5V 5V G SDI 12 12V G SDM C2 SDM C3 SDM C1 G 12V G SW 12 SW 12 G POWER OUT FIGUR...

Страница 6: ...DE IN USA CR5000 MICROLOGGER CAUTION DC ONLY POWER IN 11 16 VDC pc card status ANALOG INPUTS Voltage VoltDiff VoltSE Thermocouple TCDiff TCSE Bridge measurements use VX BrFull BrFull6W BrHalf BrHalf3W BrHalf4W Others Resistance PanelTemp PeriodAvg AM25T SWITCHED VOLTAGE EXCITATION VX Excite BrFull BrFull6w BrHalf BrHalf3W BrHalf4W SWITCHED CURRENT EXCITATION IX ExciteI Resistance CONTINUOUS ANALOG...

Страница 7: ...inals on the unplugable Power In connector are for connecting power from an external battery to the CR5000 These are the only terminals that can be used to input battery power the other 12V and SW 12V terminals are out only Power from this input will not charge internal CR5000 batteries Power to charge the internal batteries 17 28 VDC or 18 VRMS AC must be connected to the charger input on the sid...

Страница 8: ...n the run on power up program If the 0 5 input continues to be held at ground while the CR5000 is powered on and goes through its 2 5 second initialization sequence the CR5000 will not run run on power up program OV1 1 13 SDM Connections The Synchronous Device for Measurement SDM connections C1 C2 and C3 along with the adjacent 12 volts and ground terminals are used to connect SDM sensors and peri...

Страница 9: ...by using a PCMCIA card in the built in card slot OV2 2 Measurements Processing Data Storage The CR5000 divides a program into two tasks The measurement task manipulates the measurement and control hardware on a rigidly timed sequence The processing task processes and stores the resulting measurements and makes the decisions to actuate controls The measurement task stores raw Analog to Digital Conv...

Страница 10: ...3 278824 31 07 24 2 25 09 26 8 24 11 24 45 23 75 1995 02 16 15 15 04 64 278825 31 07 24 21 25 1 26 77 24 13 24 39 23 76 OV3 PC9000 Application Software PC9000 is a Windows application for use with the CR5000 The software supports CR5000 program generation real time display of datalogger measurements graphing and retrieval of data files OV3 1 Hardware and Software Requirements The following compute...

Страница 11: ... extensive on line help to guide the user in its operation run PC9000 to get the details A CR5000 is not necessary to try out the programming and real time display options a demo uses canned data for viewing Without a CR5000 there are no communications with the datalogger operations such as downloading programs and retrieving data will not function Figures OV3 1 and OV3 2 show the main PC9000 menu...

Страница 12: ... Created by Program Generator View Data Collected from CR5000 Display Data in Tables Collected From CR5000 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 Save and Download Logger Files Diagn...

Страница 13: ...ates up to five displays simultaneously Choices include analog meter horizontal and vertical bars independent scaling offset multiple alarms and rapid on site calibration of sensors Undo Ctrl Z Date Time Select All Strip Remarks and Spaces Ctrl S Cut Ctrl X Copy Ctrl C Paste Ctrl V Delete Delete Line Ctrl Y Wrap Text Ctrl W Go To Line Find Ctrl F Replace Ctrl R Colors Fonts Defaults Tile Horizonta...

Страница 14: ... Line statistics available for max min best fit mean and standard deviation Handles files of unlimited size Historical graphing requires no special processing of the data and provides rapid feedback to the operator OV3 3 4 Tools Control and Communications Supports PC to CR5000 communications clock read set status read program download and program retrieval OV3 3 5 Collect Collect data from CR5000 ...

Страница 15: ...etup Data Run Stop Program File Status Configure Settings ROM Version xxxx OS Version xxxx OS Date xxxx OS Signature Serial Number Rev Board Station Name xxxx Program Name xxxxx StartTime xxxxx Run Signature DLD Signature Battery xxxx New Edit Copy Delete Run Options Directory Format Set Time Date Settings Display Power Up Screen Press any key for Main Menu except Adjust contrast with lighter dark...

Страница 16: ...ables created by active program Real Time Tables Real Time Custom Final Storage Data Reset Data Table Graph Setup Graph Type Scope Scaler Manual Upper 0 000000 Lower 0 000000 Display Val Off Display Max Off Display Min Off List of Data Tables created by active program Cursor to Data and Press Enter All Tables List of Data Tables created by active program ...

Страница 17: ... Type Roll 30 0 22 35 _____ ___ ____ __ 20 00 List of Data Tables created by active program For Example Cursor to desired Table and press Enter TCTemp 3 Tref 23 0234 TCTemp 1 19 6243 TCTemp 2 19 3429 TCTemp 3 21 2003 Flag 1 1 0000 Flag 2 0 00000 Flag 3 0 00000 Flag 4 0 00000 Fl 3 TCTemp 3 2 Public Table values can be changed Cursor to value and press Enter to edit value Press Graph Char for Graph ...

Страница 18: ...CTemp 2 TCTemp 3 Flag 1 Flag 2 Flag 3 Flag 4 TCTemp 3 24 9496 List of Data Tables created by active program For Example Cursor to desired Table and Press Enter TCTemp 3 New values are displayed as they are stored Cursor to desired Field and Press Enter Cursor to position for next value and Press Enter ...

Страница 19: ...8 21 9395 22 8253 2000 01 03 00 12 47 9 24 1242 21 8176 21 9118 22 8308 2000 01 03 00 12 48 10 24 1242 21 8342 21 945 22 8364 2000 01 03 00 12 49 11 24 1242 21 8453 21 9506 22 8364 Press Graph Char for Graph of selected field Use PgUp PgDn to move cursor and window of data graphed 5 2000 01 03 00 12 43 Tref TC 1 21 8675 List of Data Tables created by active program For Example Table1 Temps Cursor ...

Страница 20: ...w remove the Card CR5000 closes tables first All Card Data Will be Lost Proceed Yes No Remove Card Format Card Table Status Card Status PC Card Status Battery OK 5Volt Card WP Disabled List of Data Tables on card created by active program Cursor to PCCard and Press Enter CPU List of Programs No Program CRD List of Programs ...

Страница 21: ...mat CPU All programs and other files will be lost Proceed Yes List of Programs No Data Run Stop Program File Status Configure Settings New File Name CPU CR5 CRD CR5 CPU CRD Copy From To Execute Cursor to File and Press Enter List of files on CPU or Card CPU Program No Program CRD Program ...

Страница 22: ...or Example Cursor to desired Program and Press Enter Edit Directly or Cursor to first character of line and Press Enter D INSERT Instruction Function Blank Line Block Insert Off DataTable TableName Temps TrigVar 1 Size 1000 Block Commands Copy Cut Delete Insert blank line DataTable Temps 1 1000 Sample 1 TREF IEEE4 Sample 3 TC IEEE4 EndTable BeginProg Scan 1 sec 3 0 Edit Instruction parameters with...

Страница 23: ... Year 2000 Month 5 Day 24 Hour 15 Minute 10 Set Cancel Cursor to Configure Settings and Press Enter Set Time Date Settings Display Security Enable RS 232 Time Out No CR5000 Off Turn off display Back Light Contrast Adjust Display Time Out No Yes if yes Time out min 1 Enter Passwords Level 1 Level 2 Level 3 Enter Num Password click ...

Страница 24: ...ground RESOLUTION 70 ns number of cycles measured ACCURACY 0 03 of Reading Resolution PULSE COUNTERS DESCRIPTION Two 16 bit inputs selectable for switch closure high frequency pulse or low level ac MAXIMUM COUNT 4 x 109 counts per scan SWITCH CLOSURE MODE Minimum Switch Closed Time 5 ms Minimum Switch Open Time 6 ms Maximum Bounce Time 1 ms open without being counted HIGH FREQUENCY PULSE MODE Maxi...

Страница 25: ...n be fastened with the hasp for easy access or with the two supplied screws for more permanent applications The white plastic inserts at the corners of the enclosure must be removed to insert the screws Both enclosures are white for reflecting solar radiation thus reducing the internal enclosure temperature The Model ENC 12 14 fiberglass enclosure houses the CR5000 and one or more peripherals Insi...

Страница 26: ... AC and a temperature compensated charging circuit with a charge indicating LED Light Emitting Diode An AC transformer or solar panel should be connected to the base at all times The charging source powers the CR5000 while float charging the lead acid batteries The internal lead acid battery powers the datalogger if the charging source is interrupted The lead acid battery specifications are given ...

Страница 27: ... TABLE 1 3 1 CR5000 Rechargeable Battery and AC Transformer Specifications Lead Acid Battery Battery Type Yuasa NP7 6 Float Life 25oC 3 years minimum Capacity 7 0 amp hour Shelf Life full charge 6 months Charge Time AC Source 40 hr full charge 20 hr 95 charge Operating temperature 40 C to 60 C AC Transformer Input 120 VAC 60 Hz Isolated Output 18 VAC 1 2 Amp There are inherent hazards associated w...

Страница 28: ...g Department 1 5 Direct Battery Connection to the CR5000 Wiring Panel Any clean battery backed 11 to 16 VDC supply may be connected to the 12 V and G connector terminals on the front panel When connecting external power to the CR5000 first remove the green power connector from the CR5000 front panel Insert the positive 12 V lead into the right most terminal of the green connector Insert the ground...

Страница 29: ...C5 C7 C8 G G 2 0V 0 8V 5V 5V G SDI 12 12V G SDM C2 SDM C3 SDM C1 G 12V G SW 12 SW 12 G POWER OUT MADE IN USA 11 16 V G 18V G V in DCDC1R BOOST REGULATOR V out FIGURE 1 6 1 CR5000 with DCDC18R It is also possible to use the vehicle s 12 V power system as the primary supply for a CR5000 with a battery base Figure 1 6 2 When a vehicle s starting motor is engaged the system voltage drops considerably ...

Страница 30: ...R5000 and its peripheral devices and sensors is critical in all applications Proper grounding will ensure the maximum ESD electrostatic discharge protection and higher measurement accuracy 1 7 1 ESD Protection An ESD electrostatic discharge can originate from several sources However the most common and by far potentially the most destructive are primary and secondary lightning strikes Primary ligh...

Страница 31: ...5A Thermal fuse 0 9A Thermal fuse 1 85A Thermal fuse Batteries SW12 Control 10µf Excitation CAO Pulse Counter Grounds Power Grounds G FIGURE 1 7 1 Schematic of CR5000 Grounds The 9 pin serial I O ports on the CR5000 are another path for transients to enter and damage the CR5000 Communications devices such a telephone or short haul modem lines should have spark gap protection Spark gap protection i...

Страница 32: ...ground does exist it is good practice to verify that it carries no current If the integrity of the AC power ground is in doubt also ground the system through the buildings plumbing or another connection to earth ground 1 7 2 Effect of Grounding on Measurements Common Mode Range The common mode range is the voltage range relative to the CR5000 ground within which both inputs of a differential measu...

Страница 33: ... shield or ground leads with large current flow tying the problem leads into the terminals next to the excitation CAO and pulse counter channels should help Problem leads can also be tied directly to the ground lug to minimize induced single ended offset voltages 1 8 Powering Sensors and Peripherals The CR5000 is a convenient source of power for sensors and peripherals requiring a continuous or se...

Страница 34: ...ong periods of time between site visits or applications at extreme temperatures TABLE 1 8 2 Typical Current Drain for Some CR5000 Peripherals Typical Current Drain mA Peripheral Quiescent Active AM25T 5 1 COM100 5 1 8 COM200 Phone Modem 0 0012 140 SDM INT8 0 4 6 5 1 9 Controlling Power to Sensors and Peripherals Controlling power to an external device is a common function of the CR5000 Many device...

Страница 35: ...ort is set high 12 V from the datalogger passes through the relay coil closing the relay which completes the power circuit to a fan turning the fan on In other applications it may be desirable to simply switch power to a device without going through a relay Figure 1 9 2 illustrates a circuit for switching external power to a device without going through a relay If the peripheral to be powered draw...

Страница 36: ...ies are present Hydrogen gas generated by the batteries may build up to an explosive concentration 1 10 2 Replacing the Internal Battery Misuse of the lithium battery or installing it improperly can cause severe injury Fire explosion and severe burn hazard Do not recharge disassemble heat above 100 C 212 F solder directly to the cell incinerate nor expose contents to water The CR5000 contains a li...

Страница 37: ...lock will reset and data will be lost when power is removed A replacement lithium battery can be purchased from Campbell part number 13497 Table 1 10 1 lists the specifications of the battery Table 1 10 1 CR5000 Lithium Battery Specifications Model Tadiran TL 5955 3 6 V Capacity 1650 mAh self discharge rate 1 year 20 C Diameter 14 5 mm Length 33 5 mm Operating temperature range 55 C to 85 C The CR...

Страница 38: ... cell is placed into the battery holder observing the polarity markings on the holder Replace the band clamp ensuring that both ends snap securely into the battery holder B A T T E R Y 2 datalogger cr5 000 S A N Y O FIGURE 1 10 5 Loosening of band clamp ...

Страница 39: ...Section 1 Installation and Maintenance 1 15 S A N Y O FIGURE 1 11 6 Removal of band clamp and battery ...

Страница 40: ...Section 1 Installation and Maintenance 1 16 This is a blank page ...

Страница 41: ...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 CardOut instruction within the data table declaration A maximum of 30 tables can be created by the program 2 1 1 Internal Static RAM Internal RAM is used as either the sole storage area for a data table or as a buffer area when data are sent to a ...

Страница 42: ... Data are stored internally in a binary format Variables and calculations are performed internally in IEEE 4 byte floating point with some operations calculated in double precision There are two data types used to store data IEEE4 four byte floating point and Campbell Scientific two byte floating point FP2 The data format is selected in the instruction that outputs the data Within the CR5000 time ...

Страница 43: ...r Files under the Tools menu has the option of retrieving a file from a PC card This can be used to retrieve a data file When the CR5000 is used without a computer in the field or large data files are collected on a PC card the PC card can be transported to the computer with the data on it The format of the data files on the PC card is different than the data file formats created by PC9000 when th...

Страница 44: ...k here to store the data as an ASCII file TOA5 Section 2 4 There will be no date and time stamps Binary Without Time Click here to store the data as a binary file TOB1 Section 2 4 There will be no date and time stamps 2 3 1 2 Collection Method All Records Create New File Collects the entire table stored in the CR5000 PC9000 gets the current record number from the table in the CR5000 and then retri...

Страница 45: ...les except the Public and Status tables are collected when collection is executed The data from each table are stored in a file with the table name and increment number see Table naming This is a convenient method of collecting all data from the CR5000 The first time data are collected all data is checked and the file type and collection method are selected PC9000 remembers the settings and on sub...

Страница 46: ...le This feature is provided to allow the user to start and stop collecting data for some event without leaving the real time window Check this box to write the current table to a file in the computer Writing begins with the current record and continues until the Write File box is unchecked or until the window is closed This collection method requires that the PC is connected to the CR5000 while th...

Страница 47: ...n The retrieved data file is stored on the computer in the same form that it was stored on the PC card TOB2 This format generally needs to be converted to another format for analysis Section 2 3 4 FIGURE 2 3 2 Logger Files Dialog Box 2 3 4 Via PCMCIA PC Card When the CR5000 is used without a computer in the field or large data files are collected on a PC card the PC card can be transported to the ...

Страница 48: ...y tables with the same name that exist on the card This is the option that is generally used when a blank but formatted card is inserted or when a card is reinserted after transferring data to a computer The Same Card option is only available if the data table header matches the program exactly and the program has already run with a card This option allows removing the card to read it and then ret...

Страница 49: ... time without the space required for individual time stamps When TOB2 files are converted to another format the number of records may be greater or less than the number requested in the data table declaration There are always at least two additional frames of data allocated When the file is converted these will result in additional records if no lapses occurred If more lapses occur than were antic...

Страница 50: ...the format datalogger and program used to collect the data Figure 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 The format of the file on disk TOA5 is an ASCII format TOB1 is a Binary format This information is used by the historical graphing and file conversion function...

Страница 51: ...IEEE4 4 byte floating point Time Stamp This field is the date and time stamp for this record It indicates the time according to the logger clock that each record was stored Record Number This field is the record number of this record The number will increase up to 2E32 and then start over with zero The record number will also start over at zero if the table is reset Field Data This is the data for...

Страница 52: ...vg 1 TC_Avg 2 TC_Avg 3 TC_Avg 4 degC degC degC degC degC Avg Avg Avg Avg Avg 29 94 25 6 25 36 25 48 25 4 29 93 25 6 25 36 25 41 25 35 2 4 2 TOB1 Binary File Format This is a sample of a file collected as Binary with time stamps TOB1 Bob s9K CR5000 1048575 1 00 EXPLDAT DLD 4339 Temp SECONDS NANOSECONDS RECORD RefTemp_Avg TC_Avg 1 TC_Avg 2 TC_Avg 3 TC_Avg 4 SECONDS NANOSECONDS RN degC degC degC degC...

Страница 53: ... boundary This additional time stamp takes up space that would otherwise hold data When TOB2 files are converted to another format the number of records may be greater or less than the number requested in the data table declaration There are always at least two additional frames of data allocated When the file is converted these will result in additional records if no lapses occurred If more lapse...

Страница 54: ...Section 2 Data Storage and Retrieval 2 14 This is a blank page ...

Страница 55: ...ween switching to a channel and making a measurement SettlingTime and the length of time to integrate a measurement Integ and to reverse the polarity of excitation voltage RevEx 3 1 1 Voltage Range The CR5000 has 5 fixed voltage ranges and autorange The 16 bit A D has a resolution of 1 part in 2 16 65 536 To allow for some overrange capabilities the A D is applied to a range approximately 9 greate...

Страница 56: ...y cancels voltage offsets in the sensor wiring and measurement circuitry One measurement is made with the excitation voltage with the polarity programmed and a second measurement is made with the polarity reversed The excitation on time for each polarity is exactly the same to ensure that ionic sensors do not polarize with repetitive measurements Reversing the inputs of a differential measurement ...

Страница 57: ...ures reverses the excitation reverses the inputs delays measures reverses the excitation delays measures Thus there are four delays per channel measured The CR5000 processes the measurement segments into the single value it returns for the measurement 3 1 5 Integration Integration is used to reduce the noise included in a measurement The CR5000 may use a combination of analog and digital integrati...

Страница 58: ...ow side of a differential channel can be used for a single ended measurement The single ended channels are numbered 1 40 Because a single ended measurement is referenced to CR5000 ground any difference in ground potential between the sensor and the CR5000 will result in an error in the measurement For example if the measuring junction of a copper constantan thermocouple being used to measure soil ...

Страница 59: ...ry Even with this ground connection the ground potential of the two instruments may not be at exactly the same level which is why a differential measurement is desired A differential measurement has the option of reversing the inputs to cancel offsets as described above Sustained voltages in excess of 16 V will damage the CR5000 circuitry 3 3 Signal Settling Time Whenever an analog input is switch...

Страница 60: ...t of time and then making zero integration measurements every 100 µs Looking at the series of measurements it is possible to see the settling of the sensor signal By counting the number of measurements before the signal settles the correct settling time can be determined 100 µs per measurement plus an extra 100 µs if the measurement is made on the 20 mV range where the default settling time is 200...

Страница 61: ...e CR5000 to make the 20 measurements on channel 1 BrFull PT 20 mV50 1 Vx1 20 5000 False False 0 0 1 0 0 CallTable SetlDat NextScan EndProg The program was run on a Druck water level pressure transducer with 200 feet of cable The first six measurements of each of the 5 readings are shown in Table 3 3 1 The reading has settled by the second measurement PT 2 thus a settling time of 200 µs is adequate...

Страница 62: ...oltage to the thermocouple voltage The temperature of the measuring junction is then calculated from a polynomial approximation of the NIST TC calibrations 3 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 Monograph 175 the thermocouple vol...

Страница 63: ...temperature gradients on the input panel can be much worse For example the CR5000 with the rechargeable battery back was placed in a controlled temperature chamber Thermocouples in channels at the ends and middle of each analog terminal strip measured the temperature of an insulated aluminum bar outside the chamber The temperature of this bar was also measured by another datalogger Differences bet...

Страница 64: ... Temperature Errors Due to Panel Gradient Chamber changed from 55 to 80 C at maximum rate 7 6 5 4 3 2 1 0 1 2 5 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 Time minutes Measured Actual C 60 40 20 0 20 40 60 80 Chamber and CR5000 Panel Temperature C Chanel 1 Chanel 5 Chanel 10 Chanel 11 Chanel 16 Chanel 20 Panel Chamber FIGURE 4 3 2 Panel Temperature Gradients During 55 to 80 C change...

Страница 65: ... is the National Institute of Standards and Technology Monograph 175 1993 The American National Standards Institute has established limits of error on thermocouple wire which is accepted as an industry standard ANSI MC 96 1 1975 Table 3 4 1 gives the ANSI limits of error for standard and special grade thermocouple wire of the types accommodated by the CR5000 TABLE 3 4 1 Limits of Error for Thermoc...

Страница 66: ...o 50 C accuracy of a CR5000 differential voltage measurement is specified as 0 075 of the measured voltage plus the input offset error of 2 times the basic resolution of the range being used to make the measurement plus 2 µV The input offset error reduces to the basic resolution if the differential measurement is made utilizing the option to reverse the differential input For optimum resolution th...

Страница 67: ...d not used N 270 to 1300 270 to 580 270 to 1300 not used When the thermocouple measurement junction is in electrical contact with the object being measured or has the possibility of making contact a differential measurement should be made Noise on Voltage Measurement The typical input noise on the 20 mV range for a differential measurement with no integration and input reversal is 1 8 µV RMS On a ...

Страница 68: ...hin these temperature ranges Temperature difference measurements made outside of the reference temperature range should be made by obtaining the actual temperatures referenced to a junction within the reference temperature range and subtracting one temperature from the other Table 3 4 3 gives the reference temperature ranges covered and the limits of error in the linearizations within these ranges...

Страница 69: ...e by 0 012 oC The RTD is 25 oC but is indicating 25 1 oC and the terminal that the thermocouple is connected to is 0 05 oC cooler than the RTD TABLE 3 4 5 Example of Errors in Thermocouple Temperature Source Error oC of Total Error Single Differential No Integration Reversing Differential 250 µs Integration ANSI TC Error 1oC TC Error 1 Slope ANSI TC Error 1oC TC Error 1 Slope Reference Temp 0 15o ...

Страница 70: ...e voltage measured by the CR5000 This thermoelectric offset voltage is a factor whether or not the junction box is used for the reference This offset can be minimized by making the thermal conduction between the two points large and the distance small The best solution in the case where extension grade wire is being connected to thermocouple wire would be to use connectors which clamped the two wi...

Страница 71: ...for the analog to digital conversion is completed When more than one measurement per sensor is necessary four wire half bridge three wire half bridge six wire full bridge excitation is applied separately for each measurement For example in the four wire half bridge when the excitation is reversed the differential measurement of the voltage drop across the sensor is made with the excitation at both...

Страница 72: ...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 2 2 1 2 3 4 2 2 4 3 2 2 1000 1 1 Resistance H L H I IXR X result w mult 1 offset 0 X V I R x s Resistance used to measure full bridge H L IXR X result w mult 1 offset 0 X V I R R R R R R R R R R R R R R R R R x bridge 1 3 3 4 2 1 2 3 1 2 2 3 4 1 2 3 4 R R R X R R R X R R R R X R R R X R R R R X R R R X R R R R X R R R X R 1 2 4 2 ...

Страница 73: ...st measurement is held and then is switched off after another 100 µs when the second measurement is held i e reverse the excitation 100 µs delay no integration Influence of Ground Loop on Measurements When measuring soil moisture blocks or water conductivity the potential exists for a ground loop which can adversely affect the measurement This ground loop arises because the soil and water provide ...

Страница 74: ...uld have the PulseCount instruction programmed to return frequency If the number of counts is primary interest PulseCount should be programmed to return counts i e the number of times a door opens the number of tips of a tipping bucket rain gage The interval of the scan loop that PulseCount is in is not the sole determining factor in the calculation of frequency While normally the counters will be...

Страница 75: ...integration range combinations needed For the 250 usc and zero integrations multiple measurements are made and averaged to come up with gain values to use in the measurements Ten measurements are made on the zero integration ranges and five measurements for the 250 usec integrations When this calibration is performed the values in the calibration table are completely replaced i e no filtering is u...

Страница 76: ...ibration shift and the need for the self calibration If the temperature of the CR5000 remains the same there will be little calibration drift with the self calibration disabled The time constant for the background calibration at the 4 second rate is approximately 36 seconds This allows the CR5000 to remain calibrated during fairly rapid temperature changes In cases of extreme temperature change su...

Страница 77: ...e names of the individual temperatures are TCTemp 1 TCTemp 2 TCTemp 3 TCTemp 20 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...

Страница 78: ...s here Public Start 6 Declare the start time array 4 2 Programming Sequence The following table describes the structure of a typical CR5000 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 th...

Страница 79: ...ach time Program The program section defines the action of datalogging Set scan interval The scan sets the interval for a series of measurements Measurements Enter the measurements to make Processing Enter any additional processing with the measurements Call Data Table s The Data Table must be called to process output data Initiate controls Check measurements and Initiate controls if necessary Nex...

Страница 80: ... 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 13 26 82 24 15 24 45 23 8 1995 02 16 15 15 04 63 278824 31 07 24 2 25 09 26 8 24 11 24 45 23 75 1995 02 16 15 15 04 64 278825 31 07 24 21 25 1 26 77 24 13 24 39 23 76 The user s program determines the values that are output and their sequence The CR5000 automatically assigns names to each field in the data table In...

Страница 81: ...0 records in RAM DataInterval TintoInt Interval Units Lapses DataInterval 0 10 msec 10 DataInterval is an instruction that modifies the conditions under which data are stored The four parameters are the time into the interval the interval on which data are stored the units for time and the number of lapses or gaps in the interval to keep track of The example outputs at 0 time into on the interval ...

Страница 82: ...cessing Once you know what you want the measurements and calculations have been listed and the output tables defined the program itself may be relatively short The executable program begins with BeginProg and ends with EndProg The measurements processing and calls to output tables bracketed by the Scan and NextScan instructions determine the sequence and timing of the datalogging BeginProg Scan 1 ...

Страница 83: ...nts the status of the ports 1 high 0 low To set ports 1 3 4 and 6 high and 2 5 7 and 8 low the number is B00101101 The least significant bit is on the right and represents port 1 This is much easier to visualize than entering 72 the decimal equivalent 4 5 Logical Expression Evaluation 4 5 1 What is True Several different words get used to describe a condition or the result of a test The expression...

Страница 84: ...rue Y will be set to 0 any time the conditional statement is executed If 0 then Y 0 is always false Y will never be set to 0 by this conditional statement The CR5000 expression evaluator evaluates the expression X 5 and returns 1 if the expression is true and 0 if the expression is false W X Y will set W equal to 1 if X Y or will set W equal to 0 if X Y The CR5000 uses 1 rather than some other non...

Страница 85: ...t with a letter CRBasic is Field name 16 not case sensitive 4 7 1 Expressions in Parameters Many parameters allow the entry of expressions If an expression is a comparison it will return 1 if the comparison is true and 0 if it is false Section 4 5 3 An example of the use of this is in the DataTable instruction where the trigger condition can be entered as an expression Suppose the variable TC 1 is...

Страница 86: ...nt time 1 is the most recent record stored 2 is the record stored prior to the most recent For example the expression Tdiff Temp TC_Avg 1 1 Temp TC_Avg 1 101 could be used in the example program Section 4 3 to calculate the change in the 10 ms average temperature of the first thermocouple between the most recent average and the one that occurred a second 100 x 10 ms earlier In addition to accessin...

Страница 87: ...entend 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 record or if it is in the middle of an event The values of Tablename output 1 1 and Tablename eventend 1 1 are only updated when the tables are called The WorstCase example in Section 6 2 illustrates the use of this syntax NOTE ...

Страница 88: ...Section 4 CRBasic Native Language Programming 4 12 This is a blank page ...

Страница 89: ...Temp 4 Alias TCTemp 1 CoolantT Alias TCTemp 2 ManifoldT Alias TCTemp 3 ExhaustT Alias TCTemp 4 CatConvT Const Declares symbolic constants for use in place of numeric entries Syntax Const 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...

Страница 90: ...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 dimensioned value a subscript out of b...

Страница 91: ...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...

Страница 92: ... 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...

Страница 93: ...grees C to degrees F Sub ConvertCtoF Tmp Tmp Tmp 1 8 32 EndSub BeginProg Scan 1 Sec 3 0 Measure Temperatures panel 4 thermocouples and 100 ohm PRT in deg C PanelTemp RefT 250 TCDiff TC 4 mV20C 1 TypeT RefT True 0 250 1 0 0 Resistance PRTresist 1 mV50 7 Ix1 1 500 True True 0 250 0 01 0 PRT PRTtemp 1 PRTresist 1 0 0 Call Output Table for C CallTable TempsC Convert Temperatures to F using Subroutine ...

Страница 94: ...Section 5 Program Declarations 5 6 This is a blank page ...

Страница 95: ...e 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 variable or interva...

Страница 96: ...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 CR5000 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...

Страница 97: ...e was not called or another trigger condition was not met The CR5000 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 is called on ...

Страница 98: ...a table 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 RecsBefore Constant The number of records to store before the Start Trigger StartTrig The variable or expression test to Trigger copying the pre trigger records into the data ta...

Страница 99: ...al to the 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 PanelTemp RefTemp 250 TCDiff TC 5 mV50C 1 TypeT RefTemp RevDiff Del Integ 1 0 CallTable Event NextScan EndProg FillStop Data Tables are by de...

Страница 100: ... the program to call the worst case tables see example Parameter Data Type Enter 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 The cloned tables use th...

Страница 101: ...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...

Страница 102: ... value for size The partitioning algorithm attempts to have the tables fill at the same time DSP4 FlagVar Rate Send data to the DSP4 If this instruction appears inside a DataTable the DSP4 can display the fields of this Table otherwise the Public Variables are used by the DSP4 The Instruction can only be used once in a program hence only the public variables or a single data table can be viewed Pa...

Страница 103: ...le 7 Random message transmit failure could be no data in buffer Table Table Name The data table from which record s should be transmitted TableOption The TableOption indicates which records should be sent from the data table Constant Code Description 0 send all records since last execution 1 send only the most recent record stored in the table BufferControl Constant The BufferControl parameter spe...

Страница 104: ... xxx x 5 Fixed decimal ASCII xx xx 6 Fixed decimal ASCII x xxx 7 Fixed decimal ASCII xxx 8 Fixed decimal ASCII xxxxx GOESStatus Dest StatusCommand The GOESStatus instruction is used to request status and diagnostic information from the SAT HDR GOES satellite transmitter When the datalogger sends a command further processing tasks will be performed only after a response has been received from the H...

Страница 105: ... the source must be an array Source Variable The name of the Variable that is to be averaged 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 in...

Страница 106: ... maximum number of covariances is Z 2 Z 1 Where Z NumVals If X 1 is the first specified element of the source array the covariances are calculated and output in the following sequence X_Cov 1 X_Cov Z 2 Z 1 Cov X 1 X 1 Cov X 1 X 2 Cov X 1 X 3 Cov X 1 X Z Cov X 2 X 2 Cov X 2 X 3 Cov X 2 X Z Cov X Z X Z The first NumCov of these possible covariances are output FFT Source DataType N Tau Units Option T...

Страница 107: ... is A 2 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 power spectral density power per herz The Power Spectrum multiplied by T N tau yields the PSD The integral of the PSD over a given bandwidth yields the total power in that band Note that the bandwidth of each value is 1 T hertz Inverse ...

Страница 108: ...ring 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 the result and then taking the Inverse FFT of the larger array The resolution in the time domain is increased by the ratio of the size of the padded FFT to the size of the unpadded FFT This can be used to increase the resolution of...

Страница 109: ...ld names are limited to 19 characters Individual names may be entered for each result generated by the previous output instruction or an array may be used to name multiple fields When the program is compiled the CR5000 will determine how many fields are created If the list of names is greater than the number of fields the extra names are ignored If the number of fields is greater than the number n...

Страница 110: ...s the bin to which the weighted value is added When the histogram is output the value accumulated in each bin can be output or the totals can be divided by the TOTAL number of input scans and then output These values are the contributions 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 valu...

Страница 111: ...or example when the disable variable is 0 the current input is not included in the histogram The histogram that is eventually stored includes the inputs that occurred while the disable variable was 0 Value Result 0 Process current input 0 Do not process current input Bins Constant The number of bins or subranges to include in the histogram bin select range The width of each subrange is equal to th...

Страница 112: ...ns3 x Bins4 Histogram4D Output Example The example program below is an example of using the Histogram4D instruction to calculate a 2 dimensional histogram of RPM distribution vs Gear VARIABLES and CONSTANTS Public RPM Gear Port 4 Dim Bin 2 OUTPUT SECTION DataTable RPMvsG 1 100 DataInterval 0 60 Min 100 Histogram4D Bin FP2 0 4 8 0 0 000 1 0 5 4 5 0 8000 0 0 0 0 4 bins for gear range 0 5 to 4 5 8 bi...

Страница 113: ...to greater than the associated level Rising edge or positive polarity Or if Falling edge or negative polarity is selected a count occurs if the source goes from greater than 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 I...

Страница 114: ...uction is called the source is checked to see if its value has changed from the previous value and if in any change it has crossed any of the specified crossing levels The instruction can be programmed to count crossings on either the rising edge source changes from less than the level to greater than the level or on the falling edge source changes from greater than the level to less than the leve...

Страница 115: ...o counts 1 0 0 5 3 3 Add one count to first second and third bins the signal crossed 1 1 5 and 3 2 1 1 The second dimension when greater than 1 is determined by the value of the element in the source array following the element checked for the crossing It is the value of this variable at the time the crossings are detected that determines the second dimension 0 0 5 1 1 5 2 2 5 3 3 5 0 1 2 3 4 5 6 ...

Страница 116: ... for the last bin that is greater than any possible second dimension source value The crossing levels and the boundaries for the second dimension are not specified in the LevelCrossing instruction but are contained in variable arrays This allows the levels to be spaced in any manner the programmer desires The arrays need to be dimensioned to at least the same size as the dimensions of the histogra...

Страница 117: ...ta 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 the current input is not checked for a new maximum The maximum ...

Страница 118: ... 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 the current input is not included in the histogram The histogram that is eventually stored includes the inputs that occurred ...

Страница 119: ...mber of cycles counted that were associated with that bin i e number of cycles in bin divided by total number of cycles counted The user enters the number of mean bins the number of amplitude bins and the upper and lower limits of the input data The values for the amplitude bins are determined by the difference between the upper and lower limits on the input data and by the number of bins For exam...

Страница 120: ... the first bin will not be counted However if the value is too small processing time will be consumed counting cycles which are in reality just noise Outputs Generated No Mean Bins x No Amplitude Bins x Reps Sample Reps Source DataType This instruction stores the current value s at the time of output from the specified variable or array Parameter Data Type Enter Reps Constant The number of values ...

Страница 121: ...t The number of totals 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 Code Data Format IEEE4 24 IEEE 4 byte floating point FP2 7 Campbell Scientific 2 byte floating point DisableVar Constant Variable or Expression...

Страница 122: ...ly stored is the total of the inputs that occurred while the disable variable was 0 Value Result 0 Process current input 0 Do not process current input Subinterval Constant The number of samples per sub interval calculation Enter 0 for no sub interval calculations SensorType The type of wind sensors Constant Value Sensor Type 0 Speed and Direction 1 East and North OutputOpt Value Outputs for each ...

Страница 123: ...le taken during the output period enter 0 for the Subinterval parameter or 2 by averaging standard deviations processed from shorter sub intervals of the output period Averaging sub interval standard deviations minimizes the effects of meander under light wind conditions and it provides more complete information for periods of transition 1 Standard deviation of horizontal wind fluctuations from su...

Страница 124: ...ude U and direction Θu If the input sample interval is t the number of samples in output interval T is N T t The mean vector magnitude is U U N Scalar mean horizontal wind speed S S Σsi N where in the case of orthogonal sensors Si Uei 2 Uni 2 1 2 Unit vector mean wind direction Θ1 Θ1 Arctan Ux Uy where Ux Σsin Θi N Uy Σcos Θi N or in the case of orthogonal sensors Ux Σ Uei Ui N Uy Σ Uni Ui N where...

Страница 125: ... sensors Ue ΣUei N Un ΣUni N Resultant mean wind direction Θ Θ Θ Θu Θu Arctan Ue Un Standard deviation of wind direction σ σ σ σ Θ Θ Θ Θu using Campbell Scientific algorithm σ Θu 81 1 U S 1 2 The algorithm for σ θu is developed by noting Figure 6 4 4 that Cos U s where i i Θ Θ Θ Θ i i i u FIGURE 6 2 3 Standard Deviation of Direction The Taylor Series for the Cosine function truncated after 2 terms...

Страница 126: ...2 Summing Θi 2 over N samples and dividing by N yields the variance of Θu Note that the sum of the last term equals 0 σ Θ Θ Θ u N U S s NS i i i i N i N 2 2 2 1 1 2 1 The term Θi i s NS 2 is 0 if the deviations in speed are not correlated with the deviation in direction This assumption has been verified in tests on wind data by CSI the Air Resources Laboratory NOAA Idaho Falls ID and MERDI Butte M...

Страница 127: ...ain gages and pressure and force transducers 7 3 Half Bridges BrHalf Half Bridge 7 5 BrHalf3W Three Wire Half Bridge 7 6 BrHalf4W Four Wire Half Bridge 7 6 7 4 Full Bridges BrFull Four Wire Full Bridge 7 8 BrFull6W Six Wire Full Bridge 7 9 7 5 Current Excitation Resistance Measures Resistance or Full Bridge with Current Excitation 7 11 7 6 Excitation Continuous Analog Output ExciteCAO Sets the vol...

Страница 128: ...eIO Sets Digital Outputs 7 28 7 9 Peripheral Devices AM25T Controls the AM25T multiplexer 7 29 AO4 Sets the voltage to an SDM AO4 output device 7 30 CANBUS Measures and controls the SDM CAN interface 7 31 CD16AC Controls an SDM CD16AC SDMCD16 or SDM CD16D 16 channel relay control port device 7 36 CS7500 Communicates with the CS7500 open path CO2 sensor 7 37 CSAT3 Communicates with the CSAT3 sonic ...

Страница 129: ... 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 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 the the...

Страница 130: ...V1000 1 1000 mV mV200 2 200 mV mV50 3 50 mV mV20 4 20 mV AutoRange 5 mV20 mV5000 Selects range Sect 3 1 mV200C mV50C mV20C 20 30 40 200 mV 50 mV 20 mV The mV200C mV50C and mV20C ranges pull the channel into common mode range and check for open input DiffChan Constant The differential channel number on which to make the first measurement When Reps are used subsequent measurements will be automatica...

Страница 131: ...ach of the channels measured Constant Entry Integration 0 200 Flash Conversion 200 2 flash conversions 100 µS apart and averaged 250 500 16000 250 µS multiples of 500 250 µS integrations starting each 500 µS and averaged _60Hz or 16667 16 667 µS reject 60 Hz noise _50 Hz or 20000 20 000 µS reject 50 Hz noise Mult Offset Constant Variable Array or Expression A multiplier and offset by which to scal...

Страница 132: ...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 DiffChan ExChan MeasPEx ExmV RevEx RevDiff SettlingTime Integ Mult Offset X result w mult 1 offset 0 X V V R R s f 2 1 This Instruction applies an excitation voltage and makes two differential voltage measurements then ...

Страница 133: ...ccur on that channel ExChan Enter the excitation channel number to excite the first measurement Constan Alpha Code Code Channel Result VX1 1 Switched excitation channels are switched to the excitation voltage VX2 2 for the measurement and switched off between measurements VX3 3 VX4 4 MeasPEx Constant The number of sensors to excite with the same excitation channel before automatically advancing to...

Страница 134: ...ersions 100 µS apart and averaged 250 500 16000 250 µS multiples of 500 250 µS integrations starting each 500 µS and averaged _60Hz or 16667 16 667 µS reject 60 Hz noise _50 Hz or 20000 20 000 µS reject 50 Hz noise Mult Offset Constant Variable Array or Expression A multiplier and offset by which to scale the raw results of the measurement 7 4 Full Bridges BrFull Dest Reps Range DiffChan ExChan Me...

Страница 135: ...meter Data Type Enter 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 Range Constant Alpha Code Numeric Code Voltage Range mV5000 0 5000 mV mV1000 1...

Страница 136: ...arity reversed to cancel offsets RevDiff Code Value Result Reversing requires twice as much time to complete Constant False 0 Signal is measured with the high side referenced to the low True 0 A second measurement is made after reversing the inputs to cancel offsets SettlingTime Constant The time in microseconds to delay between setting up a measurement switching to the channel setting the excitat...

Страница 137: ...r to drive the current specified Some of the consequences of this are The maximum resistance that can be excited with 2500 µA 5V 0 0025A 2000 Ohms The maximum resistance that can be excited with 1000 µA 5V 0 001A 5000 Ohms The minimum resistance required to fill the 20 mV range 0 02V 0 0025A 8 Ohms The resistance instruction can be used for full bridge measurements were the sensor is calibrated fo...

Страница 138: ...the channel is entered as a negative number all reps occur on that channel IxChan Enter the current excitation channel number to use to excite the first measurement Constant Alpha Code Code Channel Result IX1 1 Current Excitation Channels IX2 2 IX3 3 IX4 4 MeasPEx Constant The number of sensors to excite with the same excitation channel before automatically advancing to the next excitation channel...

Страница 139: ...asurement 7 6 Excitation Continuous Analog Output ExciteCAO CAOChan CAOmV Boost FastUpdate ExciteCAO sets the voltage of a Continuous Analog Output channel The datalogger has two continuous analog out CAO channels These channels are used to provide a continuous analog output The output may be used for proportional control The CAO channels can source 15 mA and sink 5 mA If Boost is enabled sink is ...

Страница 140: ...Parameter Data Type Enter IxChan Enter the current excitation channel number to use to excite the first measurement Constant Alpha Code Code Channel Result IX1 1 Current Excitation Channels IxChan IX2 2 IX3 3 IX4 4 ExuA Constant The excitation current in microamps The allowable range is 2500 µA XDelay Specifies the length of time the current channel is enabled after which the channel is set low an...

Страница 141: ...itation voltage CAO or current channel 7 7 Self Measurements Battery Dest This instruction reads the battery voltage and stores it in the destination variable The units for battery voltage are volts PanelTemp Dest Integ This instruction measures the panel temperature in C Parameter Data Type Enter Dest Variable or Array The Variable in which to store the results of the instruction When Reps are us...

Страница 142: ...mely rapid temperature change and the Calibration instruction is run to update the calibration before each set of measurements 3 The program is run by a repair technician specifically to get the results of the calibration Calibration values are also available in the status table without running a special program If there is not enough time leftover in a fast scan for the background calibration to ...

Страница 143: ...ot an option when there is not time for the automatic background calibration The instruction requires more time because of the multiple measurements for the 250 µs and zero integrations When the results of the calibration are placed in an array the array must have at least 60 elements more if the program contains instructions which use excitations The calibration values will be in the following or...

Страница 144: ... 37 60 Hz rejection 200 mV single ended offset 38 60 Hz rejection 200 mV differential offset 39 60 Hz rejection 200 mV gain 40 60 Hz rejection 50 mV single ended offset 41 60 Hz rejection 50 mV differential offset 42 60 Hz rejection 50 mV gain 43 60 Hz rejection 20 mV single ended offset 44 60 Hz rejection 20 mV differential offset 45 60 Hz rejection 20 mV gain 46 50 Hz rejection 5000 mV single en...

Страница 145: ... on which to make the first measurement If the channel is entered as a negative number all reps occur on that channel Threshold Constant The voltage in millivolts that the input must cross for a count to occur For a signal centered around CR5000 ground Figure 7 8 1 the threshold should be 0 If the input signal is a 0 to 5 V CMOS signal then a threshold of 2500 mV would result in the voltage compar...

Страница 146: ...nput referred hysteresis equals 20 mV divided by the selected voltage gain The effective input referred hysteresis on the 200 mV range is 1 mV Consequently 1 mV of noise on the input signal could cause extraneous counts on the 200 mV range For best results select the largest input range smallest gain that will meet the minimum input signal requirements c Vo s Sensor with DC offset Silicon diodes s...

Страница 147: ...vg function to measure a water content reflectometer that outputs a square wave that can be measured by the datalogger The measured period is converted to volumetric water content using a polynomial Dim Time1 9 array for the realtime instruction Public H20period declaration Const H20percent 0 set value Public H20percent declaration BeginProg Scan 5 Sec 3 0 set 5 second scan rate If Time5 0 Then if...

Страница 148: ...ble Public Flag 8 Flag dimension DataTable TEST Flag 1 1000 Trigger buffer of 1000 Records DataInterval 0 TBLINT1 UNITS1 100 200 mSecs 100 lapses Average 1 Tblk1 FP2 0 Reps Source Res Disable Sample 1 PortStatus FP2 Reps Source Res Disable EndTable End of table TEST BeginProg Program begins here Scan RATE RUNITS 3 0 Scan 500 mSecs PortGet PortStatus 1 Set port 1 high PanelTemp Tref Integ PanelTemp...

Страница 149: ...y The running average can be used to smooth out readings when a low frequency relative to the scan rate causes large fluctuations in the measured frequency from scan to another Code Result 0 Counts 1 Frequency Hz counts scan interval in seconds 1 Running average of frequency The number entered is the time period over which the frequency is averaged in milliseconds Mult Offset Constant Variable Arr...

Страница 150: ...frequency pulse there is an internal 100 kohm pull up resistor to 5 V on the pulse channel This pull up resistor accommodates open collector output devices for high frequency input Larger input transitions are required at high frequencies because of the input RC filter with 1 2 microsecond time constant Signals up to 400 kHz will be counted if centered around 2 5 V with deviations 2 5 V for 1 2 mi...

Страница 151: ...rage the over range will be the value from the PulseCount instruction until 1 second has passed Resetting the average prior to re starting the scan avoids this ReadIO Dest Mask ReadIO is used to read the status of selected control I O channels ports on the CR5000 There are 8 ports The status of these ports is considered to be a binary number with a high port 5 V signifying 1 and a low port 0 V sig...

Страница 152: ... 12 for several seconds SW12 Example This example sets the switched 12 volt supply high at the beginning of each scan and low at the end of the program Const RATE 500 Scan interval number Const RUNITS 1 Scan interval units mSecs Const TBLINT1 200 Table 1 interval number Const UNITS1 1 Table 1 interval units mSecs Dim Tblk1 1 Block 1 dimensioned source Dim Tref Declare reference temperature variabl...

Страница 153: ...ansition will be counted on the rising edge from 1 5V to 3 5V If a 0 is entered the transition will be counted on the falling edge from 3 5V to 1 5V Function The Function parameter has 8 digits Each digit is used to program the results for each port Only one function may be programmed per port The number of values returned is determined by the number of ports for which a result is requested Digit ...

Страница 154: ...ter is used to select which of the ports to set it too is a binary representation of the ports a 1 means set the port according to the source a 0 means do not change the status of the port CRBasic allows the entry of numbers in binary format by preceding the number with B For example if the mask is entered as B110 leading zeros can be omitted in binary format just as in decimal and the source is 5...

Страница 155: ... starting input channel on the multiplexer DiffChan Constant The Differential channel that will be used to make the actual measurements from the AM25T If the channel is entered as a negative number all reps occur on that channel TCType Constant The Thermocouple Type Code Enter 1 to return voltage measurements Tref Variable The variable in which to store read the AM25T reference temperature ClkPort...

Страница 156: ...sult 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 AO4 Source Reps SDMAdress This instruction is used to set the voltage to an SDM AO4 four channel analog output device The AO4 instruction...

Страница 157: ...ich 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 The SDMAddress parameter defines the address of the SDM CAN with which to communicate Valid SDM addresses are 0 through 14 Address 15 is reserved for the SDMTrigger instruction The SDM address is enter...

Страница 158: ...d integer least significant byte first 5 Retrieve data 4 byte IEEE floating point number most significant byte first 6 Retrieve data 4 byte IEEE floating point number least significant byte first 7 Build data frame in SDM CAN memory unsigned integer most significant byte first Overwrite existing data 8 Build data frame in SDM CAN memory unsigned integer least significant byte first Overwrite exist...

Страница 159: ... 28 Read Transmit Receive Overrun and Watchdog errors The errors are placed consecutively in the array specified by the Dest parameter Reset error counters to 0 after reading 29 Read SDM CAN status result is placed into the array specified in the Dest parameter The result codes are as follows Status Description 0000 The SDM CAN is involved in bus activities error counters are less than 96 0001 The...

Страница 160: ...M CAN that was acknowledged by an external node will also be received by the SDM CAN but no retransmission will occur in the event of loss of arbitration or error Frames received correctly from an external node are acknowledged 3 Normal retransmission will occur in the event of loss of arbitration or error Frames received correctly from an external node are acknowledged This is the typical setting...

Страница 161: ...nge from 1 to 64 there are 64 bits in a CAN data frame The SDM CAN can be configured to notify the datalogger when new data is available by setting a control port high 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 nu...

Страница 162: ...alues Const CMULT1 0 4 Multiplier Const COSET1 0 Offset Dim CANBlk1 CANREP1 Dimensioned Dest Aliases and other Variables Alias Canblk1 1 Engine_Speed PROGRAM BeginProg Scan PERIOD P_UNITS 0 0 ____________________ CAN Blocks_______________________ Retrieve Data from CAN bus network Canbus CANBLK1 ADDR1 TQUANT TSEG1 TSEG2 217056256 DTYPE1 STBIT1 NBITS1 NVALS2 CMJLT1 COSET1 Next Scan EndProg CD16AC S...

Страница 163: ...ddress for each subsequent device that it communicates with CS7500 Dest Reps SDMAddress CS7500Cmd Communicates with the CS7500 open path CO2 and H2O sensor See CS7500 manual for more information Parameter Data Type Enter Dest The Dest parameter is the input variable name in which to store the data from each CS7500 associated with this instruction The length of the input variable array will depend ...

Страница 164: ...alue output bandwidth Hz and programmed delay 230 delay 6 579 msec 5 Get CO2 H2O molar density mmol m3 and internal pressure estimate kPa CSAT3 Dest Reps SDMAddress CSAT3Cmd CSAT3Opt Communicates with the CSAT3 three dimensional sonic anemometer See CSAT3 manual for more information Parameter Data Type Enter Dest The Dest parameter is a variable in which to store the results of the measurement Thi...

Страница 165: ...ls the CSAT3 which measurement parameters to use and what frequency to expect the measurement trigger from the datalogger See the table below for a brief description of each of the parameter and the CSAT3 manual for a detailed description Code Description 1 Set Execution Parameter to 1 Hz 2 Set Execution Parameter to 2 Hz 3 Set Execution Parameter to 3 Hz 5 Set Execution Parameter to 5 Hz 6 Set Ex...

Страница 166: ... s channels 1 through 4 The digits represent the channels in descending order left to right For example the code entered for Config8_5 to program channels 8 and 6 to capture the rising edge of a high level voltage and channels 5 and 7 to capture the falling edge of a low level voltage would be 0303 See section 2 of the INT8 manual for information about the specification requirements of high and lo...

Страница 167: ... have a slower period than the execution interval of the datalogger If an edge was not detected for a channel since the last time that the INT8 was polled then the datalogger will not update the input location for that channel The INT8 will capture events even during communications with the datalogger nnnn Averages the input values over nnnn milliseconds The datalogger program is delayed by this i...

Страница 168: ...d Constant or variable The time per bit in microseconds Initial Setting default 30 0 µS Resolution 50 µS Min Setting 8 µS Max Setting 3 mS SDMSpeed 30 gives 30 0 µS SDMSpeed k gives bit_rate INT k 20 Resolution When calculating SDMSpeed k the loggers round down to the next higher bit rate SDMTrigger When SDMTrigger is executed the CR5000 sends a measure now group trigger to all connected SDM devic...

Страница 169: ...ines the address of the CSAT3 with which to communicate Valid SDM addresses are 0 through 14 Address 15 is reserved for the SDMTrigger instruction If the Reps parameter is greater than 1 the datalogger will increment the SDM address for each subsequent CSAT3 that it communicates with The SDM address is entered as a base 10 number unlike older jumper settable SDM instruments that used base 4 Mode T...

Страница 170: ...e SW8A measurement The variable array for this parameter must be dimensioned to the number of Reps Reps Constant The number of channels that will be read on the SW8A If StartChan Reps 1 is greater than 8 measurement will continue on the next sequential SW8A In this instance the addresses of the SDM devices must be consecutive SDMAddress Constant The address of the first SW8A with which to communic...

Страница 171: ... Constant Variable Array or Expression A multiplier and offset by which to scale the raw results of the measurement See the 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...

Страница 172: ...Section 7 Measurement Instructions 7 46 This is a blank page ...

Страница 173: ...igned 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 less than...

Страница 174: ... which takes an angle as its argument and returns the length ratio of the side adjacent to the angle to the hypotenuse ACOS Function Example The example uses ACOS to calculate π By definition a full circle is 2π radians ACOS 0 is π 2 radians 90 degrees Public Pi Declare variables Pi 2 ACOS 0 Calculate Pi AND Used to perform a logical conjunction on two expressions Syntax result expr1 And expr2 Rem...

Страница 175: ...n be any valid numeric expression that has a value between 1 and 1 inclusive The ASIN function takes the ratio of two sides of a right triangle and returns the corresponding angle The ratio is the length of the side opposite to the angle divided by the length of the hypotenuse The result is expressed in radians and is in the range π 2 to π 2 radians To convert degrees to radians multiply degrees b...

Страница 176: ...gle as its argument and returns the ratio of two sides of a right triangle Do not confuse Atn with the cotangent which is the simple inverse of a tangent 1 tangent Atn FunctionExample The example uses Atn to calculate π By definition a full circle is 2π radians Atn 1 is π 4 radians 45 degrees Dim Pi Declare variables Pi 4 Atn 1 Calculate Pi ATN2 The ATN2 function returns the arctangent of y x Synt...

Страница 177: ...a full circle is 2π radians ATN2 1 1 is π 4 radians 90 degrees Dim Pi Declare variables Pi 4 ATN2 5 5 Calculate Pi AvgSpa Dest Swath Source Computes the spatial average of the values in the source array Syntax AvgSpa Dest Swath Source Remarks Find the average of the values in the given array and place the result in the variable named in Dest The Source must be a particular element in an array e g ...

Страница 178: ...ps Source Number Remarks AvgRun is used to create a running average A running average is the average of the last N values where N is the number of values Dest X N i i i N 1 Where X N is the most recent value of the source variable and XN 1 is the previous value X1 is the oldest value included in the average i e N 1 values back from the most recent Parameter Data Type Enter Dest Variable or Array T...

Страница 179: ...e adjacent to the angle divided by the length of the hypotenuse The result lies in the range 1 to 1 To convert degrees to radians multiply degrees by π 180 To convert radians to degrees multiply radians by 180 π Cos FunctionExample The example uses 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 Calcu...

Страница 180: ...value of NumOfCov NumOfCov Constant The number of covariances to be calculated If four data sets are to be compared against a fifth set this would be set to four SizeOfSets Constant The number of values in the data sets for the covariance calculations CoreArray Array The array that holds the core data set The covariance of core data with each of the other sets is calculated independently The data ...

Страница 181: ...urements stored in an array and places the results in an array It can also perform an inverse FFT generating a time series from the results of an FFT Depending on the output option chosen the output can be 0 The real and imaginary parts of the FFT 1 Amplitude spectrum 2 Amplitude and Phase Spectrum 3 Power Spectrum 4 Power Spectral Density PSD or 5 Inverse FFT The difference between the FFT instru...

Страница 182: ...e 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 power spectral density power per herz The Power Spectrum multiplied by T N tau yields the PSD The integral of the PSD over a given bandwidth yields the total power in that band Note that the bandwidth of each value is 1 T herz Inverse FFT The input...

Страница 183: ... 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 the result and then taking the Inverse FFT of the larger array The resolution in the time domain is increased by the ratio of the size of the padded FFT to the size of the unpadded FFT This can be used to increase the resolution of a maximum or minimum as lo...

Страница 184: ...he time into interval allows an offset to the interval The IfTime instruction can be used to set the value of a variable or it can be used as an expression for a condition The scan clock that the IfTime function checks has the time resolution of the scan interval i e it remains fixed for an entire scan and increments for the next scan IfTime must be within a scan to function The window of time in ...

Страница 185: ...lliseconds 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 results based on the outcome of that evaluation Syntax Result IIF Expression TrueValue FalseValue Parameter Data Type Enter Expression The Variable or expression to test Expression or Value Result Variable 0 True return TrueValue 0 False return FalseValue True...

Страница 186: ...1 0 0 1 1 1 Int Fix Return the integer portion of a number Syntax Int source Fix source Remarks The source can be any valid numeric expression Both Int and Fix remove the fractional part of source and return the resulting integer value If the numeric expression results in a Not a Number Int and Fix return a Not a Number The difference between Int and Fix is that if number is negative Int returns t...

Страница 187: ...ollows Logn x Log x Log n The following example illustrates a procedure that calculates base 10 logarithms Log10 Log X Log 10 Log Function Example The example calculates the value of e then uses the Log function to calculate the natural logarithm of e to the first second and third powers Dim I M Declare variables BeginProg M Exp 1 For I 1 To 3 Do three times M Log Exp 1 I Next I EndProg LOG10 numb...

Страница 188: ...ariable in which to store the results of the memory test Variable Result Meaning 0 No problems found 1 Error in CPU RAM 2 Error in Task Memory 3 Error in both CPU RAM and Task Memory MaxSpa Dest Swath Source Finds the maximum value in an array Syntax MaxSpa Dest Swath Source Remarks Find the maximum value in the given array and place the result in the variable named in Dest The Source must be a pa...

Страница 189: ...e in which to store the results of the instruction Swath Constant The number of values of the source array in which to search of the minimum Source Array The name of the variable array that is the input for the instruction MinSpa Function Example This example uses MinSpa to find the minimum value of the five elements Temp 6 through Temp 10 and store the result in the variable MinTemp MinSpa MinTem...

Страница 190: ...n Source reps If source reps is less than destination reps the remainder of destination is filled with that last value of source Parameter Data Type Enter Dest Variable or Array The variable in which to store the results of the instruction Reps Constant The number of repetitions for the measurement or instruction Source Array The name of the variable array that is the input for the instruction Rep...

Страница 191: ...state of Flag 1 Dim A B C Flag 8 Declare variables Public Msg If NOT Flag 1 Then Evaluate expressions Msg 10 Else Msg 100 End If Or Used to perform a logical disjunction on two expressions Syntax result expr1 Or expr2 Remarks If either or both expressions evaluate True result is True The following table illustrates how result is determined If expr1 is And expr2 The result is is is True True True T...

Страница 192: ...to load the previous peak or valley until the next peak or valley is detected DestChange Variable or array Variable or array in which to store the change from the previous peak or valley When a new peak or valley is detected the change from the previous peak or valley is loaded in the destination When a new peak or valley has not yet been reached 0 is stored in the destination When Reps are greate...

Страница 193: ...gered when Change 2 is not 0 Sample 1 PeakV 2 IEEE4 DataTable PV2 holds the peaks and valleys for XY 2 EndTable The Following table is an alternative to using separate tables for each signal It stores both signals whenever there is a new peak or valley in either signal The value stored for the signal that does not have a new peak will be a repeat of its last peak or valley Normally a program would...

Страница 194: ...nt or instruction Source Variable or Array The name of the variable or array that contains the Rs RO value s Mult Offset Constant Variable Array or Expression A multiplier and offset by which to scale the raw results of the measurement See the 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 TCDi...

Страница 195: ...Minute to rTime 5 Alias rTime 6 Second assign the alias Second to rTime 6 Alias rTime 7 uSecond assign the alias uSecond to rTime 7 Alias rTime 8 WeekDay assign the alias WeekDay to rTime 8 Alias rTime 9 Day_of_Year assign the alias Day_of_Year to rTime 9 DataTable VALUES 1 100 set up data table DataInterval 0 1 mSec 0 set up data table Sample 1 Year IEEE4 place Year in VALUES table Sample 1 Month...

Страница 196: ...d 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 DataTable RtoP...

Страница 197: ... Example The example uses the RmsSpa function to RND Source The RND function is used to generate a random number Syntax RND source Remarks The RND function returns a single value less than 1 but greater than or equal to 0 The same random number sequence is generated each time the instruction is encountered because each successive call to the RND function uses the previous random number as a seed f...

Страница 198: ...bridge strain gages refer to the number of active elements i e strain gages 1 2 or 4 respectively Parameter Data Type Enter Dest Variable to store strain in Reps Number of strains to calculate Destination source and zero variables must be dimensioned accordingly BrConfig Bridge configuration code for strain gages The bridge configuration code can be entered as a positive or negative number code Vr...

Страница 199: ... be entered as a constant used for all repetitions or a variable array can be loaded with individual gage factors which are automatically used with each rep To use an array enter the parameter as arrayname with no element number in the parentheses v Poisson ratio enter 0 if it does not apply to configuration StrainCalc Example This example uses StrainCalc to find the microstrain value of a bridge ...

Страница 200: ...on The Rnd function returns a Single value less than 1 but greater than or equal to 0 The value of number determines how Rnd generates a random number Value of number Number returned 0 The same number every time as determined by number 0 The next random number in the sequence 0 The number most recently generated number omitted The next random number in the sequence The same random number sequence ...

Страница 201: ...alue Sgn Source Used to find the sign value of a number Syntax x Sgn source Remarks Returns an integer indicating the sign of a number The argument number can be any valid numeric expression Its sign determines the value returned by the Sgn function If X 0 then Sgn X 1 If X 0 then Sgn X 0 If X 0 then Sgn X 1 Sgn Function Example The example uses Sgn to determine the sign of a number Dim Msg Number...

Страница 202: ...Volt 1 Get input Radians Degrees Pi 180 Convert to radians Ans Sin Radians The Sine of Degrees SinH Source The SINH function returns the hyperbolic sine of an expression or value Syntax x SINH Expr Remarks The SINH function returns the hyperbolic sine SINH x 0 5 ex e x for the value contained in the Expr argument The example uses SINH to calculate the hyperbolic sine of a voltage input Public Volt...

Страница 203: ...er Data Type Enter Dest Variable or Array The variable in which to store the results of the instruction Swath Constant The number of values of the array over which to perform the specified operation Source Array The name of the variable array that is the input for the instruction Tan Source Returns the tangent of an angle Syntax x Tan source Remarks Source can be any valid numeric expression measu...

Страница 204: ...r the value defined in Source TANH Function Example The example uses TANH to calculate the hyperbolic tangent of a voltage input Public Volt1 Ans Declare variables VoltDiff Volt1 1 mV5000 1 True 100 500 1 0 Returns voltage on Channel 1 to Volt 1 Ans TANH Volt1 The Hyperbolic Tangent of Volt1 XOR The XOR function is used to perform a logical exclusion on two expressions Syntax result expr1 XOR expr...

Страница 205: ...Msg True Else Msg False End If Derived Math Functions The following is a list of nonintrinsic mathematical functions that can be derived from the intrinsic math functions provided with CRBasic Function CRBasic equivalent Secant Sec 1 Cos X Cosecant Cosec 1 Sin X Cotangent Cotan 1 Tan X 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...

Страница 206: ......

Страница 207: ...ws the layout of a typical datalogger program and the use of the BeginProg EndProg statements Program variables and the DataTable are defined followed by the code for the main program Define Variables for WindSpeed and Rain Dimension the RealTime array PUBLIC WINDSP PUBLIC RAIN DIM TIME 9 ALIAS TIME 1 YEAR ALIAS TIME 2 MONTH ALIAS TIME 3 DAY ALIAS TIME 4 HOUR ALIAS TIME 5 MINUTES ALIAS TIME 6 SECO...

Страница 208: ...list may contain variables constants or expressions that evaluate to a constant i e do not contain a variable that should be passed into the variables declared in the subroutine Values of variables passed can be altered by the subroutine If the subroutine changes the value of the subroutine declared variable it changes the value in the variable that was passed in If a constant is passed to one of ...

Страница 209: ... an array Subsequent Read picks up where current Read leaves off Parameter Variable destination Restore pointer to Data to beginning Used in conjunction with Data and Read Data Statement Example This example uses Data to hold the data values and Read 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 Th...

Страница 210: ...ficiently long to process all measurements plus the delay period If the delay is applied to the measurement task sequence and the scan interval is not long enough to process all measurements plus the delay the program will not compile when downloaded to the datalogger If the delay is applied to the processing task sequence the program will compile but scans will be skipped Parameter Data Type Ente...

Страница 211: ...tementblock Program lines between the Do and Loop statements that are repeated while or until condition is true Exit Do Only used within a Do Loop control structure to provide an alternate way to exit a Do Loop Any number of Exit Do statements may be placed anywhere in the Do Loop Often used with the evaluation of some condition for example If Then Exit Do transfers control to the statement immedi...

Страница 212: ...es that are stored in the datalogger The FileManage instruction has the following parameters Parameter Data Type Enter Device Filename Text The Device Filename argument is the file that should be manipulated The Device on which the file is stored must be specified and the entire string must be enclosed in quotation marks Device CPU the file is stored in datalogger memory Device CRD the file is sto...

Страница 213: ...ing the file directly to the computer FileMark is placed within a conditional statement in order to write the filemark at the desired time For Next Statement Repeats a group of instructions a specified number of times Syntax For counter start To end Step increment statementblock Exit For statementblock Next counter counter The For Next statement has these parts Part Description For Begins a For Ne...

Страница 214: ...e loop is exited and execution continues with the statement following the Next statement Tip Changing the value of counter while inside a loop can make the program more difficult to read and debug You can nest For Next loops by placing one For Next loop within another Give each loop a unique variable name as its counter The following construction is correct For I 1 To 10 For J 1 To 10 For K 1 To 1...

Страница 215: ...ches performed when condition is true Else Identifies actions taken if condition is not satisfied If the Else clause is not present control passes to the next statement in the program elsepart Statements or branches performed when condition is false The thenpart and the elsepart fields both have this syntax statements GoTo linenumber GoTo linelabel The thenpart and elsepart syntax has these parts ...

Страница 216: ... executed If the first expression is false CRBasic begins evaluating each ElseIf condition in turn When CRBasic finds a true condition the statements immediately following the associated Then are executed If none of the ElseIf conditions is true the statements following the Else are executed After executing the statements following Then or Else the program continues with the statement following En...

Страница 217: ...on sets a time to power up and then shuts off CR5000 power Only the clock continues running while the CR5000 is powered down When the time to power up arrives the power is restored the CR5000 reloads its program from Flash memory and begins running The interval allows the CR5000 to periodically power up and execute a program StartTime is a time value If StartTime is in the future when PowerOff is ...

Страница 218: ... actual application would have measurements within the scan Public Start 6 count Declare the start time array and count Start is initialized to 0 at compile time 0 time is Midnight the start of 1990 count is initialized to 0 at compile time BeginProg Scan 1 SEC 0 120 Scan once per second for 2 minutes Count count 1 Increment counter NextScan PowerOff Start 4 min Power off wake up on 4 minute inter...

Страница 219: ...allows a running program to erase and restart a data table TableName is the name of the table to reset ResetTable Example The example program line uses ResetTable to reset table MAIN when Flag 2 is high If Flag 2 then ResetTable MAIN resets table MAIN Scan Used to establish the program scan rate Syntax Scan Interval Units Option Count Exit Scan Next Scan The measurements processing and calls to ou...

Страница 220: ...he number of scans defined by this Constant Larger buffers can be used for a Scan that has occasional large processing requirements such as FFTs or Histograms and or when processing may be interrupted by communications If a value of 1000 is inserted into the BufferSize argument of a scan having 10 thermocouple measurements 40 000 bytes of SRAM will be allocated for the buffer 4 bytes measurement x...

Страница 221: ...ect If testexpression matches more than one Case clause only the statements following the first match are executed Case Sets apart a group of CRBasic statements to be executed if an expression in expressionlist matches testexpression expressionlist The expressionlist consists of a comma delimited list of one or more of the following forms expression expression To expression Is compare operator exp...

Страница 222: ... 1 To 4 7 To 9 11 13 Select Case statements can be nested Each Select Case statement must have a matching End Select statement Select Case Statement Example The example uses Select Case to decide what action to take based on user input Dim X Y Declare variables If Not X Y Then Are they equal If X Y Then Select Case X What is X Case 0 To 9 Must be less than 10 Run some code Run some code Case 10 To...

Страница 223: ... The SlowSequence instruction allows a group of measurements to be executed at a rate slower than the main program Syntax SlowSequence Remarks The SlowSequence statement marks the end of the main program and begins a low priority program The instructions for this program are executed when the main program is not running as time allows It is possible to have up to four different SlowSequence scans ...

Страница 224: ...ore the lower priority SlowSequence can be sliced in the lower priority SlowSequence will never be performed Each combination of main program and SlowSequence program segments must be evaluated to determine if there is sufficient time to allow lower priority scans to be executed Low priority DataTables can be included in the SlowSequence scan by listing them after the SlowSequence instruction It s...

Страница 225: ...etween subscans Enter 0 for no delay between subscans Units The unit of time for the SubInterval Constant Alpha Code Numeric Code Units usec 0 microseconds msec 1 milliseconds sec 2 Seconds SubRatio Constant The number of times to loop through the subscan each time the scan runs The maximum number is 65 535 Example program CR5000 Example Program showing the use of the SubScan instruction to measur...

Страница 226: ...t High Delay Set Low to clock multiplexer Portset 2 1 Delay 0 20 mSec Portset 2 0 I I 1 The Resistance measurement measures the PRT resistance Resistance PRTResist I 1 mV50 7 Ix1 1 500 True True 0 250 0 01 0 With a multiplier of 0 01 1 100 the value returned is the Resistance Resistance 0 deg the required input for the PRT temperature calculation instruction NextSubScan PRT PRTTemp 1 16 PRTResist ...

Страница 227: ...reset 4 read only Timer Example The example uses Timer While Wend The While Wend instructions are used to executes a series of statements in a loop as long as a given condition is true Syntax While Condition StatementBlock Wend Remarks While Wend loops can be nested The While Wend statement has the following parameters While The While statement begins the While Wend loop control structure Conditio...

Страница 228: ...ctions lie between the While and Wend statements Wend The Wend statement ends the While Wend control structure The Do Loop statement provides more structure and a more flexible way to perform looping While Wend Statement Example This example creates a While Wend that is exited only if Reply is within a range Dim Reply Declare variable While Reply 90 Reply Reply 1 Wend NOTE ...

Страница 229: ...artTime Time Battery Float PanelTemp Float LithiumBattery Integer Boolean CPUSignature Integer DLDSignature Integer ProgSignature Integer PC CardBytesFree Integer MemoryFree Integer DLDBytesFree Integer ProcessTime Integer MaxProcTime Integer MeasureTime Integer SkippedScan Integer SlowProcTime Integer array MaxSlowProcTime Integer array LastSlowScan Integer array SkippedSlowScan Integer array Mea...

Страница 230: ... time and therefore should not be used as a reference temperature for thermocouple measurements LithiumBattery A Boolean variable signaling True 1 if the lithium battery is OK and False 0 if not The lithium battery is loaded and a comparator checked every 4 seconds to verify that the battery is charged CPUSignature The Operating System signature The value should match the value obtained by running...

Страница 231: ...with a value for the system slow scan and each of the users scans LastSlowScan The last time that this slow scan executed If the user has slow scans then this variable becomes an array with a value for the system slow scan and each of the users scans SkippedSlowScan The number of scans that have been skipped in this slow sequence If the user has slow scans then this variable becomes an array with ...

Страница 232: ...on numbers This array contains twenty values corresponding to the 20 integration range combinations These numbers are loaded by the Factory Calibration and are stored in FLASH CalGain Calibration table Gain values Each integration range combination has a gain associated with it These numbers are updated by the background slow sequence if the running program uses the integration range CalSeOffset C...

Страница 233: ...13 7 21 7 22 7 26 8 21 8 24 Cos 6 1 8 7 8 10 8 21 8 24 8 33 CosH 8 7 8 8 8 32 Covariance 6 11 6 12 CS7500 OV 2 7 37 CSAT3 OV 2 7 38 D Data Read Restore 9 3 DataEvent 4 11 6 1 6 4 6 5 6 6 6 7 DataInterval 4 4 4 5 6 1 6 2 6 3 6 4 6 5 6 7 6 18 7 22 7 26 8 23 8 27 9 1 9 18 DataTable EndTable OV 8 2 1 3 7 4 4 4 5 4 9 6 1 6 2 6 4 6 5 6 7 6 8 6 14 6 15 6 18 7 22 7 26 8 21 8 23 8 24 8 27 8 28 9 1 9 2 9 3 ...

Страница 234: ... OV 1 OV 7 OV 8 OV 9 2 3 2 6 7 21 8 23 9 1 9 2 RectPolar 8 24 Reset Table 2 5 6 5 7 26 9 13 Resistance OV 2 OV 3 3 17 3 18 3 19 7 6 7 11 7 12 8 22 RMSSpa 8 25 Rnd 8 22 8 25 8 26 8 28 8 29 RunDLDFile 9 12 9 13 S Sample 2 11 3 7 6 3 6 5 6 7 6 14 6 26 7 22 8 21 8 23 8 24 8 27 9 1 9 18 Scan OV 5 3 7 3 20 3 21 3 22 4 3 4 4 4 6 4 7 6 2 6 4 6 5 6 7 6 15 6 16 6 18 7 13 7 14 7 16 7 17 7 21 7 22 7 23 7 25 7...

Страница 235: ...2 11 4 4 4 5 4 6 5 3 6 2 6 3 6 4 6 5 6 7 6 12 6 13 7 5 7 15 7 22 7 26 7 27 7 28 7 30 7 36 7 42 9 4 9 11 9 13 9 14 9 19 V VoltDiff OV 2 7 3 8 7 8 8 8 30 8 32 9 17 VoltSE OV 2 4 10 7 3 9 17 W While Wend 9 6 9 21 9 22 WorstCase 4 11 6 1 6 6 6 7 WriteIO OV 2 1 11 7 28 ...

Страница 236: ...Index Index 4 This is a blank page ...

Страница 237: ...This is a blank page ...

Страница 238: ...w 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 T...

Отзывы: