Loading...
HomeMy WebLinkAboutCR100 Measurment & Control System-Operator's Manual 1997IVONVIN S.\YOLVUAAdO surement and ontrol System Campbell Scientific, Inc. INTERNATIONAL IEC STANDARD 61400-12 First edition 1998-02 Wind turbine generator systems — Part 12: Wind turbine power performance testing Aérogénérateurs — Partie 12: Techniques de mesure des performances de puissance ; ei Reference number 4 IEC 61400-12:1998(E) Numbering As from 1 January 1997 all IEC publications are issued with a designation in the 60000 series. Consolidated publications Consolidated versions of some IEC publications including amendments are available. For example, edition numbers 1.0, 1.1 and 1.2 refer, respectively, to the base publication, the base publication incorporating amendment 1 and the base publication incorporating amendments 1 and 2. Validity of this publication The technical content of IEC publications is kept under constant review by the IEC, thus ensuring that the content reflects current technology. Information relating to the date of the reconfirmation of the publication is available in the IEC catalogue. Information on the revision work, the issue of revised editions and amendments may be obtained from IEC National Committees and from the following IEC sources: « IEC Bulletin « IEC Yearbook On-line access* ¢ Catalogue of IEC publications Published yearly with regular updates (On-line access)* Terminology, graphical and letter symbols For general terminology, readers are referred to IEC 60050: /nternational Electrotechnical Vocabulary (EV). For graphical symbols, and letter symbols and signs approved by the IEC for general use, readers are referred to publications IEC 60027: Letter symbols to be used in electrical technology, \|EC 60417: Graphical symbols for use on equipment. Index, survey and compilation of the single sheets and |EC 60617: Graphical symbols for diagrams. IEC publications prepared by the same technical committee The attention of readers is drawn to the end pages of this publication which list the IEC publications issued by the technical committee which has prepared the present publication. * See web site address on title page. INTERNATIONAL IEC STANDARD 61400-12 First edition 1998-02 Wind turbine generator systems — Part 12: Wind turbine power performance testing Aérogénérateurs — Partie 12: Techniques de mesure des performances de puissance © IEC 1998 Copyright - all rights reserved — Droits de reproduction réservés No part of this publication may be reproduced or utilized in Aucune partie de cette publication ne peut étre reproduite ni any form or by any means, electronic or mechanical, utilisée sous quelque forme que ce soit et par aucun including photocopying and microfilm, without permission in procédé, électronique ou mécanique, y compris la photo- writing from the publisher. copie et les microfilms, sans l'accord écrit de I'éditeur International Electrotechnical Commission 3, rue de Varembé Geneva, Switzerland Telefax: +41 22 919 0300 e-mail: inmail@iec.ch IEC web site http: /Awww.iec.ch Commission Electrotechnique Internationale PRICE CODE S International Electrotechnical Commission MemayHapoanan SnextporexHnyecnan Homuccun @ For price, see current catalogue -2- 61400-12 © IEC:1998(E) CONTENTS Page FOREWORD... 4 INTRODUCTION .... 5 Clause A mmm GS ahaa rarer rear a a0 9 ww wow sew one wa maces cmse wom s maa dese aeons eos wee mae EATS 6 Amt SCOP Orrerecearreeresss erasers rere eee ep FEET SeeTTrRRNETERET ENT EW eeezaemseseenzvseseesessveses 6 1 2Normative: references ssn sarmrcrsnseersscccme nem rmsenonesoenseroremasasememareenccceceen 6 1.3 Definitions th 1.4 Symbols and units. 9 1.5 Abbreviations... 10 2 Test conditions 11 2i Wind ‘turbine generator system...................nsasqass as spnonesneenssaasaavascanecersaeeoaeeonnaaronsus 11 222) OSU SIUO sarsnessoneear anes caxesesanenncctes vet ee sis «icnmsn amt ou'sosvs devwecaannsccoamaomnanmuonssnannansshdoioaeas 11 3 Test equip OMtscsrssexsccsecnsmemeomenesessman sqm near cen arareeseesaanawestewesmen siwamsieiitiicsteueieice(iieise 3 3.1 iGlectric powel...........:.ses<ssmessseememnees ees ga Tees ERE UTERO ER 13 322) "“WIANG) SHOGCT wesvocs..-.2020000000000acacoansacnieesannsednssnahA At INSEISESBESESSICS ic snouaaousan says TayTaNsaTtRE 13 3 -SE Wind) direction saree. cee cecacecescrentecretrarseete-sosecemseversccsccccrecccececnnenteatecenacneneaanaceesnsece 14 SA MAG ONS ty reareeneereates even acne ceereteeerncsnecencs=-wereeetsr ohana re Vat Wile KiaMiamauccecscvasseceeveres ete me tees 14 3.5 Precipitation 14 3.6 Wind turbine generator system status 14 3.7 Data acquisition system 14 4 Measurement procedure 15 AA. Introduction. «12. 2 =<scssseemnesesseesansseaseneessssasscaneaersumvasesens seas ms we soueuppeeuaecurencunseevensess 15 4.2. Wind. turbine generator system Operation sccscccccsaecwswesssecrosesercasvasesvacssseavesevosversess 15 A-3 Datel CONC CTO acer rencecqer ree rnee oom ose seieioeesio om mi nieledleedlde.cldssceinceineinie annnnnme cn ease sate 15 4.4 Data SQlOCt ON re cresseaccssesncoassoceanensan ay wrap scusigasryrenaausisenwenvasauwanndtaisnen sins snisisse eis aasueiasie 45) 4.5 Data correction sz: a0s0scassessaspsasavsvaas ssosssqrssnecersccsasssnmesssenup opsesoesevesnemeyecenenemenrerers 16 B.C Database nnn. snmnnsannnaennonensined ist 35.052 555% s058s SVUSOU OREN US IESS SSCS SSSI sen C ORE RRERVE RR 16 5} De rivecl FOSCS xsrre a ecre sere ee creres wrens ns swe nett ciom omen os oe amen nancies andl et cdncieinesh nee en STEREN TERE RES 16 S41 Data NormaliZatiOny cere cessneerereneaneweacacqee eran spnergrseemos eu sanaaewawisveiewa aiosletins cn sess aasicsisnancnica 16 5.2 Determination of measured power curve .... 17 5.3 Annual energy production (AEP) 18 5.4 Power coefficient 19 6 Reporting format............cccccccscsssecseceeeceecceceeeeeeeseeceseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 19 Tables 1 Example of presentation of a Measured POWEF CUIVE.........ccecececeeeceteteeeeeetteteeeeeeneneeeee 22 2 Example of presentation of estimated annual energy production ..............cccceceeeeeeeeees 23 61400-12 © IEC:1998(E) -3- Page Figures 4 Requirements as to distance of the meteorological mast and maximum allowed MEASULOMENE SOCIONS xo -nnsce-ccncecancsenevnnsurvowowen sont ussvegueccvedsdueeseececerccecevlssecewaveonnassersvwnss 12 Presentation of example data: power performance test scatter plots.............::cceeee 20 Presentation of example Measured POWEF CUIVE.............ccccssrsrsrerrsssrrsrerssersrreeeseeseees 21 Annexes A_ Assessment of test site.. 24 B_ Calibration of test site. 28 C Evaluation of uncertainty in MeasurEMeNt ....:.......550...sesrsoecsersesneseeccsssescccresensesacereesas 29 D_ Theoretical basis for determining the uncertainty of measurement using the method (Of DINS) cessss00 31 E Bibliography.... 44 =A = 61400-12 © IEC:1998(E) INTERNATIONAL ELECTROTECHNICAL COMMISSION WIND TURBINE GENERATOR SYSTEMS — Part 12: Wind turbine power performance testing FOREWORD 1) The IEC (International Electrotechnical Commission) is a worldwide organization for standardization comprising all national electrotechnical committees (IEC National Committees). The object of the IEC is to promote international co-operation on all questions concerning standardization in the electrical and electronic fields. To this end and in addition to other activities, the IEC publishes International Standards. Their preparation is entrusted to technical committees; any IEC National Committee interested in the subject dealt with may participate in this preparatory work. International, governmental and non-governmental organizations liaising with the IEC also participate in this preparation. The IEC collaborates closely with the International Organization for Standardization (ISO) in accordance with conditions determined by agreement between the two organizations. 2) The formal decisions or agreements of the IEC on technical matters express, as nearly as possible, an international consensus of opinion on the relevant subjects since each technical committee has representation from all interested National Committees. 3) The documents produced have the form of recommendations for international use and are published in the form of standards, technical reports or guides and they are accepted by the National Committees in that sense. 4) In order to promote international unification, IEC National Committees undertake to apply IEC International Standards transparently to the maximum extent possible in their national and regional standards. Any divergence between the IEC Standard and the corresponding national or regional standard shall be clearly indicated in the latter. 5) The IEC provides no marking procedure to indicate its approval and cannot be rendered responsible for any equipment declared to be in conformity with one of its standards. 6) Attention is drawn to the possibility that some of the elements of this International Standard may be the subject of patent rights. The IEC shall not be held responsible for identifying any or all such patent rights. International Standard IEC 61400-12 has been prepared by IEC technical committee 88: Wind turbine generator systems. The text of this standard is based on the following documents: FDIS Report on voting 88/85/FDIS 88/89/RVD Full information on the voting for the approval of this standard can be found in the report on voting indicated in the above table. A bilingual version of this standard may be issued at a later date. Annexes A and C form an integral part of this standard. Annexes B, D and E are for information only. 61400-12 © IEC:1998(E) =5i= INTRODUCTION The purpose of this part of IEC 61400 is to provide a uniform methodology that will ensure consistency and accuracy in the measurement and analysis of power performance by wind turbine generator systems (WTGS). The standard has been prepared with the anticipation that it would be applied by: — the WTGS manufacturer striving to meet well-defined power performance requirements and/or a possible declaration system; — the WTGS purchaser in specifying such performance requirements; — the WTGS operator who may be required to verify that stated, or required, power performance specifications are met for new or refurbished units; — the WTGS planner or regulator who must be able to accurately and fairly define power performance characteristics of WTGS in response to regulations or permit requirements for new or modified installations. This standard provides guidance in the measurement, analysis, and reporting of power performance testing for wind turbine generator systems (WTGS). The standard will benefit those parties involved in the manufacture, installation planning and permitting, operation, utilization, and regulation of WTGS. The technically accurate measurement and analysis techniques recommended in this document should be applied by all parties to ensure that continuing development and operation of WTGS is carried out in an atmosphere of consistent and accurate communication relative to environmental concerns. This standard presents measurement and reporting procedures expected to provide accurate results that can be replicated by others. However, readers should be warned that the site calibration procedure is quite new. As yet there is no substantial evidence that it can provide accurate results for all sites, especially sites in complex terrain. Part of the procedure is based on applying uncertainty calculations on the measurements. In complex terrain situations it is not adequate to state that results are accurate since uncertainties might be 10 % to 15 % in standard deviation. A new measurement standard, accounting for these problems, will be developed in future. -6- 61400-12 © IEC:1998(E) WIND TURBINE GENERATOR SYSTEMS — Part 12: Wind turbine power performance testing 1 General 1.1 Scope This part of IEC 61400 specifies a procedure for measuring the power performance characteristics of a single wind turbine generator system (WTGS) and applies to the testing of WTGS of all types and sizes connected to the electrical power network. It is applicable for the determination of both the absolute power performance characteristics of a WTGS and of differences between the power performance characteristics of various WTGS configurations. The WTGS power performance characteristics are determined by the measured power curve and the estimated annual energy production (AEP). The measured power curve is determined by collecting simultaneous measurements of wind speed and power output at the test site for a period that is long enough to establish a statistically significant database over a range of wind speeds and under varying wind conditions. The AEP is calculated by applying the measured power curve to reference wind speed frequency distributions, assuming 100 % availability. The standard describes a measurement methodology that requires the measured power curve and derived energy production figures to be supplemented by an assessment of uncertainty sources and their combined effects. 1.2. Normative references The following normative documents, through reference in this text, constitute provisions of this part of IEC 61400. At the time of publication, the editions indicated were valid. All normative documents are subject to revision, and parties to agreements based on this part of IEC 61400 are encouraged to investigate the possibility of applying the most recent editions of the standards indicated below. Members of IEC and ISO maintain registers of currently valid International Standards. IEC 60044-1:1996, Instrument transformers — Part 1: Current transformers IEC 60186:1987, Voltage transformers Amendment 1 (1988). Amendment 2 (1995). IEC 60688:1992, Electrical measuring transducers for converting a.c. electrical quantities to analogue or digital signals ISO 2533:1975, Standard atmosphere Guide to the expression of uncertainty in measurement, |SO information publications, 1995, 110 p. ISBN 92-67-10188-9 61400-12 © IEC:1998(E) aye 1.3 Definitions For the purposes of this part of IEC 61400, the following definitions apply. 1.3.1 accuracy closeness of the agreement between the result of a measurement and a true value of the measurand 13332) annual energy production estimate of the total energy production of a WTGS during a one-year period by applying the measured power curve to different reference wind speed frequency distributions at hub height, assuming 100 % availability 1.3.3 availability ratio of the total number of hours during a certain period, excluding the number of hours that the WTGS could not be operated due to maintenance or fault situations, to the total number of hours in the period, expressed as a percentage 1.3.4 complex terrain terrain surrounding the test site that features significant variations in topography and terrain obstacles that may cause flow distortion 1.3.5 data set collection of data that was sampled over a continuous period 1.3.6 distance constant indication of the response time of an anemometer, defined as the length of air that must pass the instrument for it to indicate 63 % of the final value for a step input in wind speed 1.3.7 extrapolated power curve extension of the measured power curve by estimating power output from the maximum measured wind speed to cut-out wind speed 1.3.8 flow distortion change in air flow caused by obstacles, topographical variations, or other wind turbines that results in a deviation of the measured wind speed from the free stream wind speed and in a significant uncertainty 1:3:9 free stream wind speed speed of the undisturbed natural air flow, usually at hub height 1.3.10 hub height (wind turbines) height of the center of the swept area of the wind turbine rotor above the terrain surface NOTE - For a vertical axis wind turbine the hub height is the height of the equator plane. -8- 61400-12 © IEC:1998(E) 1.3.11 measured power curve table and graph that represents the measured, corrected and normalized net power output of a WTGS as a function of measured wind speed, measured under a well-defined measurement procedure 1.3.12 measurement period period during which a statistically significant database has been collected for the power performance test 1.3.13 measurement sector a sector of wind directions from which data are selected for the measured power curve 1.3.14 method of bins data reduction procedure that groups test data for a certain parameter into wind speed intervals (bins) NOTE - For each bin, the number of data sets or samples and: their sum are recorded, and the average parameter value within each bin is calculated. 1.3.15 net electric power output measure of the WTGS electric power output that is delivered to the electrical power network 1.3.16 obstacles stationary obstacles, such as buildings and trees, neighboring the WTGS that cause wind flow distortion 1.3.17 pitch angle angle between the chord line at a defined blade radial location (usually 100 % of the blade radius) and the rotor plane of rotation 1.3.18 power coefficient ratio of the net electric power output of a WTGS to the power available in the free stream wind over the rotor swept area 1.3.19 power performance measure of the capability of a WTGS to produce electric power and energy 1.3.20 rated power quantity of power assigned, generally by a manufacturer, for a specified operating condition of a component, device or equipment NOTE — (Wind turbines) Maximum continuous electrical power output which a WTGS is designed to achieve under normal operating conditions. 1.3.21 standard uncertainty uncertainty of the result of a measurement expressed as a standard deviation 61400-12 © IEC:1998(E) =oe 1.3.22 swept area area of the projection, upon a plane perpendicular to the wind velocity vector, of the circle along which the rotor blade tips move during rotation 1.3.23 test site location of the WTGS under test and its surroundings 1.3.24 uncertainty in measurement parameter, associated with the result of a measurement, which characterizes the dispersion of the values that could reasonably be attributed to the measurand 1.4 Symbols and units A swept area of the WTGS rotor [m7] AEP annual energy production [kWh] Biomin measured air pressure averaged over 10 min [Pa] c sensitivity factor on a parameter (the partial differential) Cp power coefficient in bin i D rotor diameter [m] Ds equivalent rotor diameter [m] D, rotor diameter of neighbouring and operating wind turbine [m] f the relative occurrence of wind speed in a wind speed interval F(V) the Rayleigh cumulative probability distribution function for wind speed I height of obstacle [m] (i width of obstacle [m] cE distance between the WTGS and the meteorology mast [m] tS distance between the WTGS or the meteorology mast and an obstacle [m] ES distance between the WTGS or the meteorology mast and a neighbouring and operating wind turbine [m] M number of uncertainty components in each bin My number of category A uncertainty components Ms number of category B uncertainty components N number of bins N, number of hours in one year = 8760 [h] N number of 10 min data sets in bin i Ny number of pre-processed data sets within a 10 min period Ng number of data samples of pre-processed data sets P, normalized and averaged power output in bin i [kw] n,i,j Promin Tromin 70min m4 Ole 61400-12 © IEC:1998(E) normalized power output [kW] normalized power output of data set j in bin i measured power averaged over 10 min [kW] gas constant J/(kg*K)] uncertainty component of category A measured absolute air temperature averaged over 10 min K] uncertainty component of category B combined standard uncertainty in the estimated annual energy production [kWh] combined standard uncertainty of the power in bin i kW] wind speed [m/s] annual average wind speed at hub height m/s] normalized and averaged wind speed in bin i [m/s] normalized wind speed m/s] normalized wind speed of data set j in bin i m/s] measured wind speed averaged over 10 min m/s] parameter averaged over pre-processing time period parameter averaged over 10 min correlation coefficient reference air density [kg/m*] derived air density averaged over 10 min [kg/m*} standard deviation of pre-processed parameter standard deviation of the normalized power data in bin i [kW] standard deviation of parameter averaged over 10 min 1.5. Abbreviations WTGS wind turbine generator system 61400-12 © IEC:1998(E) -11- 2 Test conditions The specific test conditions related to the power performance measurement of the WTGS shall be well defined and documented in the test report, as detailed in clause 6. 2.1 Wind turbine generator system As detailed in clause 6, the WTGS shall be described and documented to identify uniquely the specific machine configuration that is tested. 2.2 Test site At the test site a meteorological mast shall be set up in the neighbourhood of the WTGS to determine the speed of the wind that drives the wind turbine. The test site may have significant influence on the measured power performance of the WTGS. In particular, flow distortion effects may cause the wind speed at the meteorological mast and at the WTGS to be different, though correlated. The test site shall be assessed for sources of wind flow distortion in order to: — choose the position of the meteorological mast; — define a suitable measurement sector; - estimate appropriate flow distortion correction factors; — evaluate the uncertainty due to wind flow distortion. The following factors shall be considered in particular: — topographical variations; — other wind turbines; — obstacles (buildings, trees, etc.). The test site shall be documented as detailed in clause 6. 2.2.1 Distance of meteorological mast Care shall be taken in locating the meteorological mast. It shall not be located too close to the WTGS, since the wind speed will be slowed down in front of the WTGS. Also, it shall not be located too far from the WTGS, since the correlation between wind speed and electric power output will be reduced. The meteorological mast shall be positioned at a distance from the WTGS of between 2 and 4 times the rotor diameter D of the WTGS. A distance of 2,5 times the rotor diameter D is recommended. The meteorological mast should be positioned within the selected measurement sector. In the case of a vertical axis WTGS, D should be selected as 1,5 times the maximum horizontal rotor diameter. Figure 1 shows the separation requirements between the meteorological mast and the WTGS. It also shows the recommended separation distance of 2,5 times the rotor diameter of the WTGS between the meteorological mast and the WTGS. Da 61400-12 © IEC:1998(E) Meteorology mast at 4 D Distance of meteorology mast to WTGS between 2 Dand 4D; 2,5 Dis recommended . Maximum measurement sector: Disturbed sector due to wake of of WTGS oer 7 oe 0 ‘on meteorology 286° at 4_D mast; sector angle taken from annex A: 103° at2 D 93° at 2,5 D 74° at4D IEC 145/98 Figure 1 — Requirements as to distance of the meteorological mast and maximum allowed measurement sectors 2.2.2 Measurement sector The measurement sector shall exclude directions having significant obstacles, significant variations in topography or other wind turbines, as seen from both the WTGS under test and the meteorological mast. The disturbed sectors to be excluded due to the meteorological mast being in the wake of the WTGS under test are for distances of 2, 2,5 and 4 times the rotor diameter of the WTGS as shown in figure 1. For all other distances between the WTGS under test and the meteorological mast, and for all neighboring wind turbines and obstacles, the directions to be excluded due to wake effects shall be determined using the procedure in annex A. 2.2.3. Correction factors and uncertainty due to flow distortion at the test site If the test site meets the requirements defined in annex A, then no further site analysis is required, and no flow distortion correction factors are necessary. The applied standard uncertainty due to flow distortion of the test site shall be taken to be 2 % or greater of the measured wind speed if the meteorological mast is positioned at a distance between 2 and 3 times the rotor diameter of the WTGS and 3 % or greater if the distance is 3 to 4 times the rotor diameter. If the test site does not meet the requirements defined in annex A, or a smaller uncertainty due to flow distortion of the test site is required, then either an experimental test site calibration or a test site analysis with a three-dimensional flow model, which is validated for the relevant type of terrain, shall be undertaken. 61400-12 © IEC:1998(E) -13- If an experimental test site calibration is undertaken, it is recommended that the procedure in annex B be used. The measured flow distortion correction factors for each sector should be used. The standard uncertainty assigned to the site correction shall be no less than one-third of the maximum correction found within the entire measurement sector and the 60° sector centred on the predominant test wind direction. If a theoretical assessment of the correction factors for the test site is undertaken, using a valid three-dimensional flow model, then sectors less than or equal to 30° should be used. The standard uncertainty assigned to the site correction shall be no less than half of the maximum correction found within the entire measurement sector and the 60° sector centred on the predominant test wind direction. Although the site calibration procedure (annex B) can be used for determination of the performance characteristics of individual wind turbines within a wind power station, it is important to evaluate the consistency of the results in very complex terrain. 3 Test equipment 3.1. Electric power The net electric power of the WTGS shall be measured using a power measurement device (e.g. power transducer) and be based on measurements of current and voltage on each phase. The class of the current transformers shall meet the requirements of IEC 60044-1 and the class of the voltage transformers, if used, shall meet the requirements of IEC 60186. They are all recommended to be of class 0,5 or better. The accuracy of the power measurement device, if it is a power transducer, shall meet the requirements of IEC 60688 and is recommended to be class 0,5 or better. If the power measurement device is not a power transducer then the accuracy should be equivalent to class 0,5 power transducers. The operating range of the power measurement device shall be set to measure all positive and negative instantaneous power peaks generated by the WTGS. As a guide, the full-scale range of the power measurement device should be set to -50 % to 200 % of the WTGS rated power. All data shall be periodically reviewed during the test to ensure that the range limits of the power measurement device have not been exceeded. The power measurement device shall be mounted at the network connection point to ensure that only the net active power output, delivered to the electrical power network, is measured. 3.2 Wind speed Wind speed measurements shall be made with a cup anemometer that is properly installed at hub height on a meteorological mast, at a point that represents the free stream wind flow that drives the WTGS. The wind speed shall be measured with a cup anemometer that has a distance constant of less than 5 m and maintains its calibration over the duration of the measurement period. Calibration of the anemometer shall have been undertaken before and after the completion of the power performance test to a traceable standard. The second calibration can be replaced by an in situ comparison against another calibrated reference anemometer, mounted at a distance of 1,5 m to 2 m from the hub height anemometer, during the measurement period. During calibration, the anemometer should be mounted on a configuration similar to the one to be used during the power performance test. The measurement uncertainty of the anemometer shall be stated. The anemometer shall be mounted within +2,5 % of hub height, preferably on the top of a vertical circular tube standing clear of the top of the meteorological mast. As an alternative, the anemometer may be mounted on a boom clamped to the side of the mast and pointing in the predominant wind direction. -14- 61400-12 © IEC:1998(E) Care shall be taken to minimize flow disturbance experienced in the vicinity of the anemometer. To reduce flow effects, the anemometer shall be mounted so that its vertical separation from any mounting boom is at least 7 times the boom diameter and its horizontal separation from the mast at the anemometer height is at least 7 times the maximum mast diameter; the mast being of a tube, cone, or lattice type. No other instrument shall be mounted so that the flow, incident upon the anemometer, could be disturbed. Any corrections, which are applied to the indicated wind speed to take account of factors such as flow distortion due to the site, shall be reported clearly. The uncertainty in the correction shall also be assessed and reported, and typically shall be no less than half the difference between the corrected and uncorrected value. 3.3. Wind direction Wind direction measurements shall be made with a wind vane that is mounted on the meteorological mast within 10 % of the hub height. Proper attention shall be paid to the positioning of the wind vane to avoid wind flow distortion between the anemometer and the vane. The absolute accuracy of the wind direction measurement should be better than 5°. 3.4 Air density Air density shall be derived from the measurement of air temperature and air pressure using equation (3). At high temperatures it is recommended also to measure relative humidity and to correct for it. The air temperature sensor shall be mounted at least 10 m above ground level. It should be mounted on the meteorological mast close to hub height to give a good representation of the air temperature at the WTGS rotor centre. The air pressure sensor should be mounted on the meteorological mast close to hub height to give a good representation of the air pressure at the WTGS rotor centre. If the air pressure sensor is not mounted close to the hub height, air pressure measurements shall be corrected to the hub height according to ISO 2533. 3.5 Precipitation To distinguish measurements from dry and wet periods, precipitation should be monitored during the measurement period and documented in the test report. 3.6 Wind turbine generator system status At least one parameter that indicates the operational status of the WTGS shall be monitored. The status information shall be used in the process of determining WTGS availability. 3.7. Data acquisition system A digital data acquisition system having a sampling rate per channel of at least 0,5 Hz shall be used to collect measurements and store pre-processed data. End-to-end calibration of the installed data acquisition system shall be performed for each signal. As a guideline, the uncertainty of the data acquisition system should be negligible compared with the uncertainty of the sensors. 61400-12 © IEC:1998(E) -15—- 4 Measurement procedure 4.1 Introduction The objective of the measurement procedure is to collect data that meet a set of clearly defined criteria to ensure that the data are of sufficient quantity and quality to determine the power performance characteristics of the WTGS accurately. The measurement procedure shall be documented, as detailed in clause 6, so that every procedural step and test condition can be reviewed and, if necessary, repeated. Accuracy of the measurements shall be expressed in terms of measurement uncertainty, as described in annex C. During the measurement period, data should be periodically checked to ensure high quality and repeatability of the test results. Test logs shall be maintained to document all important events during the power performance test. 4.2 Wind turbine generator system operation During the measurement period, the WTGS shall be in normal operation, as prescribed in the WTGS operations manual, and the machine configuration shall not be changed. All data collected while the WTGS is unavailable shall be discarded. 4.3 Data collection Data shall be collected continuously at a sampling rate of 0,5 Hz or faster. Air temperature, air pressure and precipitation, and WTGS status may be sampled at a slower rate, but at least once per minute. The data acquisition system shall store either sampled data or pre-processed data sets as described below, or both. The pre-processed data sets shall comprise the following information on the sampled data: — mean value; — standard deviation; — maximum value; — minimum value. The total duration of each pre-processed data set shall be between 30 s and 10 min and shall be 10 min divided by an integer number. Furthermore, if the data sets have a duration of less than 10 min, then adjacent data sets shall not be separated by a time delay. Data shall be collected until the requirements defined in 4.6 are satisfied. 4.4 Data selection Selected data sets shall be based on 10 min periods derived from contiguous measured data. The mean and standard deviation values for each 10 min period shall, when derived from pre- processed data sets, be calculated according to the following equations: 1 Xomin = Ne Lex, (1) ; Sromin = i MNeai TNs (Mromin-Xi)? + of(N5—1)) (2) where N, is the number of pre-processed data sets within a 10 min period; X, is the parameter averaged over pre-processing time period; Xjomin is the parameter averaged over 10 min; =16)= 61400-12 © IEC:1998(E) N, is the number of data samples of pre-processed data sets; 0, is the standard deviation of pre-processed parameter; Siomin is the standard deviation of pre-processed parameter averaged over 10 min. Data sets shall be excluded from the database under the following circumstances: -— WTGS unavailable; — failure of test equipment; — wind directions outside the measurement sector. Data sets collected under special operational conditions (e.g. high blade roughness due to dust, salt, insects, ice) or atmospheric conditions (e.g. precipitation, wind shear) that occur during the measurement period may be selected as a special database, and the selection criteria shall be stated in the measurement report. 4.5 Data correction Selected data sets shall be corrected for flow distortion (see 2.2) and for air pressure if measured at a height other than close to hub height (see 3.4). Corrections may be applied to measurements if it can be shown that better accuracy can be obtained (for example, anemometer corrections for errors due to over-speeding at high turbulence sites). 4.6 Database After data normalization (see 5.1) the selected data sets shall be sorted using the “method of bins” procedure (see 5.2). The selected data sets shall cover a wind speed range extending from 1 m/s below cut-in to 1,5 times the wind speed at 85 % of the rated power of the WTGS. Alternatively, the wind speed range shall extend from 1m/s below cut-in to a wind speed at which "AEP-measured" is greater than or equal to 95 % of "AEP-extrapolated" (see 5.3). The wind speed range shall be divided into 0,5 m/s contiguous bins centred on integer multiples of 0,5 m/s. The database shall be considered complete when it has met the following criteria: - each bin includes a minimum of 30 min of sampled data; — the total duration of the measurement period includes a minimum of 180 h with the WTGS available within the wind speed range. The database shall be presented in the test report as detailed in clause 6. 5 Derived results 5.1. Data normalization The selected data sets shall be normalized to two reference air densities. One shall be the average of the measured air density data at the test site rounded to the nearest 0,05 kg/m*, The other shall be the sea level air density, referring to ISO standard atmosphere (1,225 kg/m’). No air density normalization to actual average air density is needed when the actual average air density is within 1,225 + 0,05 kg/m*. The air density is determined from measured air temperature and air pressure according to the equation: Biomin Ptomin = 3 10min RTigiaia (3) 61400-12 © IEC:1998(E) -17- where Piomin is the derived air density averaged over 10 min; Tiomin is the measured absolute air temperature averaged over 10 min; Biomin is the measured air pressure averaged over 10 min; R_ is the gas constant 287,05 J/(kg x K). For a stall-regulated WTGS with constant pitch and constant rotational speed, data normalization shall be applied to the measured power output according to the equation: Fy = Promin £o (4) P10min where P,, is the normalized power output; Piomin is the measured power averaged over 10 min; Po is the reference air density; Ptomin is the measured air density averaged over 10 min. For a WTGS with active power control, the normalization shall be applied to the wind speed according to the equation: Promin Ve= Van 280 (5) Po where V, is the normalized wind speed; Viomin is the measured wind speed averaged over 10 min; Po is the reference air density; Ptomin is the measured air density averaged over 10 min. 5.2 Determination of the measured power curve The measured power curve is determined by applying the "method of bins" for the normalized data sets, using 0,5 m/s bins and by calculation of the mean values of the normalized wind speed and normalized power output for each wind speed bin according to the equations: y-1y"y, 6 1 Hy Lev jot ni.) (6) 1 N 1 ay je (7) where V, is the normalized and averaged wind speed in bin i; V,,i,j '8 the normalized wind speed of data set j in bin i; P, is the normalized and averaged power output in bin i; P,ij is the normalized power output of data set j in bin i; N, is the number of 10 min data sets in bin i. The measured power curve shall be presented as detailed in clause 6. =485 61400-12 © IEC:1998(E) 5.3 Annual energy production (AEP) The AEP is estimated by applying the measured power curve to different reference wind speed frequency distributions. A Rayleigh distribution, which is identical to a Weibull distribution with a shape factor of 2, shall be used as the reference wind speed frequency distribution. AEP calculations shall be made for annual average wind speeds of 4, 5, 6, 7, 8, 9, 10 and 11 m/s according to the equation: AEP NEM AY) FY (A ° where AEP. is the annual energy production; N, is the number of hours in one year ~ 8760; N_ is the number of bins; V, is the normalized and averaged wind speed V in bin i; P; is the normalized and averaged power output in bin i. m{ V and F(V) = 1- exp |-— (9) ( ) 4 [i J where F(V) is the Rayleigh cumulative probability distribution function for wind speed; Vaye is the annual average wind speed at hub height; V_ is the wind speed. The summation is initiated by setting V_, equal to V,- 0,5 m/s and P,_, equal to 0,0 kW. The AEP shall be calculated in two ways, one designated “AEP-measured”, the other “AEP- extrapolated”. If the measured power curve does not include data up to cut-out wind speed, the power curve shall be extrapolated from the maximum measured wind speed up to cut-out wind speed. AEP-measured shall be obtained from the measured power curve by assuming zero power for all wind speeds above and below the range of the measured power curve. AEP-extrapolated shall be obtained from the measured power curve by assuming zero power for all wind speeds below the lowest wind speed in the measured power curve and constant power for wind between the highest wind speed in the measured power curve and the cut-out wind speed. The constant power used for the extrapolated AEP shall be the power value from the bin at the highest wind speed in the measured power curve. AEP-measured and AEP-extrapolated shall be presented in the test report, as detailed in clause 6. For all AEP calculations, the availability of the WTGS shall be set to 100 %. For given annual average wind speeds, estimations of AEP-measured shall be labelled as "incomplete" when calculations show that the AEP-measured is less than 95 % of the AEP-extrapolated. Estimations of measurement uncertainty in terms of standard uncertainty of the AEP according to annex C, shall be reported for the AEP-measured for all given annual average wind speeds. 61400-12 © IEC:1998(E) -19- The uncertainties in AEP, described above, only deal with uncertainties originating from the power performance test and do not take into account uncertainties due to other important factors. Practical AEP forecasting should account for additional uncertainties, including those concerning: local wind distribution, local air density, high atmospheric turbulence, severe wind shear, variations in the WTGS performance within a wind power station, availability of the WTGS and WTGS performance variations due to blade roughness effects. 5.4 Power coefficient The power coefficient, Cp, of the WTGS may be added to the test results and presented as detailed in clause 6. Cp shall be determined from the measured power curve according to the following equation: A Cop (10) 1 2 poAV? where Cp; is the power coefficient in bin i; V, is the normalized and averaged wind speed in bin i; P; is the normalized and averaged power output in bin i; A_ is the swept area of the WTGS rotor; Po is the reference air density. 6 Reporting format The test report shall contain the following information: — description of WTGS: identification of the specific WTGS configuration under test which includes, as a minimum, the following information: e make, type, serial number, production year, e verified rotor diameter, e rotor speed or rotor speed range, e rated power and rated wind speed, e blade data: make, type, serial numbers, number of blades, fixed or variable pitch, and verified pitch angle(s), e hub height and tower type; — description of test site (see 2.2): the description of the test site shall include photographs of all measurement sectors preferably taken from the WTGS at hub height. A test site map showing the surrounding area covering a radial distance of at least 20 times the WTGS rotor diameter and indicating the topography, location of the WTGS, meteorological mast, significant obstacles, other wind turbines, and measurement sector; — description of grid conditions at the test site, i.e. voltage, frequency and their tolerances; — description of test equipment (see clause 3): identification of the sensors and data acquisition system, including documentation of calibrations for the sensors, transmission lines, and data acquisition system; — description of measurement procedure (see clause 4): documentation of the procedural steps, test conditions, sampling rate, averaging time, measurement period, and test log book that records all important events during the power performance test; — presentation of data (see 4.3 to 4.6): the data shall be presented in both tabular and graphical formats, providing statistics of measured power output as a function of wind speed and of important meteorological parameters. Scatter plots of mean, standard deviation, maximum, and minimum power output as function of wind speed and scatter _20- 61400-12 © IEC:1998(E) plots of mean wind speed and turbulence intensity as function of wind direction for each selected data set shall be presented. Examples of scatter plots of power output for power performance test data are shown in figure 2. Special databases consisting of data collected under special operational or atmospheric conditions should also be presented as described above; presentation of measured power curve for both reference air densities (see 5.1 and 5.2): tabular and graphical representations of the measured power curve shall be provided. The reference air density shall be stated in the graph and in the table. For each bin, the table shall include normalized and averaged wind speed, normalized and averaged power output, number of data sets, and standard uncertainties of category A, category B and combined (determined according to annex C). A graphical plot shall present the same data of wind speed, power output and combined uncertainty as in the table. An example of a measured power curve is provided in table 1 and a graphical plot of the power curve is provided in figure 3. Special power curves consisting of data collected under special operational or atmospheric conditions should also be presented as described above; presentation of estimated AEP (see 5.3): a tabular presentation of the estimated AEP calculated from both the measured and the extrapolated power curve shall be provided. The table shall state the reference air density and the cut-out wind speed. For each annual average wind speed the table shall include AEP measured, uncertainties of AEP measured (determined according to annex C), and AEP extrapolated. The table shall be labelled "incomplete" at annual average wind speeds where AEP measured is less than 95 % of AEP-extrapolated; presentation of power coefficient (see 5.4): tabular and graphical presentations of the power coefficient as a function of wind speed should be provided; uncertainty assumptions on all uncertainty components shall be provided; deviations: any deviations from the requirements of this standard shall be clearly documented in the test report and supported with the technical rationale for each deviation. 1500! | T Standard values | Maximum values |. [oe 1 250) Mean values to si J: Minimum values | , i aa ni ss ioe " ate 1 000 t ; ae aie oop “a = " it S ee x = 750 ; eX OR X & + sai x Ke XK 2 500 5 = + be ir] ex 250 i im oo + Ee , 0 -250 a x id -500 ; 0 2 4} 6 8; 10 12 14 16 18 20 22 Hub height wind speed (m/s) IEC 146/98 Figure 2 — Presentation of example data: power performance test scatter plots 61400-12 © IEC:1998(E) 21 Electric power, air density 1,225 kg/m® (kW) 1500 1250 1000 750 500 250 -250 -500 Figure 3 — Presentation of example measured power curve = zat? "ETE St Ts fe 42 ¢ 32 & & ; 3 -——#$eoopeo8 : 0 4 4 6 8 10 12 14 16 18 20 22 Hub height wind speed (m/s) 1EC) 4a7Ke _22- 61400-12 © IEC:1998(E) Table 1 — Example of presentation of a measured power curve Measured power curve Category A Category B Combined Reference air density 1,225 kg/m? uncertainty uncertainty uncertainty Bin No. i Hub height Power No. of data Standard Standard Standard wind speed output sets N uncertainty uncertainty uncertainty V, P, 10 min s, uy Ue) average m/s kW kW kW kw a 1,59 -0,85 8 0,00 6,31 6,31 2 2,02 -0,74 15 0,08 6,30 6,30 3 2,51 -0,81 18 0,05 6,30 6,30 4 3,04 -0,50 22 0,09 6,30 6,30 5 3,53 -0,67 27 0,10 6,30 6,30 6 4,04 0,16 41 0,67 6,31 6,35 7 4,55 7,32 55 1,02 U2 7,28 8 4,99 25,90 61 f22) 12,45 12,51 9 5,54 61,43 54 1,98 18,40 18,50 10 6,00 93,16 95 1,51 20,13 20,19 11 6,47 129,78 90 1,87 23,71 23,78 12 6,97 174,46 81 2,55 27,32 27,44 13 7,53 231,77 68 2,91 33,10 33,23 14 8,02 283,63 61 2,79 34,56 34,67 15 8,52 339,55 73 3,56 39,19 39,35 16 9,00 387,22 69 3,36 35,38 35,54 17 9,51 445,98 69 2,91 42,88 42,98 18 9,99 504,41 81 2,58 46,23 46,30 19 10,50 565,17 79 2,86 47,72 47,80 20 11,01 620,67 74 3,73 44,69 44,85 21 11,50 680,87 78 3,07 53,04 53,13 22 12,02 731,22 85 3,42 43,10 43,24 23 12,46 770,77 60 4,00 41,44 41,64 24 13,03 820,11 102 2,63 41,46 41,55 25 13,53 850,86 88 3,57 31,81 32,01 26 13,99 884,94 79 4,68 37,79 38,08 27 14,47 923,82 85 3,36 42,99 43,12 28 14,98 940,46 61 4,59 21,13 21,62 29 15,49 956,59 28 7,35 21,01 22,25 30 15,92 972,27 27 7,19 23,81 24,87 31 16,50 990,54 33 3,46 21,99 22,26 32 16,93 994,74 14 7,80 14,15 16,16 33 17,45 987,43 12 3,00 15,38 15,67 34 18,01 976,59 23 10,26 17,36 20,16 35 18,51 980,11 23 4,71 13,58 14,37 36 18,91 984,33 13 6,84 14,52 16,05 37 19,50 954,56 5 12,15 35,38 37,40 38 20,01 975,12 7 9,84 29,91 31,49 39 20,53 934,42 8 9,46 55,36 56,16 40 20,97 952,60 5 11,97 31,26 33,47 61400-12 © IEC:1998(E) -23- Table 2 — Example of presentation of estimated annual energy production Estimated annual energy production Reference air density: 1,225 kg/m* Cut-out wind speed: 25 m/s (extrapolation by constant power from last bin) Hub height AEP-measured Uncertainty of measured AEP-extrapolated annual average (measured power curve) power curve in terms of (extrapolated power curve) wind speed standard deviation of AEP (Rayleigh) m/s MWh MWh, % MWh 4 412 111 27% 412 5 911 154 17 % 911 6 1 536 191 12 % 1 536 7 2 207 219 10 % 2214 8 2 847 236 8% 2 880 9 3 395 245 7% 3 487 10 3 812 248 6% 4001 11 4 092 incomplete 245 6% 4 403 24 - 61400-12 © IEC:1998(E) Annex A (normative) Assessment of test site The test site shall be assessed to determine whether it can meet the requirements in this annex. A.1_ Requirements regarding topographic variations The terrain at the test site shall, up to a certain distance from the WTGS, only show minor variations from a plane which passes both through the base of the tower of the WTGS and the terrain within the sectors specified in table A.1. The slope of the plane and variations of the terrain from the plane shall comply with the requirements provided in table A.1 and shown in figure A.1, where L is the distance between the WTGS and the meteorological mast and D is the rotor diameter of the WTGS. In the case of a vertical axis WTGS, D should be selected as the maximum horizontal rotor diameter. Table A.1 — Test site requirements: topographical variations Distance Sector Maximum slope Maximum terrain % variation from plane <2L 360° <3" <0,08 D 22 Land<4L measurement sector <5* <0,15D 22 Land <4L outside measurement <10** Not applicable sector 24 Land <8L measurement sector <10* <0,25 D The maximum slope of the plane, which provides the best fit to the sectoral terrain and passes through the tower base. ** The line of steepest slope that connects the tower base to individual terrain points within the sector. >4Land<8L Measurement sector slope < 10 % variations < 0,25 D BL 22Land<4L slope <5 % variations < 0,1 D ——— <2L: slope <3 % —— variations < 0,08 D _4L 2L Pe meteorology mast at distance L \ 22Land<4L slope < 10 % WTGS IEC 148/98 Figure A.1 — Requirements to topographical variations, top view 61400-12 © IEC:1998(E) -25- A.2 Requirements regarding neighbouring and operating wind turbines The WTGS under test and the meteorological mast shall not be influenced by neighbouring and operating wind turbines. The minimum distance from the WTGS under test and the meteorological mast to neighbouring and operating wind turbines shall be two rotor diameters Dy of the neighbouring wind turbine. The sectors to exclude due to wakes from neighbouring and operating wind turbines shall be taken from figure A.2. The dimensions to be taken into account are the actual distance L, and the rotor diameter D, of the neighbouring and operating wind turbine. The sectors to exclude shall be derived for both the WTGS under test and the meteorological mast, and they shall be centred on the direction from the neighbouring and operating wind turbine to the meteorological mast or the WTGS. An example is shown in figure A.3. Stopped wind turbines shall be regarded as obstacles. A.3. Requirements regarding obstacles No significant obstacles (e.g. buildings, trees, parked wind turbines) shall exist in the measurement sector within a reasonable distance from the WTGS and meteorological mast. Only small buildings, connected to the WTGS or the measurement equipment, are acceptable. Obstacles smaller than the allowable terrain variations, as defined above, can be neglected. The sectors to exclude due to wakes of significant obstacles shall be taken from figure A.2. The dimensions to be taken into account are the actual distance Le and an equivalent rotor diameter D, of the obstacle. The equivalent rotor diameter of the obstacle shall be defined as: = 2hh (At) Achy e where Dg is the equivalent rotor diameter; |, is the height of obstacle; |, is the width of obstacle. The sectors to exclude shall be derived for both the WTGS under test and the meteorological mast. They shall be centred on the direction from the obstacle to the meteorological mast or the direction from the obstacle to the WTGS. An example is shown in figure A.3. For stopped wind turbines, /, should be set to the total height, and J, to the largest of either the tower diameter close to the nacelle or to the largest blade chord. Disturbed sector o (°) 26 — 61400-12 © IEC:1998(E) Undisturbed a = 2Arctan(2D,/L, + 0,25) or « = 2Arctan(2D,/L, + 0,25) Disturbed 2 4 6 8 10 12 14 16 18 20 Relative distance L,/D, or L,/D, IEC 149/98 Figure A.2 — Sectors to exclude due to wakes of neighbouring and operating wind turbines and significant obstacles 61400-12 © IEC:1998(E) North Neighbouring and operating wind turbine meteorology mast 4, WTGS ; under test / Significant obstacle a8e 8 AZ blDy = 2.5 152,5° disturbed sector = 93° 199°/ a) North Neighbouring 25,5° ' and operating 56 wind turbine y wr 86,5° Meteorology L a dD, mast Ee L,/D, = 6,0 disturbed sector = 61° alt Significant WTGS obstacle under test c) Neighbouring North and operating 1 wind turbine Meteorology # mast LD, = 9.0 : disturbed sector = 51° pie = 79° WA wt “= 104,5° ie Significant WTGS I D 7 obstacle under test |, =23D I, = 13 D D, = 4/9 D e) The figures show the sectors to exclude when: 2 — North Meteorology mast WTGS under test North 1 Meteorology mast | D WTGS under test North no 245,5° a) the meteorological mast is in the wake of the WTGS under test; b) the meteorological mast is in the wake of the neighbouring and operating wind turbine; c) the WTGS is in the wake of the neighbouring and operating wind turbine; d) the meteorological mast is in the wake of the significant obstacle; e) the WTGS is in the wake of the significant obstacle; f) all of the above effects a) to e) are combined. Neighbouring and operating wind turbine, es _81° l, LID, = 3,4 ~ 121° disturbed sector = 80° D, Significant obstacle b) Neighbouring and operating wind turbine LJD, = 7,2 disturbed sector = 56° 4 + — 87° Significant ~ g aw a obstacle ’ 115 =23'D | | 143° 4, =13D De d) 90° : f) 1EC 150/97 Figure A.3 — An example of sectors to exclude due to wakes of the WTGS under test, a neighbouring and operating wind turbine and a significant obstacle =ps— 61400-12 © IEC:1998(E) Annex B (informative) Calibration of test site The aim of an experimental calibration of the test site is to determine the flow distortion correction factors due to the test site topography. Calibration of a test site should be performed by collecting wind speed and wind direction data at hub height on a temporary meteorological mast erected at the foundation where the WTGS to be tested will be erected and at the meteorological mast that will be used for the power performance test. The measurements of wind speeds and wind directions should follow the requirements of clause 3. Data collection should follow the procedures described in 4.3 and data selection should follow 4.4. Data should be sorted in wind direction sectors of a maximum of 30° width. For each wind direction sector, a minimum of 24 h of data at wind speeds ranging from 5 m/s to 10 m/s should be acquired. For the meteorological masts, flow distortion correction factors should be established for each wind direction sector by regressing the measured wind data from the wind turbine location on the measured wind data from the reference mast. The uncertainties connected to the measurement of the flow distortion correction factors should be derived from the measurements. Procedures for the uncertainty analysis as described in annex C should be applied. The estimated uncertainty should be used when applying the flow distortion correction factors, but the uncertainty should not be stated less than required in 2.2.3. 61400-12 © IEC:1998(E) -29- Annex C (normative) Evaluation of uncertainty in measurement This annex addresses the requirements for the determination of uncertainty in measurement. The theoretical basis for determining the uncertainty using the method of bins, with a worked example of estimating uncertainties, can be found in annex D. The measured power curve shall be supplemented with an estimate of the uncertainty of the measurement. The estimate shall be based on the ISO information publication "Guide to the expression of uncertainty in measurement". Following the ISO guide, there are two types of uncertainties: category A, the magnitude of which can be deduced from measurements, and category B, which are estimated by other means. In both categories, uncertainties are expressed as standard deviations and are denoted standard uncertainties. The measurands The measurands are the power curve, determined by the measured and normalized bin values of electric power and wind speed (see 5.1 and 5.2), and the estimated annual energy production (see 5.3). Uncertainties in the measurements are converted to uncertainty in the measurand by means of sensitivity factors. Uncertainty components Table C.1 provides a minimum list of uncertainty parameters that shall be included in the uncertainty analysis. _30- 61400-12 © IEC:1998(E) Table C.1 — List of uncertainty components Measured Uncertainty component Uncertainty Parameter category Electric power Current transformers B Voltage transformers Power transducer or power measurement device Data acquisition system (see below) Variability of electric power Wind speed Anemometer calibration Operational characteristics Mounting effects Data acquisition system (see below) Flow distortion due to terrain Air temperature Temperature sensor Radiation shielding Mounting effects Data acquisition system (see below) Air pressure Pressure sensor Mounting effects Data acquisition system (see below) Data acquisition Signal transmission system y System accuracy Do Din DoO|/D DTD WO\DnwD oO DWw/rDO WD Signal conditioning 61400-12 © IEC:1998(E) -31- Annex D (informative) Theoretical basis for determining the uncertainty of measurement using the method of bins In its most general form the combined standard uncertainty of the power in bin i, u,,; can be expressed by: 7 M wei = Deer Dis Si Ui Oi Uni Phin) (D.1) where c,i is the sensitivity factor of component k in bin i; uy, jis the standard uncertainty of component k in bin i; M is the number of uncertainty components in each bin; P,l,i,, 1S the correlation coefficient between uncertainty component k in bin i and uncertainty component | in bin j (in the expression the components k and | are both in bin i). The uncertainty component is the individual input quantity to the uncertainty of each measured parameter. The combined standard uncertainty in the estimated annual energy production, U,ep, can in its most general form be expressed by: M Uep = NR Diy DLy Skee Eh Oi Ui fF Oj Ui Prati) (D.2) where f is the relative occurrence of wind speed between V,_, and V;: F(V,) — F(V,_4) within bin i; F(V) is the Rayleigh cumulative probability distribution function for wind speed; N_ is the number of bins; N, is the number of hours in one year = 8760. It is seldom possible to deduce explicitly all the values of the correlation coefficients px), and normally significant simplifications are necessary. To allow the above expressions of combined uncertainties to be simplified to a practical level, the following assumptions may be made: — uncertainty components are either fully correlated (9 = 1, implying linear summation to obtain the combined standard uncertainty) or independent (p=0, implying quadratic summation, i.e. the combined standard uncertainty is the square root of summed squares of the uncertainty components); — all uncertainty components (they are of either category A or B) are independent of each other (either they are from the same bin or they are from different bins), except category B uncertainty components, which are fully correlated with category B components of the same origin (e.g. uncertainty in power transducer) in different bins. _32- 61400-12 © IEC:1998(E) Using these assumptions, the combined uncertainty of the power within a bin, u,j, can be expressed by: ub) = IMA ok, sei + OM, RiuRi= 9 + 7 (D.3) where Mg is the number of category A uncertainty components; Mg is the number of category B uncertainty components; S,,| is the category A standard uncertainty of component k in bin i; $; are the combined category A uncertainties in bin i; u; are the combined category B uncertainties in bin i. It should be noted that Ug i2 is not independent of bin size due to the dependency of sp | on the number of data sets in the bin (see equation D.10). The assumptions imply that the combined standard uncertainty in energy production, U,ep, is: ep = NB ODN, fF SMA oki Sti + NR SRE (EN fii Ui)” (0.4) The significance of the second term in this equation is that each individual category B uncertainty component progresses through to the corresponding AEP uncertainty, applying the assumption of full correlation across bins for the individual components. Finally, the cross-bin combined uncertainty components are added quadratically into a resulting AEP uncertainty. In practice, it may not be convenient to sum category B uncertainty components across the bins before they are individually combined. An approximation, allowing the category. B uncertainty components to be combined within bins before they are combined across bins (i.e. s; and u;, can be used), leads to the more convenient expression: wep = NE ON, AP MS ce, Sei + NB (EN fy Gi RP = (D.5) NAIM fP s? + NA(ZMy fui)? The ugep, obtained by this expression is always equal to or larger than that obtained using equation D.4. Expanded uncertainty The combined standard uncertainties of the power curve and the AEP may additionally be expressed by expanded uncertainties. Referring to the ISO guide and assuming normal distributions, intervals having levels of confidence shown in table D.1 can be found by multiplying the standard uncertainties by a coverage factor also shown in the table. 61400-12 © IEC:1998(E) —33— Table D.1 — Expanded uncertainties Level of conneence Coverage factor fo 68,27 1 90 1,645 95 1,960 95,45 2 99 2,576 99,73 3 Example The following example goes through an estimate of the category A and B uncertainties for each bin of a measured power curve. The uncertainty of the power curve is derived, and finally the uncertainty of AEP is estimated. The example follows the ISO guide and the assumptions made above. Using the combination of the category B uncertainty components according to equation D.5, all uncertainty components within each bin can be combined first to express the combined category B uncertainty of each measured parameter, as for example for the wind speed: Ut, = Ui * ait (0.6) where uncertainty components refer to the uncertainty components in table D.2, using symbols and indices as in the table. Secondly, the standard uncertainties of the measurands can be expressed by the uncertainties of the measurement parameters in bin i: wi = 8 + Bi = Oi Wi * Fi hi v Bi Bi (D.7) 2 2 2 2 2 2. = a2lyN 72.2 4 02 Ng 2242.2 URep = Na (2a sp + sw * (=r up * ci UV,i * CT UT i * CBi 4B, * Omi Ym,i ) (0.8) where uncertainties due to the data acquisition system are part of the uncertainty of each measurement parameter and flow distortion due to terrain is included in the uncertainty of wind speed. The uncertainty related to climatic variations, s,,, is evaluated separately. The example only considers the uncertainty components, which shall be included in the uncertainty analysis according to table C.1. The measured power curve, shown in figures 2 and 3 and table 1, is used in the example. The power curve (for lack of pre-processed data sets) is extrapolated with a constant power, which is the power in the last bin, to the stop wind speed of 25 m/s. The results of the uncertainty analysis in the example are also shown in figure 3 and table 1. All sensitivity factors are listed in table D.3, and category B uncertainties are listed in table D.4. Category A uncertainties The only category A uncertainty that needs to be considered is the uncertainty of the measured and normalized electric power data in each bin. -34- 61400-12 © IEC:1998(E) Category A uncertainty in electric power The standard deviation of the distribution of normalized power data in each bin is calculated by the equation: (D.9) where Op; is the standard deviation of the normalized power data in bin i; N, is the number of 10 min data sets in bin i; P, is the normalized and averaged power output in bin i; P,,;; is the normalized power output of data set j in bin i. si] 61400-12 © IEC:1998(E) —35- Table D.2 - List of category B and A uncertainties Category B: Instruments Note Standard Uncertainty Sensitivity Power output Up; Cpi=1 Current transformers : a IEC 60044-1 Ups, Voltage transformers = a IEC 60186 Up? Power transducer or . a IEC 60688 Up3,i Power measurement device . c Up4,i Wind speed uyi Pi - Pis Anemometer . b uys.i Si Vi- Viet Operational characteristics a ed uy2,i Mounting effects * c Uy3,i Air density Pp Temperature Uri on™ 288,15 K Temperature sensor . a Urs, — Pi Radiation shielding . cd Ure,i ; 1013 hPa Mounting effects : U73,) Air pressure ISO 2533 UBi Pressure sensor 2 a UB, Mounting effects 7 c Ug2,i Data acquisition system Ug, i Sensitivity factor is 5 = derived from actual Signal transmission ” b Ug4,i uncertainty parameter System accuracy = cd Ug2,i Signal conditioning = Ug3,i Category B: Terrain Flow distortion due to terrain . be Uys, cy,; (see above) Category B: Method Method Umi Air density correction cd Um4,i Cy, and cg; Method of bins c Um2,i (see above) Category A: Statistical Electric power = e Spi Cpi = Climatic variations e Sw _ * parameter required for the uncertainty analysis NOTE - Identification of uncertainties: a = reference to standard calibration c = other “objective” method d = "guestimate" e = statistics — 36- 61400-12 © IEC:1998(E) The standard uncertainty of the normalized and averaged power in the bin is estimated by the equation: si = spi = Th (D.10) 1 where Sp is the category A standard uncertainty of power in bin i; Op, is the standard deviation of the normalized power data in bin i; N, is the number of 10 min data sets in bin i. Category A uncertainties in climatic variations The power performance test may have been carried out under special atmospheric conditions that affect the test result systematically, such as very stable (large vertical shear and low turbulence) or unstable (little shear and high turbulence) atmospheric stratification or frequent and/or large changes in wind direction. The order of magnitude of this uncertainty can be tested by: a) subdividing the data record into segments, each long enough to have small (statistical) uncertainty on power, b) estimate annual energy production for each of the derived power curves, and c) calculate the standard deviation of the annual energy production estimates. Category B uncertainties The category B uncertainties are assumed to be related to the instruments, the data acquisition system, and the terrain surrounding the power performance test site. If the uncertainties are expressed as uncertainty limits, or have implicit, non-unity coverage factors, the standard uncertainty must be estimated or they must be properly converted into standard uncertainties. NOTE - Consider an uncertainty expressed as an uncertainty limit +U. If a rectangular probability distribution is assumed, the standard uncertainty is: U ore (0.11) If a triangular probability distribution is assumed, the standard uncertainty is: U c= (D.12) Category B uncertainties in the data acquisition system There may be uncertainties from transmission, signal conditioning, analogue to digital conversion, and data processing in the data acquisition system. The uncertainties may be different for each measurement channel. The standard uncertainty of the data acquisition system for the full range of a certain measurement channel, ug, can be expressed as: uai = UGr,i + Uae, i (D.13) where gi, is the uncertainty in signal transmission and signal conditioning in bin i; Ugo,; is the uncertainty in digitization in bin i, for example from quantization resolution; Ug3,; is the uncertainty in other parts of the integrated data acquisition system (software, storage system) in bin i. 61400-12 © IEC:1998(E) -37- We assume in this example the data acquisition system to have a standard uncertainty ug; of 0,1 % of full range of each measurement channel. Category B uncertainties in electric power The uncertainty of the power sensor has uncertainty contributions from current and voltage transformers and from the power transducer. Uncertainties of these subcomponents are normally stated by their classification. The standard uncertainty of the electric power for each bin, up, ;, is calculated by combining the standard uncertainties from the power transducer, the current and voltage transformers and the data acquisition system: (D.14) where Up, is the uncertainty in current transformers in bin i; Up2,, is the uncertainty in voltage transformers in bin i; Up3 i is the uncertainty in the power transducer in bin i; Ugp; is the uncertainty in the data acquisition system for the power channel in bin i. In the example, the current and voltage transformers and the power transducer are all assumed to be of class 0,5. The current transformers of class 0,5 (nominal loads of the current transformers are here designed to match the nominal power, 1 000 kW, and not 200 % of nominal power). They have uncertainty limits, referring to IEC 60044-1, of +0,5 % of the current at 100 % load. At 20 % and 5 % loads, though, the uncertainty limits are increased to +0,75 % and +1,5 % of the current, respectively. For power performance measurements on WTGS, the most important energy production is produced at a reduced power. Thus, we anticipate the uncertainty limits of +0,75 % of the current at 20 % load to be a good average. The uncertainty distribution is assumed to be rectangular. The uncertainties of the three current transformers are assumed to be caused by external influence factors such as air temperature, grid frequencyn etc. They are therefore assumed fully correlated (an exception from the general assumption) and are summed linearly. As each current transformer contributes by one-third to the power measurement, it follows that the uncertainty of all current transformers is proportional to the power as follows: _ 0,75 %- Pi[kW] 1 upti =e 3 3 = 0.43% A IKW] (D.15) The voltage transformers of class 0,5, have uncertainty limits, referring to IEC 60186, of +0,5 % of the voltage at all loads. The uncertainty distribution is assumed to be rectangular. The grid voltage is normally rather constant and independent of the WTGS power. The uncertainties of the three voltage transformers are as for the current transformers assumed to be caused by external influence factors such as air temperature, grid frequency, etc. They are therefore assumed fully correlated (an exception from the general assumption) and are summed linearly. As each voltage transformer contributes by one-third to the power measurement, it follows that the uncertainty of all voltage transformers is proportional to the power as follows: %.?p. up2,i = 0,5 % + Pi[kW] 4 3 = 0,29 %- Pi[kW] (D.16) 3 3 -38- 61400-12 © IEC:1998(E) If current and voltage transformers are not operated within their secondary loop operational load limits, additional uncertainties shall be added. The power transducer of class 0,5, referring to IEC 60688, with a nominal power of 2 000 kW (200 % of the nominal power, 1 000 kW, of the WTGS) has an uncertainty limit of 10 kW. The uncertainty distribution is assumed to be rectangular. The uncertainty of the power transducer is thus: up3,i = ee 5,8 kW (D.17) v3 Considering the electric power range of the measurement channel to be 2 500 kW and an uncertainty of the data acquisition system of 0,1% of this range, the standard uncertainty from the electric power sensor for each bin is: up, = (0,43 % - Pi[kW])? + (0,29 % » P\[kW])?+ (5.8 KW)2+ (0.1% - 2 500 kW)? = (0,52 % - P;[kW])? + (6,3 kw Category B uncertainties in wind speed (D.18) The uncertainty of the wind speed measurement is a combination of several uncertainty components. Usually, the most important ones are flow distortion due to the terrain, the mounting effects on the anemometer, and the uncertainty of the anemometer calibration. If the terrain complies with the terrain requirements of annex A the flow distortion due to the terrain is determined as 2 % or 3 %, dependent on the distance of the meteorological mast from the WTGS. If an experimental test site calibration is undertaken according to annex B, the standard uncertainty derived from the calibration shall be used, but it may not be less than one-third of the maximum flow distortion. If a test site analysis with a three-dimensional flow model is undertaken an uncertainty not less than one-half of the maximum flow distortion shall be used. The flow distortion due to mounting effects (boom and mast effects) might be considerable unless the anemometer is mounted on a tube on top of the mast. The uncertainty of the anemometer calibration and the uncertainty due to operational characteristics (over-speeding, cosine response, sensitivity to temperature and air density) might be dominating in the measurement. The category B uncertainty from wind speed in bin i, uy, can be expressed as: Wi = Ubi + U2 + U3,i * Ua * Uy, (0.19) uy; is the uncertainty of the anemometer calibration in bin i; Uy2,, is the uncertainty due to operational characteristics of the anemometer in bin i; Uy3,; is the uncertainty of flow distortion due to mounting effects in bin i; Uy4,; is the uncertainty of flow distortion due to the terrain in bin i; Ugy,, is the uncertainty in the data acquisition system for the wind speed in bin i. The sensitivity factor is determined as the local slope of the measured power curve: Pi- Pin D.20 Vi-Vi-1 ( ) o,i = The standard uncertainty of the anemometer calibration is estimated to be 0,2 m/s. Uncertainty due to operational characteristics of the anemometer is estimated to be 0,5 % of the wind 61400-12 © IEC:1998(E) —39- speed. The standard uncertainty of the flow distortion due to mounting effects is estimated to be 1 % of the wind speed, and the flow distortion due to the terrain is estimated to be 3 % of the wind speed. Considering a wind speed range of 30 m/s of the measurement channel and an uncertainty of the data acquisition system of 0,1 % of this range, the standard uncertainty from wind speed in each bin is: uyi=y(0,2m/s)? +(0,5 % -vilm/s])?+ (1%-Vilm/s])?+ (3%: Vim/s])*+ (0,1%-30m/s)? eat =/(3,2%-Vi{m/s])*+(0,20m/s)* Category B uncertainties in air density The air density is derived from measurements of the air temperature and the air pressure. The measurement of the air temperature might include the following uncertainty components: — uncertainty of the temperature sensor calibration; — uncertainty due to imperfect radiation shielding of the temperature sensor (bad shielding raises the temperature at the sensor); — uncertainty due to mounting effects (vertical air temperature profile variations from day to night influence the estimate of temperature if the temperature sensor is not at hub height). The standard uncertainty in measured air temperature for each bin, uj), can be expressed as: ur,i = Vurti 2 UF + 3 i +t Uar, (D.22) where uy; is the uncertainty of temperature sensor calibration in bin i; U7? i is the uncertainty due to imperfect radiation shielding of temperature sensor in bin i; u73,, is the uncertainty due to mounting effects of temperature sensor in bin i; Ugr,; are the uncertainties in data acquisition system for the air temperature in bin i. The sensitivity factor for the air temperature measurement is, for sea-level conditions, estimated by: = Pi Ti * 288,15 [kW / kK] (D.23) The measurement of the air pressure sensor might include first a correction factor to correct the air pressure to hub height if the sensor is not positioned at hub height. An uncertainty due to the correction might be considered, and the uncertainty (calibration) of the pressure sensor shall be included. The standard uncertainty in measured air pressure for each bin, ug;, is: uBi = \UB1,i + Ube + Ue; (D.24) where Ugi,,_ is the uncertainty of air pressure sensor calibration in bin i; Uge,_ is the uncertainty due to mounting effects of air pressure sensor in bin i; Ugg, are the uncertainties in data acquisition system for the air pressure in bin i. The sensitivity factor for the air pressure measurement is, for sea level conditions, estimated by: -40- 61400-12 © IEC:1998(E) Pi Bi ~ 7943 [kW / hPa] (D.25) The uncertainty due to the relative humidity might be significant if the average air temperature is high. At sea level and at an air temperature of 20 °C the air density varies 1,2 % between 0 % and 100 % relative humidity. It varies 2,0 % and 4,0 % at 30 °C and 40 °C, respectively. Thus, at high temperatures it is recommended to measure the relative humidity and to correct for it. The influence of the relative humidity is not taken into account in this example. The standard uncertainty of the temperature sensor is assumed to be 0,5 °C. The shielding of the temperature sensor is assumed to produce a standard uncertainty of 2 °C. The standard uncertainty due to mounting effects of the temperature sensor is dependent on the vertical distance from the hub height. Above 10 m a standard uncertainty of 1/3 °C per 10 m from hub height is assumed, and if mounted below 10 m, an additional standard uncertainty of 1 °C is assumed. With the sensor at a level of 2 m above ground and a hub height of 30m, the standard uncertainty due to mounting effects is 1,9°C. Considering a temperature range of 40 °C of the measurement channel and an uncertainty of the data acquisition system of 0,1 % of this range, the expression for the standard uncertainty of the air temperature in each bin is: uri = (0.5 K)* + (2,0 K)2+ (1,9 K)2+(0,1 %- 40K)? = 2,8 K (D.26) The pressure sensor is estimated to have a standard uncertainty of 3,0 hPa. It is assumed that the pressure is corrected to the hub height according to ISO 2533 (which, for a standard atmosphere and a height difference of 28 m between the sensor and the hub, is 3,4 hPa). The uncertainty due to deployment is estimated to be 10 % of the correction, which is 0,34 hPa. Considering a pressure range of 100 hPa of the measurement channel and an uncertainty of the data acquisition system of 0,1 % of this range, the expression for the standard uncertainty of the air pressure is: upi = ¥(3,0 hPa)* + (0,34 hPa)? +(0,1%-100 hPa)? = 3,0 hPa (D.27) Combined category B uncertainties The category B uncertainties in each bin are combined as: i= uBj+ oF; wit Fi uit Bj i (D.28) = (1 14%: P; [kW])?+(6,3 kW)*+ cf ((3,2%-Vj [m/s])2+ (0,20m/s)?) Combined standard uncertainty — Power curve The combined standard uncertainties of each bin of the power curve are found by combining the category A uncertainty with all the category B uncertainties. 2 _ 224,22 4,2 2 ucizy 8? Fu; =f 82 tu2 j+e8 | UV it eT UT it eB UB i = 83 jt (1,14 % Pi [kW])?+(6.3kW)?+02 { (3,2 %-Vilm/s])*+(0,20m/s)*) (0.29) 61400-12 © IEC:1998(E) -41- Combined standard uncertainty - Energy production The combined standard uncertainty of AEP is found by combining individually the category A and B uncertainties bin-wise: N. 52 62 2 uaeP=Nhy >-1 fs +(2M fi uy) =n Stu oB,+( 20 fiy(t.t4 %- Pi [kW])?+ (6,3 KW)? +08, (3,2 % -Vilm/s])? +(0,20 mis?) | (D.30) ~49 = 61400-12 © IEC:1998(E) Table D.3 - Sensitivity factors Power curve Sensitivity factors Bin No. Wind speed Electric power Wind speed Air temperature Air pressure i Vv, Pi ays ar; api ms”! kw kwW/ms"! kW/K kW/hPa 1 1,59 -0,85 -1,71 0,00 0,00 2 2,02 -0,74 0,26 0,00 0,00 3 2,51 -0,81 -0,14 0,00 0,00 4 3,04 -0,50 0,57 0,00 0,00 5 3,53 -0,67 -0,33 0,00 0,00 6 4,04 0,16 1,60 0,00 0,00 7 4,55 7,32 14,15 0,03 0,01 8 4,99 25,89 41,94 0,09 0,03 9 5,54 61,43 64,60 0,21 0,06 10 6,00 93,16 68,84 0,32 0,09 11 6,47 129,78 79,25 0,45 0,13 12 6,97 174,46 88,47 0,61 0,17 13 7,53 231,77 103,46 0,80 0,23 14 8,02 283,63 103,93 0,98 0,28 15 8,51 339,55 113,87 1,18 0,34 16 9,00 387,22 98,50 1,34 0,38 17 9,51 445,98 115,67 1,55 0,44 18 9,99 504,41 120,47 1,75 0,50 19 10,50 565,17 119,84 1,96 0,56 20 11,01 620,67 107,78 2,45 0,61 21 11,50 680,87 124,37 2,36 0,67 22 12,02 731,22 96,45 2,54 0,72 23 12,46 770,77 89,68 2,67 0,76 24 13,03 820,11 86,27 2,85 0,81 25 13,53 850,86 62,13 2,95 0,84 26 13,99 884,94 73,13 3,07 0,87 27 14,47 923,82 81,68 3,21 0,91 28 14,98 940,46 32,89 3,26 0,93 29 15,49 956,59 31,44 3,32 0,94 30 15,92 972,27 36,74 3,37 0,96 31 16,50 990,54 31,49 3,44 0,98 32 16,93 994,74 9,75 3,45 0,98 33 17,45 987,43 -14,09 3,43 0,97 34 18,01 976,59 19,21 3,39 0,96 35 18,51 980,11 7,07 3,40 0,97 36 18,91 984,33 10,51 3,42 0,97 37 19,50 954,56 50,46 3,31 0,94 38 20,01 975,12 40,31 3,38 0,96 39 20,53 934,42 —78,58 3,24 0,92 40 20,97 952,60 40,87 3,31 0,94 61400-12 © IEC:1998(E) - 43 Table D.4 — Category B uncertainties Bin no. Electric power Wind speed Air temperature Air pressure i Upi Uy &yiX Uys Uri OriX Uri UBi Mei UB; kW ms! kW K kW hPa kW 1 6,30 0,21 -0,35 2,80 -0,01 3,00 0,00 2 6,30 0,21 0,06 2,80 -0,01 3,00 0,00 3 6,30 0,22 -0,03 2,80 -0,01 3,00 0,00 4 6,30 0,22 0,13 2,80 0,00 3,00 0,00 5 6,30 0,23 -0,08 2,80 -0,01 3,00 0,00 6 6,30 0,24 0,38 2,80 0,00 3,00 0,00 7 6,30 0,25 3,50 2,80 0,07 3,00 0,02 8 6,30 0,26 10,74 2,80 0,25 3,00 0,08 9 6,31 0,27. 17,27 2,80 0,60 3,00 0,18 10 6,32 0,28 19,09 2,80 0,91 3,00 0,28 11 6,34 0,29 22,81 2,80 1,26 3,00 0,38 12 6,36 0,30 26,51 2,80 1,70 3,00 0,52 13 6,41 0,31 32,39 2,80 2,25 3,00 0,69 14 6,47 0,33 33,83 2,80 2,76 3,00 0,84 15 6,54 0,34 38,49 2,80 3,30 3,00 1,01 16 6,61 0,35 34,54 2,80 3,76 3,00 1,15 17 6,71 0,36 42,11 2,80 4,33 3,00 1,32 18 6,82 0,38 45,43 2,80 4,90 3,00 1,49 19 6,95 0,39 46,86 2,80 5,49 3,00 1,67 20 7,08 0,41 43,68 2,80 6,03 3,00 1,84 21 7,23 0,42 52,08 2,80 6,62 3,00 2,02 22 7,36 0,43 41,81 2,80 7,11 3,00 2) AT 23 7,47 0,45 40,01 2,80 7,49 3,00 2,28 24 7,61 0,46 39,90 2,80 7,97 3,00 2,43 25 7,70 0,48 29,63 2,80 8,27 3,00 2,52 26 7,80 0,49 35,86 2,80 8,60 3,00 2,62 27 7,92 0,50 41,20 2,80 8,98 3,00 2,74 28 7,98 0,52 17,08 2,80 9,14 3,00 2,79 29 8,03 0,53 16,80 2,80 9,30 3,00 2,83 30 8,08 0,55 20,10 2,80 9,45 3,00 2,88 31 8,14 0,56 17,77 2,80 9,63 3,00 2,93 32 8,15 0,58 5,63 2,80 9,67 3,00 2,95 33 8,13 0,59 -8,36 2,80 9,59 3,00 2,92 34 8,09 0,61 -11,72 2,80 9,49 3,00 2,89 35 8,10 0,63 4,42 2,80 9,52 3,00 2,90 36 8,12 0,64 6,70 2,80 9,56 3,00 2,92 37 8,02 0,66 -33,06 2,80 9,28 3,00 2,83 38 8,09 0,67 27,04 2,80 9,48 3,00 2,89 39 7,96 0,69 -53,95 2,80 9,08 3,00 2,77 40 8,01 0,70 28,62 2,80 9,26 3,00 2,82 -—44- 61400-12 © IEC:1998(E) Annex E (informative) Bibliography The following standards can be relevant to the use of this standard: IEC 61400-1:1994, Wind turbine generator systems — Part 1: Safety requirements IEC 61400-2:1996, Wind turbine generator systems — Part 2: Safety of small wind turbines : ae Standards Survey We at the IEC want to know how our standards are used once they are published. The answers to this survey will help us to improve IEC standards and standard related information to meet your future needs Would you please take a minute to answer the survey on the other side and mail or fax to: Customer Service Centre (CSC) International Electrotechnical Commission 3, rue de Varembé Case postale 131 1211 Geneva 20 Switzerland or Fax to: CSC at +41 22 919 03 00 Thank you for your contribution to the standards making process. Nicht frankieren Ne pas affranchir A Prioritaire Non affrancare No stamp required REPONSE PAYEE SUISSE Customer Service Centre (CSC) International Electrotechnical Commission 3, rue de Varembé Case postale 131 1211 GENEVA 20 Switzerland as No. of IEC standard: 2: Tell us why you have the standard. (check as many as apply). | am: the buyer the user a librarian a researcher an engineer a safety expert involved in testing with a government agency in industry oooo0goo0goo0go0g oon other... Ce This standard was purchased from? 4. This standard will be used (check as many as apply): for reference in a standards library to develop a new product to write specifications to use in a tender for educational purposes for a lawsuit for quality assessment for certification for general information for design purposes for testing onoooooooo0000 a This standard will be used in conjunction with (check as many as apply): IEC Iso corporate other (published by.. other (published by ooo0o0ag0n0 other (published by.. Cd This standard meets my needs (check one) not at all almost fairly well exactly Boe 7. Please rate the standard in the following areas as (1) bad, (2) below average, (3) average, (4) above average, (5) exceptional, (0) not applicable: O_sclearly written O siogically arranged 0 information given by tables O illustrations 0 technical information 8. | would like to know how | can legally reproduce this standard for: 0 __sinternal use O -ssales information 0 product demonstration O_sother... In what medium of standard does your organization maintain most of its standards (check one): paper microfilm/microfiche mag tapes CD-ROM floppy disk on line ooo0000 © A. If your organization currently maintains part or all of its standards collection in electronic media, please indicate the format(s): Osraster image O full text 10. In what medium does your organization intend to maintain its standards collection in the future (check all that apply): 0 _spaper 0 microfilm/microfiche Ol mag tape O CD-ROM O floppy disk O online 10A. For electronic media which format will be chosen (check one) 0 sraster image O full text ls My organization is in the following sector (e.g. engineering, manufacturing) 12. Does your organization have a standards library: O yes O no 13. If you said yes to 12 then how many volumes: 14. Which standards organizations published the standards in your library (e.g. ISO, DIN, ANSi, BSI, etc.): 15. My organization supports the standards-making process (check as many as apply): 0 _sbuying standards 0 susing standards membership in standards organization Os serving on standards development committee O soother... 16. My organization uses (check one) O_sFrench text only Os English text only O _sBoth English/French text 47. Other comments: 18. Please give us information about you and your company turnover/sales: Publications de la CEI préparées par le Comité d’Etudes n° 88 61400:— Aérogénérateurs. 61400-1 (1994) Partie 1: Spécifications de sécurité. 61400-2 (1996) _ Partie 2: Sécurité des petits aérogénérateurs. 61400-12 (1998) (Publiée en langue anglaise uniquement) Publication 61400-12 IEC publications prepared by Technical Committee No. 88 61400. — Wind turbine generator systems. 61400-1 (1994) Part 1: Safety requirements. 61400-2 (1996) Part 2: Safety of small wind turbines. 61400-12 (1998) Part 12: Wind turbine power performance testing. ISBN 2-8318-4247-6 9 "7828319842479 ICS 27.180 Typeset and printed by the IEC Central Office GENEVA, SWITZERLAND Attention: You may need to update your computer or PDA software to communicate with the CR1000 on this order. The CR1000 on this order has Operating System: CR1000.Std.04.obj Communicating with the CR1000 requires one of the following software products: PC Software: LoggerNet version 3.1.3 or later PC400 version 1.2.1 or later PC200W version 3.0.1 or later (free software) DevConfig version 1.3 or later (free software) PDA Software: PConnect version 3.2 or later PConnectCE version 2.0 or later Using an earlier version of software may result in communication errors and incorrect error messages. The free software and patches to update the other software packages are available on the web at: http://www.campbellsci1.com/downloads Free patches to update software are only available if you have a copy with the same major version number as the update. For example, if you have PConnect version 3.0 or later, the patch to version 3.2 is free. _—»GEC GLOBAL ENERGY CONCEPTS THE Wind Resource Wind Turbine Generator System Power Performance Test Plan for the Toksook Bay Wind Power Project November 7, 2005 Prepared for: Alaska Energy Authority 813 West Northern Lights Blvd. Anchorage, Alaska 99503 5729 Lakeview Drive NE, Suite 100, Kirkland, Washington 98033 Phone: (425) 822-9008 Fax: (425) 822-9022 www.globalenergyconcepts.com Power Performance Test Plan for the Toksook Bay Wind Power Project Table of Contents 1 INTRODUCTION. 1.1 BACKGROUND............ “a 1.2 SCOPE OF THE TEST PLAN. 1.3 TEST OVERVIEW 2 SITE SELECTION...........cccsososcscscssssncssesessossessnscscssssosovoncscscsssssssssosososessesssssesesssceresesocacocoeces 4 3 DESCRIPTION OF TEST EQUIPMENT ......ccccssssesesssessssessesescncsceeseseseesssnssencscnsacseesenees 5 3.1 THE MET TOWER AND BOOMS 32 EQUIPMENT ON THE MET TOWER 3.3 MET TOWER TO WIND TURBINE CABLING... 3.4 | EQUIPMENT IN WIND TURBINE 35 POWER TRANSDUCER 3.6 CURRENT EQUIPMENT STATUS 4 DATA COLLECTION. ...........c.cccccccsccsssssssecssescnsoscssesosscensscscesscescsececesevesssesssssssncosecosoccececoees 9 5 DATA REVIEW AND QUALITY CONTROL .......ccccccssssesessssessseeeesseeeseseseeseseseeseeeseeees 10 6 DATA ANALYSIS AND REPORTING .....cccscsssssssssssseccsesseseseeseesseseseseesessneesesesesseeeeeseee 10 7 EXCEPTIONS TO STANDARD PRACTICE......ccccscssssssesessesessesesessesesesscseesseseseneseneees 10 BS CIE DU Di Bittacscecascscaseecocnonscscqesecesecacsseescatearaca usracetcacacececacacreacensatessucrseresseceetiststecasarevesecsrsrs 11 8.1 TEST COMMENCEMENT 8.2 TEST COMPLETION 9 ROLES AND RESPONSIBILITIES. ......cccsssesesssscesesscesesesesesesecseeesesessssssseneeeeneseaeseenes 11 10) IREEERENGES xitiscscoscsccocscccaceccscevscsccsssssssescssorcsscscstscstscsescssecesesessescerestorasessnesseseocssacessseneeess 13 APPENDIX A —- IEC STANDARD FOR INSTRUMENT MOUNTING APPENDIX B - GEC BOOM CONFIGURATION APPENDIX C —- CAMPBELL SCIENTIFIC CR1000 SPECIFICATIONS APPENDIX D - WT AND CT INSTALLATION INSTRUCTION Global Energy Concepts, LLC 1 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project List of Figures Figure 1. Location of the met tower. Figure 2. Photo of the goalpost boom.... Figure 3. Detail of the goalpost boom to NRG tower connection Figure 4. NRG wind vane boom List of Tables Table 1. Sensors Installed on Met Tower Table 2. Equipment in Met Tower Enclosure Global Energy Concepts, LLC 2 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project 1 Introduction 1.1 Background The Alaska Village Electric Cooperative (AVEC) installed three Northern Power Systems (NPS) NorthWind 100 (NW 100) wind turbines in Toksook Bay in late 2005. Global Energy Concepts, LLC (GEC) is providing services to the Alaska Energy Authority (AEA) to plan, conduct, and report on one power performance test that, at a minimum, meets the requirements of the IEC 61400-12 power performance test standard [1] and fulfills the requirements of the AIDEA/AEA contract AEA06-006. Additionally, GEC plans to meet the requirements of the IEC 61400-121 draft power performance measurement standard [2] and the Measnet power performance measurement procedure [3]. All exceptions to these standards due to time and budgetary constraints will be documented and included in the uncertainty analysis. In addition to testing the performance of this particular turbine, a calibration will be done between the nacelle-mounted anemometer and the free-stream wind speed as measured by the met tower. 1.2 Scope of the Test Plan This test plan is intended to provide all parties with an understanding of the work to be completed before the power performance test commencement. A description of the test equipment is given as well as installation instruction. Included is a breakdown of tasks to be competed by each involved party. Any questions or concerns about the test plan should be directed to GEC. 1.3 Test Overview The basic premise of the power performance test is to measure the hub-height wind speed and power produced from a wind turbine over a range of wind speeds to generate a power curve. The measured power curve can then be used to evaluate the performance of the wind turbine. Major equipment required to perform the test includes: e A hub-height met tower in the vicinity of the test turbine Sensors to measure meteorological conditions A data acquisition system to record data Power transducers in the turbine Communications equipment to transfer collected data Met tower distance to the test turbine, data reduction methods, sensor requirements, acceptable boom configurations, valid wind direction sector determination, and many other specifics are detailed in the IEC and MEASNET test standards [1, 2, 3]. The purpose of these test standards is to provide a uniform methodology that will ensure consistency, accuracy, and reproducibility in the measurement and analysis of power performance by wind turbines [1]. A GEC engineer will participate in a site visit with AEA to install the test equipment and commission the test. Global Energy Concepts, LLC 3 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project 2 Site Selection Based on the site layout and topographic map provide by AEA, it was determined that Turbine 2 is the most suitable for the power performance test. To comply with IEC Standards, the met tower must be placed 2-4 rotor diameters from the test wind turbine, preferably at 2.5 rotor diameters. The terrain to the northeast of Turbine 2 is the least complex of the three turbines, and the difference between the wind speed the met tower and turbine rotor will be minimized. The monthly wind roses provided by AEA indicate that the prevailing winds during the test period will come from the northeast. The location of the met tower as specified by GEC is shown in Figure 1. This location was chosen to allow for a met tower position that meets the requirements of the standards, results in a met tower elevation above sea level that is similar to the test turbine elevation and allows the prevailing wind directions to be included in the valid direction sector for the measurement. Figure 1. Location of the met tower Global Energy Concepts, LLC 4 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project 3 Description of Test Equipment 3.1 The Met Tower and Booms A 30-m tall, 6-in diameter NRG tilt-up met tower was installed for use in the power performance test. To position the anemometers at the above ground level turbine hub height of 33.2 m, an additional 1.5-m tower section and guy wire set will be added to the top of the existing tower. The tower section and guy wires will be provided and installed by AEA. A custom boom (the “goalpost boom”) designed by GEC to be compliant with the IEC 61400- 121 draft standard will be installed on the top section of the met tower. Details of these boom requirements are given in Appendix A and a drawing of the GEC boom configuration is given in Appendix B. The standard specifies that the wind speed be measured within 2.5% of the turbine hub height; the goalpost boom will position the centerline of the anemometers at the turbine hub height. All boom sections and hardware will be provided by GEC. A GEC engineer will provide on-site instruction for the boom assembly and installation. Photos of the goalpost boom can be seen in Figure 2 and Figure 3. Figure 2. Photo of the goalpost boom Global Energy Concepts, LLC 5 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project Figure 3. Detail of the goalpost boom to NRG tower connection An additional standard NRG wind vane boom will be mounted at 30 m on the met tower and will be provided by GEC. A diagram and photo of the wind vane boom can be seen in Figure 4. Figure 4. NRG wind vane boom The temperature and barometric pressure sensors will be mounted directly to the met tower and hardware will be provided by GEC. 3.2 Equipment on the Met Tower The met tower will be instrumented with sensors to measure wind speed, wind direction, barometric pressure, temperature, and precipitation, as required by the test standards. Additional anemometers may be installed by AEA, but are not required for the power performance test. Table | specifies the sensors to be installed on the met tower. Global Energy Concepts, LLC 6 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project Table 1. Sensors Installed on Met Tower Model — Anemometer i P2546A 1029 Anemometer i P2546A 1441 Wind Vane #200P NA Barometric Pressure Met One 90D 26/32-1 TBD Temperature Met One 83D-1-35 C1433 Wetness Campbell Scientific 237 NA ‘Orientation from tower in degrees true north. 7Elevation above ground level. A NEMA 4X enclosure containing the data logger and auxiliary equipment will be installed near the base of the met tower. All items in this enclosure will be assembled prior to the site visit by GEC and AEA. The components installed in the met tower enclosure are listed in Table 2. Table 2. Equipment in Met Tower Enclosure ~ Component Manufacturer — Model Serial # Data Logger Campbell Scientific CR1000 2942 12 Ahr Battery Campbell Scientific 8065 NA Charger/Regulator Campbell Scientific CH100 LLAC4 Campbell Scientific LLAC4 Network Interface Campbell Scientific NL100 AC Transformer Campbell Scientific 9591 Omron LYIN 24 VDC Relay DIN mount AC outlet Specifications for the Campbell Scientific CR1000 data logger can be found in Appendix C. The CR1000 has been tested for an extended range of -55° to +85°C in anticipation of low temperatures in Toksook Bay. Each sensor on the met tower has its own cable that will be run down the tower and into the enclosure. Prior to lifting the met tower, all sensor cables will be terminated by GEC at the datalogger and checked for reasonable signals. A detailed wiring table will be provided to AEA prior to the installation. Global Energy Concepts, LLC Uh November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project 3.3 Met Tower to Wind Turbine Cabling Three cables will be run over the ground between the enclosure on the met tower and the base of the wind turbine. All cables are rated for outdoor use and direct burial; however, the cable will be contained in conduit provided and installed by AVEC. The data cable consists of four twisted pairs of 20 AWG conductors. Each pair has one black and one white wire and wires are numbered in pairs (e.g., white 1 and black 1 compose one pair). The data cable will carry signals from the turbine PLC for the nacelle anemometer, rotor rpm, turbine status, and watt transducer. One end of the data cable will be terminated in the data logger terminals in the enclosure at the base of the met tower, the other end will be terminated in the controller at the turbine. The twisted pairs are shielded and the outside diameter of the cable is 0.369 inches. The communication cable is an outdoor rated Category 6 cable, which will be used to transfer data from the datalogger to the Ethernet switch in Turbine 2. The communication cable will be cut to length and RJ-45 connectors will be installed on site by GEC. The outside diameter of the communication cable is approximately 0.25 inches. The power cable consists of three 12 AWG conductors in a shielded cable. The power cable will be used to provide 120 VAC power (less than 1 amp) to the datalogger from the base of Turbine 2. The outside diameter of the power cable is 0.388 inches. 3.4 Equipment in Wind Turbine Three signals from the turbine Program Logic Controller (PLC) are required for the test as per the AEA requirements'. These signals include nacelle wind speed, rotor rpm, and turbine status. Minor changes in the PLC code are required to output these signals. Any changes in the code will be made by NPS and will not affect the operation of the turbine. The nacelle wind speed and rotor rpm signals will be output as 0-10 VDC from existing terminals on the PLC. GEC will install two signal conditioners (one for each signal), which will convert, and electrically isolate, the 0-10 VDC signals into 4-20 mA signals. A 24 VDC power supply will also be installed to power the signal conditioners and will require 120 VAC. The signal conditioners and the 24 VDC power supply are designed to mount on a DIN rail. Ideally these items would be mounted on existing DIN rail inside the controller if approximately 3 inches of extra rail are available. If extra rail is not available, additional DIN rail can be mounted in the controller by AVEC. Each signal will use a twisted pair from the data cable. The turbine status signal will be output as a digital signal (0 or 24 VDC). One pair from the data cable will be terminated at the PLC for this signal. This signal will be electrically isolated through a relay in the met tower enclosure. GEC will make all terminations (or advise AVEC personnel) during the site visit. ' Only turbine status is needed to meet the IEC standard requirements; however, AEA is interested in characterizing the nacelle to free-stream wind speed relationship and GEC requested measuring the rotor rpm to facilitate data reduction and filtering. Global Energy Concepts, LLC 8 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project 3.5 Power Transducer A calibrated watt transducer (WT) and three current transformers (CTs) will be installed to measure the net active electric power from the wind turbine. This class 0.3 power transducer meets the requirements of the IEC Standards. GEC will provide the WT and CTs, but AVEC will be responsible for determining the best location and installing these items. The watt transducer will require 110 AC power (7 VA) and a voltage tap must be installed on each phase. For the installation of the current transformers and watt transducer, please refer to the detailed instructions in Appendix D. 3.6 Current Equipment Status The met tower sensors, data acquisition system, power transducers, booms, and cables have all been purchased and will be delivered to AEA. The goalpost boom and wind vane boom were shipped to the AEA warehouse. All other items listed above will be shipped to Mia Devine at the AEA offices. AEA will be responsible for transporting these materials to Toksook Bay for the installation. The WT, CTs, and the three cables that will be run between the met tower and Turbine 2 have shipped and will be delivered to: Attn: Kenny Johnson AVEC power plant Toksook Bay, Alaska 99637 4 Data Collection Data are sampled at 1 Hz and stored as 10-minute records in the datalogger. The CR1000 data logger is capable of storing approximately ten days of 10-minute data before records begin to be overwritten. Additional memory can be added to the logger at AEA’s request; however, memory limitation is not expected to be a problem. The data will be collected over the Ethernet LAN to a PC in the power plant on a daily basis. This PC will be on at all times, running the LoggerNet 3.5.1 software to communicate with the datalogger. LoggerNet will be scheduled to automatically collect data and store it in a text file on the local hard drive. Requirements for the PC to run LoggerNet are listed below: LoggerNet is a collection of 32-bit programs designed to run on Intel-based computers running Microsoft Windows operating systems. The recommended minimum computer configuration for running LoggerNet is Windows NT, Windows 2000, or Windows XP because they offer the most stable operating environment. LoggerNet may also run Windows 98 if operations such as open screens are limited so as not to exhaust the operating system’s resources. All installations require at least a Pentium II or equivalent processor, a minimum of 128 MB of RAM, a minimum of 100 MB free space on the hard disk, and TCP/IP support installed. Global Energy Concepts, LLC 9 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project A remote desktop connection will be setup on the power plant PC, which will allow GEC or AEA the ability to: View live signals from the sensors Load programs onto the datalogger Make changes to the data collection schedule Collect data from the datalogger to the power plant PC At least twice weekly AEA will transfer data from the power plant PC to GEC. The PC will be provided and installed by AEA. AVEC will determine the location of the PC in the power plant and provide an Ethernet switch. AVEC will to inform AEA of firewall issues, security, etc. 5 Data Review and Quality Control Following on-site checkout of the equipment, data collection will begin. During data collection, data will be collected by AEA and will be delivered to GEC offices where they will be checked for quality, archived, and distributed as requested by AEA. GEC will utilize established quality- control procedures that will allow for early detection of any problems. Procedures include scatter plots and time-series plots to scan for irregular signals. These procedures will be applied to each of the data sets delivered to GEC. GEC will inform AEA promptly if any errors or irregularities are apparent in the collected data. GEC will be available by phone to help troubleshoot equipment or other problems during the test. 6 Data Analysis and Reporting Preliminary analysis of the data will be part of the quality review. This analysis will allow us to determine when the minimum database size requirements have been met and whether continued data collection is necessary. GEC will provide regular progress reports. These summaries will include bin counts of valid data, scatter plots of power performance and nacelle wind speed to free-stream wind speed correlation data, and time-series plots of relevant signals. A final report will be written and submitted in draft form to the involved parties. After comments are received, a final report will be submitted. All final analysis will be conducted per the test standards. AEA estimates the test will continue until May 2006. 7 Exceptions to Standard Practice Exceptions to the IEC 61400-12 standard and draft 61400-121 standard include: 1. The topography of the Toksook Bay site exceeds the maximum slope and maximum terrain variation from plane requirements of the IEC standard, and thus requires a site calibration measurement. A site calibration measurement quantifies the effect of terrain and obstacles on the power performance measurement by concurrently measuring wind Global Energy Concepts, LLC 10 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project speed at the met tower and turbine location prior to turbine construction. No site calibration measurement was made due to the construction schedule of the turbines. 8 Schedule 8.1 Test Commencement At AVEC’s recommendation, engineers from AEA and GEC will plan to be in Toksook Bay during the week of December 5 to install the test equipment and commission the test. All cables should be pulled through conduit and the power transducer should be installed by AVEC prior to this site visit. The Ethernet LAN shall be operational by the time of the site visit. 8.2 Test Completion The test will be complete when a minimum of 180 hours of valid data are obtained and when each 0.5 m/s wind speed bin contains at least 30 minutes of data, as per the IEC standards. Data are considered valid when: e Turbine is available and running without faults e Wind direction is within the valid measurement sector ¢ No problems are noted with the data acquisition system e Sensors are not experiencing ice or rime buildup Once sufficient data are obtained to fulfill these requirements, GEC will inform AEA that the test is complete. AEA will then be responsible for removing all test equipment. A detailed explanation of data filters and a valid sector analysis will be included in the final report. 9 Roles and Responsibilities Consistent with responsibility breakdown outlined in the contract, GEC suggests the following major tasks be assigned to AEA or AVEC as appropriate: e Install all required met towers, sensors, cabling, and enclosures based on GEC specifications. e Provide conduit for cabling between the met tower and Turbine 2 and install cable in conduit prior to the GEC site visit. e Provide and install one additional 1.5-m section and upper level guy cables on the met tower. e Provide logistical assistance (on-site housing and transportation) to GEC during the instrument installation oversight activities e Review test plan and other GEC work product. e Transport all test materials to Toksook Bay from the AEA offices in Anchorage. e Maintain the PC in the power plant, collect data 2-3 times a week. Global Energy Concepts, LLC 11 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project Install WT and CTs, including power for WT and voltage tap installation (AVEC recommended for this task). Provide two 120 VAC outlets (or terminals) and breakers in the turbine base for logger and signal conditioner power. Remove all materials upon completion of the test. GEC suggests the following tasks be assigned to NPS: Provide an Ethernet switch in the base of Turbine 2. The datalogger will use the Ethernet network to deliver data to a PC in the power plant. Write additional code in the Turbine 2 PLC to output nacelle wind speed and rotor rpm as 0-10 VDC signals and specify the output voltage relationship to engineering units. Provide wiring instruction for all signals from the turbine PLC. GEC will to perform the following tasks for the testing, based on the requirements set forth in the AIDEA/AEA contract AEA06-006: Check all signals for reasonableness and calibrate signals as required during site visit. Instrumentation specification, purchase, calibration (through vendors) and installation specification (requirements for the installation of sensors, wiring, brackets, booms, and enclosures). Review test equipment installation records to ensure accuracy and conformance to GEC requirements (GEC will provide documentation templates for AVEC’s completion). Ensure data collection scheme is adequate and robust. Preliminary analysis of collected data to verify all sensors are working properly. Document the test setup. Incorporate comments and develop final test plan. Field oversight during instrument installations for documentation and checkout. Test supervision including data quality control and troubleshooting support. Data analysis and progress and final reporting. Follow up on reviewers’ comments and questions. Provide technical training to AEA on power performance measurement including furnishing a test plan template, MS Excel data templates, data logger programs, and other relevant files/software. Global Energy Concepts, LLC 12 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project 10 References 1. Wind Turbine Generator Systems, Part 12: Wind Turbine Power Performance Testing, IEC 88/85/FDIS, Project 88/61400-12, International Electrotechnical Commission, Netherlands, 1998. 2. Wind Turbine Generator Systems, Part 121; Wind Turbine Power Performance Testing, IEC 88/85/FDIS, Project 88/61400-12, International Electrotechnical Commission, Netherlands, DRAFT. 3. Power Performance Measurement Procedure, Measnet, Version 3, November 2000. Global Energy Concepts, LLC 13 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project Appendix A IEC Standard for Instrument Mounting Global Energy Concepts, LLC November 7, 2005 10 15 20 25 30 59 88/185/CDV Annex G (normative) Mounting of instruments on the meteorology mast Appropriate arrangement of instruments on the meteorological mast is important for accurate wind turbine testing. In particular, the anemometer shall be located to minimize flow distortions, especially from mast and boom influences. The least flow distortion of an anemometer is found by mounting the anemometer on top of the meteorology mast. When anemometers are mounted on booms along the mast, flow distortion from both the mast and the boom shall be taken into account. Other instruments on the mast should be mounted close to hub height but in a way that avoids interference with the anemometer. G.1 Preferred method of top mounting of anemometer The preferred method for mounting the anemometer is on top of the meteorological tower with no other instruments or equipment nearby. All provisions of this section must be met in order to achieve negligible distortion of the wind measurements. The anemometer shall be mounted on a small-diameter, round vertical tube, which carries the cable to the anemometer inside. The tube shall be no larger in diameter than the body of the anemometer and shall support the anemometer cups at least 0,75m above the meteorological tower and any other flow disturbances. The bracket connecting the anemometer to the vertical tube shall be compact, smooth, and symmetrical. If necessary to hold the anemometer steady, the small-diameter vertical tube may be mounted on another, larger-diameter tube in order to ensure that no parts of the meteorological mast extend beyond a 1:5 cone whose vertex is at the height of the anemometer cups. Other instruments must be positioned at least 1,5m below the anemometer cups. These instruments and their supporting brackets to a boom may extend beyond the 1:5 cone. Figure G.1 shows an example of a top mounting configuration. Hub height relative \ ‘ to ground at met mast. Ojf@ 7 Minimum 0,75m Vertical tube - _ es A No flow disturbances alowed Rekwonn) 209 above this line i Mast top IN \ se 4 Mast shall be within 1:5 cone 4| \- No other instruments on booms (mast centre to cone relative NA \ above this line to vertical distance to anemometer) \ Figure G.1. Example of a top-mounted anemometer and requirements for mounting 10 15 20 25 30 60 88/185/CDV G.2. Alternate method of top mounting of anemometer Alternate methods of anemometer mounting shall be considered to have increased uncertainty in wind speed measurement due to flow distortion. Relatively small distortion is obtained when two cup anemometers are top mounted side-by-side with adequate separation from the tower and each other. In the side-by-side arrangement the two vertical tubes and anemometer mounting brackets shall meet the requirements described in Section G.1. The anemometer cups must be mounted above the boom by a minimum of 15 times the boom diameter, but 25 times the boom diameter is recommended. The anemometers shall be separated by at least 1,5m and no more than 2,5m. Figure G.2 shows an example of a side-by-side configuration. The primary cup anemometer shall be defined before the test begins. The other anemometer is the control anemometer. The measurement sector shall be restricted so that the control cup anemometer does not affect the primary cup anemometer. The uncertainty due to flow distortion of other instruments and mast and boom must be determined. Minimum 1,5m and maximum 2,5m _ __ _ Hub height relative b ee ‘ op to ground at met mast oe 1 Minimum 0,75m | | Minimum 4,5m | Minimum 15 times { | boom diameter No flow disturbances alowed {| 1] Recommended 25 times above this line | | boom diameter ens wes 4 y | Nother instruments on Boom | above this line Figure G.2. Example of alternate top-mounted primary and control anemometers positioned side-by-side and wind vane and other instruments on the boom. G.3___ Lightning protection A lightning finial (attractor) can protect the top mounted instruments. If lightning protection is installed, a number of precautions shall be taken: ¢ the lightning finial should be mounted at the top of the mast such that it affords the top mounted anemometers with a 60° protection umbrella and such that the anemometer never is in the wake of the finial when the wind is in the measurement sector ¢ an adequately sized earth connection should be strapped to the tower base e the flow distortion on the anemometer shall be assessed, and an additional uncertainty shall be added G.4 Mounting of other meteorological instruments If a control anemometer is used it should be located close to the primary anemometer in order to provide a good correlation between the two instruments during the test. This correlation should be validated to ensure that the primary anemometer does not change its calibration during the test. However, the control anemometer may not interfere with the primary anemometer. 10 15 61 88/185/CDV The wind vane shall be mounted minimum 1,5m below the primary anemometer but within 10% of hub height based on its distance above ground level at the meteorological mast. It shall be mounted so that flow distortion effects are minimized with respect to the measurement sector. Temperature and pressure sensors should be located close to hub height on the meteorological mast minimum 1,5m below the primary anemometer. The temperature sensor shall be mounted in a radiation shield. The pressure sensor may be mounted in a weatherproof box. However, care should be taken to ensure that the box is properly vented so that pressure readings are not influenced by the pressure distribution around the box. Examples of suitable arrangements for other boom-mounted instruments and top-mounted anemometers are shown in Figures G.3 and G.4. _ Hub height relative f to ground at met mast op - en | Free tube | 1 . Minimum 0,75m |) —Mentical tube —__________ 4 | | \ 1 eee eee ih | Minimum 1,5m and | | Maximum 2,5m mast within 1:5 cone (mast centre to cone relative Mast top to vertical distance to anemometer) ob — % Control anemometer should be mounted || as described in clause G.5 Figure G.3. Example of a top-mounted anemometer and mounting of control anemometer, wind vane and other sensors on a boom 10 15 20 25 62 88/185/CDV Minimum 1,5m and maximum 2,5m = = I Hub height relative f on to ground at met mast op Minimum 0,75m Minimum 1,5m and Minimum 15 times ' maximum 10% of hub height | boom diameter {] f] Recommended 25 times | | | | boom diameter | || | ! Boom _|| a ! Mast top al Mast box with pressure sensor Figure G.4. Example of top-mounted primary and control anemometers positioned side- by-side and wind vane and other instruments on the boom. G.5 Boom mounting of cup anemometers Boom-mounted cup anemometers are influenced by flow distortion of both the mast and the boom. The influence of a round tubular boom is 0,5% for a distance of the cup rotor 15 boom diameters above the boom. Flow distortion due to booms should be kept below 0,5%. An anemometer operating in the wake of the meteorological mast is highly disturbed. Such measurements may not be used in power performance measurements. Flow distortion upstream of the mast can be significant. Adequate separation must be allowed between the cup anemometer and the mast to keep flow distortion effects to an acceptably low level. Guidance for appropriate anemometer — tower separation is given in clauses G.5.1 and G.5.2. Wakes from tower guys can have a strong influence on cup anemometers over surprisingly long distances. Location of cup anemometers in the vicinity of upstream guys shall be avoided. It is largely up to the user to determine what degree of disturbance and hence uncertainty is acceptable, but a suitable aim should be to avoid mast and boom induced flow distortions greater than 1% and 0,5%, respectively. Meteorological masts can either be of cylindrical or lattice construction. The required separation of the anemometer from the tower depends upon the type of mast and solidity. G.5.1 Tubular meteorological masts An approximation to the flow disturbance in the vicinity of a tubular mast can be obtained from Figure G.5. This figure shows an iso-speed plot of the flow around a tubular mast from a Navier-Stokes analysis. Least disturbance can be seen to occur if facing the wind at 45°. More generally, it can be seen that there is a retardation of the flow upwind of the mast, acceleration round it, and a wake behind it. Power Performance Test Plan for the Toksook Bay Wind Power Project Appendix B GEC Boom Configuration Global Energy Concepts, LLC November 7, 2005 RISOE SS ae STAINLESS STEEL STUB MAST —/. 48.3 mm 1 1/2" SCHED » 80 AL PIPE 2 PLCS SEPERABLE JOINTS FOR SHIPPING (2 PLCS) 960.3 mm 2" SCHED 80 AL PIPE 1 40m 1.6m (2.4m) 2.5m 33.2m 0.375" ALUMINUM MOUNTING. PLATE FOR BOOMS (DETAIL NOT SHOWN) WIND VANE, TEMPERATURE AND BAROMETRIC wen PRESSURE SENSORS NOT SHOWN MOUNTED AT 30 m ABOVE GROUND $152 ———3 GROUND ! CLM GEC GLOBAL ENERGY CONCEPTS THE Wind Resource 5729 lokeview Drive NE Suite 100 Kirkland. Washingion 98033 USA p 4258229008 # 4258229022 www.globalenergyconcepts.com WMA TOP-MOUNT ANEMOMETR BOOMS FOR AEA TOKSOOK BAY MEASUREMENT] 7 NOVEMBER 2005 C. HENDERSON GLOBAL ENERGY CONCEPTS 425.822.9008 X. 231 Power Performance Test Plan for the Toksook Bay Wind Power Project Appendix C © Campbell Scientific CR1000 Specifications Global Energy Concepts, LLC November 7, 2005 CR1I000 Measurement and Control System The CR1000 provides precision measurement capabilities in a rugged, battery-operated package. It consists of a measurement and control module and a wiring panel. Features ¢ 2 Mbytes standard memory; 4 Mbytes optional memory ¢ Program execution rate of up to 100 Hz ¢ CS1/O and RS-232 serial ports ¢ 13-bit analog to digital conversions ¢ 16-bit microcontroller with 32-bit internal CPU architecture ¢ Temperature compensated real-time clock ¢ Background system calibration for accurate measurements over time and temperature changes ¢ Single DAC used for excitation and measurements to give ratio metric measurements * Gas Discharge Tube (GDT) protected inputs ¢ Data values stored in tables with a time stamp and record number ¢ Battery-backed SRAM and clock that ensure data, programs, and accurate time are maintained while the CR1000 is disconnected from its main power source ¢ Measures intelligent serial sensors without using an SDM-SIO4 Storage Capacity The CR1000 has 2 Mbyte of FLASH memory for the Operating System. The standard CR1000 provides 2 Mbytes battery-backed SRAM for CPU usage, pro- gram storage, and data storage; an optional version provides 4 Mbytes of SRAM. Data is stored in a table format. The storage capacity of the CR1000 can be increased by using a CompactFlash® card. 12-Volt Powered Any 12 Vdc source can power the CR1000; it typically uses our BPALK or PS100 power supply. The BPALK consists of eight D-cell batteries, and the PS100 includes a sealed rechargeable battery that can be float-charged with a solar panel or ac power. Datalogger Programming The on-board, BASIC-like programming language sup- ports data processing and analysis routines. Compatible software includes Short Cut, PC400, and LoggerNet. Short Cut generates straightforward datalogger pro- grams in four steps. PC400 and LoggerNet software support datalogger program creation/editing, data retrieval, and real-time monitoring. LoggerNet includes the Transformer application that converts existing CR10X Edlog programs to CR1000 CRBasic programs. The CR1000's power consumption and packaging are optimized for unattended network applications. Input Output Terminals Analog Inputs: Eight differential (16 single-ended) channels measure voltage levels. Resolution on the most sensitive range is 0.67 pV. Pulse counters: Two pulse channels can count pulses from high level (5 V square wave), switch closure, or low level ac signals. Switched voltage excitations: Three outputs provide precision excitation voltages for resistive bridge mea- surements. Digital I/O ports: Eight ports are provided for frequen- cy measurements, digital control, and triggering. Three of these ports can also be used to measure SDM devices. Switched 12 Volt: This terminal provides unregulated 12 V that can be switched on and off under program control. RS-232 port: A PC or laptop can be connected to this 9-pin port via an RS-232 cable. CS I/O port: Data transfer peripherals that require power from the datalogger can be connected to this port via a cable. This port is also used for connecting the datalogger to a PC via an SC32B interface when optical isolation is required. Peripheral Port: One 40-pin port interfaces with the CFM100 CompactFlash® module. Operation in Harsh Environments Applications The standard operating range is -25° to +50°C; an ¢ Eddy covariance systems extended range of -55° to +85°C is available. A CR1000 s : : : e i housed in an environmental enclosure with desiccant Wireless sensor/datalogger networks is protected from humidity and most contaminants. ¢ Mesonet systems ¢ Wind profiling Communication Protocols * Vehicle testing The CR1000 supports the PAKBUs® communication ¢ Long-term climatological monitoring, meteoro- protocol. PakBus networks have the distributed routing logical research, routine weather measurement intelligence to continually evaluate links. Continually evaluating links optimizes delivery times and, in the * Air quality case of delivery failure, allows automatic switch over to ¢ Agriculture, agriculture research a configured backup route. The CR1000 also supports © Soil moist Time Di in Reflectomet the Modbus protocol, which allows the CR1000 to work Sema ake with “off the shelf” Modbus software packages. + Water level/stage ¢ Aquaculture Communications * Water quality Compatible telecommunication options include Ethernet, * Avalanche forecasting, snow science, polar, phone modems (land-line and cellular), radios, short high altitude haul modems, GOES satellite transmitters, and multi- drop modems. Real-time and historical data can be displayed on-site using a Palm OS-based PDA (requires * Geotechnical PConnect 3.1), the CR1000KD Keyboard/Display, or a * Historic preservation PC. The PC connects to the CR1000 via an RS-232 cable, or if optical isolation is required, via the CS I/O port and SC32B interface. ¢ Fire weather Customers can transport programs/data to a PC via CompactFlash® cards. The CFM100 module is used to store the programs/data on the card, and a SanDisk® ImageMate® card reader is used to download the pro- grams/data to the PC. Channel Expansion Synchronous Devices for Measurement (SDMs) SDMs are addressable peripherals that expand the CR1000's measurement and control capabilities. For example, SDMs are available to add control ports, analog outputs, pulse count channels, interval timers, or even a CANbus interface to your system. Multiple SDMs;, in any combination, can be connected to one CR1000 datalogger. The CR1000 is com- patible with the LLAC4 Low-Level AC Conver- sion Module. Use of the LLAC4 allows more wind sensors to be measured for wind profiling applications. Wind profiling helps customers determine if a site is a good can- didate for harvesting wind. REE Multiplexers 4 Multiplexers increase the number of sensors that can be measured by a CR1000 by sequentially connecting each sensor to the datalogger. Several multiplexers can be controlled by a single CR1000. The CR1000 is compat- ible with the AM16/32 and AM25T. ras Bas iS i CR1000 Specifications Electrical specifications are valid over a -25° to +50°C range unless otherwise specified; non-condensing environment required. To maintain electrical specifications, Campbell Scientific recommends recalibrating dataloggers every two years. PROGRAM EXECUTION RATE 10 ms to 30 min. @ 10 ms increments ANALOG INPUTS 8 differential (DF) or 16 single-ended (SE) individually configured. Channel expansion provided by AM16/32 and AM25T multiplexers. RANGES, RESOLUTION AND TYPICAL INPUT NOISE: Basic resolution (Basic Res) is the A/D resolution of a single conversion. Resolution of DF measurements with input reversal is half the Basic Res. Noise values are for DF measurements with input reversal; noise is greater with SE mea- surements. Input Basic 250 ys Int. 50/60 Hz Int. Range (mV) Res (uV) (uV. RMS) (uv. RMS) £5000 1330 385 192 £2500 667 192 95.9 #250 66.7 19.2 19.2 £25 67 23 1.9 27.5 2 0.62 0.58 22.5 0.67 0.34 0.19 ACCURACY": +(0.06% of reading + offset), 0° to 40°C +(0.12% of reading + offset), -25° to 50°C +(0.18% of reading + offset), -55° to 85°C (-XT only) "The sensor and measurement noise are not included and the offsets are the following: Offset for DF w/input reversal = 1.5-Basic Res + 1.0 pV Offset for DF w/o input reversal = 3-Basic Res + 2.0 pV Offset for SE = 3.Basic Res + 3.0 pV MINIMUM TIME BETWEEN VOLTAGE MEASUREMENTS: Includes the measurement time and conversion to engineering units. For voltage measurements, the CR1000 integrates the input signal for 0.25 ms or a full 16.66 ms or 20 ms line cycle for 50/60 Hz noise rejection. DF measure- ments with input reversal incorporate two integra- tions with reversed input polarities to reduce thermal offset and common mode errors and therefore take twice as long. 250 ps Analog Integration: ~1ms SE 1/60 Hz Analog Integration: ~20 ms SE 1/50 Hz Analog Integration: ~25 ms SE COMMON MODE RANGE: +5 V DC COMMON MODE REJECTION: >100 dB NORMAL MODE REJECTION: 70 dB @ 60 Hz when using 60 Hz rejection SUSTAINED INPUT VOLTAGE W/O DAMAGE: +16 Vde max. INPUT CURRENT: +1 nA typical, +6 nA max. @ 50°C; +90 nA @ 85°C INPUT RESISTANCE: 20 Gohms typical ACCURACY OF BUILT-IN REFERENCE JUNCTION THERMISTOR (for thermocouple measurements): +0.3°C, -25° to 50°C +0.8°C, -55° to 85°C (-XT only) ANALOG OUTPUTS 3 switched voltage, active only during measurement, one at a time. RANGE AND RESOLUTION: Voltage outputs pro- grammable between +2.5 V with 0.67 mV resolution. ACCURACY: +(0.06% of setting + 0.8 mV), 0° to 40°C +(0.12% of setting + 0.8 mV), -25° to 50°C +(0.18% of setting + 0.8 mV), -55° to 85°C (-XT only) CURRENT SOURCING/SINKING: +25 mA RESISTANCE MEASUREMENTS MEASUREMENT TYPES: The CR1000 provides ratiometric measurements of 4- and 6-wire full bridges, and 2-, 3-, and 4-wire half bridges. Precise, dual polarity excitation using any of the 3 switched voltage excitations eliminates dc errors. RATIO ACCURACY': Assuming excitation voltage of at least 1000 mV, not including bridge resistor error. +(0.04% of reading + offset)/V,, "The sensor and measurement noise are not included and the offsets are the following: Offset for DF w/input reversal = 1.5-Basic Res + 1.0 pV Offset for DF w/o input reversal = 3-Basic Res + 2.0 uV Offset for SE = 3-Basic Res + 3.0 pV Offset values are reduced by a factor of 2 when excitation reversal is used. PERIOD AVERAGING MEASUREMENTS The average period for a single cycle is determined by measuring the average duration of a specified number of cycles. The period resolution is 192 ns divided by the specified number of cycles to be measured; the period accuracy is +(0.01% of reading + resolution). Any of the 16 SE analog inputs can be used for period averaging. Signal limiting are typically required for the SE analog channel. INPUT FREQUENCY RANGE: Input — Signal (peak to peak? Min. Max* —Range_ _Min_ Max Pulse W. _Freg. #2500 mV 500 mV 10V 2.5 ys 200 kHz +250mV 10 mV 2vV 10 ps 50 kHz +25 mV 5mV 2vV 62 ps 8 kHz +2.5mV 2mv 2vV 100 ps 5 kHz 2The signal is centered at the datalogger ground. The maximum frequency = 1/(Twice Minimum Pulse Width) for 50% of duty cycle signals. PULSE COUNTERS Two 24-bit inputs selectable for switch closure, high frequency pulse, or low-level ac. MAXIMUM COUNTS PER SCAN: 16.7x10° SWITCH CLOSURE MODE: Minimum Switch Closed Time: 5 ms Minimum Switch Open Time: 6 ms Max. Bounce Time: 1 ms open w/o being counted HIGH FREQUENCY PULSE MODE: Maximum Input Frequency: 250 kHz Maximum Input Voltage: +20 V Voltage Thresholds: Count upon transition from below 0.9 V to above 2.2 V after input filter with 1.2 ys time constant. LOW LEVEL AC MODE: Internal ac coupling removes dc offsets up to +0.5 V. Input Hysteresis: 16 mV @ 1 Hz Maximum ac Input Voltage: +20 V Minimum ac Input Voltage: Sine wave (mV RMS) Range (Hz) 20 1.0 to 20 200 0.5 to 200 2000 0.3 to 10,000 5000 0.3 to 20,000 DIGITAL I/O PORTS 8 ports software selectable, as binary inputs or control outputs. C1-C8 also provide edge timing, subroutine interrupts/wake up, switch closure pulse counting, high frequency pulse counting, asynchronous communica- tions (UART), SDI-12 communications, and SDM communications. CAMPBELL SCIENTIFIC, INC. HIGH FREQUENCY MAX: 400 kHz SWITCH CLOSURE FREQUENCY MAX: 150 Hz OUTPUT VOLTAGES (no load): high 5.0 V +0.1 V; low <0.1 OUTPUT RESISTANCE: 330 ohms INPUT STATE: high 3.8 to 5.3 V; low -0.3 to 1.2 V INPUT HYSTERISIS: 1.4 V INPUT RESISTANCE: 100 kohms SWITCHED 12 V One independent 12 V unregulated sources switched on and off under program control. Thermal fuse hold current = 900 mA @ 20°C, 650 mA @ 50°C, 360 mA @ 85°C. SDI-12 INTERFACE SUPPORT Control ports 1, 3, 5, and 7 may be configured for SDI-12 asynchronous communications. Up to ten SDI-12 sensors are supported per port. It meets SDI-12 Standard version 1.3 for datalogger mode. CE COMPLIANCE STANDARD(S) TO WHICH CONFORMITY IS DECLARED: BS EN61326:2002 CPU AND INTERFACE PROCESSOR: Hitachi H8S 2322 (16-bit CPU with 32-bit internal core) MEMORY: 2 Mbytes of Flash for operating system; 2 Mbytes of battery-backed SRAM for CPU usage, Program storage and data storage; 4 Mbytes optional SERIAL INTERFACES: CS I/O port is used to interface with Campbell Scientific peripherals; RS-232 port is for computer or non-CS| modem connection. PARALLEL INTERFACE: 40-pin interface for attaching data storage or communication peripherals such as the CFM100 module BAUD RATES: Selectable from 300 bps to 115.2 kbps. ASCII protocol is one start bit, one stop bit, eight data bits, and no parity. CLOCK ACCURACY: +3 min. per year (-30° to 85°C); +5 min. per year (-55° to 85°C, -XT only) SYSTEM POWER REQUIREMENTS VOLTAGE: 9.6 to 16 Vde TYPICAL CURRENT DRAIN: Sleep Mode: ~0.6 mA 1 Hz Sample Rate (one fast SE meas.): ~0.6 mA 100 Hz Sample Rate (one fast SE meas.): ~7.0 mA 100 Hz Sample Rate (one fast SE meas. w/RS-232 communications): <7.0 mA EXTERNAL BATTERIES: 12 Vdc nominal; reverse polarity protected. PHYSICAL SPECIFICATIONS MEASUREMENT & CONTROL MODULE SIZE: 8.5" x 3.9" x 0.85" (21.6 x 9.9 x 2.2 cm) CR1000WP WIRING PANEL SIZE: 9.4" x 4" x 2.4" (23.9 x 10.2 x 6.1 cm); additional clearance required for serial cable and sensor leads. WEIGHT: 2.1 Ibs (1 kg) WARRANTY Three years against defects in materials and workmanship. 815 W. 1800N. + Offices also located in: Australia + Logan, Utah 84321-1784 Brazil - Canada + England - France - South Africa + Spain + (435) 753-2342 + FAX (435) 750-9540 ‘Copyright © 2004, 2005 Campbell Scientific, Inc. Printed September 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project Appendix D WT and CT Installation Instruction Install the CTs in the pad mount transformer on the conductors which arrive from the turbine, or on the paddles they are connected to. Using one CT per phase, pass all the conductors (or a paddle) for each phase through one CT. No CT should be placed on the neutral conductors. The “dot” on the face of the CT’s should face towards the generator. Install the watt transducer in the pad mount transformer. The watt transducer can be mounted on any extra DIN rail or other convenient location accessible to personnel. The output signal (2 conductors) will be run to the data logger on the met tower via the data cable running from the test turbine to the met tower. GEC personnel will make this connection. Caution: Ensure the CTs are always connected to the watt transducer or the terminals are shorted when they are installed on a live cable. Install one voltage tap per phase. Voltage taps can be placed on any one of the lugs on the conductive paddle below the CTs. Use AWG 14 wire. Do not make any connection to the neutral. Install wiring between the CTs and the watt transducer according to Table C-1. The wiring can be either single conductor or twisted shielded pair, if available. Use AWG 14 wire. Connect the watt transducer to a suitable power supply. The power supply for the watt transducer is any AC voltage between 84 and 230 volts. Included below are photos from a similar CT installation on a 1.5 MW machine. The CTs used for the NW100 are considerably smaller, approximately 4 in. by 4 in. by 2 in. Table C-1. WT and CT Wiring Table Start Location End Location Location Terminal Type “Terminal Watt Transducer_|Electrical Cabinet @ Turbine Base 14 84 - 230 VAC irs Base 84 - 230 VAC Watt Transducer_ [Electrical Cabinet @ Turbine Base 13 84 - 230 VAC__|WTG Base 84 - 230 VAC Watt Transducer__|Electrical Cabinet @ Turbine Base 2 L1 Tap Pad-mount transformer u Watt Transducer __|Electrical Cabinet @ Turbine Base 5 L2 Tap Pad-mount transformer L2 Watt Transducer __|Electrical Cabinet @ Turbine Base 8 L3 Tap Pad-mount transformer L3 CT 1 Pad-mount transformer x1 Dot Watt Transducer 1 Pad-mount transformer X2 No dot Watt Transducer 3 ICT L2 Pad-mount transformer x1 [Dot Watt Transducer 4 Pad-mount transformer X2 No dot Watt Transducer 6 CT L3 Pad-mount transformer x1 Dot Watt Transducer 7 Pad-mount transformer X2 No dot Watt Transducer 9 Global Energy Concepts, LLC C-1 November 7, 2005 Power Performance Test Plan for the Toksook Bay Wind Power Project Figure C-2. Photo of WT detail (left), voltage tap detail (right Global Energy Concepts, LLC C-2 November 7, 2005 Click EZSetup, choose CR1000 data logger: eet eset ey EZSetup Wizard - CR1000 ( CR1000 ) Connection Type Select the mode of communication that will be used for this datalogger. Datalogger Information Datalogger Name: CR1000 Datelogger 1 Direct Connect eI Phone Modem IP Port Connection IP Address: 192.168.1.4:6783 Er oes Datalogger Settings Baud Rate: 115200 PakBus Address: 1 Security Code: 0 Extra Response Time: 0s Max Time Online: 0d Oh Om Collection Schedule ‘Scheduled Collection is OFF ‘An IP Pott connection consists of a datalogger aitached to a TCP/IP serial server interface device (such as an NL100} that is assigned a specific IP address. EZSetup Wizard - CR1000 ( CR1000 ) Progress —> AP Port Settings Communication Setup Enter the IP address ofthe TCP/IP device (ve.. NL100) and the port number where the datalogger is connected Datalogger Settings Inemet IP Address: Setup Summary fis 163.1 4.6783) Communication Test The address and port are entered in the foimat XXX, where the Xs represent the IP network number and the Ys represent the Datalogger Clock ort number, Note: Leading Os should not be entered [¢.9.. 123.45.6.6:6789; note that Send Program 45 was entered instead of 045, and 6 instead of 006). Data Files Scheduled Collection ? IP Pott Help | 4 Previous | [Newt D eR een east Ue) Progress |, Datalogger Settings CommuricationSetup || | Baud Alte: Enter the baud rate that will be used in communicating | a -] with the datalogger. Note: The max baud rate for SC32A interfaces is 19,200 bps. The max for SC923 is —PDatalogger Settings 38,400 bps. | PakBus Address: Enter the unique PakBus address used to identify the Sic Siuabay fr _|_ datalogger. Vaid ange i 1 = 4094: however, the | suggested range is 1-3999, Refer to help for additional | information. Communication Test Security Code (Advanced): If a security code is set on the datalogger, it must be entered here ft communication and data colection to a | occur, 0 means security wil not be used. Extra Response Time: Ifthe datalogger requires extra time to respond, enter | * Send Program OO seconds = the extra response time, Data Files ‘Scheduled Collection OES ieee eu meuiey File Help Deployment 1000 | CRIG CR10X-PB CR1IGK-TD Serial Port cOMte Baud Rate 115200 Disconnect NL100/NL105| PakBus | RS-485 | RS-232|| CS 1/0 | TLink | PakBus Address: = PakBus/TCP Server Port: |6785 | |S PakBus/TCP Client Address: | 192.168.1.4 6785 9. )b8.1. 11 1Q0.30 ModBus/TCP - PakBus Gateway: | enabled v) — ar Se L PakBus/TCP Server: | enabled v —dis, l le d PakBus/TCP Client: | enabled vw) — diva Lud ld PakBus Address of the NL100/105 Each device in the network that supports a PakBus stack must be assigned a unique PakBus Address ni identify a node when communicating. Valid PakBus Address numbers range from 1 through 4094. [ Apply Cancel [ Factory Defaults Read File Summary LGENET - 3602 -AAAASMA FESA SLAb SN: 2092 Cs Z/o Cole < 9b00 Port = bigs From: William Thomson [mailto:wthomson@avec.org] Sent: Friday, November 11, 2005 9:20 AM To: Terence Brown Subject: RE: Toksook Bay --- NPS Meeting.. --- Ports.. -- Terance, j i red I’m dyslexic. The public IP address for Toksook Bay that you'll be using ye Bill Thomson From: Terence Brown [mailto:tbrown@aidea.org] Sent: Thursday, November 10, 2005 4:24 PM To: Mia M Devine; William Thomson Ce: Eric Marchegiani Subject: RE: Toksook Bay --- NPS Meeting.. --- Ports.. -- sorry, | assumed that we would use the same setup as the power modules. From: Mia M Devine Sent: Thursday, November 10, 2005 4:07 PM To: Terence Brown; William Thomson Ce: Eric Marchegiani Subject: RE: Toksook Bay --- NPS Meeting.. --- Ports.. -- There will NOT be a camera involved. The PC will just be downloading data from a logger by the wind turbine. Mia From: Terence Brown Sent: Thu 11/10/2005 2:49 PM To: William Thomson Cc: Mia M Devine; Eric Marchegiani Subject: RE: Toksook Bay --- NPS Meeting.. --- Ports.. -- We have the same problem in other sites so | understand. | can adjust the port within PC Anywhere. The camera is an Ethernet based camera and can be access through the pc or directly if ports are open to for it. Sounds great | will start working on things on my end. From: William Thomson [mailto:wthomson@avec.org] Sent: Thursday, November 10, 2005 2:13 PM To: Terence Brown Cc: Mia M Devine; Eric Marchegiani Subject: RE: Toksook Bay --- NPS Meeting.. --- Ports.. -- OK, that’s why | asked. Unless you arrange for your own WISP connection, you will need to be a good roommate and coexist on the available private SCADA network in the vicinity. You will need to change the default ports for PCAnywhere. | ones ports ari e current IP address you would be using for access is believe that it is only semi-static and may change in the future. bumping them up to in use. _ Unfortunately | Unless the camera is running into the PC and being accessed by PCAnywhere, then | cannot guarantee that it can be connected. If this is an Ethernet camera with specific and acceptable TCP/IP port numbers, we can give it a try, but beware the following... The effective bandwidth and latency to Toksook Bay is highly variable, and the connection is pretty much non existent at lunch and early evening. Bill Thomson From: Terence Brown [mailto:tbrown@aidea.org] Sent: Thursday, November 10, 2005 1:51 PM To: William Thomson Subject: RE: Toksook Bay --- NPS Meeting.. --- Ports.. -- We will be using PC anywhere for the file transfer and remote desktop connection. We will need one static IP address and later many be one IP address for the remote camera if we use the same setup used in the AEA power houses. | can send you the ports From: William Thomson [mailto:wthomson@avec.org] Sent: Thursday, November 10, 2005 1:45 PM To: Mia M Devine; Eric Marchegiani; Terence Brown Cc: Reuben Loewen Subject: RE: Toksook Bay --- NPS Meeting.. --- Ports.. -- Mia, | assume he will contact me at some point. Also, we should coordinate as soon as reasonable to ensure you will have communications and that there are no conflicts. For that | will need to know what software you will be using and what port numbers it will be interfacing with. Bill Thomson From: Mia M Devine [mailto:mdevine@aidea.org] Sent: Thursday, November 10, 2005 1:36 PM To: Eric Marchegiani; William Thomson; Terence Brown Page 1 of 1 Mia M Devine From: William Thomson [wthomson@avec.org] Sent: Friday, February 10, 2006 12:43 PM To: Mia M Devine Subject: RE: Computer in Toksook Bay Hello Mia —- You ARE behind a firewall. We are protecting the inner network from intrusion. However, you were given the keys to get through for your process. Here is what you have to do: DATALOGGER: 1: IP address of the NL100 port = 1.0.0.30 (Done) 2. Net Mask: Use 255.255.255.0 for consistency, but that is not the problem. 3. Default gateway should be 1.0.0.1 THIS |S PROBABLY THE PROBLEM. The default gateway is used for data logger replies to out of network requests. It has to be set. PC: 1: IP address of the PC = 192.168.1.XXX — exact address is not important. 2: IP address of the Datalogger as far as the PC is concerned = 192.168.1.113 — exact address is important. 3. If asked, the Net Mask is 255.255.255.0. 4. If asked, the default gateway should be 192.168.1.1. Bill Thomson From: Mia M Devine [mailto:mdevine@aidea.org] sent: Friday, February 10, 2006 12:07 PM +0: wrt; William Thomson Cc: Terence Brown Subject: Computer in Toksook Bay Bill, I'm still not able to communicate with the data logger from the pc in the power plant. | also tried connecting my laptop to the ethernet switch in the wind turbine base but still wasn't able to connect. The data logger is connected to a Network Link Interface (NL100) through a CS I/O port. An ethernet cable connects the NL100 to the switch in the wind turbine base. | called Campbell Scientific technical support and they say it sounds like my IP address isn't right or a firewall is blocking access. Attached are some screen shots of what | programmed into the NL100. In order to change these settings | have to take a laptop out to the met tower, so let me know if anything looks wrong to you. Best way to reach me is email or 427-7299. Thanks, Mia rc | 19), al NS (Saee| P| 1.0.0.0 IP Mess 5 C 2/14/2006 Longe IVS ts dest Mal He Rlloo is properly programmed ancl Conntelecl bs He nobwork : ~Conreed a com puke Ye bv fe nehwork bro direc, ty He UL 100) ~ Open a DBS wrdew (Shard +» — Tyee . fing’ and de LP address oF He WLIoO. To view iy in He late losger by Connechry a fc direct, to Ag WL /00, & crossover thernet able +s needed TVONVW NOLLOOULSNI evision: Giarmip bres Pe Sretive met i fire el pe Warranty and Assistance AG The NL100/105 NETWORK LINK INTERFACE is warranted by CAMPBELL SCIENTIFIC, INC. to be free from defects in materials and workmanship under normal use and service for twelve (12) months from date of shipment unless specified otherwise. Batteries have no warranty. CAMPBELL SCIENTIFIC, INC.'s obligation under this warranty is limited to repairing or replacing (at CAMPBELL SCIENTIFIC, INC.'s option) defective products. The customer shall assume all costs of removing, reinstalling, and shipping defective products to CAMPBELL SCIENTIFIC, INC. CAMPBELL SCIENTIFIC, INC. will return such products by surface carrier prepaid. This warranty shall not apply to any CAMPBELL SCIENTIFIC, INC. products which have been subjected to modification, misuse, neglect, accidents of nature, or shipping damage. This warranty is in lieu 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, Inc. directly. Affiliate companies handle repairs for customers within their territories. Please visit www.campbellsci.com to determine which Campbell Scientific company serves your country. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 753-2342. After an applications engineer determines the nature of the problem, an RMA number will be issued. Please q write this number clearly on the outside of the shipping container. CAMPBELL SCIENTIFIC's shipping address is: CAMPBELL SCIENTIFIC, INC. RMA# 815 West 1800 North Logan, Utah 84321-1784 CAMPBELL SCIENTIFIC, INC. does not accept collect calls. Additional Copyright and Warranty Information The NL100/105 contains software as part of the lwIP TCP/IP stack, redistributed in binary form, which falls under the following copyright: Copyright ©2001, 2002 Swedish Institute of Computer Science This software is provided by the author "as is" and any express or implied warranties, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. Author: Adam Dunkels NL100/105 Table of Contents PDF viewers note: These page numbers refer to the printed version of this document. Use the Adobe Acrobat® bookmarks tab for links to specific sections. We MAC UC EA ON rca sce rata cetatagtge ss Heenetpendsveaebtedeenasttcepute 1 1.1 Physical Description of the NL100/105. 1.2 Specifications 2. Setting up the NL100/105 for Communication.......... 3 2.1 Computer to NL100/105 Physical Connection 2.2 2.3 Communication with the NL100/105 2.2.1 Setup Using the Device Configurator. 2.2.2 Setup Using a Terminal Program 2.2.3 Establishing Communication Outside of ConfMon Mode ... NL100/105 Menu Options 23.1 ye We 253 2.3.4 235 2.3.6 2.3.7 2.3.8 2.3.9 Serial Server Watchdog.. 3. Connecting the NL100/105 to a Network................. 18 3.1 Network to NL100 Connection ..........ccccccscesecsssesseseseesesesesseeeeesseeesseeeseeees 18 3.2 NL100/105 to Datalogger Connections - Mixed Array Dataloggers....... 18 3.3 3.2.1 Direct Connect from the NL100/105 to a Datalogger 3.2.2 MD9 Connection from NL100/105 to Datalogger .. = 3.2.3 MD485 Connection from NL100/105 to Datalogger . ..20 3.2.4 RF Connection from NL100/105 to Datalogger 3.2.5 Short Haul Modem Connection from NL100/105 to Datalogger. 2 3.2.6 Phone Modem Connection from NL100/105 to Datalogger 7 NL100/105 to Datalogger Connections - CR9000/CR5000 a 523 « IS OLLWATOTS CUI ive ocesacecocsced oababetesononsiecatatonatesstatavesosesusestoseretstoredsiata 3.3.2 Hardware Setup for NL105 Communication with the CR9000 Via TLink ......... cece ccceeeeeeseeeseeseeesceeeeseeseeseeeseeneeenees 24 CS UO POP cores ensenicebdcicbda sivas lodasissatdeoden bleed fseboos A-1 B. Null-Modem Cable ..................cccc:ccecccccceceeseeeeeeeeeeees B-1 C. 10 Base-T Cabling ..........0...ccc cee eeeceeceeeeeeeeteeteeeeees C-1 NL100/105 Table of Contents Glossary Figures NL100/105 Jumper Placement.. Typical NL100/105 Setups in LoggerNet .. LoggerNet Setup for NL100/105 to MD9 to Datalogger Connection...... LoggerNet Setup for NL100/105 to RF to Datalogger Connection.......... LoggerNet Setup for NL100/105 to Phone to Datalogger Connection. PC9000 Setup for TCP/IP Communication Sa Ce a tS a NL100/105 Network Link Interface 1. Introduction The NL100 and NL105 Network Link Interfaces are devices used to communicate with Campbell Scientific dataloggers using an Ethernet 10 Base- T communications link. The NL100 includes a CS I/O port (see Appendix A) an RS-232 port, and an RS-485 port for communication; the NL105 adds a TLink interface for communication with a CR9000(C) system. The NL100/105 can be configured to act as a Serial Server in a standard TCP/IP network, to act as a PakBus node in a PakBus network, or to transfer MODBUS/TCP packets. All of the available settings are described in Section 2.3. However, not all settings are required for all configurations. This manual will focus mainly on setting up the NL100/105 for a standard TCP/IP network. For PakBus and MODBUS configurations, please contact Campbell Scientific for applications notes or other information that may be available. In particular, CSI’s PakBus Networking Guide can be downloaded from our web site. Campbell Scientific's LoggerNet software is used to communicate with the dataloggers once the NL100/105 is configured properly and connected to a network (refer to Section 2.). Communication with CSI’s mixed array dataloggers (CR10X, CR510, CR23X, CR7, and 21X) and table data dataloggers (CR10X-TD, CR510-TD, CR23X-TD, CR5000, and CR9000) requires LoggerNet version 2.0 or greater. Communication with PakBus dataloggers (CRIOXTD-PB, CR510TD-PB, CR23XTD-PB, and CR200) requires LoggerNet 2.1 or greater. Communication with the CR1000 requires LoggerNet 3.0 or greater. PC208W version 3.2 or higher may also be used with mixed array dataloggers (CR10X, CR510, CR23X, CR7, 21X). PC9000 may also be used for CR9000 and CR5000 dataloggers. 1.1 Physical Description of the NL100/105 The NL100/105 is housed in a rectangular case with all power and communication connections on one edge. On the opposite outside edge are tabs for mounting the NL100/105 in an enclosure. Figure 1 below shows the position of these connections and the mounting tabs. NL100/105 Network Link Interface Corner Screws Mounting Tabs 12 V Power i Connection Vat RS485 Ports $ RS-232 Ma fa CS I/O Port 10 Base-T Link Communication Indicator LEDs FIGURE 1. NL100 1.2 Specifications Standards Ethernet Standard IEEE 802.3 (CSMA/CD Access Method) TCP/IP Protocol Case Dimensions QU" x4YU"x1” Environment Temperature: -25 to +50 °C Power Supply Requirements The NL100/105 is powered via the green G 12V connector (11 to 16 VDC at 140 mA average current) on the front panel of the unit. Cable Specifications The Ethernet 10 Base-T cable should be a Category 5 twisted pair cable. The two active pairs in an Ethernet 10 Base-T network are pins 1 & 2 and pins 3 & 6. Use only dedicated wire pairs (such as blue/white & white/blue, orange/white & white/orange) for the active pairs. RJ-45 Pin-Outs: Pin 1 = TD+, Pin 2 = TD-, Pin 3 = RD+, Pin 6 = RD- NL100/105 Network Link Interface The RS-232 should be a standard straight through cable. It is recommended that the cable be kept at lengths of < 6 feet to maintain high data throughput rates. The CS I/O 9 Pin cable is a straight through cable with all 9 pins connected. Campbell Scientific’s SC12 cable is recommended. The cable for the RS-485 connection is a 2 twisted pair, 22 awg cable. CSI recommends the 9720 cable (with a Santoprene jacket) for use with the MD485s. Compliance The NL100/105 is encased in metal and meets requirements for a Class A device under European standards: APPLICATION OF COUNCIL DIRECTIVE(S) 89/336/EEC as amended by 89/336/EEC and 93/68/EEC. STANDARD(S) TO WHICH CONFORMITY IS DECLARED: ENC55022-1; 1995 AND ENC 50082-1: 1992 EUROPEAN REGULATIONS WARNING: This is a Class A product. In a domestic environment this product may cause radio interference in which case the user may be required to correct the interference at the user’s expense. 2. Setting up the NL100/105 for Communication The NL100/105 must be set up by configuring one or more of the communications ports for communication with your datalogger or other devices in the network. To do this, you must establish a direct communication link with the NL100/105 using a PC computer. You will need a null modem cable to physically connect the NL100/105 to the computer. The Device Configurator or a terminal communication software package (such as HyperTerminal, which ships with Microsoft Windows operating system software) is used to configure the settings in the NL100/105. 2.1 Computer to NL100/105 Physical Connection An RS-232 null-modem cable is required to establish communication between the NL100/105 and your computer. One end of the cable is connected to the computer's 9-pin RS-232 communications port and the other end is connected to the RS-232 port of the NL100/105. If the null-modem cable does not have a female connector on both ends, you may also need a female-to-female adapter. For additional information on null-modem cables, refer to Appendix B. The NL100/105 requires 12 VDC for operation. This power source can be supplied by the datalogger's 12 V supply or by a regulated external power source. When connecting the power leads, the ground lead should be connected first and then the 12 V lead. NL100/105 Network Link Interface 2.2 Communication with the NL100/105 2.2.1 Setup Using the Device Configurator NOTE Campbell Scientific's datalogger support software ships with a utility called the Device Configurator (or DevConfig). This tool is used to set up dataloggers and other devices for communication or to download a new operating system. DevConfig can also be downloaded from Campbell Scientific's web site. The NL100/105 must have at least operating system version 7 to be compatible with DevConfig's NL100 setup. If your NL100/105 does not have a compatible operating system, load a new one in using DevConfig's Send OS utility or use a terminal emulation program to set up the device. To use DevConfig to set up the NL100/105, first connect the NL100/105 to the computer as noted above and follow the steps below: 1. Remove power from the NL100/105. 2. Open DevConfig. 3. Highlight the NL100 in the list of devices which appears in the left-hand portion of the window. Select the COM port to which the NL100/105 is connected from the drop down list box at the bottom left of the window. 4. Press the Connect button and reapply power to the NL100/105. The device may take up to 60 seconds to respond to DevConfig, and for the current settings to be loaded into the Settings Editor. The Settings Editor is the active tab when you are first connected. Settings can be changed in this window by clicking within a field and entering a new value. If the value being set has a finite list of choices, a second click within the field will enable a drop down list box from which to select a valid option. DevConfig has built-in help for each setting, which is displayed at the bottom of the window. Use this information, along with Section 2.3 of this manual, to configure the settings for communication in your network. Once the settings have been defined, press Apply to save the changes to the NL100/105. You can also use the Terminal tab in DevConfig to set up the NL100/105 using the menus, as explained in the following section. 2.2.2 Setup Using a Terminal Program 2.2.2.1 Establishing the Initial Communication Once the physical connection has been made, communication can be established with the NL100/105 using a terminal communications package. The steps below demonstrate configuring the NL100/105 using HyperTerminal, which is shipped with Windows operating systems. NOTE NL100/105 Network Link Interface The NL100/105 is shipped from the factory with its RS-232 port set in the ConfMon mode (configuration monitor). Refer to Section 2.2.3 if the RS-232 port has been set to some other configuration and direct communication is necessary. Ensure the NL100/105 has an appropriate power source applied. (Refer to Section 2.1, above.) Create a new connection in HyperTerminal. Choose the COM port to which the null-modem cable is connected, and set the baud rate to 115,200 bps. Most of the other settings can be left at the default (data bits = 8, parity = none, stop bits = 1). Flow control should be set to none. Once HyperTerminal indicates you are connected, press <Enter> a couple of times to gain the attention of the NL100/105. When communication is established, the current port settings will be returned, followed by the NL100/105 prompt line: NL100/105 (ver, show, edit, defaults, reset, help, bye): To set up the NL100/105 for communication with the network, go into the Edit menu (Section 2.3.3 Edit) and complete the appropriate information. Note that the Ethernet 10 Base-T connection must be configured (Section 2.3.3.5) and at least one of the other port options. 2.2.3 Establishing Communication Outside of ConfMon Mode If the RS-232 port has been disabled or set to some configuration other than ConfMon, communication can still be established with the NL100/105 using one of two options. When power is first applied to the NL100/NL105, there is a 0.5-second window in which communication can be established with the NL100 using the RS232 port, regardless of the port's configuration. Therefore, if power is already applied, simply disconnect power and then reconnect it, then attempt to establish communication within the 0.5-second period. Holding down the enter key should allow you to hit this 0.5-second window. The other option is to connect a boot jumper, which bypasses the boot sequence of the NL100/105. To access the boot jumper, remove the NL100/105's cover by removing the four screws at the corners. The boot jumper is shown in Figure 2 below. The NL100/105 ships with this jumper connected to only one post. Place the jumper so that it connects the two posts. NL100/105 Network Link Interface FIGURE 2. NL100/105 Jumper Placement When the jumper is in place, open the HyperTerminal connection to the NL100/105 and power up the device. The prompt "NL100 boot" will appear. At this prompt, press <Enter> a few times to ring up the NL100/105. If communication is successfully established, a message will be returned indicating that the NL100/105 is initialized, along with the jumper setting (1 = on, 0 = off), the TCP/IP address, Telnet port address, and current communication configuration. If <Enter> is pressed again, the NL100/105 menu prompt will appear. WARNING After reconfiguring the NL100/105 for communication, the jumper should be disconnected. If this jumper remains in place and power to the NL100/105 is cycled off and back on, the NL100/105 will remain at the “NL100 boot" prompt and will not boot up. This will render the NL100/105 inaccessible via remote communications. 2.3 NL100/105 Menu Options The NL100/105 prompt lists all of the available menu options. Only the first few characters of the main menu options need to be typed — the remaining characters will be completed automatically. Press <Enter> to execute the command. Each menu option is explained below. NL100/105 Network Link Interface 2.3.1 Ver NOTE 2.3.2 Show 2.3.3 Edit 2.3.3.1 TLink Config Ver returns version information about the NL100/105. The ROM number, OS version, Ethernet physical address, and some diagnostic statistics are displayed. Version information may be requested by a Campbell Scientific Applications Engineer when troubleshooting a communication problem. The Ethernet physical address that is displayed is a hexadecimal representation of the address assigned to this device. An Ethernet address is unique to the specific device to which it is assigned. This assignment is made at the factory and cannot be changed by the user. The Ethernet physical address is not the same as the TCP/IP address. The Show command displays the current settings for the NL100/105. The Edit menu option is used to set up the communications link for the NL100/105. You should work closely with your network administrator to determine the correct settings for your specific network. You can progress through the menu options by pressing <Enter>. If you make a mistake after entering a setting, press the up cursor arrow on your keyboard to return to the previous setting. All available selections will be listed on the prompt line enclosed in parenthesis, with the current setting displayed in brackets at the end of the selections (e.g., [disabled]). Help for a setting can be displayed by entering the ? key and pressing <enter>, or by pressing F1. Once changes have been made and you have come to the end of the prompts for the communication options, you can choose "save" to put the new settings into effect or "cancel" to disregard the changes and keep the current settings. This setting is applicable to the NL105 only, and is used when communicating with a CR9000 datalogger. TLink is an interface used to communicate with a CR9000 datalogger over an Ethernet connection. A physical connection is made between the TLink port on the CR9000's 9031 CPU module and the port marked TLink on the NL105. TLink Config is used to set the TLink communications port to one of three options: TepSer - The NL105 acts as a serial server for the TLink port. A serial server is a device that allows serial communication over a TCP/IP communications link. When configured as a serial server, there is one parameter to set: TLink Serial Server Port Number - Enter the port number, in the range of 3000 to 65000, that will be used for TLink communication. The default port number is 6781. NL100/105 Network Link Interface 2.3.3.2 RS485 Config 232-Bridge - The NL105 transparently passes data between the TLink port and its RS-232 ports. The 232-Bridge configuration has only one setting, RS-232 bps. This is the bits per second (bps) at which the NL105 will communicate with the device connected to the RS-232 port. This is a fixed rate (i.e., it is not a maximum baud rate or an autobaud rate). The default is 115k bps. Disabled - The TLink communications port is disabled. This option is used to configure the NL100's RS485 port for communication with an RS485 device. Campbell Scientific offers the MD485 for communication with its dataloggers via RS485. The port can be configured for PakBus communication, as a TcpSer serial server, or as a PakSer serial server. PakBus - This option is used to set up the NL100/105 to communicate with PakBus devices over the RS485 port. Packets transferred over the port in this mode are framed as PakBus packets; therefore, any device attached to the port must be configured for PakBus communication also. PakBus is a packet based communications protocol developed by CSI. One of the advantages of PakBus is that other communications protocol packets, such as TCP/IP or MODBUS can be "wrapped" in a PakBus packet and transferred among PakBus devices in the network, thus allowing various communication protocols within one network. When a port is configured for PakBus, the NL100/105’s “PakBus/Tcep Server Config” option must be enabled (Section 2.3.3.7) or you will not be able to communicate with TCP/IP through the NL100/105 to the PakBus devices on that port. When configured for PakBus the NL100/105's RS485 port has the following settings: RS485 Bps - This option is used to set the bits per second (bps) at which the NL100/105 will communicate using the RF485 port. The default value is 38K. RS485 Beacon Interval - The NL100/105 can be set to transmit a beacon to a PakBus network via the selected port. The beacon allows the NL100/105 to determine which devices in the PakBus network it can communicate with. Note that because a beacon is broadcast to all devices, it can interfere with other communication in the network (such as RF), so a frequent beacon may not be desirable. If 0 is entered, no beacon will be sent; the default beacon is 60 seconds. RS485 Verify Interval - This is the interval at which a PakBus communication link will be verified over the RS485 port. If communication does not take place with a PakBus device within the verify internal, a packet will be sent to test the communication link. In most instances, this setting should be left at the default of 0, which will set a verify interval of 2.5 times the Beacon Interval. RS485 Neighbor list - Enter a list of addresses for PakBus devices with which the NL100/105 can communicate over the RS485 port. The addresses are specified individually, with a space separating each address, or a range of addresses can be entered by separating them NOTE 2.3.3.3 CS I/O Config NOTE NL100/105 Network Link Interface with a hyphen (e.g., 1 3 6 10-15, sets PakBus addresses 1, 3, 6, 10, 11, 12, 13, 14, and 15 as neighbors). If a Neighbor list is entered, the NL100/105 will ignore packets from any device which is not in the list (unless the address of the device sending the packet is 4000 or greater). If 0 is entered for this parameter, the NL100/105 will respond to any device that sends a packet and will automatically add that device to its neighbor list. TCPSer - This option configures the NL100 to act as a TCP/IP based serial server when communicating with the datalogger over its RS485 port. RS485 Bps - This is the bits per second (bps) at which the NL100/105 will communicate using the RS485 port. This is a fixed rate (i.e., it is not a maximum baud rate or an autobaud rate). The default rate is 38K bps. RS485 Serial server port number - Enter the port number, in the range of 1 to 65000, that will be used for communication. The default port number is 6782. PakSer - The RS485 port of the NL100/105 can be configured as a PakBus serial server. This sets up the device as a serial server. In this mode, PakBus framing is removed from the packet and routed via the RS485 port. Typically, the attached device would be one that does not support PakBus communication (such as a MODBUS device). RS485 Bps - This is the bits per second (bps) at which the NL100/105 will communicate using the RS485 port. This is a fixed rate (i.e., it is not a maximum baud rate or an autobaud rate). The default rate is 38K bps. RS485 serial server AppId Number - Enter the application ID, in the range of 1 to 65000, that will be used identify the device in the network. The default ID is 6782. The usual AppId for MODBUS devices is 501. This option is used to configure the NL100/105's CS I/O port. The port can be configured for PakBus communication, as a TcpSer serial server, or as a PakSer serial server. CR10X, CR510, CR23X, 21X, and CR7 dataloggers ship with a mixed array operating system. Mixed array dataloggers do not support the PakBus communications protocol. Therefore, you cannot communicate with them over a port configured for PakBus. However, the CR10X, CR510, and CR23X dataloggers can be special-ordered with a PakBus operating system. Check with your technical support representative for details. NL100/105 Network Link Interface 10 PakBus - This option is only used when setting up the NL100/105 to communicate with other PakBus devices in the network. Packets transferred over the CS I/O port in this mode are framed as PakBus packets; therefore, any device attached to the port must be capable of PakBus communication. PakBus is a packet based communications protocol developed by CSI. One of the advantages of PakBus is that other communications protocol packets, such as TCP/IP or MODBUS, can be "wrapped" in a PakBus packet and transferred among PakBus devices in the network, thus allowing various communication protocols within one network. When a port is configured for PakBus, the NL100/105’s “PakBus/Tcp Server Config” option must be enabled (Section 2.3.3.7) or you will not be able to communicate with TCP/IP through the NL100/105 to the PakBus devices on that port. When configured for PakBus, the NL100/105's CS I/O port has the following settings: CS I/O SdeAddr/bps - This option is used to set up the CS I/O port to communicate with the datalogger as an addressable SDC device or a modem enabled device. If SDC7 or SDC8 is chosen, the NL100/105 will use that address to communicate with the datalogger in a synchronous communication mode. If one of the baud rates is chosen, the NL100/105 will communicate with the datalogger as a modem enabled device using the selected baud rate. If another SDC device is connected to the NL100/105, the two devices must use different SDC addresses. CS I/O Beacon Interval - The NL100/105 can be set to transmit a beacon to a PakBus network via the selected port. The beacon allows the NL100/105 to determine which devices in the PakBus network it can communicate with. Note that because a beacon is broadcast to all devices, it can interfere with other communication in the network (such as RF), so a frequent beacon may not be desirable. If 0 is entered, no beacon will be sent; the default beacon is 60 seconds. CS I/O Verify Interval - This is the interval at which a PakBus communication link will be verified over the CS I/O port. If communication does not take place with a PakBus device within the verify internal, a packet will be sent to test the communication link. In most instances, this setting should be left at the default of 0, which will set a verify interval of 2.5 times the Beacon Interval. TepSer - This option configures the NL100 to act as a TCP/IP based serial server when communicating with the datalogger over its CS I/O port. This is the most common setup option for this port. CS I/O SdcAddr/bps - This option is used to set up the CS I/O port to communicate with the datalogger as an addressable SDC device or a modem enabled device. If SDC7 or SDC8 is chosen, the NL100/105 will use that address to communicate with the datalogger in a synchronous communication mode. If one of the baud rates is chosen, the NL100/105 will communicate with the datalogger as a modem enabled device using the selected baud rate. Note that mixed array dataloggers (CR10X, CR510, CR23X, 21X, CR7) can be configured only as modem enabled devices; e.g., they do not support communication using SDC7 or SDC8. NL100/105 Network Link Interface NOTE 2.3.3.4 RS-232 Config NOTE CS I/O serial server port number - Enter the port number, in the range of 1 to 65000, that will be used for communication. The default port number is 6783. PakSer - The CS I/O port of the NL100/105 can be configured as a PakBus serial server. This sets up the device as a serial server. In this mode, PakBus framing is removed from the packet and routed via the CS I/O port. Typically, the attached device would be one that does not support PakBus communication (such as a MODBUS device). CS I/O SdcAddr/bps - This option is used to set up the CS I/O port to communicate with the datalogger as an addressable SDC device or a modem enabled device. If SDC7 or SDC8 is chosen, the NL100/105 will use that address to communicate with the datalogger in synchronous communication mode. If one of the baud rates is chosen, the NL100/105 will communicate with the datalogger as a modem enabled device using the selected baud rate. CS I/O Serial Server AppId number - Enter the application ID, in the range of 1 to 65000, that will be used to identify the device in the network. The default ID is 6783. The usual AppId for MODBUS devices is 501. This option configures the NL100/105's RS-232 port for communication. The port can be set up to communicate with a datalogger or other communications device (short haul modem, RF modem, phone modem), or to be connected to directly and configured for communication. The setup options for the port are PakBus, TcpSer serial server, PakSer PakBus serial server, or ConfMon (configuration monitor). CR10X, CR510, CR23X, 21X, and CR7 dataloggers ship with a mixed array operating system. Mixed array dataloggers do not support the PakBus communications protocol. Therefore, you cannot communicate with them over a port configured for PakBus. However, the CR10X, CR510, and CR23X dataloggers can be special-ordered with a PakBus operating system. Check with your technical support representative for details. PakBus - This option is only used when setting up the NL100/105 to communicate with other PakBus devices in the network. Packets transferred over the RS-232 port in this mode are framed as PakBus packets; therefore, any device attached to the port must be capable of PakBus communication. PakBus is a packet based communications protocol developed by CSI. One of the advantages of PakBus is that other communications protocol packets, such as TCP/IP or MODBUS, can be "wrapped" in a PakBus packet and transferred among PakBus devices in the network, thus allowing various communication protocols within one network. When a port is configured for PakBus, the NL100/105’s “PakBus/Tcp Server Config” option must be enabled (Section 2.3.3.7) or you will not be able to communicate with TCP/IP through the NL100/105 to the PakBus devices on that port. 11 NL100/105 Network Link Interface When configured for PakBus, the NL100/105's RS-232 port has the following settings: RS-232 bps - This is the bits per second (bps) at which the NL100/105 will communicate using the RS-232 port. This is a fixed rate (i.e., it is not a maximum baud rate or an autobaud rate). Note that the CRIOXTD-PB and the CR510TD-PB can communicate at a maximum baud rate of 9600 bps, so to communicate with one of those dataloggers, this setting must be 9600 bps or less. The default rate is 115K bps. PakBus Beacon Interval - The NL100/105 can be set to transmit a beacon to a PakBus network via the selected port. The beacon allows the NL100/105 to determine which devices in the PakBus network it can communicate with. Note that because a beacon is broadcast to all devices, it can interfere with other communication in the network (such as RF), so a frequent beacon may not be desirable. If 0 is entered, no beacon will be sent; the default beacon is 60 seconds. RS232 Verify Interval - This is the interval at which a PakBus communication link will be verified over the RS232 port. If communication does not take place with a PakBus device within the verify internal, a packet will be sent to test the communication link. In most instances, this setting should be left at the default of 0, which will set a verify interval of 2.5 times the Beacon Interval. RS232 Neighbor list - Enter a list of addresses for PakBus devices with which the NL100/105 can communicate over the RS232 port. The addresses are specified individually, with a space separating each address, or a range of addresses can be entered by separating them with a hyphen (e.g., 1 3 6 10-15, sets PakBus addresses 1, 3, 6, 10, 11, 12, 13, 14, and 15 as neighbors). If a Neighbor list is entered, the NL100/105 will ignore packets from any device which is not in the list (unless the address of the device sending the packet is 4000 or greater). If 0 is entered for this parameter, the NL100/105 will respond to any device that sends a packet and will automatically add that device to its neighbor list. TepSer - This option configures the NL100 to act as a TCP/IP based serial server when communicating with a datalogger over its RS-232 port. RS-232 bps - This is the bits per second (bps) at which the NL100/105 will communicate using the RS-232 port. This is a fixed rate (i.e., it is not a maximum baud rate or an autobaud rate). Note that the CR10(X) and the CRS510 can communicate at a maximum baud rate of 9600 bps, so to communicate with one of those dataloggers, this setting must be 9600 bps or less. The default setting is 115K bps. RS-232 serial server port number - Enter the port number, in the range of 1 to 65000, that will be used for communication. The default port number is 6784. 12 NL100/105 Network Link Interface PakSer - The RS-232 port of the NL100/105 can be configured as a PakBus serial server. This sets up the device as a serial server. In this mode, PakBus framing is removed from the packet and routed via the RS-232 port. Typically, the attached device would be one that does not support PakBus communication (such as a MODBUS device). RS-232 bps - This is the bits per second (bps) at which the NL100/105 will communicate using the RS-232 port. This is a fixed rate (i.e., it is not a maximum baud rate or an autobaud rate). Note that the CR10(X) and the CR510 can communicate at a maximum baud rate of 9600 bps, so to communicate with one of those dataloggers, this setting must be 9600 bps or less. The default setting is 115K bps. RS-232 Serial Server AppId number - Enter the application ID, in the range of 1 to 65000, that will be used to identify the device in the network. The default ID is 6784. NOTE The usual AppId for MODBUS devices is 501. ConfMon - Configuring the RS-232 port as a ConfMon allows you to connect directly to the NL100/105 via a computer. There are no parameters; the baud rate is automatically set to 115,200 bps. Refer to Section 3.2.1 for additional information. 2.3.3.5 Ethernet 10 Base-T The 10 Base-T communications link is used to connect the NL100/105 to a TCP/IP network using a Category 5 twisted pair cable. The Ethernet 10 Base-T link must be configured or you will not be able to communicate with the NL100/105 over a TCP/IP connection. The following options must be configured. These values should be provided by your network administrator. 10BASE-T Port IP Address - This number is the address of the NL100/105 on a TCP/IP network. It is written as 32-bit number written in four 8-bit decimal-equivalent syllables separated by periods, in the format XXX.XXX.XXX.XXX. The IP Address must be a static IP Address -- the NL100/105 does not support DHCP (dynamic host configuration protocol). 10BASE-T Port Network Mask - The network mask is used to help a network router to more efficiently transfer information. Typically, a class C mask will be 255.255.255.0, a class B mask will be 255.255.0.0, anda Class A mask will be 255.0.0.0. The tighter the mask, the more the NL100/105 will rely on the default gateway to route packets. IP Address of the Default Gateway - Enter the IP address of the device that is responsible for forwarding information to destinations outside the internal network, defined by the network mask. To disable a default gateway, use the default value of 0.0.0.0. 2.3.3.6 PakBus Address of the NL100/105 If the NL100/105 is to be used in a PakBus network, a PakBus Address must be assigned. If the NL100/105 will not be used in a PakBus network, this setting 13 NL100/105 Network Link Interface 14 NOTE can be ignored. All devices in the network must have a unique PakBus Address. Valid addresses are 1 through 4094. The default ID is 678. By default LoggerNet software uses PakBus Address 4094, PC400 uses 4093, PC200W uses 4092, and PConnect/ PConnectCE uses 4091. The use of these addresses in the NL100/105 should be avoided. PakBus addresses of greater than 3999 are typically reserved for PakBus routing devices and ports. This is because when a neighbor filter is set up in a PakBus datalogger, the datalogger will answer a Hello message from any device with an ID greater than 3999, but it will ignore devices with IDs less than 4000 that are not in their neighbor list. Clock Source Address - In a PakBus network, a "neighbor" is another PakBus device that the NL100/105 can communicate with directly (e.g., it does not have to route data through another PakBus device to reach the neighbor). A neighbor can be designated for the NL100/105 as the device from which the NL100/105 will accept a clock set command. If this setting is enabled, once the NL100/105 has received a clock set from its designated neighbor, it will broadcast its clock information along with its beacon. Thus, the NL100/105 can be used to set the clock of other PakBus devices in the network. Set this ID to 0 to disable the function. Central Routers - The Central Routers setting is used to set up the NL100/105 either as a Central Router or a Branch Router. If 0 is used for this setting, then the NL100/105 is set up as a Central Router; otherwise, a list of Central Routers for the NL100/105 is entered and the device it is set up as a Branch Router. While a Central Router learns the routes of all devices in the PakBus network, a Branch Router learns the routes for devices only within its branch. The use of Branch Routers allows branches of the network to be isolated from other branches. The addresses for the Central Routers are specified individually, with a space separating each address, or a range of addresses can be entered by separating them with a hyphen (e.g., 1 3 6 10-15, sets PakBus addresses 1, 3, 6, 10, 11, 12, 13, 14, and 15 as Central Routers). 2.3.3.7 PakBus/Tcp Server Config Enabling this option will set up the NL100/105 to act as a server in a PakBus network. The NL100/105 can support up to 16 concurrent connections. This option must be enabled when the NL100/105 uses an Ethernet connection to communicate with other PakBus devices in the network. The NL100/105 will listen for incoming TCP/IP packets on the socket designated by the PakBus/Tcp server port number setting. If the NL100/105 will not be used in a PakBus network, or if the PakBus communication among PakBus devices in the network will take place over a port other than the Ethernet connection, this setting can be disabled. When enabled, there is one option to configure: NL100/105 Network Link Interface PakBus/TCP server port number - Enter the port number, in the range of 1 to 65000, that will be used for communication. The default port number is 6785. 2.3.3.8 PakBus/Tcp Client Config Enabling this option will set up the NL100/105 to act as a client in a PakBus network. In this mode, the NL100/105 will actively maintain a TCP/IP connection with a PakBus/Tcp server over the 10 Base-T connection. Server IP Address - The Server IP address is the address of the server to which the NL100/105 will attempt to connect and act as a client. Server IP Port Number - The Server IP port number is used to specify the port number of the PakBus/TCP server to which the client will attempt to connect. This option is typically used when the NL100/105 is configured to communicate with another NL100/105 over an Ethernet connection, so that the two PakBus networks served by the NL100/105s can be merged. In most situations, this setting can be disabled. 2.3.3.9 MODBUS/TCP Gateway Config When this setting is enabled, the NL100/105 will translate MODBUS/TCP packets that arrive on the 10 Base-T link for use in a PakBus network. The translation provided by this mode is MODBUS/TCP message format to MODBUS RTU serial message format. Unless you are setting up a PakBus network to also handle MODBUS communication packets, this setting can be disabled. Refer to Appendix I in the CR10X, CR510, and CR23X manuals for additional information on MODBUS. 2.3.3.10 Telnet Session Password The Telnet Session Password is the string that must be entered to communicate with the NL100/105 over a Telnet session. The string can range from 1 to 20 alphanumeric characters and is case-sensitive. This security measure is implemented to help prevent unauthorized users from gaining access to the NL100/105 device. 2.3.3.11 DevConfig Security Code Campbell Scientific's Device Configurator (or DevConfig) is an application that is used to configure dataloggers and peripheral devices for communication and to download new operating systems. A security code can be set in the NL100/105 so that communication using DevConfig is not possible unless the security code is sent when the application tries to communicate with the device. This security code helps to prevent unauthorized changes to a device. By default the address is 0. To enable security, enter a value between 1 and 65535. 15 NL100/105 Network Link Interface 16 2.3.4 Defaults 2.3.5 Reset The Defaults option displays the factory default settings for the different telecommunication options. Following the display is a prompt to Save or Cancel. If Save is selected, the NL100/105 will be reset to the factory defaults. If Cancel is chosen, the current settings will remain in effect and the user will be returned to the main menu prompt. The default settings are as follows: TLink config: [disabled] RS485 config: [disabled] CS I/O config: [Tcp Ser] CS I/O SdeAddr/bps: [9600] CS I/O serial server port number [6783] RS-232 config: [ConfMon] EtherNet 1OBASE-T: [enabled] 10BASE-T port IP address: [192.168.111.222] 10BASE-T port network mask: [255.255.0.0] IP address of the default gateway: [0.0.0.0] PakBus Address of the NL100/105: [678] Clock source address: [0] Central Routers: [0] PakBus/Tcp server config: [disabled] PakBus/Tcp client config: [disabled] MODBUS/TCP gateway config: [disabled] Telnet session password: [nl100] DevConfig security code: [0] This option is different from the Reset menu item. The Default menu item resets the NL100/105 back to the factory defaults. Reset reboots the device using the last-saved configuration. After the NL100/105 reboots, it may take a few moments to reestablish communication. Press enter a few times until the NL100/105 status line is returned. This option reboots the NL100/105, using the last saved settings that have been programmed by the user. This option is different from the Defaults menu item. The Defaults menu item resets the NL100/105 back to the factory defaults. After the NL100/105 reboots, it may take a few moments to reestablish communication. Press enter a few times until the NL100/105 status line is returned. NL100/105 Network Link Interface NOTE When using the NL100/105 in a PakBus network, resetting the NL100/105 (or making other changes to the network that might change the known route to remotes), may result in lengthy communication interruptions until the new routes can be learned by all the devices in the network. 2.3.6 Help The Help option provides tips for navigating within the NL100/105 menu prompts and gives a brief description of each menu item. Help for a particular setting can be displayed by pressing F1 or ? at the prompt for that setting. 2.3.7 Bye The Bye option is used to close the Socket connection at the end of a Telnet or terminal communication session. 2.3.8 Other Commands Additional commands are available for the NL100/105, which are not shown on the prompt line for the device. The commands are used for troubleshooting. Command _ Description io This command is a toggle, which turns on or off the monitoring of low level I/O 0 (or old) This command shows historic diagnostic trace information for the NL100/105. The object handle, name, and state are provided for all active objects and the object handle, name, and event type are provided for all recent events. c (or This command shows current diagnostic trace information for the current) NL100/105. The object handle, name, and state are provided for all active objects and the object handle, name, and event type are provided for all recent events. t (or tables) | This command displays the PakBus routing table information for the NL100/105: 2.3.9 Serial Server Watchdog If no communication is detected for a specified number of minutes, the NL100/105 will drop the communications link. This feature is called a "watchdog". The watchdog alleviates the problem of a communications port being held open, thus rendering the device inaccessible, if the NL100/105 and the remote device failed to terminate the communications link in a "normal" manner. The NL100/105 will wait two minutes for activity on a port before timing out. This affects all communication modes, including when the NL100/105 is configured as a PakBus based or TCP/IP based serial server, and when communicating with the NL100/105 during a Telnet session. 17 NL100/105 Network Link Interface 3. Connecting the NL100/105 to a Network 3.1 Network to NL100 Connection The connection from the computer network to the NL100/105 10 Base-T port should be a twisted pair cable. A male RJ-45 plug connector should be on the cable end going into the 10 Base-T port. If the cable is to be run directly from the computer to the NL100/105, a crossover cable is required. If the cable will be run from a hub to the NL100/105, a straight through cable should be used. Appendix C shows the pin-outs for these two cable types. 3.2 NL100/105 to Datalogger Connections - Mixed Array Dataloggers The cases below assume the NL100/105 is being connected to a mixed array datalogger using the datalogger's CS I/O port (CR10X, CR510 CR23X) or RS- 232 port (CR23X). TD-based dataloggers (CRI0X-TD, CR510-TD, and CR23X-TD) are configured similarly. In these instances, the communication port(s) being used on the NL100/105 should be set up as TcpSer (TCP/IP based serial server). When communicating with PakBus devices (CR1000, CR200, CR10XPB, CR510PB, or CR23XPB), the communication port on the NL100/105 can be configured for PakBus or TcpSer, depending upon the role the NL100/105 is to play in the network. In many cases, the TcpSer option can be selected. For mixed array and TD dataloggers, the network map for the LoggerNet software should depict an IPPort root device with the datalogger attached directly to the IPPort (see Figure 3) unless otherwise noted. For PakBus dataloggers, a PakBus Port must first be added to the IP Port in the network map, and then the PakBus datalogger attached to the PakBus Port. In instances where the NL100/105 is to be a PakBus router, a pbRouter must be added after the PakBus Port and before the PakBus datalogger. In some instances, extra response time (3 to 4 seconds) may need to be added to the IPPort and/or the datalogger to account for network traffic delays over a TCP/IP connection. NOTE The IP Address entered in the software for the NL100/105 should not contain leading zeros. If leading zeros are used, the communications attempts will fail. Some of the communication links require additional peripherals or cables that can be purchased from Campbell Scientific. In some cases, a standard RS-232 9 to 25 pin or 25 to 25 pin cable is required. RS-232 cables can be purchased from Campbell Scientific or from a computer accessories supplier. 18 NL100/105 Network Link Interface H- |PPort_2 Ay PakBusPort FIGURE 3. Typical NL100/105 Setups in LoggerNet 3.2.1 Direct Connect from the NL100/105 to a Datalogger Either the CS I/O port or the RS-232 port can be used to directly connect a datalogger to the NL100/105. Cabling or additional peripherals are required as listed below. Note that multiple dataloggers can be connected to one NL100/105 by using combinations of the connections described below. Each port must be assigned a unique port number. NL100/105 CS I/O port to datalogger CS I/O port - An SC12 cable is ™ connected to the CS I/O ports on both devices. An SC12 is typically shipped with all datalogger peripherals. NL100/105 RS-232 port to datalogger RS-232 port - A standard 9 to 9 pin communications cable should be connected to the RS-232 port on both devices. NL100/105 RS-232 port to datalogger CS I/O port - A serial communications cable should be connected to the RS-232 port of the NL100/105. This cable should be connected to an SC32A or SC32B optically isolated interface, and the datalogger should be connected to the 9 pin port of the SC32A/B with an SC12 cable. 3.2.2 MD9 Connection from NL100/105 to Datalogger Campbell Scientific's MD9 Multidrop Interface can be used to connect one or more dataloggers to the NL100/105 via the NL100/105’s RS-232 port. A multidrop network is capable of addressing up to 254 dataloggers, but the actual number of dataloggers that can be connected depends upon attenuation of the signal due to coax cable length, the number of devices on the network, and the number of coax terminator pairs used. Refer to the MD9 manual for determining the maximum number of dataloggers that can be connected based on these factors. 19 NL100/105 Network Link Interface An SC532 or SC532A Interface device should be connected to the serial port of the NL100/105. The cable to an SC532 should be a standard 9 to 25 pin RS- 232 cable, with the 25 pin male connection mated to the RS-232 side of the SC532. The cable to an SC532B should be a standard 9 to 9 pin RS-232 cable. Note, however, that the RTS line in the cable must be disabled (pin 7 on the 9- pin connector or pin 4 on the 25-pin connector). An SC12 cable is used to connect the 9 pin peripheral connection of the SC532/A to the serial I/O port of the MD9. Coax cable, running from the coax port of the base MD9, is run to each of the remote MD9 devices, which are connected to the dataloggers with SC12 cables. Refer to the MD9 User's Manual for additional information. The Setup window in LoggerNet should depict an MD9 Base modem attached to the IPPort, with the datalogger attached to an MD9Remote Modem. Refer to Figure 4 below. E44 MDSBase fT MDSRemote +f CRO FIGURE 4. LoggerNet Setup for NL100/105 to MD9 to Datalogger Connection 3.2.3 MD485 Connection from NL100/105 to Datalogger Campbell Scientific's RS485 communication device, the MD485, can be attached to an NL100/105 to provide a communication link to one or more dataloggers. The MD485 has three communication ports: RS485 (two terminals but the same physical port), CS I/O, and RS232. It can be configured for communication on any two of its three ports at one time. The most typical use of the MD485 is to set up a network of dataloggers linked together in an RS485 network. However, you can also attach a datalogger or other compatible peripheral to the CS I/O port or the RS-232 port of the MD485. 20 NL100/105 Network Link Interface The MD485 can be configured to communicate in a transparent (point to point) mode, as an MD9 emulator, or as a peripheral in a PakBus network. For transparent or PakBus communication, the MD485 is attached to the NL100/105's RS485 port using a 3-wire shielded cable (i.e., a 2 twisted pair shielded cable). For MD9 emulation, at least two MD485s are required. One MD485 is attached to the NL100/105's RS232 port using an SC12 cable. This MD485 acts as a base MD9 device, since the NL100/105 is, in itself, not capable of MD9 communication. A second MD485 is attached to each of the dataloggers. An appendix in the MD485 manual provides complete information on setting up the NL100/105 and the MD485s for each of the above configurations, along with information on the settings used in LoggerNet. 3.2.4 RF Connection from NL100/105 to Datalogger NL100/105 to radio frequency (RF) modems to datalogger connections allow wireless communication to remote dataloggers stations over a TCP/IP network. Up to 254 datalogger sites can be addressed in an RF network. The communication link requires an RF base station connected to the NL100's RS-232 port via a standard RS-232 9 to 25 pin cable. Note, however, that the RTS line in the cable must be disabled (pin 7 on the 9-pin connector or pin 4 on the 25-pin connector). The base station can be made up of an RS-232 RF Base Station or the combination of an SC532, RF modem (e.g., RF95A) and a transceiver (e.g., RF300). The remote datalogger is connected to an RF station that typically consists of an RF modem, transceiver, and power supply. The Setup window in LoggerNet should depict an RF Base modem attached to the IPPort, with the datalogger attached to an RFRemote Modem. Refer to Figure 5 below. 21 NL100/105 Network Link Interface Se Tee El, AFBase E44, RFRemote ‘di CR23X FIGURE 5. LoggerNet Setup for NL100/105 to RF to Datalogger Connection Refer to Campbell Scientific's Radiotelemetry Network Instruction Manual for more information on setting up RF stations. 3.2.5 Short Haul Modem Connection from NL100/105 to Datalogger The use of Short Haul Modems (SRM-5SA, SRM6-A) allows a connection to a datalogger via TCP/IP to a twisted pair cable. The short haul modem at the NL100/105 should be connected to the device using a standard RS-232 9 to 25 pin communication cable. It is recommended that a short haul surge protection device (P/N 5563) be connected next and then the twisted pair cable. Another surge protection device is recommended between the cable and the remote short haul modem. The short haul modem should be connected to an SC932 RS-232 9 to 25 pin DCE interface, which is then connected to the datalogger's CS I/O port via an SC12 cable. 3.2.6 Phone Modem Connection from NL100/105 to Datalogger A Hayes-compatible phone modem can be connected to the NL100/105 to allow a TCP/IP to phone link between a computer and a datalogger. The phone modem should be connected to the NL100/105's RS-232 port using an appropriate RS-232 serial cable. Connection of the remote phone modem to the datalogger will vary, depending upon the type of remote modem used. Refer to the user's manual for the system you purchased for additional information on assembling the remote site. In the LoggerNet communications software, the phone modem on the NL100/105 side should be shown attached to the IPPort. The datalogger is then shown as connected to the remote phone modem. Refer to Figure 6 below. @ 22 NL100/105 Network Link Interface PhoneBase “= PhoneRemate FIGURE 6. LoggerNet Setup for NL100/105 to Phone to Datalogger Connection 3.3 NL100/105 to Datalogger Connections - CR9000/CR5000 3.3.1 Software Setup As an alternative to LoggerNet, PC9000 software (version 3.5 or higher) can be used to communicate with the CR9000 and CR5000 dataloggers via the NL100/105 and a TCP/IP Network. To configure the software for communication, choose the Tools | CommLink menu option. From the I/O Port drop-down list box, select NET. On the bottom left side of the screen, there are fields in which to type the TCP/IP address and the port number. The setup should look similar to Figure 7, below. 23 NL100/105 Network Link Interface 24 CR5000-North 192.168.15.150| 6783 x 2048 200 R5000-North Z '192.168.15.150 783 FIGURE 7. PC9000 Setup for TCP/IP Communication 3.3.2 Hardware Setup for NL105 Communication with the CR9000 via TLink A CR9000 can be connected to a TCP/IP network by connecting the TLink port of the CR9000 9031 CPU module to the TLink port of the NL105 (note that the NL100 does not have this communication port). A twisted pair cable is used to make this connection. Appendix A. CS I/O Port The CS I/O port is Campbell Scientific's input/output port. It is not a standard RS-232 pin-out. The following table provides pin-out information on the port when connected to a datalogger. Signal Pin | Name Type Description 1 5 V (supplied by the Input Not used by NL100/105 datalogger) 2 | Signal Ground Provides reference for voltage levels 3 Ring Output Raised by a NL100/105 to put the datalogger into the telecommunications mode 4 | RXD Output Serial data transmitted to the datalogger 5 Modem Enable Input Raised by the datalogger when it determines that the NL100/105 raised the ring line 6 | Synchronous Device Input Used by the datalogger to Enable address the NL100/105 when the NL100/105 is configured as a synchronous device 7 | Clock/Handshake Input Used by the datalogger with SDE and TXD lines to address and transfer data to synchronous devices 8 12 V (supplied by the Not used by the NL100/105 datalogger) 9 | TXD Input Serial data received from the datalogger Appendix B. Null-Modem Cable A null-modem cable allows communication between two similar devices. It is sometimes called a crossover cable, because the transmit and receive lines are crossed so that the two devices can communicate. An RS-232 null modem cable usually also crosses other handshaking lines. An RS-232 null-modem cable can be purchased at a local computer store. The pin-outs for this cable are provided below. Carrier Detect Data Terminal Ready 4 3 Receive Data 2 Request to Send Clear to Send Clear to Send Request to Send ° Transmit Data 2° Receive Data 3 00 Transmit Data Data Terminal Ready 4 << 1,6 Carrier Detect, Data Set Ready Signal Ground 5 2° Signal Ground Data Set Ready 6 => Data Terminal Ready 72 gs > 9 ono rt wn Not Used Not Used Appendix C. 10 Base-T Cabling The cable that runs from the computer to the NL100/105 should be a Category 5 twisted pair cable. If the NL100/105 will be connected directly to the computer, a crossover cable should be used. If the NL100/105 will be connected to the computer through a hub, a straight through cable should be used. The pin-outs for each of these cables is shown below. Straight Through Cable 1 oe! Twisted Pair 1 2 22 3 23 Twisted Pair 2 Crossover Cable Twisted Pair | 0 Twisted Pair 2 C-1 Glossary Beacon Interval - Devices in a PakBus network may broadcast a message to other devices, in order to determine "neighbor" devices. Neighbor devices are devices that can be communicated with directly by the current device without being routed through an intermediate device. A beacon in a PakBus network helps to ensure that all devices in the network are aware of which other devices are viable in the network. If configured to do so, a clock set command may be transmitted with the beacon interval. This function can be used to synchronize the clocks of devices within the PakBus network. MODBUS - MODBUS is a communications protocol developed by Modicon which was designed to provide a common communications protocol among intelligent devices in the manufacturing industry. Neighbor (PakBus Neighbor) - Neighbor devices are devices that can be communicated with directly by the current device without being routed through an intermediate device. PakBus - PakBus is a packet-based communications protocol developed by Campbell Scientific. One of the advantages of PakBus is that other communications protocol packets, such as TCP/IP or MODBUS, can be "wrapped" in a PakBus packet and transferred among PakBus devices in the network, thus allowing various communication protocols within one network. Devices that are capable of PakBus communication include the CR10XTD-PB, CRS510TD-PB, CR23XTD-PB dataloggers, the RF400 modem, and the NL100/105. PakBus Node - A device in the PakBus network with a unique PakBus ID. The device can be a datalogger, a computer, or an NL100/105. Serial Server - A serial server is a device that allows serial communication over a TCP/IP communications link. TIVOANVIAW NOLDOOUISNI Cop yrtight- (ec) Campbell Scien cu vic: 2004 Enc... Warranty and Assistance The LLAC4 FOUR-CHANNEL, LOW-LEVEL AC CONVERSION MODULE is warranted by CAMPBELL SCIENTIFIC, INC. to be free from defects in materials and workmanship under normal use and service for twelve (12) months from date of shipment unless specified otherwise. Batteries have no warranty. CAMPBELL SCIENTIFIC, INC.'s obligation under this warranty is limited to repairing or replacing (at CAMPBELL SCIENTIFIC, INC.'s option) defective products. The customer shall assume all costs of removing, reinstalling, and shipping defective products to CAMPBELL SCIENTIFIC, INC. CAMPBELL SCIENTIFIC, INC. will return such products by surface carrier prepaid. This warranty shall not apply to any CAMPBELL SCIENTIFIC, INC. products which have been subjected to modification, misuse, neglect, accidents of nature, or shipping damage. This warranty is in lieu 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, Inc. directly. Affiliate companies handle repairs for customers within their territories. Please visit www.campbellsci.com to determine which Campbell Scientific company serves your country. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 753-2342. After an applications engineer determines the nature of the problem, an RMA number will be issued. Please write this number clearly on the outside of the shipping container. CAMPBELL SCIENTIFIC's shipping address is: CAMPBELL SCIENTIFIC, INC. RMA# 815 West 1800 North Logan, Utah 84321-1784 CAMPBELL SCIENTIFIC, INC. does not accept collect calls. LLAC4 Table of Contents PDF viewers note: These page numbers refer to the printed version of this document. Use the Adobe Acrobat® bookmarks tab for links to specific sections. 1. General Description... ee eeeetnreeeeeees 1 2: SPECHICATIONS.............ccsccesssssascessciscssevenensneessresceseeess 2 3: MCASUFEMEING wiisisssssscscsevessccececsccee canvesenscesereseseswesvoneees 2 A. WING «0. eee eee eec eee eeeeee eee eeeeneeeeeeeneeeeseeeeeseeeeeeenens 3 5. Program Examples ...............ceeeseeeseeeeeeeeeessseeeeeees 4 Figures 1. LLAC4 Four-Channel, Low-Level AC Conversion Module.. 2. LLAC to TTL. Tables . Sensor Output Frequencies .. 2. Control Port Compatibility... LLAC4 Four-Channel, Low-Level AC Conversion Module 1. General Description The LLAC4 is a peripheral device used to increase the number of low-level AC signals a datalogger can monitor. The module enables four datalogger control ports to emulate pulse-counting channels by converting the low-level AC signals to the logic levels datalogger control ports require. The LLAC4 is often used to measure up to four anemometers, and is especially useful for wind profiling applications. Compatible wind sensors include, but are not limited to, the 05103 Wind Monitor, 05106 Wind Monitor-MA, 05305 Wind Monitor-AQ, 03001 Wind Sentry Set, and 03101 Wind Sentry Anemometer. FIGURE 1. LLAC4 Four-Channel, Low-Level AC Conversion Module LLAC4 Four-Channel, Low-Level AC Conversion Module 2. Specifications Power: 8 to 16 Vde 0.1 mA @ 12 Vde Signal Conditioning: Minimum AC Input Voltage versus Output Square Wave Frequency: Input Sine Wave Output Square (mV RMS) Wave Range (Hz) 20 1.0 to 20 200 0.5 to 200 2000 0.3 to 10,000 5000 0.3 to 20,000 AC Coupling Removes DC Offset: up to +0.5V Input Hysteresis: 16mV @ 1 Hz Max AC Input Voltage: +20 V Dimensions: 3.1" Wx2.1” Hx 1.0”D (8.0 x 5.4 x 2.5 cm) 4.5°Wx2.1” Hx 1.0”D (11.2 x 5.4.x 2.5 cm) including base mounting flange Cable Length 2 ft (0.6 m) Weight: 3.2 oz (92 g) 3. Measurements Sensors, such as anemometers, may produce a sinusoidal AC signal output where the frequency is proportional to the speed of rotation. This AC signal is induced in a stationary coil by a magnet mounted on a rotating shaft. The datalogger’s pulse channels can read this low-level AC signal directly. The LLAC4 has signal conditioning to convert the low-level AC to a 0 to 5 volt square wave that can be measured on the control ports. The frequency response of the LLAC4 is the same as the low-level AC on the pulse inputs. Typically, propeller type anemometers operate at-higher frequencies than cup anemometers at the same wind speed (see Table 1). TABLE 1. Sensor Output Frequencies Sensor | Output @50m/s_ | Type 05103 510Hz Propeller 03101 67Hz Cup The datalogger must also be able to read these high frequency pulses on its control ports. Table 2 shows some common dataloggers and their compatible control port specifications. LLAC4 Four-Channel, Low-Level AC Conversion Module TABLE 2. Control Port Compatibility Datalogger | Input (Hz) | Control Port Measurement Type CR10X 40 C6,C7,C8 Switch Closure CR23X 2,500 C5,C6,C7,C8 High Frequency CR200 1,000 P_LL,P_SW,C1,C2 | High Frequency CR1000 400,000 C1,C2... C8 High Frequency Comparing Table 1 to Table 2 suggests that the CR10X may not be able to read either type of anemometer in high wind situations. However, the CR23X, CR200, and CR1000 would be appropriate datalogger choices. 4. Wiring Most sensors that have a low-level AC output will have three wires: signal, reference, and drain. The signal wire should go to P1 — P4 on the LLAC4 and the reference and drain wires to a &! on the LLAC4. The LLAC4 also requires that 12 V be applied to its 12 V terminal and G. This power should come from the datalogger or the datalogger’s power supply. A low-level AC signal on P1 will be converted to a 0-5 V square wave on the DI terminal. D1 can be wired to an appropriate datalogger control port that can make high frequency measurements. | I 2 SENSOR | i | sig+ |—+ P41 ee it = REF |» = ae 8 Bg DRAIN | —> + iy 3 z it DATALOGGER | | | | 12V | +— 12V | oe) goer Ln | Control Port | ~— D1 ea €d 20 10 9D AZb UU" so90071wva 01 —I___ 2 | | G|+ 6 | | FIGURE 2. LLAC to TTL LLAC4 Four-Channel, Low-Level AC Conversion Module 5. Program Examples Using the CR1000, let's measure four different wind speed sensors that produce low-level AC signals. These will include the RM Young 05103, 05106, 05305, propeller type anemometers, and RM Young 03101 cup anemometer. Program examples are provided for both the CR1000 and the CR200. Wiring Sensor LLAC4 CR1000 CR200 05103-L__| Sig+ | Red Pl Ref Black Drain | Clear_ | 05106-L__| Sig+ | Red P2 Ref Black | & Drain _| Clear Ss 05305-L__| Sig+__| Red P3 Ref Black | = P4 a a Drain | Clear 03101-L__| Sig+__| Black Ref. White Drain | Clear 12V_| Red 12V Battery + G Black G G Di White GS PLE D2 Green C6 C1/SDI-12 D3 Yellow | C7 (o7) D4 Blue C8 P_SW G Clear G G CR1000 Example Program ‘CR1000 Series Datalogger '‘LLAC4 Sample Program ‘Record 10-minute average wind speed in m/s for: '] RM Young 05103-L Wind Monitor Anemometer '] RM Young 05106-L Marine Wind Monitor Anemometer '] RM Young 05305-L AQ Wind Monitor Anemometer "I RM Young 03101-L Wind Sentry Anemometer ‘Declare Public Variables Public RMY05103WS Public RMY05106WS Public RMY05305WS Public RMY03101WS ‘Define Data Tables DataTable (WindSpd, 1,-1) DataInterval (0,10,min,0) Average (1,RMY05103WS,FP2,False) Average (1,RMY05106WS,FP2,False) Average (1,RMY05305WS,FP2,False) Average (1,RMY03101WS,FP2,False) EndTable LLAC4 Four-Channel, Low-Level AC Conversion Module ‘Main Program BeginProg Scan (1,Sec,0,0) PulseCount (RMY05103WS,1,15,0,1,0.098,0.0) PulseCount (RMY05106WS, 1,16,0,1,0.098,0.0) PulseCount (RMY05305WS,1,17,0,1,0.1024,0.0) PulseCount (RMY03101WS,1,18,0,1,0.750,0.20) If RMY03101 WS < 0.21 Then RMY03101 WS = 0.0 EndIf CallTable WindSpd NextScan EndProg CR200 Example Program 'CR200 Series Datalogger '‘LLAC4 Sample Program ‘Record 10-minute average wind speed in m/s for: 'l RM Young 05103-L Wind Monitor Anemometer 'l RM Young 05106-L Marine Wind Monitor Anemometer '] RM Young 05305-L AQ Wind Monitor Anemometer '] RM Young 03101-L Wind Sentry Anemometer ‘Declare Public Variables Public RMY05103WS Public RMY05106WS. Public RMY05305WS Public RMY03101WS 'Define Data Tables DataTable (WindSpd,1,-1) DataInterval (0,10,min) Average (1,RMY05103WS,False) Average (1,RMY05106WS,False) Average (1,RMY05305WS,False) Average (1,RMY03101WS,False) EndTable "Main Program BeginProg Scan (1,Sec) PulseCount (RMY05103WS,P_LL,0,1,0.098,0.0) PulseCount (RMY05106WS,C1,0,1,0.098,0.0) PulseCount (RMY05305WS,C2,0,1,0.1024,0.0) PulseCount (RMY03101WS,P_SW,0,1,0.750,0.20) If RMY03101WS < 0.21 Then RMY03101WS = 0.0 EndIf CallTable WindSpd NextScan EndProg Campbell Scientific Companies Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES www.campbellsci.com info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA www.csafrica.co.za sales@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA) PO Box 444 Thuringowa Central QLD 4812 AUSTRALIA www.campbellsci.com.au info@campbellsci.com.au Campbell Scientific do Brazil Ltda. (CSB) , Rua Luisa Crapsi Orsi, 15 Butanta CEP: 005543-000 Sao Paulo SP BRAZIL www.campbellsci.com.br suporte@campbellsci.com.br “Campbell Scientific Canada Corp. (CSC) 11564 - 149th Street NW Edmonton, Alberta TSM 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 Terre Neuve - Les Ulis 91967 COURTABOEUF CEDEX FRANCE www.campbellsci.fr campbell.scientific@wanadoo. fr Campbell Scientific Spain, S. L. Psg. Font 14, local 8 08013 Barcelona SPAIN www.campbellsci.es info@campbellsci.es Please visit www.campbellsci.com to obtain contact information for your local US or International representative. IVONVIAW NOLDOOULSNI A100 Null Modem Adapter, 00 Power Su rging Regulators and A105 Additional 12 V Terminals Adapter Revision: 10/04 Copyrrepghst Ce). 2H 00-2004 Campbell Serves tifi¢, tac. Warranty and Assistance The PS100 AND CH100 POWER SUPPLY AND CHARGING REGULATORS, A100 NULL MODEM ADAPTER, AND A105 ADDITIONAL 12 V TERMINALS ADAPTER are warranted by CAMPBELL SCIENTIFIC, INC. to be free from defects in materials and workmanship under normal use and service for twelve (12) months from date of shipment unless specified otherwise. Batteries have no warranty. CAMPBELL SCIENTIFIC, INC.'s obligation under this warranty is limited to repairing or replacing (at CAMPBELL SCIENTIFIC, INC.'s option) defective products. The customer shall assume all costs of removing, reinstalling, and shipping defective products to CAMPBELL SCIENTIFIC, INC. CAMPBELL SCIENTIFIC, INC. will return such products by surface carrier prepaid. This warranty shall not apply to ary CAMPBELL SCIENTIFIC, INC. products which have been subjected to modification, misuse, neglect, accidents of nature, or shipping damage. This warranty is in lieu of all other warranties, expressed cr 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, Inc. directly. Affiliate companies handle repairs for customers within their territories. Please visit www.campbellsci.com to determine which Campbell Scientific company serves your country. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 753-2342. After an applications engineer determines the nature of the problem, an RMA number will be issued. Please write this number clearly on the outside of the shipping container. CAMPBELL SCIENTIFIC's shipping address is: CAMPBELL SCIENTIFIC, INC. RMA# 815 West 1800 North Logan, Utah 84321-1784 CAMPBELL SCIENTIFIC, INC. does not accept collect calls. PS100 Table of Contents PDF viewers note: These page numbers refer to the printed version of this document. Use the Adobe Acrobat® bookmarks tab for links to specific sections. 1. Gerieral Description... ::5..ccccsccssccecereesceeeseeeseesavesssas 1 2 | SPECHICAUONS cc tetcer canes) sevceecwteed ssraevreseenscsseraneseesenes seen 1 BS. WITHIN... eee eee e eee eeeeeeeeeeeeeeeeeeeeeeeeeaaeeeeeeeeeeeeeeaea 2 4. A100 Null Modem Adapter....................:::ceeeeeeeeeeeeeeeee 4 Figures 1. Wiring to Charger 2. Simplified Charging Circuit Schematic 3. Null Modem Connections PS100 and CH100 Power Supply and Charging Regulators, A100 Null Modem Adapter, and A105 Additional 12 V Terminals Adapter 1. General Description The PS100 is a 12-volt power supply that includes a charging regulator and a 7 amp hour battery. The CH100 is a charging regulator that is used with a Campbell Scientific battery pack such as the BP12 or BP24 or with a user- supplied battery. Charging power is typically supplied by a CSI Model 9591 AC Transformer, a CSI Model 14014 AC Transformer, or by an MSX10 or MSX20 solar panel. The PS100 and CH100 each have one adapter connector that will allow connecting one of the following adapters. The A100 Null Modem Adapter has two 9-pin connectors that provide a null modem for use in a site, without a datalogger. The A100 connects and powers two Campbell Scientific peripherals that would normally be connected to a datalogger. These peripherals are typically modems linking different communications technologies; e.g., telephone to radio. The A105 Additional 12 V Terminals Adapter may be used to provide additional 12 V and ground terminals where the power supply is used to power several devices. 2. Specifications Input Voltage (CHG terminals) Battery Connections Charging Output Voltage: Temperature Compensation Range: Charging Current Limit: Power Out (+12 terminals) Voltage: Current Limited w / 3 A Thermal Fuse: 15 to 28 VDC or 18 VAC RMS Temperature compensated float charge for 12 V Battery -40 to +60°C 1.2 Amps typical Unregulated 12 V from Battery >3 A @<20°C 3 A @20°C 2.1A @ 50°C 1.8 A @ 60°C PS100 and CH100 Power Supply and Charging Regulators Battery Packs Operating Temperature Range: -40 to +60°C Capacity: PS12LA 7 Amp hours BP12 12 Amp hours BP24 24 Amp hours WARNING These batteries are designed to be float charged. Permanent damage occurs and battery life is shortened if the battery is allowed to discharge below 10.5 volts. AC Transformer: CSI Model No. 9591 Input Voltage: 120 VAC Output Voltage: : ; 18 VAC RMS Output Current (max): 1.2 Amps RMS Protection (automatic reset): 85°C thermal reset breaker UL Approval: * UL-1950 AC Transformer: CSI Model No. 14014 Input Voltage: 90 - 264 VAC; 47 - 63 Hz Output Voltage: 18 VDC Output Current (max): 1.3 Amps UL Approved, File No.: E137895 PS100 Physical Specifications: 10.5 cm tall, 19 cm long, 7 cm wide 3. Wiring An internal or external battery is connected to the charger by means of the INT (Internal) or EXT (External) connectors, as shown in Figure 1. An “external battery” cable comes with the charger that allows connecting another battery to the charger to provide power if the main battery is removed. The red lead connects to the positive battery terminal and the black lead connects to the negative terminal. WARNING Reversal of polarity of external battery will damage the PS100 or CH100. It is possible to leave two batteries connected. The battery connections are diode isolated (Figure 2); however, if one of the batteries fail, it could draw all the charging current and the other battery will be discharged. CAUTION A battery must be attached for the charger to function correctly as a power supply. PS100 and CH100 Power Supply and Charging Regulators The leads from the transformer or solar panel are connected to the CHG terminals. Polarity does not matter; either lead can be connected to either terminal. The wires that connect power to the datalogger and/or peripherals are connected to the +12 and ground (®) terminals. To Battery ~~ From Transformer ee Papago aa as Spe Rad or Solar Panel D ase ere ge hetescee : (a3 t © Cod we Oh eee ioe WARNING UFTTO bt 85 To Datalogger Oo ica or Peripherals | oe 4 +12V Hines a _ } PS100 12V POWER SUPP iC WITH CHARGING REGULATOR ai These look identical when unplugged FIGURE 2. Simplified Charging Circuit Schematic PS100 and CH100 Power Supply and Charging Regulators 4. A100 Null Modem Adapter The A100 has two 9-pin CS I/O ports with a null modem between them. The ports are used to connect two 9-pin devices that would normally be connected to the CS I/O port on a Campbell datalogger. The charger supplies 12 volts and 5 volts to the appropriate pins on the connector for powering the connected devices. CAUTION This cannot be used as a null modem between two RS-232 devices. 2 +5 V +12 V ae. Ma 7 7 1.85A Thermal Fuse +1 Ring FIGURE 3. Null Modem Connections Campbell Scientific Companies Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES www.campbellsci.com info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA www.csafrica.co.za sales@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA) PO Box 444 Thuringowa Central QLD 4812 AUSTRALIA www.campbellsci.com.au info@campbellsci.com.au Campbell Scientific do Brazil Ltda. (CSB) Rua Luisa Crapsi Orsi, 15 Butanta CEP: 005543-000 Sao Paulo SP BRAZIL www.campbellsci.com.br suporte@campbellsci.com.br Campbell Scientific Canada Corp. (CSC) 11564 - 149th Street NW Edmonton, Alberta TSM 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 Terre Neuve - Les Ulis 91967 COURTABOEUF CEDEX FRANCE www.campbellsci.fr campbell.scientific@wanadoo.fr Campbell Scientific Spain, S. L. Psg. Font 14, local 8 08013 Barcelona SPAIN www.campbellsci.es info@campbellsci.es Please visit www.campbellsci.com to obtain contact information for your local US or International representative. IVONVI S.\YOLVaAdO surement and ontrol System Revision: 5/05 Copyright (c) 2000-2005 Campbell Scientific, Inc. Warranty and Assistance The CR1000 MEASUREMENT AND CONTROL SYSTEM is warranted by CAMPBELL SCIENTIFIC, INC. to be free from defects in materials and workmanship under normal use and service for thirty-six (36) months from date of shipment unless specified otherwise. Batteries have no warranty. CAMPBELL SCIENTIFIC, INC.'s obligation under this warranty is limited to repairing or replacing (at CAMPBELL SCIENTIFIC, INC.'s option) defective products. The customer shall assume all costs of removing, reinstalling, and shipping defective products to CAMPBELL SCIENTIFIC, INC. CAMPBELL SCIENTIFIC, INC. will return such products by surface carrier prepaid. This warranty shall not apply to any CAMPBELL SCIENTIFIC, INC. products which have been subjected to modification, misuse, neglect, accidents of nature, or shipping damage. This warranty is in lieu 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, Inc. directly. Affiliate companies handle repairs for customers within their territories. Please visit www.campbellsci.com to determine which Campbell Scientific company serves your country. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTIFIC, INC., phone (435) 753-2342. After an applications engineer determines the nature of the problem, an RMA number will be issued. Please write this number clearly on the outside of the shipping container. CAMPBELL SCIENTIFIC's shipping address is: CAMPBELL SCIENTIFIC, INC. RMA# 815 West 1800 North Logan, Utah 84321-1784 CAMPBELL SCIENTIFIC, INC. does not accept collect calls. CR1000 Table of Contents PDF viewers note: These page numbers refer to the printed version of this document. Use the Adobe Acrobat® bookmarks tab for links to specific sections. CR1000 Overview.................ccccccccceeeseeeeececeeseeaeeeeeees OV1. Physical Description OV1.1 Measurement Inputs .. OV1.1.1 Analog Inputs .. OV1.1.2 Signal Grounds OV1.1.3 Power Ground.. OV1.1.4 Ground Lug ed OV1.1.5 Power In........... -OV-3 OV1.1.6 Switched 12 Volts SW-12. OV1.1.7 Switched Voltage Excitation (EX).. OV1.1.8 Digital I/O..... OV1.1.9 Pulse Inputs... OV1.2 Communication and Data Storage. OV1.2.1 Peripheral Port. OV12:2) CSO. sssssssvcs OV1.2.3 Computer RS-232... OV1.3 Power Supply and AC Adapter .. fa OV2. Memory and Programming Concepts . .OV-4 OV2.1 Memory. OV2.2 Programming OV2.3 Measurements, Processing, Data Storage. OV2.4 Data Tables.. a OV2.5 PakBus Communication with the CR1000..........cceeseseeeeee OV-7 OV2.6 Set up: Device Configuration Utility or Keyboard Display ..OV-7 OV3. Device Configurator.... OV3.1 Main DevConfig Screen OV3.2 Deployment Tab OV3.2.1 Datalogger .... OV3.2.2 Ports Settings OV3.2.3 Advanced OV3.3 Logger Control Tab OV3.4 Send OS Tab - Downloading an Operating System .. OV3.5 Settings Editor Tab. OV3.6 Terminal Tab OV4. Quick Start Tutorial OV4.1 Software Products for the CR1000 OV4.1.1 Options for Creating CR1000 Programs .. OV4.2 Connections to the CR1000 OV4.3 Setting the CR1000 PakBus Address OV4.4 PC200W Software OV4.4.1 Creating a CR1000 Program using Short Cut.. OV4.4.2 Configuring the Setup Tab... OV4.4.3 Synchronize the Clocks OV4.4.4 Send the Program OV4.4.5 Monitor Data Tables.. OV4.4.6 Collect Data eed OV4.4.7 View Data ......ccccececssesseseseeseseeesesesneseseeesneneseeseaeeenes CR1000 Table of Contents OV4.5 Programming using the CRBasic Program Editor.............. OV-27 OVS. Keyboard Display.. OVS.1 Data Display . OVS5.1.1 Real Time Tables... OV5.1.2 Real Time Custom .... OV5.1.3 Final Storage Tables.. OVS.2 Run/Stop Program... OVS5.3 File Display OVS5.3.1 File: Edit OV5.4 PCCard Display OVS.5 Ports and Status OVS.6 Settings... OV5.6.1 PakBus Settings . OV5.6.2 Configure Display. OV6. Specifications 1. Installation and Maintenance...........................::06 1-1 1.1 Protection from the Environment .2 Power Requirements ........ 1.3 CR1000 Power Supplies .. 1.3.1 BPALK Alkaline Power Supply... 1.3.2 PS100 Lead Acid Power Supply .. 1.3.3 A100 Null Modem Adapter 4s: Solar Panels vr cecersntassctestcessernerese 1.5 Direct Battery Connection to the CR1000 Wiring Panel 1.6 Vehicle Power Supply Connections 1.7 CR1000 Grounding....... 1.7.1 ESD Protection 1.7.2 Effect of Grounding on Measurements: Common Mode Rye & fet et tet ett tt oi 7 weonudiy 1.7.3 Effect of Grounding on Single-Ended Measurements... 1.8 Powering Sensors and Peripherals 1.9 Controlling Power to Sensors and Peripherals 1.9.1 Use of Digital I/O Ports for Switching Relays .. 1.10 Maintenance........ 1.10.1 Desiccant... 1.10.2 Replacing the Internal Battery EEeesess BERREGNEHS 2. Data Storage and Retrieval ..................... ee 2-1 2.1 Data Storage in CR1000... 2.1.1 Internal SRAM 2.1.2 CFM100... 2.2 Internal Data Format . 2.3 Data Collection ..... 2.3.1 Via a Communications Link.. 2.3.2 Via CF Card........... 2.4 Data Format on Computer 2.4.1 Header Information .... 2.4.2 TOAS ASCH File Format.. 2.4.3 TOB1 Binary File Format . 2.4.4 TOB3 Binary File Format CR1000 Table of Contents 3. CR1000 Measurement Details...............000cc 31 Be 3.3) 3.4 Analog Voltage Measurement Sequence SLi) Woltage Range...) -..c-c.ccscceecscereonces 3.1.2 Reversing Excitation or the Differential Input 3.1.3 Measuring Single-Ended Offset . 3.1.4 SettlingTime 3.1.5 Integration... Single Ended and Differential Voltage Measurements Signal Settling Time 3.3.1 Minimizing Settling Errors . 3.3.2 Measuring the Necessary Settling Time Thermocouple Measurements 3.4.1 Error Analysis .............. 3.4.2 Use of External Reference Junction or Junction Box 3.5 Bridge Resistance Measurements ........... 3-17 3.6 Measurements Requiring AC Excitation 3-19 3.7 Pulse Count Measurements. 3.8 Self Calibration 4. CRBASIC - Native Language Programming ........... 4-1 4.1 Format Introduction 42 43 44 4.5 4.6 47 48 49 4.1.1 Mathematical Operations .... 4.1.2 Measurement and Output Processing Instructions 4.1.3 Inserting Comments Into Program Programming Sequence Example Program . 4.3.1 Data Tables . 4.3.2 The Scan -- Measurement Timing and Processing Variable Data Types . 4.4.1 FLOAT.. 44.2 LONG... 4.4.3 BOOLEAN . 4.4.4 STRING...... 4.4.5 Numerical Expressions with Floats, Longs and Booleans .. Numerical Entries ................++ Logical Expression Evaluation .. 4.6.1 What is True?.. 4.6.2 Expression Evaluatio: 4.6.3 Numeric Results of Expression Evaluation. Flags.. Parameter Types 4.8.1 Expressions in Parameters. 4.8.2 Arrays of Multipliers Offsets for Sensor Calibration is Program Access to! Data! Lables ccrcccrecscessarcssessesssecsseeveresesvssesesvassecsvases 5. Program Declarations ©... ee eee eeeeeeeeeeees 5-1 CR1000 Table of Contents 6. Data Table Declarations and Output Processing INStFUCTIONS *.5.<.<ccccce: soc cesescocsseevescveveresevesctitsistsseresesoondess 6.1 Data Table Declaration ... 6.2 Trigger Modifiers........ 6.3 Export Data Instructions . 6.4 Output Processing Instructions.... 7. Measurement Instructions ........................ccccceeeeeeeee 7-1 7.1 Voltage Measurements 3 7.2 Thermocouple Measurements . 7-3 7.3 Half Bridges..... 7.4 Full Bridges.. 7.5 Excitation... 7.6 Self Measurement 7.7 Digital V/O........ 7.8 Specific Sensors 7.9 Peripheral Devices .. 8. Processing and Math Instructions .................0.... 8-1 9. Program Control Instructions..................:ceee 9-1 10. Custom Keyboard Display .....................e 10-1 11. String Functions ..........0....0 cece eee eeeneees 11.1 Expressions with Strings... 11.1.1 Constant Strings .. 11.1.2 Add Strings.......... 11.1.3 Subtraction of Strings.. 11.1.4 String Conversion to/from Numeric 11.1.5 String Comparison Operators = 11.1.6 Sample () Type Conversions and Other Output Processing Instructions 11.2 String Manipulation Function: 12. Serial Input and Output Functions. ..................... 12-1 13. PakBus Communication Instructions................ 13-1 Appendix A. CR1000 Status Table. o.oo... eee cette eeeeeeee A-1 iv Figures Tables CR1000 Table of Contents OV1-1. CR1000 Measurement and Control System... OV1-2. CR1000 Wiring Panel and Associated Instructions. OV2-1. Typical Data Table ...... OV-7 1.3-1. BPALK Power Supply | A | ||| 1.7-1. Schematic of CR1000 Grounds 1.9-1. Relay Driver Circuit with Relay .. 1.9-2. Power Switching without Relay .. 1.10-1. CR1000 with wiring panel 1.10-2. Loosen thumbscrew to remove CR1000 canister from wiring panel 1.10-3. Pull edge with thumbscrew away from wiring panel 1.10-4. Remove nuts to disassemble canister .. 1.10-5. Remove and replace battery ............. 3.3-1. Settling Time for Pressure Transducer 3.4-1. Panel Temperature Errors.. 3.4-2. Panel Temperature Gradients during -55 to 80 °C Change .. 3.4-3. Panel Temperature Gradients during 80 to 25 °C Change... 3.4-4. Diagram of Junction Box. 3.5-1. Circuits Used with Bridge Measurement Instructions 6.4-1. Example Crossing Data 6.4-2. Crossing Data with Second Dimension Value.. 6.4-3. Input Sample Vectors . 6.4-4. Mean Wind Vector es 64-5. Standard! Deviation of Direction.....................0..cssscsscesseorsceceresusseoees 7.7-1. Input conditioning circuit for low-level and high level POLIO LAV era SIN Pie ecscestessvcctercok sees soees cs ctetsesvssetesesectresete lace nee stoeessse tere eres 7-17 7.7-2. Conditioning Large Voltage Pulses ................s.sssssssssssessseeesseeeeeeses 7-20 8-1. Dew Point Temperature over the RH Range for Selected PRUE TEMPCLAatares 25) castes sscsecssscscascssesstchesesssesseseves saststevesestesenteseveseeess tee 8-10 8.2 Effect of RH Errors on Calculated Dew Point................seccssseseeseseeees 8-11 1.3-1. Typical Alkaline Battery Service and Temperature... 1.3-2. PS100, Battery, and AC Transformer Specifications . 1.8-1. Current Sourcing Limits 1.8-2. Typical Current Drain for Some CR1000 Peripherals 1.10-1. CR1000 Lithium Battery Specifications.. 2.2-1. CR1000 Data Types ... 2.2-2. Resolution and Range Limits of FP2 Data 22-3. FP2 Decimal Location..........<.<<.:s.<0s<0 3.3-1. First Six Values of Settling Time Data 3.4-1. Limits of Error for Thermocouple Wire 3.4-2. Voltage Range for Maximum Thermocouple Resolution.. 3.4-3. Limits of Error on CR1000 Thermocouple Polynomials... as 3.4-4. Reference Temperature Compensation Range and Polynomial Error Relative to NIST Standards 3.4-5. Example of Errors in Thermocouple Temperature ... 4.5-1. Formats for Entering Numbers in CRBasic.. 4.6-1. Synonyms for True and False... 4.8-1. Rules for Names... 7.7-1. Calibrate Return Value Decode CR1000 Overview The CR1000 provides precision measurement capabilities in a rugged, battery-operated package. The CR1000 includes CPU and analog and digital inputs and outputs. The on- board, BASIC-like programming language includes data processing and analysis routines. PC200 3.0, PC400 1.2, or LoggerNet 3.0 software provides program generation and editing, data retrieval, and realtime monitoring. A ay FIGURE OV1-1. CR1000 Measurement and Control System OV1. Physical Description Figure OV1-2 shows the CR1000 panel and the associated program instructions. The details of the measurement instructions can be found in Section 7. OV1.1 Measurement Inputs OV1.1.1 Analog Inputs There are 8 differential or 16 single-ended inputs for measuring voltages up to +5 V. A thermistor installed in the wiring panel can be used to measure the reference temperature for thermocouple measurements, and a heavy copper grounding bar and connectors combine with the case design to reduce temperature gradients for accurate thermocouple measurements. Resolution on the most sensitive range is 0.67 1V OV-1 CR1000 Overview Analog Inputs Voltage VoltDiff VoltSE Thermocouple TCDiff TCSE Bridge measurements (use VX) BrFull BrFull6W BrHalf BrHalf3W BrHalf4Ww Others PanelTemp PeriodAvg AM25T Switched Voltage Excitation (EX) Excite BrFull BrFull6w BrHalf BrHalf3W BrHalf4Ww Ground Lug = RS-232 Pulse Inputs PulseCount PulseCountReset Power In POWER OUT ae oar C) ° ° ares Pe) ie ee - s GROUND CR1000 Se WIRING P/NEL —— mar cecr) ae cy (o} Gi ot) Cl |i) Ci | Cin) (Cin) | in) in) in| nt) Cnt on) | Cl Cl cs VO DSP4 (Data Tables and Output) CAMPBELL ey SCIENTIFIC = INC. Logan, Utah PERIPHERAL PORT Le ante Switched 12 Volts SW-12 PortSet SWwl2 SDM Connections CS7500 CSAT3 SDMINT8 SDMSpeed SDMTrigger Control I/O PortGet PortSet Power Ground (G) Peripheral Port CardOut (Data Tables and Output) PulseCount PulseCountReset ReadIO TimerlO WritelO FIGURE OV1-2. CR1000 Wiring Panel and Associated Instructions Ov-2 CR1000 Overview OV1.1.2 Signal Grounds (=) The terminals marked with + are used to connect the ground reference for measurements and shield wires. OV1.1.3 Power Ground (G) The G terminals (power grounds) are intended to carry return currents from the 5V, SW-12, 12V, and C1-C8. OV1.1.4 Ground Lug = The large ground lug is used to connect a heavy gage wire to earth ground. A good earth connection is necessary fix the ground potential of the datalogger and to send to earth transients that come in on either the G or = terminals or are shunted to ground via the spark gaps protecting other inputs. OV1.1.5 Power In The G and 12V terminals on the Power In connector plug are for connecting power from an external battery to the CR1000. These are the only terminals that can be used to input battery power; the other 12V and SW-12V terminals are output only. OV1.1.6 Switched 12 Volts SW-12 The SW-12 terminals provide an unregulated 12 volts that can be switched on and off under program control. OV1.1.7 Switched Voltage Excitation (EX) Three switched excitation channels provide precision programmable voltages within the +2.5 Volt range for bridge measurements. Each analog output will provide up to 25 mA between +2.5 V. OV1.1.8 Digital I/O There are 8 digital Input/Output channels (0 V low, 5 V high) for frequency measurement, pulse counting, digital control, and triggering. In addition to the individual channel digital I/O functions, there are several groups of channels that can be used for other functions. 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 peripherals. The COM groupings can be used for serial I/O communication and Intelligent Sensor input. OV1.1.9 Pulse Inputs Two Pulse input channels can count pulses from high-level (5 V square wave), switch closure, or low-level A/C signals. OV-3 CR1000 Overview OV1.2 Communication and Data Storage OV1.2.1 Peripheral Port CAUTION OV1.2.2 CSI/O The peripheral port is for attaching data storage or communication peripherals. The CFM100 is a module that plugs onto the peripheral port and has a slot for a Type I or Type II compact flash card (Section 2.1.2). Removing a card from the CFM100 while the card is active can cause garbled data and can actually damage the card. Always press the button to disable the card for removal before switching off the CR1000 power. A 9-pin serial I/O port supports CSI peripherals. OV1.2.3 Computer RS-232 RS-232 port that allows direct connection to most PCs. The RS-232 port is not isolated. OV1.3 Power Supply and AC Adapter The CR1000 requires a separate 12 V power supply. The PS100 power supply has a 7 amp hour battery with built in charging regulator. Optional adapters for AC power are available. Charging power can also come from a 17-28 VDC input such as a solar panel. OV2. Memory and Operating Concepts OV2.1 Memory The CR1000 has two MB Flash EEPROM that is used to store the Operating System. Another 128 K of Flash is used to store configuration settings. A minimum of 2 MB SRAM (4 MB optional) is available for program storage (16K), operating system use, and data storage. The size of available memory may be seen in the status file. Additional data storage is available by using a compact flash card in the optional CFM100 Compact Flash Module. OV2.2 Programming OV-4 The CR1000 program directs how and when the sensors are measured and data are stored. The program is created on a computer and sent to the CR1000. The CR1000 can store a number of programs in memory. Campbell Scientific has two software applications that create CR1000 programs: ShortCut and the CRBasic Editor. For many applications ShortCut is a good place to start. With ShortCut you select the sensors to measure, the units to report the measurements in, and the CR1000 Overview data to output. ShortCut supports most of the sensors sold by Campbell Scientific as well as generic measurements. The CR1000 programs created by ShortCut are generally clear and provide a good example of CRBasic code for those who wish to write CR1000 programs themselves. For those that have the need or inclination to tackle more complex programs, the CRBasic Editor is used to create and edit the CRBasic programs that the CR1000 runs. Section 4 provides an introduction to CRBasic Programming. The CRBasic Editor has syntax highlighting and online help for the CR1000 instruction set described in Sections 5-12. ShortCut is included with PC200, PC400 and LoggerNet and is available for free from the Campbell Scientific web site. The CRBasic Editor is included in PC400 and LoggerNet. OV2.3 Measurements, Processing, Data Storage A CR1000 program consists of measurement/control, SDM communications, and processing. Measurement/control actions are mainly through the wiring panel interface to the world. For example, voltages are measured, pulses are counted and control ports are set high or low. Processing includes converting the raw hardware results into numbers representing engineering units, performing calculations, and storing data. The CR1000 can execute its measurement and processing tasks in either a sequential or pipelined mode. Pipelined execution has more precise timing of the measurements, and may be more efficient with processing and power consumption. However, because multiple tasks are taking place at the same time, the sequence in which certain tasks are executed may not be in the exact order that they are programmed. Sequential execution follows the exact sequence of the program but may be a little slower because it does only one step of the program at one time. The CR1000 compiler can automatically decide which mode to compile in, using the more efficient pipelined mode when possible and switching to sequential mode where there might be any chance that the sequence could affect the program operation. In sequential execution the instructions in the program are executed exactly in the sequence that they exist in the program. After a measurement is made the result is converted to a value determined by the processing included in the instruction. Before the next measurement is made, any processing instructions between the measurement instructions are completed. Conditional measurements and conditional processing are allowed. Because the time required for the processing may change with the numbers or code processed and the processing can be interrupted for servicing communications, the time between measurements can vary. The declaration “SequentialMode” in the CR1000 program forces the program to be executed sequentially Pipelined execution splits measurement, SDM communications, and processing into separate tasks. The measurement task manipulates the measurement and control hardware on a rigidly timed sequence. The SDM task gets data from and sends data to SDM peripherals. The processing task OV-5 CR1000 Overview OV-6 processes and stores the resulting measurements, does serial I/O communications, and makes the decisions to actuate controls. The measurement task stores raw Analog to Digital Converter (ADC) data directly into memory. The SDM task stores its results into another section of memory. As soon as the data from a scan is in memory, the processing task starts. There are at least two buffers each allocated for the raw measurement and SDM data, thus the buffers from one scan can be processed while the measurement and SDM tasks are filling others. The Scan instruction that sets the scan interval has a buffer option parameter that allows the programmer to set the buffer size in terms of the number of scans that can be buffered. (This option is ignored in sequential mode.) This is a powerful tool that allows the processing task to lag behind the measurement and SDM tasks without skipping any scans. For example, at a 10 Hz measurement rate the normal processing that scales the measurements may keep up with the scan easily. However, periodic output processing every 30 minutes may require 3 scans (0.3 seconds) to complete. With a buffer size greater than 3, the CR1000 can keep up with the measurements and data storage and never skip a measurement. When a program is compiled in pipelined mode, the tasks are separated. When the program runs, the measurement tasks are performed at a precise rate, ensuring that the measurement timing is exact and invariant. Because evaluating expressions is part of the processing task, conditional measurements are not possible in the pipelined mode. v Measurement Task Analog Measurements and Excitation Read Pulse Counters Read Control Ports (GetPort) Set Control Ports (Set Port) v Processing Task SDM Task / Processing SDM Instructions Output (Except SDMSIO4 & Serial /O SDMIO16) SDMSIO4, SDMIO16 ReadIO, WritelO Evaluate expressions and set variables in Measurement and SDM instructions OV2.4 Data Tables The CR1000 can store individual measurements or it may use its extensive processing capabilities to calculate averages, maxima, minima, histograms, FFTs, etc., on periodic or conditional intervals. Data are stored in tables such as listed in Table OV2-1. The values to output are selected when running ShortCut or when writing a datalogger program directly. CR1000 Overview Table OV2-1. Typical Data Table TOAS Fritz ICR1000 {1079 CR1000.Std.1.0 |CPU:TCTemp.CR1 |51399 ‘Temp TIMESTAMP RECORD |Reff_Avg |TC_Avg(1) |TC_Avg(2) TC_Avg(3) TC_Avg(4) |TC_Avg(5S) |TC_Avg(6) TS RN degC DegC DegC DegC DegC DegC DegC Avg Avg Avg Avg Avg Avg Avg 10/28/2004 12:10 }119 23.52 23.49 23.49 23.5 23.49 23.5 23.5 10/28/2004 12:20 |120 23.55 23.51 23.51 23.51 23.51 23.51 23.52 10/28/2004 12:30 121 23.58 23.52 23.53 23.53 23.53 23.53 23.53 10/28/2004 12:40 |122 23.58 23.53 23.54 23.54 23.54 23.54 23.54 OV2.5 PakBus Communication with the CR1000 The CR1000 uses PakBus network communications protocol. PakBus increases the number of communications and networking options available to the datalogger. In addition to communicating via its RS-232 and/or CS I/O ports, the CR1000 can also communicate via the digital I/O COM ports. Some of the advantages of PakBus are: e¢ Routing — the CR1000 can act as a router, passing on messages intended for another logger. PakBus supports automatic route detection and selection. e Short distance networks with no extra hardware — A CR1000 can talk to another CR1000 over distances up to 30 feet by connecting 3 wires between the dataloggers: transmit, receive, and ground. A PC communicating with one of these loggers (e.g. via a phone modem or RF to the CS I/O port) can be routed through that datalogger to the other datalogger. e Datalogger to datalogger communications — Special PakBus instructions simplify transferring data between dataloggers for distributed decision making or control. All devices that send or receive messages in a PakBus network must have a unique PakBus Address. The CR1000 default PakBus address is 1. Ina PakBus Network each datalogger must be set to a unique address before it is installed in the network. To communicate with the CR1000, the PC software (e.g., LoggerNet) must know the CR1000’s PakBus address. OV2.6 Set up: Device Configuration Utility or Keyboard Display When you receive a new CR1000 from Campbell Scientific it should be set to the default PakBus address, 1. If you only have one PakBus datalogger, or will only communicate with the CR1000 with a direct RS-232 or telephone modem connection, there may be no need to change the address. However, if a CR1000 has been in use or someone has borrowed it, you may need to check what the address is or to set it or some other setting. While there are a number of ways to do this, the two most basic are to use the Device Configuration Utility or the Keyboard display. OV-7 CR1000 Overview OV3. Device Configurator The Device Configuration Utility (DevConfig) sets up dataloggers and intelligent peripherals before those devices are deployed in the field and before these devices are added to networks in Campbell Scientific datalogger support software such as LoggerNet or PC400. Some key features of DevConfig include: ¢ DevConfig only supports direct serial connections between the PC and devices. ¢ DevConfig can not only send operating systems to supported device types, but can also set datalogger clocks and send program files to dataloggers. ¢ DevConfig allows you to determine operating system types and versions e DevConfig provides a reporting facility where a summary of the current configuration of a device can be shown on the screen and printed. This configuration can also be saved to a file and used to restore the settings in the same or a replacement device. ¢ Some devices may not support the configuration protocol in DevConfig, but do allow configurations to be edited through the terminal emulation screen. e Help for DevConfig is shown as prompts and explanations on its main screen. Help for the appropriate settings for a particular device can also be found in the user’s manual for that device. © Updates to DevConfig are available from Campbell Scientific's web site. These may be installed over top of older versions. OV3.1 Main DevConfig Screen The DevConfig window is divided into two main sections: the device selection panel on the left side and tabs on the right side. After choosing a device on the left, you will then have a list of the serial ports (COM1, COM2, etc.) installed on your PC. You’ll be offered a choice of baud rates only if the device supports more than one baud rate in its configuration protocol. The page for each device presents instructions about how to set up the device to communicate with DevConfig. Different device types will offer one or more tabs on the right. Ov-8 CR1000 Overview SRD ke tie en sg File Help Device Type A100 | send Os | 'CCE40 "= | cR1000 CRIOX-PB CRIGX-TD CR2K CR2%-PB In order to configure the CR1000, power (+12 Volts DC) must be supplied to the a datalogger on its Power Inport. Anine pin cable should also be connected CR5000 between one of your computer's RS-232 Ports and the RS—232 port on the CR510 datalogger. When these requirements have been met, select the appropriate CRS510-PB serial port in the left panel and press the Connect button. CR510-TD cRs000x MD485 NL100 ~ atten F400 4 SC105 . 335 pe Eee ee SDM-CAN er buaiod SMxM Unknown . 6 CR1000 ‘Serial Port ae te COM1 — Baud Rate When the user presses the Connect button, the device type, serial port, and baud rate selector controls become disabled and, if DevConfig is able to connect to the CR1000, the button will change from "Connect" to "Disconnect". The Display will change to: PASM Sue Ree Ree Deployment | Logger Control] Send OS | Settings Editor | Terminal Emulator | Datalogger | Ports Settings | Advanced | Serial Number: [1073 Security Password 1: [0 = 0S Version: [CR1000.Std00.60 Security Password fF — Station Name: ff Secutty Password 3: [7 =} PakBus Address: [T =} Station Name Specifies a name assigned to this station Factory Defaults OV3.2 Deployment Tab The Deployment Tab allows the user to configure the datalogger prior to deploying it. Ov-9 CR1000 Overview OV3.2.1 Datalogger OV-10 Serial Number displays the CR1000 serial number. This setting is set at the factory and cannot be edited. OS Version displays the operating system version that is in the CR1000. Station Name displays the name that is set for this station. PakBus Address allows you to set the PakBus address of the datalogger. The allowable range is between 1 and 4094. Each PakBus device should have a unique PakBus address. Addresses >3999 force other PakBus devices to respond regardless of their respective PakBus settings. See the PakBus Networking Guide for more information. Security: Up to three levels of security can be set in the datalogger. Level 1 must be set before Level 2 can be set, and Level 2 must be set before Level 3 can be set. If a level is set to 0, any level greater than it will also be set to 0 (e.g., if Level 2 is 0, Level 3 is 0). Valid security codes are 1 through 65535 (0 is no security). Each level must have a unique code. Functions affected by each level of security are: Security Password 1 When this level is set, collecting data, setting the clock, and setting variables in the Public table are unrestricted, requiring no security code. If the user enters the Security] code, the datalogger program can be changed or retrieved or variables can be set in the Status table. Security Password 2 When this level is set, data collection is unrestricted, requiring no security code. If the user enters the Security2 code, the datalogger clock can be changed and variables in the public table can be changed. If the user enters the Security1 code, non-read-only values in the status table can be changed and the datalogger program can be changed or retrieved. Security Password 3 When this level is set, all communication with the datalogger is prohibited if no security code is entered. If the user enters the Security3 code, data can be collected from the datalogger. If the user enters the Security2 code, data can be collected, public variables can be set, and the clock can be set. If the user enters the Security 1 code, all functions are unrestricted. CR1000 Overview OV3.2.2 Ports Settings PASO me Rea Deployment | Logger Control | Send 0S | Settings Editor | Terminal Emulator | Datalogger Potts Settings | Advanced | Select the Pot [SEER | Neihbous | [Begin Baud Rate: [Disabled ae Beacon Intervak 0 Verity Intervak [0 - f | | | ‘ | | 4 4 | Rea Range | “Bemove Range Choose the datalogger port to configure. The port that is selected by this control will dictate which baud rates, beacon intervals, verify intervals, and neighbour lists will be displayed and/or edited Baud Rate 115200 z ] (acl Cancel | _EactoyDefauts | _ReadFie | __Sunmay | Selected Port specifies the datalogger serial port to which the beacon interval and hello setting values will be applied. Beacon Interval sets the interval (in seconds) on which the datalogger will broadcast beacon messages on the port specified by Selected Port. Verify Interval specifies the interval (in seconds) at which the datalogger will expect to have received packets from neighbors on the port specified by Selected Port. A value of zero (default) indicates that the datalogger has no neighbor list for this port. Neighbors List, or perhaps more appropriately thought of as the “expected neighbors list”, displays the list of addresses that this datalogger expects to find as neighbors on the port specified by Selected Port. As you select items in this list, the values of the Begin and End range controls will change to reflect the selected range. You can add multiple lists of neighbors on the same port. Begin and End Range are used to enter a range of addresses that can either be added to or removed from the neighbors list for the port specified by Selected Port. As you manipulate these controls, the Add range and Remove Range buttons will be enabled or disabled depending on the relative values in the controls and whether the range is present in or overlaps with the list of address ranges already set up. These controls will be disabled if the Verify Interval value is set to zero. Add Range will cause the range specified in the Begin and End range to be added to the list of neighbors to the datalogger on the port specified by Selected Port. This control will be disabled if the value of the Verify Interval is zero or if the end range value is less than the begin range value. OV-11 CR1000 Overview Remove Range will remove the range specified by the values of the Begin and End controls from the list of neighbors to the datalogger on the port specified by Selected Port. This control will be disabled if the range specified is not present in the list or if the value of Verify Interval is set to zero. Help is displayed at the bottom of the Deployment tab. When you’re finished, you must Apply to send the settings to the datalogger. The Summary window will appear and you can Save or Print the settings for your records or to use them as a template for another datalogger. Cancel causes the datalogger to ignore the changes. Read File gives you the opportunity to load settings saved previously from this or another similar datalogger. If you load settings from a file, the changes will not actually be written to the datalogger until you click Apply. OV3.2.3 Advanced OV-12 SP aed oni canes Deployment | Logger Control| Send 0S | Settings Editor | Terminal Emulator | Datalogger| Ports Settings Advanced | Is Router: PakBus Nodes Allocation: [ SDC Baud Rate: Central Routers: Max Packet Size: CR1000 Central Routers Setting This setting specifies a list of up to eight PakBus addresses for.routers that are able to work as Centra/ Routers. By specifying a non-empty list for this setting, the CR1000 will be configured as a Branch Router meaning that it will not be required to keep track of neighbours of any routers except those in its own branch. Configured in this fashion, the CR1000 will ignore any neighbour lists received from addresses in the central routers setting and will forward any messages that it receives to the nearest default router Cancel | _EactorDefeuts | __ReodFile | Summary | Is Router allows you to control whether the datalogger will act as a PakBus router. PakBus Nodes Allocation Specifies the amount of memory that the CR1000 Allocates for maintaining PakBus Routing information. This value represents roughly the maximum number of PakBus Nodes that the CR1000 will be able to track in its routing tables. CR1000 Overview OV3.3 Logger Control Tab Sener eg File Help Deployment Logger Control | Send OS | Settings Editor | Terminal Emulator | yok ee SEEEEEEE EEE] PR Cong Tine [RTT STG Station Time: |11/09/04 11:51:19 Difference: {0.00989 seconds | ‘System Clock Setting: | Local Standard Time + Set Clock | j-begger Progem —————— Current Program: Last Compiled | | Last Compile Results: | COM1 J Baud Rate 175200 =] Disconnect ] | Click "Send Program” to send a new program. 1 | | The clock in the PC and the datalogger will be checked every second and the difference displayed. The System Clock Setting allows you to configure what offset, if any, should be used with respect to standard time (Local Daylight Time or UTC, Greenwich mean time). The value selected for this control will be remembered between sessions. Clicking the Set Clock Button will synchronize the station clock to the current computer system time. Current Program displays the current program known to be running in the datalogger. This value will be empty if there is no current program. The Last Compiled field displays the time when the currently running program was last compiled by the datalogger. As with the Current Program field, this value will be read from the datalogger if it is available. Last Compile Results shows the compile results string as reported by the datalogger. The Send Program button presents an open file dialogue from which you can select a program file to be sent to the datalogger. The field above the button will be updated as the send operation progresses. When the program has been sent the Current Program, Last Compiled, and Last Compile Results fields will be filled in. OV-13 CR1000 Overview OV3.4 Send OS Tab - Downloading an Operating System DevConfig can send operating systems to all Campbell Scientific devices with flash replaceable operating systems. An example for the CR1000 is shown below: CSI Device Configuration Utility File Help Device Type CC640 a CR1000 OS Download Instructions CRIGK-TD CR23K This page is used to download an operating system to the CR1000 using Coeag the datalogger's boot code. As a result of this process, the datalogger CR2xx will reset all of its memory including programs, data, and settings. If R5000 you do not want to reset the datalogger program and all of its settings CR510 (including PakBus identifier), an operating system can be sent using the Ci CRS10-PB Logger Control” tab and sending the operating system file as a program to CR510-TD the datal cR9000x je Cale Ogee MD485 1, Connect the RS-232 port on the datalogger to a serial port on your NL100 computer. Pee 2. Remove power from the datalogger. SDM-CAN 3. Make sure that the appropriate serial port is selected in the left SMxM panel and click the Start button below. Unknown 4. In the resultina file open dialoaue box. select the file that shouldbe =~ cr1000 SendOs | Serial Port coM1 s Baud Rate 115200 x } [_Gonnect | Start Print Instructions. The text at right gives the instructions for downloading the OS. Follow these instructions. When you click the Start button, DevConfig offers a file open dialog box to prompt you for the operating system file (*.obj file). When the CR1000 is then powered-up, DevConfig starts to send the operating system: When the operating system has been sent, a message dialog will appear similar to the one shown below: OS Send Complete The operating system file, J:\CR1000\CR1000,5td.00.60.0bj, has been sent Its signature is 63965 (0xF9DD) The information in the dialog helps to corroborate the signature of the operating system sent. For devices such as the CR10X (especially those with extended memory) that can take a long time to reset following an OS download, text warns you against interrupting the memory test. OV-14 CR1000 Overview OV3.5 Settings Editor Tab The CR1000 has a number of properties, referred to as “settings”, some of which are specific to the PakBus protocol. PakBus is discussed in more detail in the PakBus Networking Guide available from the Campbell Scientific website (www.campbellsci.com). The Settings Editor tab provides access to most of the PakBus settings, however, the Deployment tab makes configuring some of these settings a bit easier. es DareReana reee tied Deployment Logger Contiol| Send OS Settings Editor | Terminal Emulator | __|€R1000.Std.00.60 PakBus Nodes Alocation Baud Rate RS232 Baud Rate ME |Boud Rate COM3T0 Baud Rate SDC7 BaudRateSDC8 Baud Rate COM1 Baud Rate COM2 OS Version cOM1 = Baud Rate 115200 | Specifies the version of the operating system currently in the datalogger. Concel | acto Defauts | ReadFile | Summary | The top of the Settings Editor is a grid that allows the user to view and edit the settings for the device. The grid is divided into two columns with the setting name appearing in the left hand column and the setting value appearing in the right hand column. You can change the currently selected cell with the mouse or by using the up arrow and down arrow keys as well as the Page Up and Page Down keys. If you click in the setting names column, the value cell associated with that name will automatically be made active. You can edit a setting by selecting the value, pressing the F2 key or by double clicking on a value cell with the mouse. The grid will not allow read-only settings to be edited. The bottom of the Settings Editor displays help for the setting that has focus on the top of the screen. Once you have changed a setting, you can Apply them to the device or Cancel. These buttons will only become enabled after a setting has been changed. If the device accepts the settings, a configuration summary dialogue will be shown that will give the user a chance to save and/or print the settings for the device: OV-15 CR1000 Overview Setting changes were saved Configuration of CR1000, 1079 Configured on: Tuesday, November 09, 2004 12:21:38 Setting Name - Setting Value : : OS Version CR1000.Std.00.60 Serial Number 1079 Station Name __ __|Bosco PakBus Address 3 Security Level 1 ‘ Security Level 2 Security Level 3 Is Router |PakBus Nodes Allocation Clicking the Revert to Defaults button on the Settings Editor will send a command to the device to revert to its factory default settings. The reverted values will not take effect until the final changes have been applied. This button will remain disabled if the device does not support the DevConfig protocol messages. If, after changing a setting or clicking the Summary button, you clicked Save on the summary screen to save the configuration, you can use the Read File button to load those settings. The settings from the saved file are immediately sent to the device and, if they’re accepted, you can then Apply them. OV3.6 Terminal Tab The Terminal tab offers a terminal emulator that can be used to access the CR1000 Terminal Mode. Press “Enter” several times until the CR1000 terminal mode prompt: “CR1000>“ is returned. Terminal mode commands consist of a single character and “Enter”. For example, sending an “H” and “Enter” will return a list of the terminal commands. OV-16 CR1000 Overview Cana Rete ee ag Deployment | Logger Control | Send 0S | Settings Editor Terminal Emulator | IcR1000> iCR1000> ICR1000> ICR1000>H : Scan processing time; real time in secs : TI data Read Clock Chip : Status : Errors : Scan Information : Raw A/D Values : VARS : Suspend/start Dataoutput : Read Inloc Binary : UNUSED : Task Sequencer Opcodes : TI Coefficient Dump : MTdbg() : Compile Errors : VARS w/o names : File Directory : Nenu Calibration Data : DLD File Dump Serial Port (COMI * Baud Rate 115200 x Disconnect ] WM AlGaps 17 Echo Input GPrrQHDAAOoPODIAH DONE O OV4. Quick Start Tutorial OV4.1 Software Products for the CR1000 PC200W Starter Software supports a direct connection between the PC and the CR1000, and includes Short Cut for Windows (Short Cut) for creating CR1000 programs. PC200W provides basic tools for setting the datalogger’s clock, sending a program, monitoring sensors, and manually collecting and viewing data. CR1000 support was added to PC200W in Version 3.0. PC200W is . available at no charge from the Campbell Scientific website. PC400 Datalogger Support Software (mid-level software) supports a variety of telecommunication options, manual data collection, and data display. PC400 includes Short Cut and the CRBasic Program Editor for creating CR1000 programs. PC400 does not support combined communication options (e.g., phone-to-RF), PakBus® routing, or scheduled data collection. LoggerNet Datalogger Support Software (full-featured software) supports combined telecommunication options, data display, and scheduled data collection. The software includes Short Cut and CRBasic for creating CR1000 programs, and tools for configuring, trouble-shooting, and managing datalogger networks. OV4.1.1 Options for Creating CR1000 Programs 1. Short Cut is a program generator that creates a datalogger program in four easy steps, and a wiring diagram for the sensors. Short Cut supports the majority of sensors sold by Campbell Scientific, and is recommended for creating straightforward programs that measure the sensors and store data. OV-17 CR1000 Overview 2. The CRBasic Editor is a program editor used to create more complex CR1000 programs. Short Cut generated programs can be imported into the CRBasic Editor for adding instructions, or for functionality not supported by Short Cut. For those users of CR10X dataloggers who are switching to CR1000 dataloggers, the Transformer Utility can be used to convert a CR10X program to a CR1000 program, which can be imported into the CRBasic Editor. Because of differences in program code, not all CR10X programs can be fully converted by the Transformer. The Transformer Utility is included with PC400 and LoggerNet software. OV4.2 Connections to the CR1000 OV-18 Campbell Scientific Power Supplies are described in Section 1.3. When connecting power to the CR1000, first remove the green power connector from the CR1000 front panel. Insert the positive 12V lead into the terminal labeled “12V”, and the ground lead into the terminal labeled “G”. Double-check the polarity before plugging the green connector into the panel. Connect the white serial cable (PN 10873, provided) between the port labeled “RS232” on the CR1000 and the serial port on the computer. For computers that have only a USB port, a USB Serial Adaptor (PN 17394 or equivalent) is required. Cae) as a ere et pritag om PS100 12V POWER SUPPLY ici cda ead barat Rae ad age eat 2 Rees FIGURE OV4-1. Power and RS232 Connections CR1000 Overview OV4.3 Setting the CR1000 PakBus Address The CR1000 default PakBus address is 1 (Section OV2.5). Unless the CR1000 is used in a network, there is no need to change the Pakbus address, or any of the other default settings. To change settings, the Device Configuration Utility (DevConfig) is used, as described in Section 0V3. OV4.4 PC200W Software This Quick-Start tutorial prompts the user through the process of programming the CR1000, monitoring sensor measurements, collecting data, and viewing data using the PC200W software. When PC200W is first started, the EZSetup Wizard is launched. Click the Next button and follow the prompts to select the CR1000, the COM port on the computer that will be used for communications, 115200 baud, and Pakbus Address 1. When prompted with the option to Test Communications click the Finish button. To change a setting in the datalogger setup, select that datalogger from the main window, and click the Edit button. Ifa datalogger was not added with the Wizard, click the Add button to invoke the Wizard. After exiting the EZSetup wizard, the Setup/Connect window appears, as shown below. The Current Datalogger Profile, Datalogger Clock, and Datalogger Program features of PC200W are integrated into this window. Tabs to the right are used to select the Monitor Values and Collect Data windows. Buttons to the right of the tabs are used to run the Split, View, and Short Cut applications. Short Cut ete ee et res ‘alla Datalogger Information Datalogger Name: CR1000 Datalogger Type: CR1000 Direct Connect Connection COM Port: COM1 Datalogger Settings Baud Rate: 115200 PakBus Address: 1 Security Code: 0 Extra Response Time: 0s Max Time Online: Od Oh Om OV-19 CR1000 Overview OV-20 OV4.4.1 Creating a CR1000 Program using Short Cut NOTE Objective: Every one second, measure air temperature in degrees C with a Type T thermocouple, and store one-minute average Battery Voltage, Panel Temperature, and Thermocouple temperature. A Type T Thermocouple is included with CR1000, packaged with the screwdriver. The thermocouple consists of a pair of 5-inch wires with blue/red insulation, soldered together at one end. Click on the Short Cut button to display the Home screen, as shown below. @ SCWIN - [Home] Each of the four steps has a button with a ? for accessing Help. Use the Help in conjunction with the steps outlined below: Step 1: Create a New File Step 1 is to open a new or existing file. From the Home page, click the New button. Use the drop-down list box to select the CR1000. Enter a 1 second Scan Interval and click OK to complete Step 1. Step 2: Select the Sensors A Type T thermocouple consists of two wires of dissimilar metals (copper and constantan) soldered together at one end. The soldered end is the measurement junction; the junction that is created when the thermocouple is wired to the CR1000 is the reference junction. When the two junctions are at different temperatures, a voltage proportional to the temperature difference is induced into the wires. The thermocouple measurement requires the reference junction temperature to calculate the measurement junction temperature. CR1000 Overview Step 2 is to select the sensors to be measured. From the Home page, click the Sensors button. The Sensors worksheet is divided into two sections: the Available sensors tree and the Selected sensors table, as shown below. The sensors you want to measure are chosen from the Available sensors tree. Double click on the Temperature application group to display the available sensors. Double click on the Wiring Panel Temperature sensor to add it the selected sensors table. Click OK on the next screen to accept the PTemp_C label. Double click on the Type T thermocouple, change the number to 1 and click OK. On the next screen, make sure Ptemp_C is selected for the Reference Temperature Measurement, and click OK to accept the Temp_C label. J SCWIN (CR1000) C:\CampbellSci\SCWin\quickstart.scw Scan Interval ‘@ Sensors Generic Measurements ‘Q Meteorological ‘QMiscellaneous Sensors cea Panel Temp 107 Temperature Probe B 108 Temperature Probe Type TTC B 109 Temperature Probe B 43347 RTD Temperature Probe (calibrated) 43347 RTD Temperature Probe (not calibrated) B IRTS-P Precision Infrared Temperature Sensor B Type E (chromel-constantan) Thermocouple Type J (iron-constantan) Thermocouple i B Type K (chromel-alumel) Thermocouple | B Type T (copper-constantan) Thermocouple | / : ‘B Wiring Panel Temperature ‘© Water ‘@ Calculations & Control ‘©.Calculations Control OV-21 CR1000 Overview OV-22 Click on the Wiring Diagram tab to view the sensor wiring diagram, as shown below. Wire the Type T Thermocouple (provided) to the CR1000 as shown on the diagram. Click the Sensors tab and the Home button to return to the Home page to continue with Step 3. €R1000 Wiring Diagram for quickstartscw (Wiring details can be found in the help file.) Type T (copper-constantan) Thermocouple ‘R100 Blue tt Red tL Step 3: Output Processing Step 3 is to define the output processing for the sensor measurements. From the Home page, click the Output button. The Output screen has a list of Selected Sensors on the left, and Output Tables on the right. The default is for two Tables, Table1 and Table2. Both Tables have a Store Every field and the drop-down list box that are used to set the interval at which data will be stored. The objective for this exercise calls for a one-minute output processing. To remove Table2, Click on the Table2 tab to activate it, and click the Delete Table button. The Table Name field is the name that will be used for the Table in which the output will be stored. Change the default Name of Table1 to OneMin, and change the interval to 1 minute. The Selected Sensors list is provided on the left side of the screen. To adda sensor measurement to the Output Table, highlight a measurement and click one of the output buttons; e.g., Average. Select the Default, Panel Temp, and Type T TC sensors and click the Average button to add them to the OneMin Table. CR1000 Overview Click the Home button to continue with Step 4 to complete the program. terval = 1.0000 Seconds CRBasic - [Output] =/oi x Ns Ce Battvolt [Average | Batt_Volt_AV| Volts Average | PTemp_C_A\|Deg C Average — |Temp_C_AV(/Deg C Step 4: Finish Step 4 is to finish the program. From the Home page, click the Finish button. Type in QuickStart for the file name. Any errors the compiler may have detected are displayed, along with the names of the files that were created. The file QuickStart.CR1 is the program file that will be sent to the CR1000, QuickStart.def is a summary of the sensor wiring and measurement labels (click the Summary or Print buttons to view or print the file). Click the OK button and close Short Cut. A toa C:\Campbellsci\Lib\Compilers\cricomp.exe exit code: 0 C:\CampbellSci\SCwin\quickstart.CR1 -- Compiled in PipelineMode. SCWIN CRBasic program successfully created. Program successfully compiled. Files created: C:\CampbellSci\SC Win\quickstart.CR1: SCWIN program for the datalogger C:\CampbellSci\SCWin\quickstart.DEF: summary of the SCWIN program CX Use PC200W, PC400, or LoggerNet to transmit quickstart.CR1 to the cR1i000. 51x Ov-23 CR1000 Overview OV4.4.2 Configuring the Setup Tab Connect Button From the Setup/Connect screen, click on the Connect button to establish communications with the CR1000. When communications have been established, the text on the button will change to Disconnect. Datalogger Information Datalogger Name: CR1000 Datalogger Type: CR1000 Direct Connect Connection COM Port: COM2 Datalogger Settings Baud Rate: 115200 PakBus Address: 1 Security Code: 0 Extra Response Tit Max Time O1 OV4.4.3 Synchronize the Clocks Click the Set Clock button to synchronize the datalogger’s clock with the computer’s clock. OV4.4.4 Send the Program Click the Select and Send Program button. Navigate to the C:\CampbellSci\SCWin folder and select the file QuickStart.CR1 and click the Open button. A progress bar is displayed, followed by a message that the program was successfully sent. OV4.4.5 Monitor Data Tables OV-24 The Monitor Values window is used to display the current sensor measurement values from the Public Table, and the most recent data from the OneMin Table. Click on the Monitor Values tab. The Public Table is automatically selected and displayed. To view the OneMin Table, click the Add button, select the OneMin Table, and click the Paste button. CR1000 Overview Peo canteen OV4.4.6 Collect Data Click on the Collect Data tab. From the Collect Data window you can choose what data to collect, and where to store the retrieved data. Click on the OneMin Table, with the Option New data from datalogger selected. Click the Collect button and a dialog box appears, prompting for a file name. Click the Save button to use the default file name CR1000_OneMin.dat. A progress bar, followed by the message Collection Complete is displayed. ee ea te eet D) OV-25 CR1000 Overview OV4.4.7 View Data OV-26 To view the collected data, click on the View button (located in the upper right hand corner of the main screen). Options are accessed by using the menus or by selecting the toolbar icons. If you move and hold the mouse over a toolbar icon for a few seconds, a brief description of that icon's function will appear. To open a data file, click the Open file icon, and double click on the file CR1000_OneMin.dat in the PC200W folder. Click the Expand Tabs icon to display the data in columns with column headings. To graph thermocouple temperature, click on the data column with the heading Temp_C, then click the Show Graph, 1 Y axis icon on the toolbar. Show graph Open file Expand tabs "2005-02-16 "2005-02-16 "2005-02-16 01 "2005-02-16 08: "2005-02-16 08: "2005-02-16 08: "2005-02-16 "2005-02-16 "2005-02-16 "2005-02-16 08 eee BE Ld Close the graph and view screens, and close PC200W. CR1000 Overview OV4.5 Programming using the CRBasic Program Editor Those users who are moving from the Edlog Program Editor to the CRBasic Program Editor may find Short Cut to be an excellent way to learn CRBasic. First create a program using Short Cut, then open the file with CRBasic to see how Short Cut created the program. The program file listed below is the Short Cut file QuickStart.CR1 from the tutorial after being imported into the CRBasic editor. See Section 4 for information on the CRBasic programming. ['cR1000 ‘Declare Variables and Units Public Batt_Volt Public PTemp_C Public Temp_C Units Batt_Volt=Volts Units PTemp_C=Deg C Units Temp_C=Deg C ‘Define Data Tables DataTable(OneMin, True,-1) DataInterval(0,1,Min,0) Average(1,Batt_Volt,FP2,False) Average(1,PTemp_C,FP2,False) Average(1,Temp_C,FP2,False) EndTable DataTable(Table1 ,True,-1) DatalInterval(0,1440,Min,0) Minimum(1,Batt_Volt,FP2,False,False) EndTable 'Main Program BeginProg Scan(5,Sec,1,0) ‘Default Datalogger Battery Voltage measurement Batt_Volt: Battery(Batt_Volt) ‘Wiring Panel Temperature measurement PTemp_C: PanelTemp(PTemp_C, 60Hz) 'Type T (copper-constantan) Thermocouple measurements Temp_C: TCDiff(Temp_C,1,mV2_5C,1,TypeT,PTemp_C,True,0, 60Hz,1,0) ‘Call Data Tables and Store Data CallTable(OneMin) CallTable(Table1) NextScan EndProg OV-27 CR1000 Overview OV5. Keyboard Display The CR1000 has an optional keyboard display. This section illustrates the use of the CR1000KD. The CR1000KD has a few keys that have special functions which are listed below. Key Usage [2] and [8] To navigate up and down through the menu list one line at a time [Enter] Selects the line or toggles the option of the line the cursor is on [Esc] Backs up one level in the menu [Home] Moves cursor to top of the list [End] Moves cursor to bottom of the list [Pg Up] Moves cursor up one screen [Pg Dn] Moves cursor down one screen [BkSpc] Delete character to the left [Shift] Change alpha character selected [Num Lock] Change to numeric entry [Del] Delete [Ins] Insert/change graph setup [Graph] Graph OV-28 CR1000 Overview Power Up Screen (Ss) CAMPBELL SCIENTIFIC CR1000 Datalogger 06/18/2000, 18:24:35 CPU: TRIG.CR1 Running. Press any key for Main Menu (except <, >, *. or [Esc]) Data Run/Stop Program File PCCard Ports and Status Configure, Settings CR1000 Display Toggle backlight with * Adjust contrast with < > < lighter darker > Real Time Tables Real Time Custom Final Storage Data Reset Data Tables Graph Setup Options depend on program state Run Options Directory Format Active Tables Format Card PCCard is only in the menu if a CFM100 is attached, and it has a card in it. OSSignature SerialNumber RevBoard StationName PakBusAddress : ProgName PakBus Configure Display Set Time OV-29 CR1000 Overview OV5.1 Data Display Data Run/Stop Program File PCCard Ports and Status List of Data Tables created by active program Configure, Settings Move the cursor to Data and List of Data Tables created by press Enter active program Real Time Tables Real Time Custom Final Storage Data Reese! Data Tables List of Data Tables created by active program Graph Setup |All Tables List of Data Tables created by active program Roll/Scope Scaler Manual Manual/Auto Not shown if “Auto” On/Off Display Max On/Off Display Min On/Off Scope requires manual scalar OV-30 OV5.1.1 Real Time Tables List of Data Tables created by active program. For Example, Public Tablet Temps Move the cursor to desired table and press Enter Public Table values can be changed. Move the cursor to value and press Enter to edit value. ns : 23.0234 19.6243 19.3429 1.2003 : -1.0000 : 0.00000 : 0.00000 : 0.00000 Press Graph for graph of selected field Press Ins for Graph Setup New values are displayed as they are stored. Scaler Manual Upper: 30.000000 Lower: 20.000000 Display Val Display Max Display Min Graph Type CR1000 Overview Edit field: Num TCTemp(3) Current Value: 21.2003 New Value: Oo Move the cursor to setting and press Enter to change Auto/Manual On/Off On/Off On/Off Roll/Scope On Roll OV-31 CR1000 Overview OV5.1.2 Real Time Custom The first time you navigate to Real Time Custom you will need to set up the display. The CR1000 will keep the setup as long as the same program is running. List of Data Tables created by active program. For Example, Move the cursor to desired table and press Enter To add value, move the cursor to position for the value and press Enter Move the cursor to desired field and press Enter — 124.9496 New values are displayed as they are stored. To delete a field, move the cursor to that field and press Del OV-32 CR1000 Overview OV5.1.3 Final Storage Tables List of Data Tables created by active program. For Example: Table1 Temps Move the cursor to Use Home (oldest), End (newest), desired Table and PgUp (older), PgDn (newer), press Enter «, >, 7, and ¢ to move around in data table. TimeStamp Record Tref TC(1) TC(2) TC(3) “2000-01-03 00:12:38" 0 ‘I a “42: 21.934 22.8419 "2000-01-03 00:12:39" 1 a et 21.9173 22.8364 "2000-01-03 00:12:40" 2 21.9229 22.8364 "2000-01-03 00:12:41" 3 24.1242 : 21.8786 21.9173 22.8419 "2000-01-03 00:12:42" 4 24.1242 : 21.8786 21.9173 22.8253 "2000-01-03 00:12:43" 5 24.1242 [x 21.9118 22.8364 “2000-01-03 00:12:44" 6 24.1242 : 21.8675 21.9173 22.8087 "2000-01-03 00:12:45" 7 24.1242 : 21.8675 21.9173 22.8142 "2000-01-03 00:12:46" 8 24.1242 : 21.8398 21.9395 22.8253 "2000-01-03 00:12:47" 9 a Y24 O170 21.9118 22.8308 "2000-01-03 00:12:48" 10 24f\242 21.8342 21.945 22.8364 “2000-01-03 00:12:49" 11 24.1242 -8453 21.9506 22.8364 Press Ins for Jump To screen. Use arrow up Go to Record: A Press Graph for graph of or down to selected field or for full ‘press ns to edit scroll to the screen display of string record number data. Use «, >, PgUp, Table Size: wanted, or PgDn to move cursor 1000 press Ins and and window of data Current Record: manually type graphed. 759 in the record number. Scaler Manual Press Ins for Upper: 30.000000 Graph Setup Lower: 20.000000 Display Val On Display Max On Display Min On Graph Type Roll OV-33 CR1000 Overview OV5.2 Run/Stop Program Data Run/Stop Program File PCCard Ports and Status Configure, Settings Move the cursor to run/stop program and press Enter. Vv CPU: ProgramName.CR1 If program Is Running is running >* Run on Power Up Stop, Retain Data [>_> Stop, Delete Data Restart, Retain Data Restart, Delete Data Execute Press escape to cancel or get list of available programs. CPU: ProgramName.CR1 If program Is Stopped is stopped >* Run on Power Up lt Stop, Delete Data Restart, Retain Data Restart, Delete Data Press escape to cancel or get list of available programs. No program running or : stopped CRD: — UH—_——______ > for list of program files on CPU if no card is present Press escape to cancel. OV-34 Select 1 (press Enter) and move the cursor to Execute. Press Enter to execute. Select 1 (press Enter) and move the cursor to Execute. Press Enter to execute. Select location of program file. OV5.3 File Display Data Run/Stop Program File PCCard Ports and Status Configure, Settings CPU: .CR1 CRD: .CR1 Move the cursor to File and press Enter Run Options Directory Format Execute List of files on CPU or Card. New File Name: CR1000 Overview OV-35 CR1000 Overview OV5.3.1 File: Edit The CRBasic Program Editor is recommended for writing and editing datalogger programs. Changes in the field can be made with the keyboard display. List of Program files on CPU: or CRD: For Example: CPU: TCTEMP.CR1 RACE.CR1 Save Changes? ESC Move the cursor to desired Program and press Enter CR1000 INSERT " TCTemp.CR1 Instruction P I Function Public TREF,TC(3),FLAG(8) ness nS Blank Line ——— = Block BbtaTable (Temps, 1,1000) Insert Off Sample (1, TREF,IEEE4) Sample (3,TC(),IEEE4) Edit Directly or move cursor to first atime of line and Edit Instruction parameters with press Enter parameter names and some pick lists: DataTable TableName > Temps TrigVar 1 Size 1000 ENTER Edit Instruction Blank Line Create Block Insert blank line Move the cursor {Block Commands Sample (1, TREF,IEEE4) to highlight Copy Sample (3,TC(),IEEE4) desired block and Cut EndTable press Enter Delete _ BeginProg Scan(1,sec,3,0) To insert a block created by this operation, move the cursor to desired place in program and press Ins. OV-36 CR1000 Overview OV5.4 PCCard Display Data Run/Stop Program File PCCard is only in menu if PCCard CFM100 is attached and a Ports and Status CF card is inserted. Configure, Settings Move the cursor to PCCard and List of Data Tables on card used by active program press Enter ‘Active Tables Format Card All Card Data Will be Lost! Proceed? OV-37 CR1000 Overview OV5.5 Ports and Status Ports Status Table OV-38 PortStatus (1): PortStatus (2): PortStatus (3): PortStatus (4): PortStatus (5): PortStatus (6): PortStatus (7): PortStatus (8): Move the cursor to the desired port and press Enter to toggle OFF/ON. The port must be configured as an output to be toggled. List of Status Variables (see Appendix A) CR1000 Overview OV5.6 Settings 05/24/2000, 15:10:40 2000 5 24 15 10 Set Time/Date Settings Display IsRouter PakBusNodes Turn Off Display Back Light Contrast Adjust Display Timeout: Yes Timeout (min): 4 Move the cursor to time element and press Enter to change OV-39 CR1000 Overview OV5.6.1 PakBus Settings OV-40 CR1000 Overview OV5.6.2 Configure Display PakBus Configure Display Set Time Move the cursor to Configure Display and press Enter Press Enter to turn off Display On/Off Turn Off Display Backlight Contrast Adjust Display Timeout: Yes Timeout (min): 4 Yes/No Enter display timeout in minutes (max = 60) OV-41 CR1000 Overview OV6. Specifications Electrical specifications are valid over a -25° to +50°C range unless otherwise specified; non-condensing environment required. PROGRAM EXECUTION RATE 10 ms to 30 min. @ 10 ms increments. ANALOG INPUTS DESCRIPTION: 8 differential (DF) measurements or 16 single-ended (SE) measurements, individually configured. Channel expansion provided through AM16/32 and AM25ST Multiplexers. RANGES, RESOLUTION AND TYPICAL INPUT NOISE: Basic resolution (Basic Res) is the A/D resolution of a single conversion. Resolution of DF measurements with input reversal is half the Basic Res. Noise values are for DF measurements with input reversal; noise is greater with SE measurements. Input Basic 250 us Int. 50/60 Hz Int. Range (mV) Res (uV) (uV RMS) (uv RMS) +5000 1330 385 192 +2500 667 192 95.9 #250 66.7 19.2 19.2 +25 67 23 1.9 475 2 0.62 0.58 22.5 0.67 0.34 0.19 ACCURACY ': +(0.1% of reading + offset), 0° to 40°C +(0.2% of reading + offset), -25° to 50°C +(0.4% of reading + offset), -55° to 85°C (-XT only) Offset for DF measurement wiinput reversal = (Basic Res + 1.0 pV)/2 Offset for DF measurement w/o input reversal = Basic Res + 1.0 pV Offset for SE measurement = Basic Res + 2 V MINIMUM TIME BETWEEN VOLTAGE MEASUREMENTS: Includes the measurement time and conversion to engineering units. For voltage measurements, the CR1000 integrates the input signal for 0.25 ms or a full 16.66 ms or 20 ms line cycle for 50/60 Hz noise rejection. DF measurements with input reversal incorporate two integrations with reversed input polarities to reduce thermal offset and common mode errors and therefore take twice as long. 250 ps Analog Integration: ~1ms SE 1/60 Hz Analog Integration: ~20 ms SE 1/50 Hz Analog Integration: ~25 ms SE COMMON MODE RANGE: +5 V DC COMMON MODE REJECTION: >100 dB NORMAL MODE REJECTION: 70 dB @ 60 Hz when using 60 Hz rejection SUSTAINED INPUT VOLTAGE W/O DAMAGE: +16 Vdc max. INPUT CURRENT: +1 nA typical, +6 nA max. @ 50°C, +90 nA max. @ 85°C. INPUT RESISTANCE: 20 Gohms typical ACCURACY OF BUILT-IN REFERENCE JUNCTION THERMISTOR (for thermocouple measurements): +£0.3°C, -25° to 50°C +#0.8°C, -55° to 85°C ANALOG OUTPUTS DESCRIPTION: 3 switched voltage, active only during measurement, one at a time. RANGE AND RESOLUTION: Voltage outputs programmable between +2.5 V with 0.67 mV resolution. ACCURACY: +(0.08% of setting + 8.0 mV), 0° to 40°C (0.15% of setting + 8.0 mV), -25° to 50°C +(0.25% of setting + 8.0 mV), -55° to 85°C (-XT only) CURRENT SOURCING/SINKING: +25 mA RESISTANCE MEASUREMENTS MEASUREMENT TYPES: The CR1000 provides ratio metric measurements of 4- and 6-wire full bridges, and 2-, 3-, and 4-wire half bridges. Precise, dual polarity excitation using any of the 3 switched voltage excitations eliminates de errors. Ov-42 RATIO ACCURACY’: Assuming excitation voltage of at least 1000 mV, not including bridge resistor error. +(0.04% of reading + Offset/Vex) Offset values are reduced by a factor of 2 when excitation reversal is employed. Offset for DF measurement w/input reversal = (Basic Res + 1.0 nV)/2 Offset for DF measurement w/o input reversal = Basic Res + 1.0 pV Offset for SE measurement = Basic Res + 2 »V PERIOD AVERAGING MEASUREMENTS DESCRIPTION: The average period for a single cycle is determined by measuring the average duration of a specified number of cycles. The period resolution is 192 ns divided by the specified number of cycles to be measured; the period accuracy is +(0.01% of the reading + resolution)’. Any of the 16 SE analog inputs can be used for period averaging. Signal limiting is typically required for the SE analog channel. INPUT FREQUENCY RANGE & SPECIFICATION: Input Input Signal Input Signal Pulse Frequency Range (mV) (Min) (Max) , Width (Max) , Peak to Peak Peak to Peak (Min) +2500 mV 500 mV 10V 2.5 ps 200 kHz +250 mV 10 mV 2vV 10 ps 50 kHz +25mV SmvV 2vV 62 us 8 kHz +2.5mV 2mv 2v 100 ps 5 kHz 2-Maximum signal must be centered at datalogger ground. 3-Maximum frequency equals 1/(Twice Minimum Pulse Width) for 50 % duty cycle signals. PULSE COUNTERS DESCRIPTION: Two 24-bit inputs selectable for switch closure, high frequency pulse, or low-level ac. MAXIMUM COUNTS PER SCAN: 16.7x10° 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: Maximum Input Frequency: 250 kHz Maximum Input Voltage: +20 V Voltage Thresholds: Count upon transition from below 0.9 V to above 2.2 V after input filter with 1.2 ys time constant. LOW LEVEL AC MODE: Internal ac coupling removes dc offsets up to +0.5 V. Input Hysteresis: 16 mV @ 1 Hz Maximum ac Input Voltage: +20 V Minimum ac Input Voltage: (Sine wave mV RMS) Range (Hz) 20 1.0 to 20 200 0.5 to 200 2000 0.3 to 10,000 5000 0.3 to 20,000 DIGITAL I/O PORTS DESCRIPTION: 8 ports selectable, under program control, as binary inputs or control outputs. C1-C8 also have multiple function capability, which include edge timing, subroutine interrupts/wake up, switch closure pulse counting, high frequency pulse counting, asynchronous communication port (UART), SDI-12 communication port, and SDM communication port. HIGH FREQUENCY MAX: 400 kHz SWITCH CLOSURE FREQUENCY MAX: 150 Hz OUTPUT VOLTAGES (no load): high 5.0 V +0.1 V; low <0.1 OUTPUT RESISTANCE: 330 ohms INPUT STATE: high 3.8 to 5.3 V; low -0.3 to 1.2V INPUT HYSTERESIS: 1.4 V INPUT RESISTANCE: 100 kohms " Sensor and measurement noise not included CR1000 Overview Electrical specifications are valid over a -25° to +50°C range unless otherwise specified; non-condensing environment required. SDI-12 INTERFACE SUPPORT DESCRIPTION: Control Ports 1, 3, 5, and 7 may be configured for SDI-12 asynchronous communication. Up to ten SDI-12 sensors are supported per port. It meets SDI-12 Standard version 1.3 for datalogger mode. CE COMPLIANCE STANDARD(S) TO WHICH CONFORMITY IS DECLARED: BS EN61326:2002 CPU AND INTERFACE PROCESSOR: Hitachi H8S 2322 (16-bit CPU with 32 bit internal core) MEMORY: Battery backed SRAM; 2 Mbytes, 16 Kbytes for program storage; 4 Mbytes optional SERIAL INTERFACES: COM1 (CS V/O, used to interface with Campbell Scientific peripherals), COM2 (Standard RS-232 communication port) PARALLEL INTERFACE: 40-pin interface for attaching data storage or communication peripherals such as the CFM100 module BAUD RATES: Selectable from 300 to 115.2 kbps. ASCII protocol is one start bit, one stop bit, eight data bits, and no parity. CLOCK ACCURACY: +3 minute per year (-30" to 85°C) +15 minute per year (-55" to 85°C, -XT only) SYSTEM POWER REQUIREMENTS VOLTAGE: 9.6 to 16 Vde TYPICAL CURRENT DRAIN: Sleep Mode: 1 Hz Sample Rate (one fast SE measurement) 100 Hz Sample Rate (one fast SE measurement 100 Hz Sample Rate (one fast SE measurement w/RS-232 communication): ..~20.0 mA EXTERNAL BATTERIES: 12 Vde nominal; reverse polarity protected PHYSICAL SPECIFICATIONS SIZE: 8.5” x 3.9” x 0.85” (21.6 x 9.9 x 2.2 cm) — Measurement & Control Module; 9.4" x 4" x 2.4” (23.9 x 10.2 x 6.1 cm) — CR1000WP Wiring Panel. Additional clearance required for serial cable and sensor leads. WEIGHT: 2.1 Ibs (1 kg) WARRANTY Three years against defects in materials and workmanship. OV-43 Section 1. Installation and Maintenance 1.1 Protection from the Environment The normal environmental variables of concern are temperature and moisture. The standard CR1000 is designed to operate reliably from -25 to +50°C (-40°C to +85°C, optional) in noncondensing humidity. When humidity tolerances are exceeded, damage to IC chips, microprocessor failure, and/or measurement inaccuracies due to condensation on the PC board may result. Effective humidity control is the responsibility of the user. Internal moisture is eliminated by sealing the module at the factory with a packet of silica gel inside. The desiccant is replaced whenever the CR1000 is repaired at Campbell Scientific. The module should not be opened by the user except to replace the lithium coin cell providing back up power to the clock and SRAM. Repeated disassembly/ assembly of the CR1000 will degrade the seal, leading to potential moisture problems. Extra desiccant should also be placed in the enclosure to prevent corrosion on the Wiring Panel terminals and CR1000/Wiring Panel connections. Campbell Scientific offers environmental enclosures for housing a CR1000 and peripherals. The fiberglass enclosures are classified as NEMA 4X (watertight, dust-tight, corrosion-resistant, indoor and outdoor use). A 1.25" diameter entry/exit port is located at the bottom of the enclosure for routing cables and wires. The enclosure door can 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. The enclosures are white for reflecting solar radiation, thus reducing the internal enclosure temperature. 1.2 Power Requirements The CR1000 operates at a nominal 12 VDC. Below 9.6 V or above 16 volts the CR1000 does not operate properly. The CR1000 is diode protected against accidental reversal of the positive and ground leads from the battery. Input voltages in excess of 18 V may damage the CR1000 and/or power supply. A transzorb provides transient protection by limiting voltage at approximately 20 V. System operating time for the batteries can be determined by dividing the battery capacity (amp-hours) by the average system current drain. The CR1000 typically draws 0.5 mA in the sleep state (with display off), 0.6 mA with a 1 Hz sample rate, and >10 mA with a 100 Hz sample rate. 1-1 Section 1. Installation and Maintenance CAUTION The 12 V and switched 12 V terminals on the wiring panel are not regulated by the CR1000; they obtain power directly from the Power In terminal. If you use the CR1000 wiring panel to source power to other 12 V devices, be sure the power supply regulates the voltage within the range acceptable to the connected device. The maximum voltage output by a Campbell Scientific power supply is approximately 16 V (the charging voltage at —40°C). 1.3 Campbell Scientific Power Supplies CR1000 Power Supplies are available from Campbell Scientific with either alkaline or lead acid batteries, the BPALK and PS100, respectively. The CH100 contains the same circuitry as the PS100. It is used to float charge an external 12 VDC Yuasa battery using AC or solar power. No internal batteries are contained in the CH100. Other power supply options are connecting a 12-volt battery directly to the CR1000, Section 1.5, or supplying power from a vehicle, Section 1.6. Each of the power supplies has a thermal fuse in the power circuit that limits source current. If excessive current is drawn, the fuse gets hot, increases in resistance, and limits current. When the problem is fixed, the fuse cools and the resistance decreases, eventually allowing current to pass. When excessive current is drawn due to shorting the power leads to the Wiring Panel, allow 10 to 15 seconds for the fuse to cool before connecting power. 1.3.1 BPALK Alkaline Power Supply The BPALK uses 8 alkaline D cells and comes with an AA cell battery pack to supply power while replacing the D cells. The 4 AA batteries are not included. To replace the batteries without stopping the datalogger program, 1) connect the external battery to the port labeled temporary, 2) remove the old batteries, 3) replace with new alkaline D cell batteries, and 4) remove the external battery. A fresh set of eight alkaline D cells has 12.4 volts and a nominal rating of 7.5 amp-hours at 20°C. The amp-hour rating decreases with temperature as shown in Table 1.3-1. The datalogger Battery instruction can be used to monitor battery voltage. Replace the alkaline cells before the CR1000 battery voltage drops below 9.6 V. Section 1. Installation and Maintenance TABLE 1.3-1. Typical Alkaline Battery Service and Temperature Temperature (°C) | % of 20°C Service 20 - 50 100 15 98 10 94 5 90 0 86 -10 70 -20 50 -30 30 NOTE This data is based on one "D" cell under conditions of 50 mA current drain with a 30 ohm load. As the current drain decreases, the percent service improves for a given temperature. FIGURE 1.3-1. BPALK Power Supply 1-3 Section 1. Installation and Maintenance 1.3.2 PS100 Lead Acid Power Supply CAUTION The PS100 power supply includes a 12 V, 7.0 amp-hour lead acid battery, an AC transformer (18 V), and a temperature compensated charging circuit with a charge indicating diode. An AC transformer or solar panel should be connected to the PS100 at all times. The charging source powers the CR1000 while float charging the lead acid batteries. The internal lead acid battery powers the datalogger if the charging source is interrupted. The PS100 specifications are given in Table 1.3-2. The two leads from the charging source can be inserted into either of the CHG ports, polarity doesn't matter. A transzorb provides transient protection to the charging circuit. A sustained input voltage in excess of 40 V will cause the transzorb to limit voltage. The red light (LED) on the PS100 is on when a charging source is connected to the PS100 CHG ports. The switch turns power on and off to the 12 V ports, battery charging still occurs when the switch is off. Switch the power to "off" before disconnecting or connecting the power leads to the Wiring Panel. The Wiring Panel and PS100 are at power ground. If 12 V is shorted to either of these, excessive current will be drawn until the thermal fuse opens. Section 1. Installation and Maintenance FIGURE 1.3-2. PS100 Monitor the power supply voltage using the datalogger Battery instruction. Incorporate this instruction into your data acquisition programs to keep track of the state of the power supply. If the system voltage level consistently decreases through time, some element(s) of the charging system has failed. The Battery instruction measures the voltage at the Power In terminals, not the voltage of the lead acid battery. External power sources must be disconnected from the CR1000 and charging circuit in order to measure the actual lead acid battery voltage. Section 1. Installation and Maintenance 1-6 TABLE 1.3-2. PS100, Battery, and AC Transformer Specifications Input Voltage (CHG terminals) 15 to 28 VDC or 18 VAC RMS Battery Connections Charging Output Voltage: Temperature compensated float charge for 12 V Battery Temperature Compensation Range: -40 to +60°C Charging Current Limit: 1.2 Amps typical Power Out (+12 terminals) Voltage: Unregulated 12 V from Battery Current Limited w / 3 A Thermal Fuse: >3 A @< 20°C 3 A @ 20°C 2.1A @ 50°C 1.8 A @ 60°C Batteries Operating Temperature Range: -40 to +60°C Capacity: PS12LA 7 Amp hours BP12 12 Amp hours BP24 24 Amp hours AC Transformer: CSI Model No. 9591 Input Voltage: 120 VAC Output Voltage: 18 VAC RMS Output Current (max): 1.2 Amps RMS Protection (automatic reset): 85°C thermal reset breaker UL Approval: UL-1950 AC Transformer: CSI Model No. 14014 Input Voltage: 90 - 264 VAC; 47 - 63 Hz Output Voltage: 18 VDC Output Current (max): 1.3 Amps UL Approved, File No.: E137895 There are inherent hazards associated with the use of sealed lead acid batteries. Under normal operation, lead acid batteries generate a small amount of hydrogen gas. This gaseous by-product is generally insignificant because the hydrogen dissipates naturally before build-up to an explosive level (4%) occurs. However, if the batteries are shorted or overcharging takes place, hydrogen gas may be generated at a rate sufficient to create a hazard. Campbell Scientific makes the following recommendations: 1. A CR1000 equipped with standard lead acid batteries should NEVER be used in applications requiring intrinsically safe equipment. 2. A lead acid battery should not be housed in a gas-tight enclosure. Section 1. Installation and Maintenance 1.3.3 A100 Null Modem Adapter The A100 Null Modem Adapter is used when 5 volts is needed to power external modems with the PS100 or CH100. The A100 supplies 5 volts to pin 1 of the 9 pin null modem ports. A common use for the A100 is in radiotelemetry networks. The maximum current drain on the 5-volt supply of the A100 is 150 milliamps. 1.4 Solar Panels Auxiliary photovoltaic power sources may be used to maintain charge on lead acid batteries. When selecting a solar panel, a rule-of-thumb is that on a stormy overcast day the panel should provide enough charge to meet the system current drain (assume 10% of average annual global radiation, kW/m). Specific site information, if available, could strongly influence the solar panel selection. For example, local effects such as mountain shadows, fog from valley inversion, snow, ice, leaves, birds, etc. shading the panel should be considered. 1.5 Direct Battery Connection to the CR1000 Wiring Panel Any clean, battery backed 11 to 16 VDC supply may be connected to the Power In terminals on the front panel. When connecting external power to the CR1000, first, remove the green power connector from the CR1000 front panel. Insert the positive 12 V lead into the right-most terminal of the green connector. Insert the ground lead in the left terminal. Double check polarity before plugging the green connector into the panel. 1.6 Vehicle Power Supply Connections If a CR1000 is powered from the 12 Volts of a motor vehicle, a second 12 V supply is required. When the starting motor of a vehicle with a 12 V electrical system is engaged, the voltage drops considerably below 11 V, which would cause the CR1000 to stop measurement every time the vehicle is started. The second 12 V supply prevents this malfunction. Figure 1.6-3 shows connecting the two supplies to a CR1000. The diodes allows the vehicle to power the CR1000 without the second supply attempting to power the vehicle. Section 1. Installation and Maintenance CR1000 Panel IN4001 +12V [>-————_—-® Vehicle +12 G Vehicle at IN4001 -———-e Second Supply +12 Second Supply = FIGURE 1.6-3. Connecting CR1000 to Vehicle Power Supply 1.7 CR1000 Grounding Grounding the CR1000 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 lightning strikes hit the datalogger or sensors directly. Secondary strikes induce a voltage in power lines or sensor wires. The primary devices for protection against ESD are gas-discharge tubes (GDT). All critical inputs and outputs on the CR1000 are protected with GDTs or transient voltage suppression diodes. The GDTs fire at 150 V to allow current to be diverted to the earth ground lug. To be effective, the earth ground lug must be properly connected to earth (chassis) ground. As shown in Figure 1.7-1, the power ground and signal ground are independent lines until joined inside the CR1000. Section 1. Installation and Maintenance Tie pulse-counter returns into grounds ( * ) in pulse-counter terminal strip. Large excitation return currents may also be tied into this ground in order to minimize induced single-ended offset voltages in half bridge measurements. Tie 5 V, SW-12, 12 V and C1-C8 returns into power grounds (G). External Star Ground at Power Input Ground Lug #! Tie analog signal shields and returns to grounds @) located in analog input terminal strips. hes” Pak ate Pooh be rata Thy. Qe Po pees Le Fecr1000 Pin) see re FIGURE 1.7-1. Schematic of CR1000 Grounds The 9-pin serial I/O ports on the CR1000 are another path for transients to enter and damage the CR1000. Communications devices such a telephone or short-haul modem lines should have spark gap protection. Spark gap protection is often an option with these products, so it should always be requested when ordering. The spark gaps for these devices must be connected to either the CR1000 earth ground lug, the enclosure ground, or to the earth (chassis) ground. 1-9 Section 1. Installation and Maintenance A good earth (chassis) ground will minimize damage to the datalogger and sensors by providing a low resistance path around the system to a point of low potential. Campbell Scientific recommends that all dataloggers be earth (chassis) grounded. All components of the system (dataloggers, sensors, external power supplies, mounts, housings, etc.) should be referenced to one common earth (chassis) ground. In the field, at a minimum, a proper earth ground will consist of a 6 to 8 foot copper sheathed grounding rod driven into the earth and connected to the CR1000 Ground Lug with a 12 AWG wire. In low conductive substrates, such as sand, very dry soil, ice, or rock, a single ground rod will probably not provide an adequate earth ground. For these situations, consult the literature on lightning protection or contact a qualified lightning protection consultant. An excellent source of information on lightning protection can be located via the web at http://www.polyphaser.com. In vehicle applications, the earth ground lug should be firmly attached to the vehicle chassis with 12 AWG wire or larger. In laboratory applications, locating a stable earth ground is not always obvious. In older buildings, new cover plates on old AC sockets may indicate that a safety ground exists when in fact the socket is not grounded. Ifa safety 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 CR1000 ground, within which both inputs of a differential measurement must lie in order for the differential measurement to be made correctly. Common mode range for the CR1000 is +5.0 V. For example, if the high side of a differential input is at 2 V and the low side is at 0.5 V relative to CR1000 ground, a measurement made on the 5.0 V range would indicate a signal of 1.5 V. However, if the high input changed to 6 V, the common mode range is exceeded and the measurement may be in error. Common mode range may be exceeded when the CR1000 is measuring the output from a sensor which has its own grounded power supply and the low side of the signal is referenced to the sensors power supply ground. If the CR1000 ground and the sensor ground are at sufficiently different potentials, the signal will exceed the common mode range. To solve this problem, the sensor power ground and the CR1000 ground should be connected, creating one ground for the system. In a laboratory application, where more than one AC socket may be used to power various sensors, it is not safe to assume that the power grounds are at the same potential. To be safe, the ground of all the AC sockets in use should be tied together with a 12 AWG wire. 1.7.3 Effect of Grounding on Single-Ended Measurements 1-10 Low-level single-ended voltage measurements can be problematic because of ground potential fluctuations. The grounding scheme in the CR1000 has been Section 1. Installation and Maintenance designed to eliminate ground potential fluctuations due to changing return currents from 12 V, SW-12, 5 V, and the control ports. This is accomplished by utilizing separate signal grounds (‘+ ) and power grounds (G). To take advantage of this design, observe the following grounding rule: NOTE Always connect a device’s ground next to the active terminal associated with that ground. Several ground wires can be connected to the same ground terminal. Examples: 1. Connect 5 Volt, 12 Volt, and control grounds to G terminals. 2. Connect excitation grounds to the closest + terminal on the excitation terminal block. 3. Connect the low side of single-ended sensors to the nearest */ terminal on the analog input terminal blocks. 4. Connect shield wires to the nearest |* terminal on the analog input terminal blocks. If offset problems occur because of shield or ground leads with large current flow, tying the problem leads into the *. terminals next to the excitation 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 CR1000 is a convenient source of power for sensors and peripherals requiring a continuous or semi-continuous 5 VDC or 12 VDC source. The CR1000 has two continuous 12-Volt (12V) supply terminals, one switched 12 Volt (SW-12) supply terminals, and one continuous 5 Volt (5V) supply terminals. Voltage on the 12V and SW-12 terminals will change with the CR1000 supply voltage. The 5V terminal is regulated and will always remain near 5 Volts (+4%)so long as the CR1000 supply voltage remains above 9.6 Volts. The 5V terminal is not suitable for resistive bridge sensor excitation. Table 1.8-1 shows the current limits of the 12-Volt and 5 Volt ports. Table 1.8-2 shows current requirements for several CSI peripherals. Other devices normally have current requirements listed in their specifications. Current drain of all peripherals and sensors combined should not exceed current sourcing limits of the CR1000. 1-11 Section 1. Installation and Maintenance Table 1.8-1 Current Sourcing Limits Terminals Current Source Limit swi2 <900 mA @ 20°C <729 mA @ 40°C < 630 mA @ 50°C < 567 mA @ 60°C < 400 mA @ 80°C 12V+SW12 < 1.85 A @ 20°C <1.50A @ 40°C < 130A @ 50°C <1LI7A @ 60°C <0.85 A @ 80°C 5V + CSI/O <200 mA Make certain that the primary source of power for the CR1000 can sustain the current drain for the period of time required. Contact a CSI applications engineer for help in determining a power budget for applications that approach the limits of a given power supply’s capabilities. Be particularly cautious about any application using solar panels and cellular telephone or radio, applications requiring long periods of time between site visits, or applications at extreme temperatures. TABLE 1.8-2. Typical Current Drain for Some CR1000 Peripherals Typical Current Drain (mA) Peripheral Quiescent Active AM25T _ 1 COM210 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 CR1000. Many devices can conveniently be controlled with the SW-12 (Switched 12 Volt) terminals on the CR1000. Table 1.8-1 shows the current available from SW-12 port. Applications requiring more control channels or greater power sourcing capacity can usually be satisfied with the use of Campbell Scientific’s A21REL-12 Four Channel Relay Driver, ASREL-12 Six Channel Relay Driver, SDM-CD16AC 16 Channel AC/DC Relay Module, or by using the control (C1-C8) ports as described in Section 1.9.1 1.9.1 Use of Digital I/O Ports for Switching Relays Each of the eight digital I/O ports (C1 - C8) can be configured as an output port and set low or high (0 V low, 5 V high) using the PortSet or WritelO 1-12 Section 1. Installation and Maintenance CONTROL PORT 1.5K 2N2222A instructions. A digital output port is normally used to operate an external relay driver circuit because the port itself has a limited drive capability (2.0 mA minimum at 3.5 V). Figure 1.9-1 shows a typical relay driver circuit in conjunction with a coil driven relay which may be used to switch external power to some device. In this example, when the control port 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 draws in excess of 75 mA at room temperature (limit of the 2N2907A medium power transistor), the use of a relay (Figure 1.9-1) would be required. Other control port activated circuits are possible for applications with greater current/voltage demands than shown in Figures 1.9-1 and 2. For more information contact a Campbell Scientific applications engineer. G SUPPLY: MAXIMUM = 40 VDC MINIMUM = REQUIRED COIL VOLTAGE ron + MAXIMUM CURRENT TO —_ 12voce COIL IS 75 mA AT 25°C, naiag TV — = Battery 40 mA AT -50°C FAN FIGURE 1.9-1. Relay Driver Circuit with Relay 1-13 Section 1. Installation and Maintenance 20K CONTROL PORT @) SUPPLY, 40 VDC MAXIMUM 10K S MAXIMUM CURRENT TO 2N2907A PERIPHERAL IS 75 mA AT 25°C, 40 mA AT —5SO°C 2K PERIPHERAL TO BE POWERED 2N2222A FIGURE 1.9-2. Power Switching without Relay 1.10 Maintenance The CR1000 power supplies require a minimum of routine maintenance. When not in use, the rechargeable supply should be stored in a cool, dry environment with the AC charger active. 1.10.1 Desiccant The CR1000 is shipped with desiccant to reduce humidity. Desiccant should be changed periodically. To prevent corrosion in uncontrolled or condensing atmospheres, the CR1000 must be placed inside a weather tight instrument enclosure with desiccant. Do not completely seal the enclosure if lead acid batteries are present. Hydrogen gas generated by the batteries may build up to an explosive concentration. 1.10.2 Replacing the Internal Battery CAUTION 1-14 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 CR1000 contains a lithium battery that operates the clock and SRAM when the CR1000 is not powered. The CR1000 does not draw any power from the lithium battery while it is powered by a 12 VDC supply. In a CR1000 stored at room temperature, the lithium battery should last approximately 10 years (less at temperature extremes). Where the CR1000 is powered most or all of the time the lithium cell should last much longer. While powered from an external source, the CR1000 measures the voltage of the lithium battery daily. This voltage is displayed in the status table (Section Section 1. Installation and Maintenance 1.6) A new battery will have approximately 3.6 volts. The CR1000 Status Table has a “Lithium Battery” field. This field is either “True” (battery is good) or “False” (replace battery). If the lithium cell is removed or allowed to discharge below the safe level, the CR1000 will still operate correctly while powered. Without the lithium battery, the clock will reset and data will be lost when power is removed. A replacement lithium battery can be purchased from Campbell (part number 13519). Table 1.10-1 lists the specifications of the battery. Table 1.10-1 CR1000 Lithium Battery Specifications Model Tadiran TL-59025 (3.6 V) Capacity 1.2 Ah self discharge rate 1%/year @ 20°C Operating temperature range —-55°C to 85°C The CR1000 must be partially disassembled to replace the lithium cell. Figures 1.10-1 to 1.10-5 illustrate how to disassemble the CR1000. Reverse these steps to reassemble the CR1000. FIGURE 1.10-1. CR1000 with wiring panel. 1-15 Section 1. Installation and Maintenance dy |G yy oe FIGURE 1.10-2. Loosen thumbscrew to remove CR1000 canister from wiring panel. FIGURE 1.10-3. Pull edge with thumbscrew away from wiring panel. 1-16 Section 1. Installation and Maintenance FIGURE 1.10-5. Remove and replace battery. 1-17 Section 2. Data Storage and Retrieval The CR1000 can store individual measurements or it may use its extensive processing capabilities to calculate averages, maxima, minima, histograms, FFTs, etc., on periodic or conditional intervals. Data are stored in tables. The number of tables and the values to output in each table are selected when running Short Cut (Overview) or when writing a datalogger program directly (Sections 4 — 9). 2.1 Data Storage in CR1000 There are two possible areas for data storage on the CR1000: Internal SRAM The optional CFM100 Compact Flash Module allows storing data in a compact flash card. Internal SRAM is used as either the sole storage area for a data table or as a buffer area when data are sent to compact flash (CF) card. When the CR1000 gets a request for data that is stored on a CF card, the CR1000 only looks for the data in the CF card when the oldest data are requested or if the data are not available in internal RAM. 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 CF card by including the CardOut instruction within the data table declaration. 2.1.1 Internal SRAM 2.1.2 CFM100 Internal SRAM is used as either the sole storage area for a data table or as a buffer area when data are sent to a CF card. The maximum number of data tables that can be created is 30. Internal SRAM is battery backed. Data remain in memory when the CR1000 is powered down. Data in SRAM are erased when a different program is loaded and run. There is 1 Mbyte of SRAM. Some of this is used by the operating system and for program storage. The rest is available for data storage. When a new program is compiled, the CR1000 checks that there is adequate space in SRAM for the data tables; a program that requests more space than is available will not run. The CFM100 is an optional module that plugs onto the CR1000 peripheral port and has a slot for a Type I or Type II CF card. CF cards allow expanding the CR1000’s storage capacity. A program can send a maximum of 30 data tables to a CF card. 2-1 Section 2. Data Storage and Retrieval NOTE To install or remove the CFM100 module, turn the CR1000 power off. When a data table is sent to a CF card, the data table in SRAM is used as a buffer for transferring data to the card. When the card is present, the status table will show the size of the table on the card for the table size. If the card is removed, the size of the table in SRAM will be shown. When a new program is compiled that sends data to the CF card, the CR1000 checks if a card is present and if the card has adequate space for the data tables. If the card has adequate space, the tables will be allocated and the CR1000 will start storing data to them. If there is no card or if there is not enough space, the CR1000 will warn that the card is not being used and will run the program, storing the data in SRAM only. When a card with enough available memory is inserted the CR1000 will create the data tables on the card and store the data that is accumulated in SRAM. Data stored on cards can be retrieved through a communication link to the CR1000 or by removing the card and carrying it to a computer. Because of the popularity of compact flash cards for digital photography, there are many varieties of compact flash adapters for computers. There are also passive adapters that allow a compact flash card to be plugged into the PCMCIA card slot available on many laptops. The PCMCIA interface is much faster than the communication link. With large files transferring the CF card to the computer may be faster than collecting the data over the link. The CR1000 uses either the FAT or the FAT 32 format for the CF cards. Cards can be formatted in a PC or in the CR1000. 2.2 Internal Data Format TABLE 2.2-1 CR1000 DATA TYPES Data Type __| Size Range Resolution LONG 4 bytes -2,147,483,648 to +2,147,483,647 1 bit (1) TEEE4 4 bytes 1.8 E -38 to 1.7 E38 24 bits (about 7 digits) FP2 2 bytes -7999 to +7999 13 bits (about 4 digits) Boolean 4 bytes True/False _— String 1 byte per character _— — +1 byte, 16 byte minimum 2-2 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 six data types used to store data. The data format is selected in the instruction that outputs the data. Within the CR1000, time is stored as integer seconds and nanoseconds into the second since midnight, the start of 1990. While IEEE 4 byte floating point is used for variables and internal calculations, FP2 is adequate for most stored data. Campbell Scientific 2 byte floating point provides 3 or 4 significant digits of resolution, and requires half the memory space as IEEE 4 byte floating point (2 bytes per value vs 4). Section 2. Data Storage and Retrieval TABLE 2.2-2. Resolution and Range Limits of FP2 Data Zero | Minimum Magnitude Maximum Magnitude 0.000 | +0.001 +7999. The resolution of FP2 is reduced to 3 significant digits when the first (left most) digit is 8 or greater (Table 2.2-2). Thus, it may be necessary to use IEEE4 output or an offset to maintain the desired resolution of a measurement. For example, if water level is to be measured and output to the nearest 0.01 foot, the level must be less than 80 feet for low-resolution output to display the 0.01-foot increment. If the water level is expected to range from 50 to 90 feet the data could either be output in high resolution or could be offset by 20 feet (transforming the range to 30 to 70 feet). TABLE 2.2-3 FP2 Decimal Location | Absolute Value | Decimal Location | 0- 7.999 | KOK | 8 - 79.99 | XX.XX | _80 - 799.9 | XXX.X [800 - 7999. [_XXxx. 2.3 Data Collection Data can be transferred into a computer via a communications link using one of Campbell Scientific’s datalogger support software packages (e.g., PC200, PC400, LoggerNet) or by transferring a CF card from the CR1000 to the computer. When the CR1000 is used without a computer in the field, or large data files are collected on a CF card, the CF card can be transported to the computer with the data on it. The format of the data files on the CF card is different than the data file formats created when data are collected via a communications link. Data files read directly from the CF card generally need to be converted into another format to be used. 2.3.1 Via a Communications Link See the manual and help for the software package you are using. 2.3.2 Via CF Card When the CR1000 is used without a communication link in the field, or large data files are collected on a CF card, the card can be transported to the computer with the data on it. See the CFM100 manual for additional information. Section 2. Data Storage and Retrieval 2-4 2.3.2.1 Inserting a CF Card A card inserted in the CF slot of the CFM100 when no program is running or when a program is running that does not use the CF card does not cause a response from the CR1000. When a new program is compiled that sends data to the CF card, the CR1000 checks if a card is present and if the card has adequate space for the data tables. If the card has adequate space, the tables will be allocated and the CR1000 will start storing data to them. When a card is inserted into a CR1000 that is programmed to send data to a card, the CR1000 will detect the card. If the card has no data tables files with the same names as those created by the program, the CR1000 checks if the card has adequate space for the data tables. If the card has adequate space, the tables will be allocated and the CR1000 will start storing data to them. If the card has existing data table files whose names match those created by the program, and the program has already run with a card, the CR1000 checks if the data table headers match the program exactly and if the time that the CR1000 last stored data to a card matches a time stored on the card, the CR1000 starts appending to the data table on the card. This option allows removing the card to read it and then returning it to the CR1000 and having the new data appended to the data already on the card. If you choose to use this option be aware that if the CR1000 overwrites its buffer while the card is out, there will be a gap in the data on the card. If there is not enough space on the card or the data tables do not match, the CR1000 will turn the LED yellow indicating that the card is not being used. 2.3.2.2 Removing Card from CR1000 CAUTION To remove a card, press the button on the CFM100. The CR1000 will store any buffered data to the card and then power if off. The Status LED will turn green when it is OK remove the card. Remove the card. The card will be reactivated after 20 seconds if it is not removed. The CF card Status LED just above the CF card door is red when the card is being written to. Removing a card or removing power from the card while it is active can cause garbled data and can actually damage the card. Before switching off the CR1000 power, press the CFM100 button and wait for the green LED. When the CF card is inserted in a computer, the data files can be copied to another drive or used directly from the CF card just as one would from any other disk. In most cases, however, it will be necessary to convert the file format before using the data. Section 2. Data Storage and Retrieval 2.3.2.3. Converting File Format The CR1000 stores data on the CF card in TOB3 Format. TOB3 is a binary format that incorporates features to improve reliability of the CF cards. TOB3 allows the accurate determination of each record’s time without the space required for individual time stamps. When TOB3 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 anticipated, there may be fewer records in the file than were allocated. CardConvert software included in PC200, PC400, and LoggerNet will convert the data on the card to another format. 2.4 Data Format on Computer The format of the file stored on disk can be either ASCII or Binary depending on the file type selected in the computer software used to collect the data (PC200, PC400, LoggerNet). 2.4.1 Header Information Every data file stored on disk has an ASCII header at the beginning. The header gives information on 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","Station","Logger","Serial No.","OS Ver","DLD File","DLD Sig","Table Name" "TIMESTAMP","RECORD","Field Name","Field Name","Field Name" "TS","RN","Field Units","Field Units","Field Units" mv" "Processing","Processing","Processing" "Field Data Type","Field Data Type","Field Data Type","Field Data Type","Field Data Type" timestamp,record number field data, field data, field data, FIGURE 2.4.1 Header Information File Format The format of the file on disk. TOAS5 is an ASCII format. TOB1 is a Binary format. Station Name The station name set in the logger that the data was collected from. Logger Model The datalogger model that the data was collected from. Section 2. Data Storage and Retrieval 2-6 Logger Serial Number The serial number of the logger that the data was collected from. This is the serial number of the CR1000 CPU. Operating System Version The version of the operating system in the logger that the data was collected from. DLD File The name of the program that was running when the data were created. DLD Signature The signature of the program file that created the data. Table Name The data table name. Field Name The name of the field in the data table. This name is created by the CR1000 by appending underscore (_ ) and a three character mnemonic for the output processing (e.g., AVG, TOT, etc.). Field Units The units for the field in the data table. Units are assigned in the program with the units declaration. Field Processing The output processing that was used when the field was stored. Smp = Sample Max = Maximum Min = Minimum Avg = Average Field Data Type This header line is only in TOB] binary format and identifies the data type for each of the fields in the data table. UINT4 = Unsigned 4 byte integer IEEEF4 = 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 each of the fields in the record. 2.4.2 TOAS5 ASCII File Format The following is a sample of a file collected as TOAS. "TOAS","Fritz","CR1000","1079","CR1000.Std.1.0","CPU:TCTemp.CR1","51399","Temp" "TIMESTAMP","RECORD","RefTemp_Avg","TC_Avg(1)","TC_Avg(2)","TC_Avg(3)","TC_Avg(4)" "TS","RN","degC","DegC","DegC","DegC","DegC" een >> ‘Avg","Avg","Avg","Ave","Avg" Section 2. Data Storage and Retrieval "2004-10-27 16:20:00",0,24.1,24.03,24.04,24.05,24.04 "2004-10-27 16:30:00", 1,24.01,24.01,24.01,24,23.99, The following is an example of how the above data might look when imported into a spreadsheet. TOAS Fritz CR1000 1079}CR1000.Std1.0 |CPU:TCTemp.CR1 51399|Temp TIMESTAMP RECORD |Reff_Avg |TC_Avg(1) |TC_Avg(2) TC_Avg(3) TC_Avg(4) TS RN degC DegC DegC DegC [DegC Avg Avg Avg Avg Avg 10/27/2004 16:20 0 24.1 24.03 24.04 24.05 24.04 10/27/2004 16:30 1 24.01 24.01 24.01 24 23.99 2.4.3 TOB1 Binary File Format This is a sample of the TOB1 Binary file header "TOB1","Fritz'","CR1000","1079","CR1000.Std. 1.0","CPU:TCTemp.CR1","51399","Temp" "SECONDS","NANOSECONDS","RECORD","RefTfemp_Avg","TC_Avg(1)","TC_Avg(2)","TC_Avg(3)","TC_Avg(4)" "SECONDS","NANOSECONDS","RN","degC","DegC","DegC","DegC","DegC" “mm 0" "Ave"."Avge","Ave","Ave","Ave" "ULONG","ULONG","ULONG","FP2","FP2","FP2","FP2","FP2" (Data are binary and not directly readable) 2.4.4 TOB3 Binary File Format The TOB3 binary format has a header similar to the other formats. TOB3 data is stored in fixed size “frames” that generally contain a number of records. The size of the frames is a function of the record size. The frames are time stamped, allowing the calculation of time stamps for their records. If there is a lapse in periodic interval records that does not occur on a frame boundary, an additional time stamp is written within the frame and its occurrence noted in the frame boundary. This additional time stamp takes up space that would otherwise hold data. When TOB3 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 anticipated, there may be fewer records in the file than were allocated. Section 3. CR1000 Measurement Details 3.1 Analog Voltage Measurement Sequence The CR1000 measures analog voltages with either an integrate and hold or analog to digital (A/D) conversion. The A/D conversion is made with a 13-bit successive approximation technique which resolves the signal voltage to approximately one part in 7500 of the full scale range. Using the fastest possible measurements at the minimum scan rate of 10 ps (100 Hz) the CR1000 can make and store measurements from all 8 differential or 13 single- ended channels. The maximum conversion rate is 2700 per second for measurements made on a single channel. The timing of CR1000 measurements is precisely controlled. The measurement schedule is determined at compile time and loaded into memory. This schedule sets interrupts that drive the measurement task. Using two different voltage measurement instructions with the same voltage range takes the same measurement time as using one instruction with two repetitions. (This is not the case in the CR10X, 21X, CR23X and CR7 dataloggers where there is always a setup time for each instruction.) There are four parameters in the measurement instructions that may vary the sequence and timing of the measurement. These are options to measure and correct the ground offset on single-ended measurements each time measurements are made (MeasOfs), to reverse the high and low differential inputs (RevDiff), to set the time to allow the signal to settle between switching to a channel and making a measurement (SettlingTime), to set the length of time to integrate a measurement (Integ), and to reverse the polarity of excitation voltage (RevEx). 3.1.1 Voltage Range Fixed Voltage Ranges AutoRange The CR1000 has 6 fixed voltage ranges and autorange. The 13 bit A/D has a resolution of 1 part in 2'° (8,192). To allow for some overrange capabilities the A/D is applied to a range approximately 9% greater than the Full Scale Range resulting in the 1 part in 7500 resolution over the FSR. For example, on the +2500 mV range the full scale range is 5000 mV [2500 - (-2500)] and the resolution is two thirds of a millivolt; 5000/.667 = 7500. The smaller the voltage range, the better the absolute resolution. In general, a measurement should use the smallest fixed voltage range that will accommodate the full scale output of the sensor being measured. If the voltage exceeds the range, the CR1000 indicates the overrange by returning Not-A-Number (NAN) for the measurement. For signals that do not fluctuate too rapidly, AutoRange allows the CR1000 to automatically choose the voltage range to use. The CR1000 AutoRange makes Section 3. CR1000 Measurement Details two measurements. The first measurement determines the range to use. It is made with the 250 ps integration on the +2500 mV range. The second measurement is made on the appropriate range using the integration specified in the instruction. Both measurements use the settling time programmed in the instruction. AutoRange optimizes resolution but takes longer than a measurement on a fixed range, because of the two measurements required. An AutoRange measurement will return Not-A-Number if the voltage exceeds the range picked by the first measurement. To avoid problems with a signal on the edge of a range, AutoRange selects the next larger range when the signal exceeds 90% of a range. AutoRange is very good for a signal that occasionally exceeds a particular range, for example, a Type J thermocouple that most of the time will be less than 476 °C (+25 mV range) but will occasionally see temperatures as high as 500 °C (+250 mV range, Table 3.4-2). AutoRange should not be used for rapidly fluctuating signals, particularly those whose signal traverses several voltage ranges rapidly because of the possibility that the signal could change ranges between the range check and the actual measurement. Open Circuit Detect / Pull into Common Mode Another option selected with the voltage range code is to check for an open circuit and at the same time pull the signal into common mode range. The range codes for this option end in C. For example, the range code for the +25 mV range is “mV25”, the code for this range with open circuit detect is “mV25C” The open circuit detect works by briefly (50 microseconds) connecting the voltage input to 300 mV within the CR1000. A differential voltage input has the high side connected to 300 mV and the low side connected to ground. After disconnecting, the input is allowed to settle, and the voltage measurement is made. If the sensor is open (inputs not connected and “floating”) the inputs will remain floating near the voltage they were connected to; a measurement on the +2.5 mV, +7.5 mV, +25 mV, or the +250 mV voltage range will overrange and return Not-A-Number (NAN). If the sensor is good, the signal from the sensor will drive the inputs to the correct value. The autorange open circuit detect range (AutorangeC) will only autorange up to the +250 mV range and cannot be used for higher voltages. If AutorangeC was allowed to switch to the +2500 mV range it would not be able to detect open circuits. Briefly connecting the inputs to the internal CR1000 voltages also serves to pull a floating differential voltage into the CR1000 common mode (Section 3.2). This voltage range option should be used for making differential voltage measurements of thermocouples (TCDiff) and for other sensors with floating differential outputs (e.g., Solar radiation sensors). The open circuit detect does not work on the +2500 mV or +5000 mV ranges. However, the mV2500C and mV5000C ranges can be used to pull a floating differential signal within common mode range. There is no reason to use these ranges for single-ended measurements. Section 3. CR1000 Measurement Details 3.1.2 Reversing Excitation or the Differential Input Reversing the excitation polarity or the differential input are techniques to cancel voltage offsets that are not part of the signal. For example, if there is a +5 pV offset in the measurement circuitry, a 5 mV signal will be measured as 5.005 mV. When the input is reversed, the measurement will be -4.995 mV. Subtracting the second measurement from the first and dividing by 2 gives the correct answer: 5.005-(-4.995)=10, 10/2=5. Most offsets are thermocouple effects caused by temperature gradients in the measurement circuitry or wiring. Reversing the excitation polarity 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 cancels offsets in the CR1000 measurement circuitry and improves common-mode rejection. One measurement is made with the high input referenced to the low input and a second with the low referenced to the high. 3.1.3 Measuring Single-Ended Offset The single-ended offset is a voltage offset on a single-ended input. It is measured by internally switching the input to ground and measuring the voltage. When a single-ended measurement is made this offset is corrected for in the calibration. The offset can either be measured automatically as part of the background calibration or as part of the measurement sequence each time the measurement is made (adding to the time to make the measurement). When the offset is measured in the measurement sequence, the offset is measured once prior to completing all of the instruction reps. The MeasOfs parameter in instructions that make single-ended voltage measurements is used to force the offset measurement. In most cases the background calibration is adequate. Additional accuracy can be gained by making the offset measurement with each measurement instruction when the offset is changing rapidly as it would during when the CR1000 is undergoing rapid temperature swings. 3.1.4 SettlingTime When the CR1000 switches to a new channel or switches on the excitation for a bridge measurement, there is a finite amount of time required for the signal to reach its true value. Delaying between setting up a measurement (switching to the channel, setting the excitation) and making the measurement allows the signal to settle to the correct value. The default settling times are the minimum required for the CR1000 to settle to within its accuracy specifications. Additional time is necessary when working with high sensor resistances or long lead lengths (higher capacitance). Using a longer settling time increases the time required for each measurement. Section 3.3 goes into more detail on determining an adequate settling time. 3-3 Section 3. CR1000 Measurement Details When the CR1000 reverses the differential input or the excitation polarity it delays the same settling time after the reversal as it does before the first measurement. Thus there are two delays per channel when either RevDiff or RevEx is used. If both RevDiff and RevEx are selected, there are four measurement segments, positive and negative excitations with the inputs one way and positive and negative excitations with the inputs reversed. The CR1000 switches to the channel: sets the excitation, delays, measures, reverses the excitation, delays, measures, reverses the excitation, reverses the inputs, delays, measures, reverses the excitation, delays, measures. Thus there are four delays per channel measured. The CR1000 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 CR1000 may use a combination of analog and digital integration. With analog integration, the input signal is integrated for a precise period of time. The integrated value is held for the A/D conversion. There are three possible analog integration times 20 ms, 16.67 ms and 250 ps. The 20 ms (1/50 second) and 16.667 ms (1/60 second) are available to integrate out the effects of noise from 50 or 60 Hz AC power sources. An integration time is specified as part of the measurement instruction. An integration time of 250 selects the 250 1s integration, “_60 Hz” selects the 60 Hz rejection (16.667 ms), and “*_50 Hz” selects 50 Hz rejection (20 ms). The +2500 and +5000 mV ranges do not have the 16.667 and 20 ms integrations. On these ranges the ““_50 Hz” and “_60 Hz” integrations reject 50 or 60 Hz noise by averaging two of the 250 1s integration measurements that are spaced exactly one half of a 50 or 60 Hz cycle apart. The average of these measurements is stored as the result of the measurement. The integration specified in the measurement instruction is used for each segment of the measurement. Thus, if reversing the differential input or reversing the excitation is specified, there will be two integrations per channel; if both reversals are specified, there will be four integrations. 3.2 Single Ended and Differential Voltage Measurements A single-ended voltage measurement is made on a single input which is measured relative to ground. A differential measurement measures the difference in voltage between two inputs. 3-4 NOTE Section 3. CR1000 Measurement Details There are two sets of channel numbers on the analog channels. Differential channels (1-8) have two inputs: high (H) and low (L). Either the high or low side of a differential channel can be used for a single ended measurement. The single-ended channels are numbered 1-16. Because a single ended measurement is referenced to CR1000 ground, any difference in ground potential between the sensor and the CR1000 will result in an error in the measurement. For example, if the measuring junction of a copper-constantan thermocouple, being used to measure soil temperature, is not insulated and the potential of earth ground is 1 mV greater at the sensor than at the point where the CR1000 is grounded, the measured voltage would be 1 mV greater than the thermocouple output, or approximately 25 °C high. Another instance where a ground potential difference creates a problem is where external signal conditioning circuitry is powered from the same source as the CR1000. Despite being tied to the same ground, differences in current drain and lead resistance result in different ground potential at the two instruments. For this reason, a differential measurement should be made on an analog output from the external signal conditioner. Differential measurements MUST be used when the inputs are known to be different from ground, such as the output from a full bridge. Common mode range In order to make a differential measurement, the inputs must be within the CR1000 common mode range of +5 V. The common mode range is the voltage range, relative to CR1000 ground, within which both inputs of a differential measurement must lie, in order for the differential measurement to be made. For example, if the high side of a differential input is at 4 V and the low side is at 3 V relative to CR1000 ground, there is no problem. A measurement made on the +5000 mV range will return 1000 mV. However, if the high input is at 5.8 V and the low input is at 4.8 V, the measurement can not be made because the high input is outside of the +5 V common mode range (the CR1000 will indicate the overrange by returning not-a-number (NAN). Sensors that have a floating output or are not referenced to ground through a separate connection may need to use the voltage range option to pull into common mode range (Section 3.1.1) or to have one side of the differential input connected to ground to ensure the signal remains within the common mode range. Problems with exceeding common mode range may be encountered when the CR1000 is used to read the output of external signal conditioning circuitry if a good ground connection does not exist between the external circuitry and the CR1000. When operating where AC power is available, it is not always safe to assume that a good ground connection exists through the AC wiring. Ifa CR1000 is used to measure the output from a laboratory instrument (both plugged into AC power and referencing ground to outlet ground), it is best to tun a ground wire between the CR1000 and the external circuitry. 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. 3-5 Section 3. CR1000 Measurement Details A differential measurement has the option of reversing the inputs to cancel offsets as described above. NOTE Sustained voltages in excess of +16 V will damage the CR1000 circuitry. 3.3 Signal Settling Time Whenever an analog input is switched into the CR1000 measurement circuitry prior to making a measurement, a finite amount of time is required for the signal to stabilize at it's correct value. The rate at which the signal settles is determined by the input settling time constant which is a function of both the source resistance and input capacitance. The CR1000 delays after switching to a channel to allow the input to settle before initiating the measurement. The default delays used by the CR1000 depend on the integration used and the voltage range. The default delay is 450 us for 250 ps integrations and 3 ms for 50 Hz or 60 Hz rejection integrations. This settling time is the minimum required to allow the input to settle to the resolution specification. Additional wire capacitance associated with long sensor leads can increase the settling time constant to the point that measurement errors may occur. There are three potential sources of error which must settle before the measurement is made: 1. The signal must rise to its correct value. 2. A-small transient caused by switching the analog input into the measurement circuitry must settle. 3. When a resistive bridge measurement is made using a switched excitation channel, a larger transient caused when the excitation is switched must settle. 3.3.1 Minimizing Settling Errors When long lead lengths are mandatory, the following general practices can be used to minimize or measure settling errors: 1. DONOT USE WIRE WITH PVC INSULATED CONDUCTORS. PVC has a high dielectric which extends input settling time. 2. Where possible run excitation leads and signal leads in separate shields to minimize transients. 3. When measurement speed is not a prime consideration, additional time can be used to ensure ample settling time. The settling time required can be measured with the CR1000. Section 3. CR1000 Measurement Details 3.3.2 Measuring the Necessary Settling Time The CR1000 can measure the time required for a particular sensor/cable configuration to settle. This is done by making a number of measurements with different settling times. Looking at the series of measurements it is possible to see the settling of the sensor signal. The following example demonstrates measuring the settling time for a differential voltage measurement. If you are not yet familiar with CR1000 programming, you may want to read Section 4 before trying to follow the example. The series of measurements on the sensor is made with separate measurements for each settling time. Before the program to measure the settling time is run, the sensor with the cable that will be used in the installation needs to be connected and the sensor needs to be stabilized. If the sensed value is changing rapidly it will be difficult to separate the settling time from true changes in the value measured. The following program measures the settling time on a full bridge pressure transducer. 'CR1000 Series Datalogger ‘Program to measure the settling time of a sensor ‘measured with a differential voltage measurement Public PT(20) ‘Variable to hold the measurements DataTable (Settle, True,100) Sample (20,PT(),IEEE4) EndTable BeginProg Scan (1,Sec,3,0) BrFull (PT(1),1,mV7_5,1,Vx1,1,2500,True , True ,100,250,1.0,0) BrFull (PT(2),1,mV7_5,1,Vx1,1,2500, True , True ,200,250,1.0,0) BrFull (PT(3),1,mV7_5,1,Vx1,1,2500, True , True ,300,250,1.0,0) BrFull (PT(4),1,mV7_5,1,Vx1,1,2500, True , True ,400,250,1.0,0) BrFull (PT(5),1,mV7_5,1,Vx1,1,2500, True , True ,500,250,1.0,0) BrFull (PT(6),1,mV7_5,1,Vx1,1,2500, True , True ,600,250,1.0,0) BrFull (PT(7),1,mV7_5,1,Vx1,1,2500, True ,True ,700,250,1.0,0) BrFull (PT(8),1,mV7_5,1,Vx1,1,2500,True , True ,800,250,1.0,0) BrFull (PT(9),1,mV7_5,1,Vx1,1,2500,True , True ,900,250,1.0,0) BrFull (PT(10),1,mV7_5,1,Vx1,1,2500, True ,True ,1000,250,1.0,0) BrFull (PT(11),1,mV7_5,1,Vx1,1,2500, True ,True ,1100,250,1.0,0) BrFull (PT(12),1,mV7_5,1,Vx1,1,2500, True ,True ,1200,250,1.0,0) BrFull (PT(13),1,mV7_5,1,Vx1,1,2500, True ,True ,1300,250,1.0,0) BrFull (PT(14),1,mV7_5,1,Vx1,1,2500, True ,True ,1400,250,1.0,0) BrFull (PT(15),1,mV7_5,1,Vx1,1,2500, True ,True ,1500,250,1.0,0) BrFull (PT(16),1,mV7_5,1,Vx1,1,2500,True , True ,1600,250,1.0,0) BrFull (PT(17),1,mV7_5,1,Vx1,1,2500,True , True ,1700,250,1.0,0) BrFull (PT(18),1,mV7_5,1,Vx1,1,2500,True , True ,1800,250,1.0,0) BrFull (PT(19),1,mV7_5,1,Vx1,1,2500,True , True ,1900,250,1.0,0) BrFull (PT(20),1,mV7_5,1,Vx1,1,2500,True , True ,2000,250,1.0,0) CallTable Settle NextScan EndProg Section 3. CR1000 Measurement Details The program was run on a Druck water level pressure transducer with 200 feet of cable. The first six measurements are shown in Table 3.3-1. All 20 values are plotted in Figure 3.3-1. The reading has settled by the fourteenth measurement, PT(14), thus a settling time of 1400 ps is adequate. Table 3.3-1. First Six Values of Settling Time Data TOAS Pepe’ CR1000 1079 CR1000.Std.01.00 CPU:Settlebridge.CR1 1455 Settle TIMESTAMP RECORD PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) Ts RN Smp Smp Smp Smp Smp Smp 1/3/2000 23:34 0 0.03638599 0.03901386 0.04022673 0.04042887 0.04103531 0.04123745 1/3/2000 23:34 1 0.03658813 0.03921601 0.04002459 0.04042887 0.04103531 0.0414396 1/3/2000 23:34 2 0.03638599 0.03941815 0.04002459 0.04063102 0.04042887 0.04123745 1/3/2000 23:34 3 0.03658813 0.03941815 0.03982244 0.04042887 0.04103531 0.04103531 1/3/2000 23:34 4 0.03679027 0.03921601 0.04022673 0.04063102 0.04063102 0.04083316 Settling Time 0.044 0.043, | ——________-- — - — 0.042 | —— 0.041 + 3 —*Series1 | 5 | —m-Series2 | el os am mthshanleaacrarln | —s-Series3 | + Series4 | | —*-Series5 | 0.039 — -— - ae 0.038 + a —_——_—__— - 0.037 1 2 3 4 5 6 7 8 9 10 1 12 13 14 15 Time (x100 us) FIGURE 3.3-1. Settling Time for Pressure Transducer 3.4 Thermocouple Measurements 16 17 «18 19 A thermocouple consists of two wires, each of a different metal or alloy, which are joined together at each end. If the two junctions are at different temperatures, a voltage proportional to the difference in temperatures is induced in the wires. If the junctions are at the same temperature, there is no voltage. When a thermocouple is used for temperature measurement, the wires are soldered or welded together at the measuring junction. The second 3-8 Section 3. CR1000 Measurement Details junction, which becomes the reference junction, is formed where the other ends of the wires are connected to the measuring device. (With the connectors at the same temperature, the chemical dissimilarity between the thermocouple wire and the connector does not induce any voltage.) When the temperature of the reference junction is known, the temperature of the measuring junction can be determined by measuring the thermocouple voltage and adding the corresponding temperature difference to the reference temperature. The CR1000 determines thermocouple temperatures using the following sequence. First the temperature of the reference junction is measured and stored in °C. If the reference junction is the CR1000 analog input terminals, the temperature is measured with the built in thermistor (PanelTemp instruction). The thermocouple measurement instruction measures the thermocouple voltage (TCDiff or TCSE). The thermocouple instruction calculates the voltage that a thermocouple of the type specified would output at the reference junction temperature if its reference junction were at 0 °C, and adds this voltage 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 voltage measurement, and the linearization error (difference between NIST standard and CR1000 polynomial approximations). The discussion of errors which follows is limited to these errors in calibration and measurement and does not include errors in installation or matching the sensor to the environment being measured. Panel Temperature The panel temperature thermistor is just under the panel in the center of the two rows of analog input terminals. The thermistor (Betatherm 10K3A1A) has an interchangeability specification of 0.1 °C for temperatures between 0 and 70 °C. Below freezing and at higher temperatures this specification is degraded. Combined with possible errors in the completion resistor measurement, and the Steinhart and Hart equation used to calculate the temperature from resistance, the accuracy of panel temperature is +.0.3°C-25 to 50°C and +.0.8°C-55 to 85°C. The error in the reference temperature measurement is a combination of the error in the thermistor temperature and the difference in temperature between the panel thermistor and the terminals the thermocouple is connected to. The terminal strip cover should always be used when making thermocouple measurements. It insulates the terminals from drafts and rapid fluctuations in temperature as well as conducting heat to reduce temperature gradients. Ina typical installation where the CR1000 is in a weather proof enclosure not subject to violent swings in temperature or lopsided solar radiation loading, the temperature difference between the terminals and the thermistor is likely to be less than 0.2 °C. Section 3. CR1000 Measurement Details 3-10 Panel Temperature error summary | —t—Sum of Worst Case Errors —®Thermistor Tolorance —®—CR1000 Measurement —Completion Resistor Error -35 15 5 25 45 65 FIGURE 3.4-1. Panel Temperature Errors With an external driving gradient, the temperature gradients on the input panel can be much worse. For example, the CR1000 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 between the temperature measured by one of the thermocouples and the actual temperature of the bar are due to the temperature difference between the terminals the thermocouple is connected to and the thermistor reference (the figures have been corrected for thermistor errors). Figure 3.4-2 shows the errors when the chamber was changed from -55 to 85°C in approximately 15 minutes. Figure 3.4-3 shows the results when going from 85 to 25°C. During these rapid changes in temperature, the temperature of panel thermistor will tend to lag behind the terminals because it is buried a bit deeper in the CR1000. Section 3. CR1000 Measurement Details Reference Temperature Errors Due to Panel Gradient Chamber Changed from - 55 to 85 degrees C 8 & Chamber and Reference Temperature degrees C 8 ° Measured - Actual degrees C © 3 -40 = ® XN ® +r 2? ®© RF ®@ er EP eK SE QB =: er fe Fe Ke KF NNN NN HO OO MO Time Minutes 37 39 41 43 FIGURE 3.4-2. Panel Temperature Gradients during -55 to 80 °C Change Reference Temperature Errors Due to Panel Gradient Chamber Changed from 85 to 25 degrees C 2 — 90 8 c 3 ee {Chanel 1 4 | —*Chanel 3 Chanel 4 | —>—Chanel 6 4 —*— Chanel 8 | ____| —®RefTemp_Avg —*—Chamber Temp g hamBoe ana Reference Temperatures deg. Measured - Actual degrees C ® & 8 6 20 FIGURE 3.4-3. Panel Temperature Gradients during 80 to 25 °C Change 3-11 Section 3. CR1000 Measurement Details 3-12 Thermocouple Limits of Error The standard reference which lists thermocouple output voltage as a function of temperature (reference junction at 0°C) 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 CR1000. TABLE 3.4-1. Limits of Error for Thermocouple Wire (Reference Junction at 0°C) Limits of Error Thermocouple Temperature (Whichever is greater) Type Range °C Standard Special T -200 to 0 + 1.0°C or 1.5% Oto 350 + 1.0°C or 0.75% + 0.5°C or 0.4% J 0 to 750 + 2.2°C or 0.75% + 1.1°C or 0.4% E -200 to 0 + 1.7°C or 1.0% Oto 900 + 1.7°C or 0.5% + 1.0°C or 0.4% K -200 to 0 + 2.2°C or 2.0% 0 to 1250 + 2.2°C or 0.75% + 1.1°C or 0.4% RorS 0 to 1450 + 1.5°C or 0.25% + 0.6°C or 0.1% B 800 to 1700 + 0.5% Not Estab. When both junctions of a thermocouple are at the same temperature there is no voltage produced (law of intermediate metals). A consequence of this is that a thermocouple can not have an offset error; any deviation from a standard (assuming the wires are each homogeneous and no secondary junctions exist) is due to a deviation in slope. In light of this, the fixed temperature limits of error (e.g., £1.0 °C for type T as opposed to the slope error of 0.75% of the temperature) in the table above are probably greater than one would experience when considering temperatures in the environmental range (i.e., the reference junction, at 0 °C, is relatively close to the temperature being measured, so the absolute error - the product of the temperature difference and the slope error - should be closer to the percentage error than the fixed error). Likewise, because thermocouple calibration error is a slope error, accuracy can be increased when the reference junction temperature is close to the measurement temperature. For the same reason differential temperature measurements, over a small temperature gradient, can be extremely accurate. In order to quantitatively evaluate thermocouple error when the reference junction is not fixed at 0 °C, one needs limits of error for the Seebeck coefficient (slope of thermocouple voltage vs. temperature curve) for the various thermocouples. Lacking this information, a reasonable approach is to apply the percentage errors, with perhaps 0.25% added on, to the difference in temperature being measured by the thermocouple. Section 3. CR1000 Measurement Details Accuracy of the Thermocouple Voltage Measurement The -25 to 50 °C accuracy of a CR1000 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 pV). 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, the +20 mV range is used for all but high temperature measurements (Table 3.4-2). The input offset error dominates the voltage measurement error for environmental measurements. A temperature difference of 45 to 65 °C between the measurement and reference junctions is required for a thermocouple to output 2.67 mV, the voltage at which 0.075% of the reading is equal to 2 1V. For example, assume that a type T thermocouple is used to measure a temperature of 45 °C and that the reference temperature is 25 °C. The voltage output by the thermocouple is 830.7 pV. At 45 degrees a type T thermocouple outputs 42.4 1 V per °C. The possible slope error in the voltage measurement is 0.00075x830.7 nV = 0.62 pV or 0.014 °C (0.62/42.4). The basic resolution on the +20 mV range is 0.67 pV or 0.01 °C. The 2 pV offset is an error of 0.047 °C. Thus, the possible error due to the voltage measurement is 0.081 °C on a non-reversing differential, or 0.024 °C with a reversing differential measurement. The value of using a differential measurement with reversing input to improve accuracy is readily apparent. The error in the temperature due to inaccuracy in the measurement of the thermocouple voltage is worst at temperature extremes, particularly when the temperature and thermocouple type require using the 200 mV range. For example, assume type K (chromel-alumel) thermocouples are used to measure temperatures around 1300 °C. The TC output is on the order of 52 mV, requiring the +200 mV input range. At 1300 °C, a K thermocouple outputs 34.9 nV per °C. The possible slope error in the voltage measurement is 0.00075x52 mV = 39 pV or 1.12 °C (39/34.9). The basic resolution on the 200 mV range is 6.67 1. V or 0.19 °C. Thus, the possible error due to the voltage measurement is 1.56 °C on a non-reversing differential, or 1.31 °C with a reversing differential measurement. TC Type and temp. range °C T -270 to 400 E -270 to 1000 K_ --270 to 1372 J -210 to 1200 B 0to 1820 R -50 to 1768 S -50 to 1768 N_-270 to 1300 TABLE 3.4-2. Voltage Range for Maximum Thermocouple Resolution Temp. range Temp. range Temp. range Temp. range for for +2.5 mV for 7.5 mV for +25 mV +250 mV range range range range -45 to 75 -270 to 180 -270 to 400 not used -20 to 60 -120 to 130 -270 to 365 >365 -40 to 80 -270 to 200 -270 to 620 >620 -30 to 65 -145 to 155 -210 to 475 >475 0 to 710 0 to 1265 0 to 1820 not used -50 to 320 -50 to 770 -50 to 1768 not used -50 to 330 -50 to 820 -50 to 1768 not used -80 to 105 -270 to 260 -270 to 725 >725 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. 3-13 Section 3. CR1000 Measurement Details 3-14 Noise on Voltage Measurement The typical input noise on the +25 mV range for a differential measurement with 250 us integration and input reversal is 1.2 1V RMS. Ona type T thermocouple (approximately 40 ,:V/°C) this is 0.03 °C. Note that this is an RMS value, some individual readings will vary by greater than this. By integrating for 16.67 ps the noise level is reduced to .33 pV RMS. Thermocouple Polynomial: Voltage to Temperature NIST Monograph 175 gives high order polynomials for computing the output voltage of a given thermocouple type over a broad range of temperatures. In order to speed processing and accommodate the CR1000's math and storage capabilities, 4 separate 6th order polynomials are used to convert from volts to temperature over the range covered by each thermocouple type. Table 3.4-3 gives error limits for the thermocouple polynomials. TABLE 3.4-3. Limits of Error on CR1000 Thermocouple Polynomials (Relative to NIST Standards) Tc Type Range °C Limits of Error °C T -270 to 400 -270 to -200 +18 @-270 -200 to -100 + 0.08 -100 to 100 + 0.001 100 to 400 + 0.015 J -150 to 760 + 0.008 -100 to 300 + 0.002 E -240 to 1000 -240 to -130 +04 -130 to 200 + 0.005 200 to 1000 + 0.02 K -50 to 1372 -50 to 950 + 0.01 950 to 1372 + 0.04 Reference Junction Compensation: Temperature to Voltage The polynomials used for reference junction compensation (converting reference temperature to equivalent TC output voltage) do not cover the entire thermocouple range. Substantial errors will result if the reference junction temperature is outside of the linearization range. The ranges covered by these linearizations include the CR1000 environmental operating range, so there is no problem when the CR1000 is used as the reference junction. External reference junction boxes however, must also be within 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 Error Summary Section 3. CR1000 Measurement Details 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. Two sources of error arise when the reference temperature is out of range. The most significant error is in the calculated compensation voltage, however error is also created in the temperature difference calculated from the thermocouple output. For example, suppose the reference temperature for a measurement on a type T thermocouple is 300°C. The compensation voltage calculated by the CR1000 corresponds to a temperature of 272.6 °C, a -27.4 °C error. The type T thermocouple with the measuring junction at 290 °C and reference at 300 °C would output -578.7 ):V; using the reference temperature of 272.6 °C, the CR1000 calculates a temperature difference of -10.2 °C, a -0.2 °C error. The temperature calculated by the CR1000 would be 262.4 °C, 27.6 °C low. TABLE 3.4-4. Reference Temperature Compensation Range and Polynomial Error Relative to NIST Standards © Type Range °C Limits of Error °C T -100 to 100 + 0.001 J -150 to 296 + 0.005 E -150 to 206 + 0.005 K -50 to 100 +0.01 The magnitude of the errors described in the previous sections illustrate that the greatest sources of error in a thermocouple temperature measurement with the CR1000 are likely to be due to the limits of error on the thermocouple wire and in the reference temperature. Errors in the thermocouple and reference temperature linearizations are extremely small, and error in the voltage measurement is negligible. To illustrate the relative magnitude of these errors in the environmental range, we will take a worst case situation where all errors are maximum and additive. A temperature of 45 °C is measured with a type T (copper-constantan) thermocouple, using the +2.5 mV range. The nominal accuracy on this range is 1 pV (0.01% of 10 mV) which at 45 °C changes the temperature by 0.012 °C. The RTD is 20 °C but is indicating 20 °C, and the terminal that the thermocouple is connected to is 0.05 °C cooler than the RTD. 3-15 Section 3. CR1000 Measurement Details 3-16 TABLE 3.4-5. Example of Errors in Thermocouple Temperature Source Error: °C : % of Total Error Single Differential 250 ys Integration Reversing Differential 50/60 Hz Rejection Integration Looe ANSI TC Error | TC Error 1% |ANSI TC TC Error 1% (°C) Slope Error (1°C Slope Reference Temp. _| 0.159:11.7% 0.159:31.1% 0.159:12.4% | 0.15°:36.4% TC Output 1,0°:78% 0.29:41.5% 1.09:82.5% 0.29:48.6% Voltage 0.10°:7.8% 0.10°:20.8% 0.05°:4.1% 0.05°:12.1% Measurement Noise 0.03°:2.3% 0.03°:6.2% 0.01°:0.8% 0.019:2.4% Reference 0.001°:0.1% 0.001°:0.2% 0.001°:0.1% — | 0.0019:0.25% Linearization Output 0.001°:0.1% 0.0019:0.2% 0.001°:0.1% | 0.0019:0.25% Linearization Total Error 1.2829: 100% 0.482°: 100% 1.212°:100% 0.412°:100% 3.4.2 Use of External Reference Junction or Junction Box An external junction box is often used to facilitate connections and to reduce the expense of thermocouple wire when the temperature measurements are to be made at a distance from the CR1000. In most situations it is preferable to make the box the reference junction in which case its temperature is measured and used as the reference for the thermocouples and copper wires are run from the box to the CR1000. Alternatively, the junction box can be used to couple extension grade thermocouple wire to the thermocouples, and the CR1000 panel temperature used as the reference. Extension grade thermocouple wire has a smaller temperature range than standard thermocouple wire, but meets the same limits of error within that range. The only situation where it would be necessary to use extension grade wire instead of a external measuring junction is where the junction box temperature is outside the range of reference junction compensation provided by the CR1000. This is only a factor when using type K thermocouples, where the upper limit of the reference compensation linearization is 100 °C and the upper limit of the extension grade wire is 200°C. With the other types of thermocouples the reference compensation range equals or is greater than the extension wire range. In any case, errors can arise if temperature gradients exist within the junction box. Figure 3.4-4 illustrates a typical junction box. Terminal strips will be a different metal than the thermocouple wire. Thus, if a temperature gradient exists between A and A' or B and B', the junction box will act as another thermocouple in series, creating an error in the voltage measured by the CR1000. 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 wires in contact with each other. Section 3. CR1000 Measurement Details CR1000 Junction Box A A Tc H FIGURE 3.4-4. Diagram of Junction Box An external reference junction box must be constructed so that the entire terminal area is very close to the same temperature. This is necessary so that a valid reference temperature can be measured and to avoid a thermoelectric offset voltage which will be induced if the terminals at which the thermocouple leads are connected (points A and B in Figure 3.4-3) are at different temperatures. The box should contain elements of high thermal conductivity, which will act to rapidly equilibrate any thermal gradients to which the box is subjected. It is not necessary to design a constant temperature box, it is desirable that the box respond slowly to external temperature fluctuations. Radiation shielding must be provided when a junction box is installed in the field. Care must also be taken that a thermal gradient is not induced by conduction through the incoming wires. The CR1000 can be used to measure the temperature gradients within the junction box. 3.5 Bridge Resistance Measurements There are six bridge measurement instructions included in the standard CR1000 software. Figure 3.5-1 shows the circuits that would typically be measured with these instructions. In the diagrams, the resistors labeled R, would normally be the sensors and those labeled R> would normally be fixed resistors. Circuits other than those diagrammed could be measured, provided the excitation and type of measurements were appropriate. All of the bridge measurements have the option (RevEx) to make one set of measurements with the excitation as programmed and another set of measurements with the excitation polarity reversed. The offset error in the two measurements due to thermal emfs can then be accounted for in the processing of the measurement instruction. The excitation channel maintains the excitation voltage or current until the hold 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 polarities and then excitation is again applied and reversed for the measurement of the voltage drop across the fixed resistor. Calculating the actual resistance of a sensor which is one of the legs of a resistive bridge usually requires additional processing following the bridge measurement instruction. In addition to the schematics of the typical bridge configurations, Figure 3.5-1 lists the calculations necessary to compute the resistance of any single resistor, provided the values of the other resistors in the bridge circuit are known. 3-17 Section 3. CR1000 Measurement Details BrHalf X = result w/mult = 1, offset = 0 xX V, R, =R} —— x 1-X 7 : x= Mi _Rs p, -Re(t-X) ' Rs Vy Re +Re : X X = result w/mult = 1, offset = 0 Rg = RX R; =R, / X xa 2¥2— M4 Rs Af Vy —Vy Ry X = result w/mult = 1, offset = 0 Rg, =RX _ v2 _Rs Ry =R, /X Vi Re X = result w/mult = 1, offset = 0 X, =-X/1000+R; /(R3 +R,) V. R R R,(1-X x =1000— = 1000) —3—-—# R,= 21%) Vy R3+Rq Ry+Ro X, —~RiX ay 1X, X = result w/mult = 1, offset = 0 v. (R R X= 100077 = 1000) 3 2 V4 R3 +R, R,+Rp X, = X/1000+R, /(R, +R) — RaX. y 1-x; _ R(1-X,) Xo 3 Resistance Vv. r-H : Rs L Ws -———— X = result w/mult = 1, offset = 0 3- 18 Section 3. CR1000 Measurement Details Resistance X = result w/mult = 1, offset = 0 -R,R, - X(R, +R,+ R,) R= SS used to measure full bridge bs V, " ( R, R, ) 1 X-R, “7, hme RS +R, Ry +R, a RXR +R +R) , = tS Vy X+R, Ra Ry _ RR, +R,)— Ro (Rs + Ry) R RR = X(R +R +R) yi ~ Ry +R, +R, +R, ° X-R, a R _ RR ~X(R +R +R) i X+R, IXR FIGURE 3.5-1. Circuits Used with Bridge Measurement Instructions 3.6 Measurements Requiring AC Excitation Some resistive sensors require AC excitation. These include electrolytic tilt sensors, soil moisture blocks, water conductivity sensors and wetness sensing grids. The use of DC excitation with these sensors can result in polarization, which will cause an erroneous measurement, and may shift the calibration of the sensor and/or lead to its rapid decay. Other sensors like LVDTs (without built in electronics) require an AC excitation because they rely on inductive coupling to provide a signal. DC excitation would provide no output. Any of the bridge measurements can reverse excitation polarity to provide AC excitation and avoid ion polarization. The frequency of the excitation can be determined by the delay and integration time used with the measurement. The highest frequency possible is 5 kHz, the excitation is switched on and then reversed 100 us later when the first measurement is held and then is switched off after another 100 ys when the second measurement is held (i.e., reverse the excitation, 100 ps 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 an alternate path for the excitation to return to CR1000 ground, and can be represented by the model diagrammed in Figure 3.6-1. 3-19 Section 3. CR1000 Measurement Details oat FIGURE 3.6-1. Model of Resistive Sensor with Ground Loop In Figure 3.6-1, V, is the excitation voltage, R¢ is a fixed resistor, R, is the sensor resistance, and Rg is the resistance between the excited electrode and CR1000 earth ground. With Rg in the network, the measured signal is: Rs " ~VaTROGR,) +RR, Re [3.6-1] R,R¢Rg is the source of error due to the ground loop. When Rg is large the equation reduces to the ideal. The geometry of the electrodes has a great effect on the magnitude of this error. The Delmhorst gypsum block used in the 227 probe has two concentric cylindrical electrodes. The center electrode is used for excitation; because it is encircled by the ground electrode, the path for a ground loop through the soil is greatly reduced. Moisture blocks which consist of two parallel plate electrodes are particularly susceptible to ground loop problems. Similar considerations apply to the geometry of the electrodes in water conductivity sensors. The ground electrode of the conductivity or soil moisture probe and the CR1000 earth ground form a galvanic cell, with the water/soil solution acting as the electrolyte. If current was allowed to flow, the resulting oxidation or reduction would soon damage the electrode, just as if DC excitation was used to make the measurement. Campbell Scientific probes are built with series capacitors in the leads to block this DC current. In addition to preventing sensor deterioration, the capacitors block any DC component from affecting the measurement. 3.7 Pulse Count Measurements 3-20 Many pulse output type sensors (e.g., anemometers and flow-meters) are calibrated in terms of frequency (counts/second). For these measurements the accuracy is related directly to the accuracy of the time interval over which the pulses are accumulated. Frequency dependent measurements should 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 read on the scan interval, if execution is delayed, for example by lengthy output processing, the pulse counters are not read until the scan is Section 3. CR1000 Measurement Details synchronized with real time and restarted. The CR1000 actually measures the elapsed time since the last time the counters were read when determining frequency so in the case of an overrun, the correct frequency will still be output. The resolution of the pulse counters is one count. The resolution of the calculated frequency depends on the scan interval: frequency resolution = 1/scan interval (e.g., a pulse count in a 1 second scan has a frequency resolution of 1 Hz, a 0.5 second scan gives a resolution of 2 Hz, and a 10 ms scan gives a resolution of 100 Hz). The resultant measurement will bounce around by the resolution. For example, if you are scanning a 2.5 Hz input once a second, in some intervals there will be 2 counts and in some 3 as shown in figure 3.7-1. If the pulse measurement is averaged, the correct value will be the result. FIGURE 3.7-1. Varying counts within Pulse interval. The resolution gets much worse with the shorter intervals used with higher speed measurements. As an example, assume that engine RPM is being measured from a signal that outputs 30 pulses per revolution. At 2000 RPM, the signal has a frequency of 1000 Hz (2000 RPMx(1 min/60 s)x30=1000). The multiplier to convert from frequency to RPM is 2 RPM/Hz (1 RPM/(30 pulses/60s) = 2). Ata 1 second scan interval, the resolution is 2 RPM. However, if the scan interval were 10 ms, the resolution would be 200 RPM. At the 10 ms scan, if every thing was perfect, each interval there would be 10 counts. However, a slight variation in the frequency might cause 9 counts within one interval and 11 in the next, causing the result to vary between 1800 and 2200 RPM! 3.8 Self Calibration The CR1000 performs a self-calibration of the analog voltage measurements and excitation voltages. The range gains and offsets and the excitation voltage output will vary with temperature. The self calibration allows the CR1000 to maintain its specifications over the temperature range. Rather than make all of the measurements required to calibrate all range/integration type combinations possible in the CR1000, the calibration only measures the range/integration type combinations that occur in the running CR1000 program. The calibration may occur in three different modes. 1. Compile time calibration. This occurs prior to running the program and calibrates all integration/range combinations needed. For the 250 usc integration multiple measurements are made and averaged to come up with gain values to use in the measurement. Five measurements for the 3-21 Section 3. CR1000 Measurement Details 3-22 250 usec integrations. When this calibration is performed the values in the calibration table are completely replaced (i.e., no filtering is used). 2. System background calibration. This automatically takes place in the background while the user program is running. Multiple measurements are not averaged, but a filter is applied to the new gain/offset values obtained. The filter is used so that the calibration values change slowly. The filter combines the newly measured value multiplied by 0.1 with the previous calibration value by 0.9 to arrive at the new calibration value. A piece of the background calibration is added to each fast scan in the user program. The background calibration measurements will be repeated every 4 seconds or the time it takes to complete them, whichever is longer. If there is not enough time to do the background calibration, the CR1000 will display: “Warming when Fast Scan X is running background calibration will be disabled.” (X is the number of the fast scan where the first scan entered in the program is 1, the next scan is 2, etc.) 3. Calibration under program control. When the calibrate instruction is included in a program, the calibration is identical to the compile time calibration. The calibration table values are replaced with those calculated. The fast integrations have averaging as in the compile calibrate. When a calibrate instruction is found in any scan the background calibration will be disabled (even if the scan is not executed). The calibrate instruction is described in Section 7. The self calibration does not take place if there is not enough time to run it or if the calibrate instruction is in the CR1000 program and never executed. Without the self calibration the drift in accuracy with temperature is about a factor of 10 worse. For example, over the extended temperature range (-40 to 85°C) the accuracy specification is approximately 0.1% of reading. If the self calibration is disabled, the accuracy over the range is approximately 1% of reading. Temperature is the main factor causing a calibration shift and the need for the self calibration. If the temperature of the CR1000 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 CR1000 to remain calibrated during fairly rapid temperature changes. In cases of extreme temperature change, such as bringing a vehicle from equilibrium in a chamber at -30°C out into a hot Arizona day, it may be worthwhile to override the background calibration by running the calibration instruction in the scan with the measurements. Another case where using the calibration instruction makes sense is where there is not time for the background calibration in the normal scan but the program can periodically stop making measurements and run the calibration instruction in a separate scan. Section 4. CRBasic - Native Language Programming The CR1000 is programmed in a language that has some similarities to a structured basic. There are special instructions for making measurements and for creating tables of output data. The results of all measurements are assigned variables (given names). Mathematical operations are written out much as they would be algebraically. This section describes a program, its syntax, structure, and sequence. 4.1 Format Introduction 4.1.1 Mathematical Operations Mathematical operations are written out much as they would be algebraically. For example, to convert a temperature in Celsius to Fahrenheit one might write: TempF = TempC * 1.8 + 32 With the CR1000 there may be 2 or 20 temperature (or other) measurements. Rather than have 20 different names, a variable array with one name and 20 elements may be used. A thermocouple temperature might be called TCTemp. With an array of 20 elements the 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 hardware to make a measurement and place the results in a variable or a variable array. Output processing instructions are procedures that store the results of measurements or calculated values. Output processing includes averaging, saving maximum or minimum, standard deviation, FFT, etc. The instructions for making measurements and outputting data are not found in a standard basic language. The instructions Campbell Scientific has created for these operations are in the form of procedures. The procedure has a keyword name and a series of parameters that contain the information needed to complete the procedure. For example, the instruction for measuring the temperature of the CR1000 input panel is: PanelTemp (Dest, Integ) Section 4. CRBasic - Native Language Programming PanelTemp is the keyword name of the instruction. The two parameters associated with PanelTemp are: Destination, the name of the variable in which to put the temperature; and /ntegration, the length of time to integrate the measurement. To place the panel temperature in the variable RefTemp (using a 250 microsecond measurement integration time) the code is: PanelTemp(RefTemp, 250) The use of these instructions should become clearer as we go through an introductory example. 4.1.3 Inserting Comments Into Program Comments can be inserted into a program by preceding the comment with a single quote ("). Comments can be entered either as independent lines or following CR1000 code. When the CR1000 compiler sees the ' it ignores the rest of the line. ' The declaration of variables starts here. Public Start(6) ‘Declare the start time array 4.2 Programming Sequence The following table describes the structure of a typical CR1000 program: Declarations Make a list of what to measure and calculate. Declare constants Within this list, include the fixed constants used, Declare Public variables indicate the values that the user is able to view while the program is running, Dimension variables the number of each measurement that will be made, Define Aliases and specific names for any of the measurements. Define data tables. Describe, in detail, tables of data that will be saved from the experiment. Process/store trigger Set when the data should be stored. Are they stored when some condition is met? Are data stored on a fixed interval? Are they stored on a fixed interval only while some condition is met? Table size Set the size of the table in CR1000 RAM Other on-line storage Should the data also be sent to the PC card? devices Processing of Data What data are to be output (current value, average, maximum, minimum, etc.) Section 4._CRBasic - Native Language Programming Define Subroutines Program Set scan interval Measurements Processing Call Data Table(s) Initiate controls NextScan End Program If there is a process or series of calculations that need to be repeated several times in the program, it can be packaged in a subroutine and called when needed rather than repeating all the code each time. The program section defines the action of datalogging The scan sets the interval for a series of measurements Enter the measurements to make Enter any additional processing with the measurements The Data Table must be called to process output data Check measurements and Initiate controls if necessary Loop back (and wait if necessary) for the next scan 4-3 Section 4. CRBasic - Native Language Programming 4.3 Example Program Const RevDiff=1 =] —S Const Del=0 ‘default Const Integ=250 Const Mult=1 Const Offset=0 [- Declare constants Public Reffemp Public TC(6) Units Reffemp=degC Units TC=DegC axl Declare public variables , t— Declarations dimension array, and declare units. DataTable (Temp, 1,2000) DataInterval (0,10,min,10) Average (1,RefTemp,FP2,0) [+ Define Data Table Average (6,TC(),FP2,0) EndTable =! — BeginProg Scan (1,Sec,3,0) PanelTemp (RefTemp, 250) i Measure TCDiff (TC(),6,mV2_SC ,1,TypeT,Reffemp,RevDiff,Del,Integ,Mult, Offset) Scan loop CallTable Temp i Call Data Table NextScan EndProg 4.3.1 Data Tables Data storage follows a fixed structure in the CR1000 in order to optimize the time and space required. Data are stored in tables such as: TOAS Fritz CR1000 = |1079 CR1000.Std.1.0 |CPU:TCTemp.CR1 |51399 ‘Temp TIMESTAMP RECORD |Reff_Avg |TC_Avg(1) |TC_Avg(2) TC_Avg(3) TC_Avg(4) |TC_Avg(5) |TC_Avg(6) TS RN degC DegC DegC ‘DegC DegC DegC DegC Avg Avg Avg Avg Avg Avg Avg 10/28/2004 12:10 |119 23.52 23.49 23.49 23.5 23.49 23.5 23.5 10/28/2004 12:20 |120 23:55 23.51 23.51 23.51 23.51 23.51 23.52 10/28/2004 12:30 |121 23.58 23.52 23.53 23.53 23:53 23.53 23.53 10/28/2004 12:40 |122 23.58 23.53 23.54 23.54 23.54 23.54 23.54 4-4 The user's program determines the values that are output and their sequence. The CR1000 automatically assigns names to each field in the data table. In the above table, TIMESTAMP, RECORD, Reffemp_Avg, and TC_Avg(1) are fieldnames. The fieldnames are a combination of the variable name (or alias if one exists) and a three letter mnemonic for the processing instruction that outputs the data. Alternatively, the FieldNames instruction can be used to override the default names. The data table header also has a row that lists units for the output values. The units must be declared for the CR1000 to fill this row out (e.g., Units Reffemp Section 4. CRBasic - Native Language Programming = degC). The units are strictly for the user's documentation; the CR1000 makes no checks on their accuracy. The above table is the result of the data table description in the example program: DataTable (Temp,1,2000) DataInterval(0,10,min,10) Average(1,RefTfemp,fp2,0) Average(6,TC(),fp2,0) EndTable All data table descriptions begin with DataTable and end with EndTable. Within the description are instructions that tell what to output and that can modify the conditions under which output occurs. ' DataTable(Name, Trigger, Size) DataTable (Temp, 1,2000) The DataTable instruction has three parameters: a user specified name for the table, a trigger condition, and the size to make the table in CR1000 RAM. The trigger condition may be a variable, expression, or constant. The trigger is true if it is not equal to 0. Data are output if the trigger is true and there are no other conditions to be met. No output occurs if the trigger is false (=0). The example creates a table name Temp, outputs any time other conditions are met, and retains 2000 records in RAM. ' Datalnterval(TintoInt, Interval, Units, Lapses) DataInterval(0,10,min,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 relative to real time, the interval is 10 minutes, and the table will keep track of 10 lapses. The DatalInterval instruction reduces the memory required for the data table because the time of each record can be calculated from the interval and the time of the most recent record stored. Other output condition modifiers are: WorstCase and FillandStop. The output processing instructions included in a data table declaration determine the values output in the table. The table must be called by the program in order for the output processing to take place. That is, each time a new measurement is made, the data table is called. When the table is called, the output processing instructions within the table process the current inputs. If the trigger conditions for the are true, the processed values are output to the data table. In the example, several averages are output. ' Average(Reps, Source, DataType, DisableVar) Average(1,RefTemp,fp2,0) Average(6,TC(1),fp2,0) Average is an output processing instruction that will output the average of a variable over the output interval. The parameters are repetitions - the number 4-5 Section 4._ CRBasic - Native Language Programming of elements in an array to calculate averages for, the Source variable or array to average, the data format to store the result in (Table 4.3-1), and a disable variable that allows excluding readings from the average if conditions are not met. A reading will not be included in the average if the disable variable is not equal to 0; the example has 0 entered for the disable variable so all readings are included in the average. TABLE 4.3-1 Formats for Output Data Code Data Format Size Range Resolution FP2 Campbell Scientific floating point | 2 bytes +7999 13 bits (about 4 digits) ITEEE4 IEEE four byte floating point 4 bytes 1.8 E-38 to 1.7E 24 bits (about 7 digits) 38 LONG 4 byte Signed Integer 4 bytes -2,147,483,648 to 1 bit (1) +2,147,483,647 BOOLEAN 4 byte Signed Integer 4 bytes 0, -1 True or False (-1 or 0) STRING ASCII String Set by programmer 4.3.2 The Scan -- Measurement Timing and Processing 4-6 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,Sec,3,0) ModuleTemp(RefTemp, 250) TCDiff(TCQ,6,mV2_5C,4,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset) CallTable Temp NextScan EndProg The Scan instruction determines how frequently the measurements within the scan are made: 'Scan(Interval, Units, BufferSize, Count) Scan(1,Sec,3,0) The Scan instruction has four parameters. The /nterval is the interval between scans. Units are the time units for the interval. The minimum interval is 10 milliseconds. The maximum scan interval is 30 minutes. The BufferSize is the size (in the number of scans) of a buffer in RAM that holds the raw results of measurements. Using a buffer allows the processing in the scan to at times lag behind the measurements without affecting the measurement timing (see the scan instruction in Section 9 for more details). Count is the number of scans to make before proceeding to the instruction following NextScan. A count of 0 means to continue looping forever (or until ExitScan). In the example the scan Section 4._CRBasic - Native Language Programming is 1 second, three scans are buffered, and the measurements and output continue indefinitely. 4.4 Variable Data Types 4.4.1 FLOAT 4.4.2 LONG The declaration of variables (via the DIM or the PUBLIC statement) allow an optional type descriptor AS that specifies the data type. The default data type, without a descriptor, is IEEE4 floating point (FLOAT). The data types are FLOAT, LONG, BOOLEAN, and STRING. “AS FLOAT” specifies the default IEEE4 data type. If no data type is explicitly specified with the AS statement, then FLOAT is assumed. Public Z, Reffemp, TCTemp(3) Public X AS FLOAT “AS LONG?” specifies the variable as a 32 bit long integer, ranging from — 2,147,483,648 to +2,147,483,647 (31 bits plus the sign bit). There are two possible reasons a user would do this: (1) speed, since the OS can do math on integers faster that with floats, and (2) resolution, since the LONG has 31 bits compared to the 24 bits in the IEEE4. Examples: Dim 1 AS LONG Public LongCounter AS LONG 4.4.3 BOOLEAN 4.4.4 STRING “AS BOOLEAN?” specifies the variable as a 4 byte Boolean. Boolean variables are typically used for flags and to represent conditions or hardware that have only 2 states (e.g., On/Off, Ports). A Boolean variable uses the same 32 bit long integer format as a LONG but can set to only one of two values: True, which is represented as —1, and false, which is represented with 0. The Boolean data type allows application software to display it as an ON/OFF, TRUE/FALSE , RED/BLUE, etc. Public Switches(8) AS Boolean, FLAGS(16) AS Boolean “AS STRING * size” specifies the variable as a string of ASCII characters, NULL terminated, with size specifying the maximum number of characters in the string. A string is convenient in handling serial sensors, dial strings, text messages, etc. 4-7 Section 4. CRBasic - Native Language Programming Strings can be dimensioned only up to 2 dimensions instead of the 3 allowed for other data types. (This is because the least significant dimension is actually used as the size of the string.) Public FirstName AS STRING * 20 Public LastName AS STRING * 20 4.4.5 Numerical Expressions with Floats, Longs and Booleans Floats, Longs and Booleans are converted automatically into each other Boolean from Float or Long When a float or long integer is converted to a boolean, zero is False (0), Any non-zero value will set the Boolean to True (-1) Public X, Y Public I AS Long, B AS Boolean BeginProg X=0 Y =0.125 I= 126 B=X ‘This will set B = False (0) B=Y ‘This will Set B = True (-1) B=! ‘This will Set B = True (-1) EndProg Float from Long or Boolean When a Long or Boolean is converted to a float, the integer value is loaded into the Float. Booleans will be converted as —1 or 0 depending on if the value is true or false. Note that integers greater than 24 bits (16,777,215; the size of the mantissa for a Float) will lose resolution when converted to a float. Long from Float or Boolean Booleans will be converted as —1 or 0 depending on if the value is true or false. When a Float is converted to a Long integer it is truncated. This conversion is the same as the INT function (Section 8). Note that the integer conversion is to the integer equal to or less than the value of the float. This may not be intuitive for negative numbers, for example: Dim I as Float BeginProg 1=4.6 ‘This will set I to 4. I1=-4.6 ‘This will set I to —5. EndProg If the Float is greater than maximum long integer, the integer will be set to the maximum (+2,147,483,647). If the float is less than the minimum long integer, the integer is set to the minimum (—2,147,483,648). Section 4. CRBasic - Native Language Programming Expressions are evaluated as long as possible as integers Public X, I AS Long BeginProg 1= 126 X = (143) * 3.4 ‘I+3 is evaluated as an integer, ‘then converted to FLOAT before ‘it is multiplied by 3.4 EndProg Constants will be converted to Longs and/or Floats at compilation If a constant (either entered as a number or declared with CONST) can be expressed correctly as an integer, the compiler will use the type that is most efficient in each expression. The integer version will be used if possible, i.e., if the expression has not yet confronted a float. Public I AS Long, ‘J is an integer Public Fl, F2 ‘FJ and F2 are Floats CONST ID = 10 BeginProg I=ID*5 ‘ID (10) and 5 are loaded at ‘compile time as Floats Fl=F2+ID ‘ID (10) is loaded at compile ‘time as a float to avoid a ‘run time conversion from an ‘integer before each addition EndProg 4.5 Numerical Entries In addition to entering regular base 10 numbers there are 3 additional ways to represent numbers in a program: scientific notation, binary, and hexadecimal (Table 4.5-1). TABLE 4.5-1 Formats for Entering Numbers in CRBasic Format Example Value Standard 6.832 6.832 Scientific notation 5.67E-8 5.67X10° Binary: &B1101 13 Hexadecimal &HFF 255 The binary format makes it easy to visualize operations where the ones and zeros translate into specific commands. For example, a block of ports can be set with a number, the binary form of which represents 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 4-9 Section 4. CRBasic - Native Language Programming port 1. This is much easier to visualize than entering 72, the decimal equivalent. 4.6 Logical Expression Evaluation 4.6.1 What is True? Several different words get used to describe a condition or the result of a test. The expression, X>5, is either true or false. However, when describing the state of a port or flag, on or off or high or low sounds better. In CRBasic there are a number of conditional tests or instruction parameters the result of which may be described with one of the words in Table 4.6-1. The CR1000 evaluates the test or parameter as a number; 0 is false, not equal to 0 is true. TABLE 4.6-1. Synonyms for True and False Predefined Constant True (-1) False (0) Synonym High Low Synonym On Off Synonym Yes No Synonym Trigger Do Not Trigger Number #0 0 Digital port 5 Volts 0 Volts 4.6.2 Expression Evaluation Conditional tests require the CR1000 to evaluate an expression and take one path if the expression is true and another if the expression is false. For example: If X>=5 then Y=0 will set the variable Y to 0 if X is greater than or equal to 5. The CR1000 will also evaluate multiple expressions linked with and or or. For example: If X>=5 and Z=2 then Y=0 will only set Y=0 if both X>=5 and Z=2 are true. If X>=5 or Z=2 then Y=0 will set Y=0 if either X>=5 or Z=2 is true (see And and Or in Section 9). A condition can include multiple and and or links. 4.6.3 Numeric Results of Expression Evaluation The CR1000 evaluates an expression and returns a number. A conditional statement uses the number to decide which way to branch. The conditional statement is false if the number is 0 and true if the number is not 0. For example: If 6 then Y=0, is always true, Y will be set to 0 any time the conditional statement is executed. 4-10 4.7 Flags Section 4._CRBasic - Native Language Programming If 0 then Y=0 is always false, Y will never be set to 0 by this conditional statement. The CR1000 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 CR1000 uses -1 rather than some other non-zero number because the and and or operators are the same for logical statements and binary bitwise comparisons (see and and or in Section 8). The number -1 is expressed in binary with all bits equal to 1, the number 0 has all bits equal to 0. When -1 is anded with any other number the result is the other number, ensuring that if the other number is non-zero (true), the result will be non-zero While any variable can be used as a flag as far as logical tests in CRBasic are concerned, it is best to use Boolean variables. If the value of the variable is non-zero the flag is high. If the value of the variable is 0 the flag is low (Section 4.6). Boolean variables can only have one of two values, true (-1) or false (0). 4.8 Parameter Types Instruction parameters allow different types of inputs. These types are listed below and specifically identified in the description of the parameter in the following sections or in CRBasic help. Constant Variable Variable or Array Constant, Variable, or Expression Constant, Variable, Array, or Expression Name Name or list of Names Variable, or Expression Variable, Array, or Expression Table 4.8-1 lists the maximum length and allowed characters for the names for Variables, Arrays, Constants, etc. 4-11 Section 4. CRBasic - Native Language Programming TABLE 4.8-1. Rules for Names Name for Maximum Length (number of Allowed characters characters) Variable or Array 16 | Letters A-Z, upper or lower. Constant 16 case, underscore “_”, and Alias 16 numbers 0-9. The name must Data Table Name 8 start with a letter. CRBasic is Field name 16 not case sensitive 4.8.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.6.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 a thermocouple temperature: ' DataTable(Name, TrigVar, Size) DataTable(Temp, TC(1)>100, 5000) Entering the trigger as the expression, TC(1)>100, will cause the trigger to be true and data to be stored whenever the temperature TC(1) is greater than 100. 4.8.2 Arrays of Multipliers Offsets for Sensor Calibration 4-12 If variable arrays are used as the multiplier and offset parameters in measurements that use repetitions, the instruction will automatically step through the multiplier and offset arrays as it steps through the channels. This allows a single measurement instruction to measure a series of individually calibrated sensors, applying the correct calibration to each sensor. If the multiplier and offset are not arrays, the same multiplier and offset are used for each repetition. Section 4. CRBasic - Native Language Programming Public Pressure(3), Mult(3), Offset(3) DataTable (AvgPress, 1,-1) DataInterval (0,60,Min,10) Average (3,Pressure(), [EEE4,0) EndTable BeginProg ‘Calibration Factors: Mult(1)=0.123 : Offset(1)=0.23 Mult(1)=0.115 : Offset(1)=0.234 Mult(1)=0.114 : Offset(1)=0.224 Scan (1,Sec,10,0) 'VoltSe instruction using array of multipliers and offsets: VoltSe (Pressure(),3,mV5000,1,True,0, 60Hz,Mult(),Offset()) CallTable AvgPress NextScan EndProg 4.9 Program Access to Data Tables Data stored in a table can be accessed from within the program. The format used is: Tablename.Fieldname(fieldname index,records back) Where Tablename is the name of the table in which the desired value is stored. Fieldname is the name of the field in the table. The fieldname is always an array even if it consists of only one variable; the fieldname index must always be specified. Records back is the number of records back in the data table from the current 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 accessing the data actually output in a table, there is additional information about the data table that can be retrieved using the same Tablename.fieldname syntax. Tablename.record(1,n) = the record number of the record output n records ago. Tablename.output(1,1) = -1 if data were output to the table the last time the table was called, = 0 if data were not output. 4-13 Section 4. CRBasic - Native Language Programming 4-14 NOTE Tablename.timestamp(m,n) = element m of the timestamp output n records ago where: timestamp(1,n) = microseconds since 1990 timestamp(2,n) = microseconds into the current year timestamp(3,n) = microseconds into the current month timestamp(4,n) = microseconds into the current day timestamp(5,n) = microseconds into the current hour timestamp(6,n) = microseconds into the current minute timestamp(7,n) = microseconds into the current second Tablename.tablesize(1,1) = the size of the table in number of records. Tablename.tablefull(1,1) =/ or 0 to indicate if a fill and stop table is full or if a ring memory table has begun overwriting its oldest data. (0 indicates the table is not full.) Tablename.eventend(1,1) is only valid for a data table using the DataEvent instruction, Tablename.eventend(1,1) = -1 if the last record of an event occurred the last time the table was called, = 0 if the data table did not store a record or if it is in the middle of an event. Tablename.eventcount(1,1) = the number of data storage events that have occurred in a data table using the DataEvent instruction. 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. Section 5. Program Declarations Alias AngleDegrees AS type Used to assign a second name to a variable. Syntax Alias VariableA = AliasName Remarks Alias allows assigning a second name to a variable. Within the datalogger program, either name can be used. Only the alias is available for Public variables. The alias is also used as the root name for data table fieldnames. With aliases the program can have the efficiency of arrays for measurement and processing yet still have individually named measurements. Alias Declaration Example The example shows how to use the Alias declaration. Dim TCTemp(4) Alias TCTemp(1) = CoolantT Alias TCTemp(2) = ManifoldT Alias TCTemp(3) = ExhaustT Alias TCTemp(4) = CatConvT The AngleDegrees declaration is used to set math functions in the program to return, or to expect as the source, degrees instead of radians. Syntax AngleDegrees Remarks The AngleDegrees instruction is placed in the declarations section of the program, before the code enclosed in the BeginProg/EndProg instructions. AngleDegrees affects the following instructions that return an angle in radians: ATN, ATN2, ACOS, ASIN, RectPolar. Angle Degrees affects the following instructions that expect an angle in radians as the source: COS, COSH, TAN, TANH, SIN, SINH. Negative radians will convert to negative degrees. The declaration of variables (via the DIM or the PUBLIC statement) allow an optional type descriptor AS that specifies the data type. The default data type, 5-1 Section 5. Program Declarations 5-2 without a descriptor, is IEEE4 floating point (FLOAT). The data types are FLOAT, LONG, BOOLEAN, and STRING. AS FLOAT specifies the default IEEE4 data type. If no data type is explicitly specified with the AS statement, then FLOAT is assumed. Public Z, RefTemp, TCTemp(3) Public X AS FLOAT AS LONG specifies the variable as a 32 bit long integer, ranging from — 2,147,483,648 to +2,147,483,647 (31 bits plus the sign bit). There are two possible reasons a user would do this: (1) speed, since the OS can do math on integers faster that with floats, and (2) resolution, since the LONG has 31 bits compared to the 24 bits in the IEEE4. Examples: Dim I AS LONG Public LongCounter AS LONG AS BOOLEAN specifies the variable as a 4 byte Boolean. Boolean variables are typically used for flags and to represent conditions or hardware that have only 2 states (e.g., On/Off, Ports). A Boolean variable uses the same 32 bit long integer format as a LONG but can set to only one of two values: True, which is represented as —1, and false, which is represented with 0. The Boolean data type allows application software to display it as an ON/OFF, TRUE/FALSE , RED/BLUE, ete. Public Switches(8) AS BOOLEAN, FLAGS(16) AS BOOLEAN AS STRING * size specifies the variable as a string of ASCII characters, NULL terminated, with size specifying the maximum number of characters in the string. A string is convenient for handling serial sensors, dial strings, text messages, etc. String arrays can only have up to 2 dimensions instead of the 3 allowed for other data types. (This is because the least significant dimension is actually used as the size of the string.) Public FirstName AS STRING * 20 Public LastName AS STRING * 20 Const Dim Section 5. Program Declarations 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 constants, or any of the arithmetic or logical operators. Tip Constants can make your programs easier to modify. Unlike variables, constants can't be changed while your program is running. Caution Constants must be defined before referring to them. Const Declaration Example The example uses Const to define PI. Const PI = 3.141592654 ‘Define constant. Dim Area, Circum, Radius "Declare variables. Radius = Volt( 1 ) 'Get measurement. Circum = 2 * PI * Radius ‘Calculate circumference. Area = PI * ( Radius * 2 ) ‘Calculate area. Declares variables and allocates memory for the variables. In CRBasic, ALL variables MUST be declared. Syntax Dim varname[([subscripts]}) [, varname[([subscripts])]] Remarks The Dim statement has these parts: Part Description varname Name of a variable. subscripts Dimensions of an array variable. You can declare multiple dimensions. The argument subscripts has the following syntax: size [size, size] In CRBasic the lowest number in a dimension is | not 0. 5-3 Section 5. Program Declarations 5-4 PipelineMode Public ' Create the variable array A with 8 elements Dim A( 8) 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 bounds error is recorded. When variables are initialized, they are set to 0. Tip Put Dim statements at the beginning of the program. The PipelineMode instruction is used to configure the datalogger to perform all instructions sequentially as they occur in the program. Syntax PipelineMode Remarks The datalogger has two processing modes: sequential mode and pipeline mode. In sequential mode, instructions are executed by the datalogger sequentially as they occur in the program. In pipeline mode, measurement tasks and processing tasks are handled separately and executed concurrently. The default mode of operation is pipeline mode. However, when the datalogger program is compiled, the datalogger analyzes the program instructions and automatically switches to sequential mode if the code requires it. The datalogger can be forced to run in the pipeline or sequential mode by placing the appropriate instruction at the beginning of the program before the BeginProg instruction. See OV2.3 for more description of the Pipeline and Sequential mode. Dimensions a variable as public and available in the Public table of the CR1000. Syntax Public(list of [dimensioned] variables that make up the Public Table) Remarks More than one Public statement can be made. Public Declaration Example Section 5. Program Declarations The example shows the use of the Public declaration. Dim x(3 ), y, z( 2, 3, 4) Public x, y, z Public Dim x(3 ), y,z(2,3,4) ‘Dim is optional Public x(3 ),y, z( 2, 3,4) Public w SequentialMode Station Name The SequentialMode instruction is used to configure the datalogger to perform all instructions sequentially as they occur in the program. Syntax SequentialMode Remarks The datalogger has two processing modes: sequential mode and pipeline mode. In sequential mode, instructions are executed by the datalogger sequentially as they occur in the program. In pipeline mode, measurement tasks and processing tasks are handled separately and executed concurrently. The default mode of operation is pipeline mode. However, when the datalogger program is compiled, the datalogger analyzes the program instructions and automatically switches to sequential mode if the code requires it. The datalogger can be forced to run in the pipeline or sequential mode by placing the appropriate instruction at the beginning of the program before the BeginProg instruction. See OV2.3 for more description of the Pipeline and Sequential mode. Sets the station name. Syntax StationName StaName Remarks StationName is used to set the datalogger station name with the program. The station name is displayed by PC9000 and stored in the data table headers (Section 2.4). Section 5. Program Declarations Sub, Exit Sub, End Sub Declares the name, variables, and code that form a Subroutine. Syntax Sub SubName [(VariableList )] [ statementblock | [ Exit Sub ] [ statementblock | End Sub The Sub statement has these parts: Part Sub SubName VariableList statementblock Exit Sub Description Marks the beginning of a Subroutine. Name of the Subroutine. Subname cannot be the same as any other globally recognized name in the program. List of variables that are passed to the Subroutine when it is called. The list of Subroutine variables to pass is optional. Subroutines can operate on the global program variables declared by the Public or Dim statements. The advantage of passing variables is that the subroutine can be used to operate on whatever program variable is passed (see example). If the Subroutine variable list is used, the variable names used in this list should not be the same names as variables, aliases, or constants declared elsewhere. Multiple variables are separated by commas. When the Subroutine is called, the call statement must list the program variables or values to pass into the subroutine variable. The number and sequence of the program variables/values in the call statement must match the number and sequence of the variable list in the sub declaration. Changing the value of one of the variables in this list inside the Subroutine changes the value of the variable passed into it in the calling procedure. The call may pass constants or expressions that evaluate to constants (i.e., do not contain a variable) into some of the variables. Ifa 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. Any group of statements that are executed within the body of the Subroutine. Causes an immediate exit from a Subroutine. Program execution continues with the statement following the Section 5. Program Declarations statement that called the Subroutine. Any number of Exit Sub statements can appear anywhere in a Subroutine. End Sub Marks the end of a Subroutine. A Subroutine is a procedure that can take variables, perform a series of statements, and change the value of the variables. However, a Subroutine can't be used in an expression. You can call a Subroutine using the name followed by the variable list. See the Call statement for specific information on how to call Subroutines. Caution Subroutines can be recursive; that is, they can call themselves to perform a given task. However, recursion can lead to strange results. Subroutine Example ‘CR1000 ‘Declare Variables used in Program: Public RefT, TC_C(4), TC_F(4), I ‘Data output in deg C: DataTable (TempsC, 1,-1) DatalInterval (0,5,Min, 10) Average (1,RefT,FP2,0) Average (4,TC_C(),FP2,0) EndTable ‘Same Data output in F : DataTable (TempsF,1,-1) DataInterval (0,5,Min,10) Average (1,RefT,FP2,0) Average (4,TC_F(),FP2,0) EndTable ‘Subroutine to convert temperature in degrees C to degrees F Sub ConvertCtoF (TmpC, TmpF) TmpF = TmpC*1.8 +32 EndSub BeginProg Scan (1,Sec,3,0) ‘Measure Temperatures (panel and 4 thermocouples) in deg C PanelTemp (RefT,250) TCDiff (TC_C(),4,mV2_5C,1,TypeT,RefT,True ,0,250,1.0,0) ‘Call Output Table for C CallTable TempsC ‘Convert Temperatures to F using Subroutine: 5-7 Section 5. Program Declarations ‘Subroutine call using Call statement, ‘RefT is used for both source and destination. Call ConvertCtoF(RefT, RefT) For 1= 1 to4 ‘Subroutine call without Call statement: ConvertCtoF(TC_C(1),TC_F(1)) Next I CallTable TempsF NextScan EndProg Units Used to assign a unit name to a field associated with a variable. Syntax Units Variable = UnitName Remarks Units allows assigning a unit name to a field. The unit name appears in the header of the output files. The unit name is a text field that allows the user to label data. When the user modifies the units, the text entered is not checked by the CRBasic editor or the CR1000. Example Dim TCTemp( 1 ) Units TCTemp( 1 ) = Deg_C 5-8 Section 6. Data Table Declarations and Output Processing Instructions 6.1 Data Table Declaration DataTable (Name, TrigVar, Size) output trigger modifier export data destinations output processing instructions EndTable DataTable is used to declare/define a data table. The name of the table, output trigger and size of the table in RAM are set with DataTable. The Table declaration must be at the beginning of the code prior to BeginProg. The table declaration starts with DataTable and ends with EndTable. Within the declaration are output trigger modifiers (optional, e.g., Datalnterval, DataEvent or WorstCase), the on-line storage devices to send the data to (optional, e.g., CardOut, DSP4), and the output processing instructions describing the data set in the table. Parameter & Data Type Enter Name Name The name for the data table. The table name is limited to eight characters. TrigVar Constant Variable, or Expression The name of the variable to test for the trigger. Trigger modifiers add additional conditions. Value Result 0 Do not trigger #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 interval trigger occurs, a line (or row) of data is output with the number of values determined by the output Instructions within the table. This data is called a record. The total number of records stored equals the size.. Note Enter a negative number and all remaining memory (after creating fixed size data tables) will be allocated to the table or partitioned between all tables with a negative value for size. The partitioning algorithm attempts to have the tables fill at the same time. EndTable DataTable Example - see Section 4.3. Used to mark the end of a data table. See DataTable Section 6. Data Table Declarations and Output Processing Instructions 6.2 Trigger Modifiers 6-2 Datainterval (Tintoint, Interval, Units, Lapses) Used to set the time interval for an output table. DataInterval is inserted into a data table declaration following the DataTable instruction to establish a fixed interval table. The fixed interval table requires less memory than a conditional table because time is not stored with each record. The time of each record is calculated by knowing the time of the most recent output and the interval of the data. Datalnterval does not override the Trigger in the DataTable instruction. If the trigger is not set always true by entering a constant, it is a condition that must be met in addition to the time interval before data will be stored. The Interval determines how frequently data are stored to the table. The interval is synchronized with the real time clock. Time is kept internally as the elapsed time since the start of 1990 (01-01-1990 00:00:00). When the interval divides evenly into this elapsed time it is time to output (elapsed time MOD interval = 0). Entering 0 for the Interval sets it equal to the scan Interval. TintoInt allows the user to set the time into the Interval, or offset relative to real time, at which the output occurs([elapsed time + TintoInt] MOD interval = 0). For example, 360 (TintoInt) minutes into a 720 (Interval) minute (Units) interval specifies that output should occur at 6:00 (6 AM, 360 minutes from midnight) and 18:00 (6 PM, 360 minutes 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 CR1000 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 to ensure that the interval is correct. The datalogger keeps track of lapses or discontinuities in the data. If a lapse has occurred, the CR1000 inserts a time stamp into the data. When the data are retrieved a time stamp can be calculated and stored with each record. This lapse time stamp takes up some memory that would otherwise be used for data. While the CR1000 allocates some extra memory for the table, if there are a lot of lapses, it is not possible to store as many records as requested in the DataTable declaration. The Lapses parameter allows the programmer to allocate additional space for the number of lapses entered. This is used in particular when the program is written in a way that will create lapses. For example, if the data output is controlled by a trigger (e.g., a user flag) in the DataTable instruction in addition to the DataInterval, lapses would occur each time the trigger was false for a period of time longer than the interval. To take advantage of the more efficient memory use, always enter | or greater for the lapses parameter even if no lapses are expected. Entering 0 causes every record to be time stamped. Entering a negative number tells the CR1000 not to keep track of lapses. Only the periodic time stamps (approximately once per K of data) are inserted. Section 6. Data Table Declarations and Output Processing Instructions Parameter Enter & Data Type TintoInt The time into the interval (offset to the interval) at which the table is to be output. The Constant units for time are the same as for the interval. Interval Enter the time interval on which the data in the table is to be recorded. The interval may Constant be in pts, ms, s, or minutes, whichever is selected with the Units parameter. Enter 0 to make the data interval the same as the scan interval. Units The units for the time parameters, PowerOff is the only instruction that uses hours or days. Constant Code Units microseconds milliseconds seconds minutes Lapses As each new record is stored, time is checked to ensure that the interval is correct. The Constant datalogger keeps track of lapses or discontinuities in the data. Openinterval When the DatalInterval instruction is included in a data table, the CR1000 uses only values from within an interval for time series processing (e.g., average, maximum, minimum, etc.). When data are output every interval, the output processing instructions reset each time output occurs. To ensure that data from previous intervals is not included in a processed output, processing is reset any time an output interval is skipped. (An interval could be skipped because the table was not called or another trigger condition was not met.) The CR1000 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 the interval because sampling uses only the current value and involves no processing.) OpenInterval is used to modify an interval driven table so that time series processing in the table will include all values input since the last time the table output data. Data will be output whenever the table is called on the output interval (provided the other trigger conditions are met), regardless of whether or not output occurred on the previous interval. OpenInterval Example: In the following example, 5 thermocouples are measured every 500 milliseconds. Every 10 seconds, while Flag(1) is true, the averages of the reference and thermocouple temperatures are output. The user can toggle Flag(1) to enable or disable the output. Without the OpenInterval Instruction, the first averages output after Flag(1) is set high would include only the measurements within the previous 10-second interval. This is the default and is what most users desire. With OpenInterval in the program (remove the initial single quote (*) to uncomment the instruction) all the measurements made while the flag was low will be included in the first averages output after the flag is set high. 6-3 Section 6. Data Table Declarations and Output Processing Instructions 6-4 Const RevDiff 1 Const Del 0 Const Integ 250 Public Reffemp Public TC(5) Public Flag(8) Units TC=degC EndTable BeginProg EndProg ‘Reverse input to cancel offsets 'Use default delay 'Use 250 jus integration ‘Declare the variable used for reference temperature ‘Declare the variable used for thermocouple measurements Units Reffemp=degC : DataTable (AvgTemp,Flag(1),1000) = ‘Output when Flag(1)=true Datalnterval(0,10,sec,10) ‘Output every 10 seconds(while Flag(1)=true) ‘Opentnterval 'When Not Commented, include data while Flag(1)=false in next average Average(1,RefTemp,IEEE4,0) Average(5,TC,IEEE4,0) Scan(500,mSec,0,0) PanelTemp (RefTemp,250) TCDiff (TCQ),5,mV2_5C,9,TypeT,Reffemp,RevDiff,Del,Integ, 1,0) CallTable AvgTemp NextScan DataEvent (RecsBefore, StartTrig, StopTrig, RecsAfter) Used to set a trigger to start storing records and another trigger to stop storing records within 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 Enter & Data Type RecsBefore The number of records to store before the Start Trigger. Constant StartTrig The variable or expression test to Trigger copying the pre trigger records into the data table and start storing each new record.. Variable, or Value _| Result Expression 0 Do not trigger #0 Trigger StopTrig The variable, expression or constant to test to stop storing to the data table. The Variable, CR1000 does not start checking for the stop trigger until after the Start Trigger Expression or | occurs. A non-zero (true) constant may be used to store a fixed number of Constant records when the start trigger occurs (total number of records = PreTrigRecs+ 1 record for the trigger +PostTrigRecs.). Zero (false) could be entered if it was desired to continuously store data once the start trigger occurred. Value_| Result 0 Do not trigger #0 Trigger RecsAfter The number of records to store after the Stop Trigger occurs. Constant Section 6. Data Table Declarations and Output Processing Instructions DataEvent Example: In this example, 5 type T thermocouples are measured. The trigger for the start of an event is when TCTemp(1) exceeds 30 degrees C. The stop trigger is when TCTemp(1) less than 29 degrees C. The event consists of 20 records prior to the start trigger and continues to store data until 10 records following the stop trigger. Const RevDiff 1 ‘Reverse input to cancel offsets Const Del 0 'Use default delay Const Integ 0 ‘Use no integration Public RefTemp ‘Declare the variable used for reference temperature Public TC(5) ‘Declare the variable used for thermocouple measurements Public Flag(8) Units Reffemp=degC . Units TC=degC DataTable (Event,1,1000) DataInterval(0,00,msec, 10) ‘Set the sample interval equal 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,Reffemp,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,mV2_5C,1,TypeT,Reffemp,RevDiff,Del,Integ, 1,0) CallTable Event NextScan EndProg FillStop Data Tables are by default ring memory where, once full, the newest data are written over the oldest. Entering FillStop into a data table declaration makes the table fill and stop. Once the table is filled, no more data are stored until the table has been reset. The table can be reset (all data erased) from within the program by executing the ResetTable instruction. Example: DataTable (Temp,1,2000) Datalnterval(0,100,msec, 10) FillStop ' the table will stop collecting data after 2000 records. Average(1,RefTemp,fp2,0) Average(6,TC(1),fp2,0) EndTable 6-5 Section 6. Data Table Declarations and Output Processing Instructions WorstCase (TableName, NumCases, MaxMin, Change, RankVar) Allows saving the most significant or “worst-case” events in separate data tables. A data table is created that is sized to hold one event. This table acts as the event buffer. Each event that occurs is stored to this table. This table may use the DataEvent instruction or some other condition to determine when an event is stored. The significance of an event is determined by an algorithm in the program and a numerical ranking of the event is stored in a variable. WorstCase creates as many clones of the specified table as the number of cases for which to keep data. When WorstCase is executed, it checks the ranking variable; if the value of the variable is a new worst case, the data in the event table replace the data in the cloned table that holds the least significant event currently stored. An additional data table, nameWC (e.g., EvntWC) is created that holds the values of the rank variables for each of the worst case tables and the time that that table was stored. WorstCase must be used with data tables sent to the CR1000 SRAM. It will not work if the event table is sent to the CF card. While WorstCase acts as Trigger Modifier and a data table declaration (creating the cloned data tables), it is entered within the program to call the worst case tables (see example). Parameter Enter & Data Type TableName The name of the data table to clone. The length of this name should be 6 characters or name 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 the name of the table being cloned (up to the first 6 characters) plus a 2 digit number (e.g., Evnt01, Evnt02, Evnt03, ...). The numbers give the tables unique names, they have no relationship to the ranking of the events. MaxMin A code specifying whether the maximum or minimum events should be saved. Constant Value | Result 0 Min, save the events associated with the minimum ranking; i.e., Keep track of the RankVar associated with each event stored. If a new RankVar is less than previous maximum, copy the event over the event with previous maximum) 1 Max, save the events associated with the maximum ranking; i.e., copy if RankVar is greater than previous lowest (over event with previous minimum) Change The minimum change that must occur in the RankVariable before a new worst case is Constant stored. RankVar The Variable to rank the events by. Variable 6-6 Section 6. Data Table Declarations and Output Processing Instructions WorstCase Example This program demonstrates the Worst Case Instruction. Five type T thermocouples are measured. The event is similar to that in the example for the DataEvent instruction; the trigger for the start of a data event is when TC(1) exceeds 30 degrees C. However in this example, the stop trigger is set immediately true. This is done to set a fixed size for the event which can be duplicated in the worst case tables. To use the worst case instruction with events of varying duration, the event table size must be selected to accommodate the maximum duration expected (or needed). The event consists of 20 records prior to the start trigger and continues until 100 records following the start trigger. The ranking criteria is the number of readings following the trigger that TC(1) stays above 30 degrees C. The greater the number the “worse” the event. 'CR1000 Series Datalogger Const NumCases = 5 ‘Number of Worst Cases to save Const Max = 1 ‘A constant to indicate ranking maximum values in worst case Public Reffemp ‘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 Reffemp = degC Units TC = degC DataTable (Evnt,1,125) DataInterval(0,00,msec,10) ‘Set the sample interval equal to the scan DataEvent(20,TC(1)>30,-1,100) '20 records before TC(1)>30, '100 records after TC(1)>30 Sample(1,RefTemp,IEEE4) ‘Sample the reference temperature Sample(5,TC,IEEE4) ‘Sample the 5 thermocouple temperatures EndTable BeginProg Scan(500,mSec, 10,0) PanelTemp (RefTemp,250) TCDiff(TCQ,5,mV2_5C,1,TypeT,RefTemp,True,0,250,1,0) CallTable Evnt IF Evnt.EventEnd(1,1) then ‘Check if an Event just Ended I=100 "Initialize Index NumAbove30=0 ‘Zero Ranking Variable Do ‘Loop through the Event table NumAbove30=NumAbove30+1 ‘Counting the # of times TC(1)>30 I=I-1 Loop While I>0 and Evnt.TC(1,1I)>=30 ~ ‘Quit looping when at end or TC(1)<30 WorstCase(Evnt,NumCases,Max,0,NumAbove30) ‘Check for worst case EndIf NextScan EndProg 6-7 Section 6. Data Table Declarations and Output Processing Instructions 6.3 Export Data Instructions 6-8 CardOut (StopRing, Size) Used to send output data to the CFM100 Compact Flash Module card. This instruction creates a data table on the CF card. CardOut must be entered within each data table declaration that is to store data on a CF card. Parameter Enter & Data Type | StopRing A code to specify if the Data Table on the CF card is fill and stop or ring (newest data Constant overwrites oldest). Value | Result Ring i Fill and Stop Size The size to make the data table. The number of data sets (records) to allocate memory for Constant in the CF card. Each time a variable or interval trigger occurs, a line (or row) of data is output with the number of values determined by the output Instructions within the table. This data is called a record. Note Enter a negative number and all remaining memory (after creating fixed size data tables) will be allocated to the table or partitioned between all tables with a negative 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. Parameter Enter & Data Type FlagVar The variable array to use for the 8 flags that can be displayed and toggled by the DSP4. Array A value of 0 = low; 40 = high. If the array is dimensioned to less than 8, the DSP4 will only work with the flags up to the dimension. The array used for flags in the Real Time displays is Flag (). Rate How frequently to send new values to the DSP4 in milliseconds. Constant Example DSP4 (Flag( ), 200) Use Flag( ) to work with the buttons, update the DSP4 display every 200 msec. (5 times a second). GOESData (Dest, Table, TableOption, BufferControl, DataFormat) The GOESData instruction is used to transmit data to the SAT HDR GOES satellite data transmitter. The GOESData instruction is not inserted within the Data Table declaration, it is inserted within the program, typically within the scan. Section 6. Data Table Declarations and Output Processing Instructions Data transfer to the transmitter can occur via the datalogger's CS I/O port only. The GOESData instruction has the following parameters: NOTE When the datalogger sends a command, further processing tasks will be performed only after a response has been received from the HDR GOES Transmitter. Parameter Enter & Data Type Dest The variable that holds a result code for the transmission. The result codes are: Variable or Result Code ___| Description Array 0 Command executed successfully 2 Timed out waiting for STX character from transmitter after SDC addressing 3 Wrong character received after SDC addressing. 4 Something other than ACK returned when select data buffer command was executed 5 Timed out waiting for ACK 6 CS I/O port not available 7 Random message transmit failure (could be no data in buffer) Table The data table from which record(s) should be transmitted. Table Name 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 | The BufferControl parameter specifies which buffer should be used (random or Constant self-timed) and whether data should be overwritten or appended to the existing data. Data stored in the self-timed buffer is transmitted only during a predetermined time frame. Data is erased from the transmitter's buffer after each transmission. Data in the random buffer is transmitted immediately after a threshold has been exceeded. The transmission is randomly repeated to insure it is received. Code __| Description 0 Append to self-timed buffer 1 Overwrite self-timed buffer 2 Append to random buffer 3 Overwrite random buffer 9 Clear random buffer DataFormat | The DataFormat parameter specifies the format of the data sent to the transmitter Constant Code _| Description 0 CSI FP2 data; 3 bytes per data point 1 Floating point ASCII; 7 bytes per data point 2 18-bit binary integer; 3 bytes per data point, numbers to the right of the decimal are truncated 6-9 Section 6. Data Table Declarations and Output Processing Instructions 6-10 Parameter Enter & Data Type 3 RAWS7; 7 data points: Data Point Description 1 total rainfall in inches, format = xx.xxx 2 wind speed MPH, format = xxx 3 vector average wind direction in degrees, format = xxx 4 air temperature in degrees F, format = xxx 5 RH percentage, format = xxx 6 fuel stick temperature in degrees F, format = xxx 7 battery voltage in VDC, format = xx.x 4 Fixed decimal ASCII xxx.x 5 Fixed decimal ASCII xx.xx 6 Fixed decimal ASCII x.xxx 7 Fixed decimal ASCII xxx 8 Fixed decimal ASCII xxxxx GOESGPS (GoesArray1(6), GoesArray2(7) ) The GOESGPS instruction is used to store GPS data from the satellite into two variable arrays. Syntax GOESGPS (GoesArray1(6), GoesArray2(7) ) Remarks The GOESGPS instruction returns two arrays. The first array, which must be dimensioned to 6, holds a result code indicating the success of the instruction, followed by global positioning information. The result codes are as follows: Code_| Description 0 Command executed successfully 2 Timed out waiting for STX character from transmitter after SDC addressing 3 Wrong character received after SDC addressing 4 Something other than ACK returned when select data buffer command was executed 5 Timed out waiting for ACK 6 CS I/O port not available; GOES not attached 7 ACK not returned following data append or overwrite command The GPS data values are as follows: Value Description Time Seconds since January 1, 2000 Latitude Fractional degrees; 100 nanodegree resolution Longitude Fractional degrees; 100 nanodegree resolution Elevation Signed 32-bit number, in centimeters Magnetic Variation | Fractional degrees; | millidegree resolution Section 6. Data Table Declarations and Output Processing Instructions The second array, which must be dimensioned to 7, holds the following time values: year, month, day hour (GMT), minute seconds, microseconds. GOESSetup (ResultCode, PlatformID, MsgWindow, STChannel, STBaud, RChannel, RBaud, STinterval, STOffset, Rinterval) The GOESSetup instruction is used to program the GOES transmitter for communication with the satellite. Syntax GOESSetup (ResultCode, PlatformID, MsgWindow, STChannel, STBaud, RChannel, RBaud, STInterval, STOffset, RInterval) Remarks Since the purpose of this instruction is to set up the transmitter for communication, it only has to be run once within the datalogger program. Information for all parameters in this instruction is supplied by NESDIS. See the CRBasic Editor or the SATHDRGOES manual for more detailed information on the instruction GOESStatus (Dest, StatusCommand) The GOESStatus instruction is used to request status and diagnostic information from the SAT HDR GOES satellite transmitter. NOTE When the datalogger sends a command, further processing tasks will be performed only after a response has been received from the HDR GOES Transmitter. Parameter Enter & Data Type Dest An array that will hold the result codes returned from the transmitter. The size Array of the array is determined by the option chosen in the StatusCommand. Code | Description Command executed successfully Checksum failure in response Timeout waiting for STX character after SDC addressing Wrong character (not STX) received after SDC addressing Received a NAK Timed out waiting for ACK CS V/O port not available Transmit random message failure, could be no data Invalid command ONANDNPWNK SO 6-11 Section 6. Data Table Declarations and Output Processing Instructions Parameter Enter & Data Type StatusCommand | The StatusCommand specifies the type of information requested from the Constant transmitter. Code | Description | Array Dim Required 0 Read time 4 1 Status 13 2 Last message status 14 3 Transmit random message 1 4 Read error register 10 5 Reset error register 1 6 Return transmitter to online mode if 6.4 Output Processing Instructions Average (Reps, Source, DataType, DisableVar) This instruction stores the average value over the output interval for the source variable or each element of the array specified. Parameter Enter & Data Type Reps The number of averages to calculate. When Reps is greater than one, the source must be Constant an array. Source The name of the Variable that is to be averaged. Variable DataType A code to select the data storage format. Constant Code | Data Format TEEE4 IEEE 4 byte floating point al FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, in the Average instruction, when the disable variable is +0 Variable, or the current input is not included in the average. The average that is eventually stored is Expression the average of the inputs that occurred while the disable variable was 0. Value Result 0 Process current input #0 Do not process current input Covariance (NumVals, Source, DataType, DisableVar, NumCov) Calculates the covariance of values in an array over time. The Covariance of X and Y is calculated as: n >(x,-¥) 2x, Sy Cov(X, Y) = = n n where 17 is the number of values processed over the output interval and X; and Y, are the individual values of X and Y. 6-12 Section 6. Data Table Declarations and Output Processing Instructions Parameter& | Enter Data Type NumVals The number of elements in the array to include in the covariance calculations Constant Source The variable array that contains the values from which to calculate the Variable covariances. If the covariance calculations are to start at some element of the Array array later than the first, be sure to include the element number in the source (e.g., X(3)). DataType A code to select the data storage format. Constant Alpha Code | Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. When the disable variable is #0 Constant, the current input is not included in the Covariance. Variable, or Value Result Expression 0 Process current input #0 Do not process current input NumCov The number of covariances to calculate. The maximum number of covariances Constant 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) The FFT performs a Fast Fourier Transform on a time series of measurements stored 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. Parameter Enter & Data Type Source The name of the Variable array that contains the input data for the FFT. Variable DataType A code to select the data storage format. Constant Alpha Code | Numeric Code | Data Format TEEE4 24 IEEE 4 byte floating point FP2 Z Campbell Scientific 2 byte floating point N Number of points in the original time series. The number of points must be a power of 2 Constant (i.e., 512, 1024, 2048, etc.). Tau The sampling interval of the time series. Constant 6-13 Section 6. Data Table Declarations and Output Processing Instructions 6-14 Parameter Enter & Data Type Units The units for Tau. Constant Alpha Code _| Units USEC microseconds MSEC milliseconds SEC seconds MIN minutes Options | A code to indicate what values to calculate and output. Constant Code Result 0 FFT. The output is N/2 complex data points, i.e., the real and imaginary parts of the FFT. The first pair is the DC component and the Niquist component. This first pair is an exception because the DC and Niquist components have no imaginary part. 1 Amplitude spectrum. The output is N/2 magnitudes. With Acos(wt); A is magnitude. 2 Amplitude and Phase Spectrum. The output is N/2 pairs of magnitude and phase; with Acos(wt - ¢); A is amplitude, ¢ is phase (-7,7). 3 Power Spectrum. The output is N/2 values normalized to give a power spectrum. With Acos(wt - $), the power is A’ /2. The summation of the N/2 values yields the total power in the time series signal. 4 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. 5. Inverse FFT. The input is N/2 complex numbers, organized as in the output of option 0, which is assumed to be the transform of some real time series. The output is the time series whose FFT would result in the input array. T=N*tau: the length, in seconds, of the time series. Processing field: “FFT,N,tau,option”. Tick marks on the x axis are 1/(N*tau) Hertz. N/2 values, or pairs of values, are output, depending upon the option code. Normalization details: Complex FFT result i, i= 1 .. N/2: ai*cos(wi*t) + bi*sin(wi*t). wi = 2n(i-1)/T. gi = atan2(bi,ai) (4 quadrant arctan) Power(1) = (al? + b1’)/N*_ (DC) Power(i) = 2*( ai? + bi’)/N” (i= 2..N/2, AC) PSD(i) = Power(i) * T = Power(i) * N * tau Al = sqrt(al? + b1’)/N (DC) Ai = 2*sqrt(ai’ + bi?)/N (AC) Section 6. Data Table Declarations and Output Processing Instructions Notes: ¢ Power is independent of the sampling rate (1/tau) and of the number of samples (N). e The PSD is proportional to the length of the sampling period (T=N*tau), since the “width” of each bin is 1/T. e The sum of the AC bins (excluding DC) of the Power Spectrum is the Variance (AC Power) of the time series. e The factor of 2 in the Power(i) calculation is due to the power series being mirrored about the Niquist frequency N/(2*T); only half the power is represented in the FFT bins below N/2, with the exception of DC. Hence, DC does not have the factor of 2. e The Inverse FFT option assumes that the data array input is the transform of a real time series. Filtering is performed by taking an FFT on a data set, zeroing certain frequency bins, and then taking the Inverse FFT. Interpolation is performed by taking an FFT, zero padding 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 long as aliasing is avoided. FFT Example Const SIZE_FFT 16 CONST PI 3.141592654 Const CYCLESperT 2 Const AMPLITUDE 3 Const DC 7 Const OPT_FFT 0 CONST PI 3.141592654 dimi public x(SIZE_FFT),y(SIZE_FFT) DataTable(Amp, 1,1) fit(x,fp2,SIZE_FFT,10 msec, 1) EndTable DataTable(AmpPhase, 1,1) fft(x,fp2,SIZE_FFT,10 msec,2) EndTable DataTable(power, 1,1) fft(x,fp2,SIZE_FFT,10 msec,3) EndTable DataTable(PSD,1,1) fft(x,fp2,SIZE_FFT,10 msec,4) EndTable DataTable(FFT, 1,1) fft(x,IEEE4,SIZE_FFT,10 msec,0) EndTable DataTable(IFFT,1,1) ‘inverse FFT 6-15 Section 6. Data Table Declarations and Output Processing Instructions 6-16 fft(y IEEE4,SIZE_FFT,10 msec,5) EndTable BeginProg Scan(10, msec,0,SIZE_FFT) i=i+] X(i) = DC + Sin(PI/8+2*PI*CY CLESperT*i/SIZE_FFT) * AMPLITUDE + Sin(PI/2+PI*i) Next Scan CallTable(Amp) CallTable(AmpPhase) CallTable(Power) CallTable(PSD) CallTable(FFT) for i= 1 to SIZE_FFT " get result back into y() y(i) = FFT.x_fft(i,1) next CallTable(IFFT) ‘ inverse, result is the same as x() EndProg FieldNames( "Fieldname1:Description1,Fieldname2:Description2..." ) The FieldNames instruction must be placed inside the DataTable declaration immediately following the output instruction for which names are being created. The names are entered in the form of "Fieldname:Description". The fieldname and description must be separated by a colon, and the entire string must be enclosed in quotation marks. The Fieldname element is the name to be used for the field; field names are limited to 19 characters. The Description element (which is optional) provides a way for the user to include further information about the field. In a collected data file, the Description is included in the header line below the Fieldname, along with the processing description. The maximum number of characters in the Description depends upon the description that is automatically generated for the processing type. The total maximum characters for the two is 65, including quotation marks, spaces, and other characters. As an example, the processing description and fieldname description for a Sample instruction might look like the following: Smp,:This is a sample air temp" Smp,: and the opening and closing quotation marks use 7 characters; therefore, there are 58 remaining for the fieldname description. If an output instruction generates multiple fields, individual names may be entered for each or an array may be used. Individual names should be separated by commas. If an array is used, the array name and dimension must be specified (i.e., "Temp(4)" specifies an array of 4 field names; Temp(1) through Temp(4)). Note that an expression which evaluates as a constant can also be used to specify the array dimension. When the program is compiled, the datalogger will determine how many fields are created. If the list of names Section 6. Data Table Declarations and Output Processing Instructions is greater than the number of fields, the extra names are ignored. If the number of fields is greater than the number names in the list of field names, the default names are used for the remaining fields. Examples Sample(4, Temp(1), IEEE4) FieldNames “IntakeT, CoolerT, PlenumT, ExhaustT” The 4 values from the variable array temp are stored in the output table with the names IntakeT, CoolerT, PlenumT, and ExhaustT. Sample(4, Temp(1), IEEE4) FieldNames “IntakeT, CoolerT” The 4 values from the variable array Temp are stored in the output table with 2 individual names and the remainder of the default array Temp: IntakeT, CoolerT, Temp(3), and Temp(4), Sample(4, Temp(1), IEEE4) FieldNames “IntakeT(2)” The 4 values from the variable array Temp are stored in the output table with IntakeT,an array of 2, and the remainder of the default array Temp: IntakeT(1), IntakeT(2), Temp(3), and Temp(4), Histogram (BinSelect, DataType, DisableVar, Bins, Form, WtVal, LoLim, UpLim) Processes input data as either a standard histogram (frequency distribution) or a weighted value histogram. The standard histogram counts the time that the bin select variable is within a particular sub-range of its specified range. The count in a bin is incremented whenever the bin select input falls within the sub-range associated with the bin. The value that is output to the data table for each bin can either be the accumulated total count for each bin or a relative fraction of time computed by dividing the accumulated total in each bin by the total number of scans. This form of output is also referred to as a frequency distribution. The weighted value histogram does not add a constant to the bin but instead adds the current value of a variable. That variable name is entered as the weighted value. Each time the instruction is executed, the weighted value is added to a bin. The sub-range that the bin select value is in determines 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 value input) are accumulated into corresponding direction sectors (bin select input). 6-17 Section 6. Data Table Declarations and Output Processing Instructions 6-18 To obtain the average of the weighted values that occurred while the bin select value was within a particular sub-range, the weighted value output must be divided by the fraction of time that the bin select value was within that particular sub-range (i.e., a standard histogram of the bin select value must also be output; for each bin the weighted value output must be divided by the frequency distribution output). The frequency distribution histogram is specified by entering a constant in the weighted value parameter. Enter 1 to have frequency output as the fraction of the total time that the bin select value was within the bin range. Enter 100 to have the frequency output as the percent of time. Enter a variable name for the weighted value histogram. At the user's option, the histogram may be either closed or open. The open form includes all values below the lower range limit in the first bin and all values above the upper range limit in the last bin. The closed form excludes any values falling outside the histogram range. The difference between the closed and open form is shown in the following example for temperature values: Lower range limit 10°C Upper range limit 30°C Number of bins 10 Closed Form Open Form Range of first bin 10 to <12° <12° Range of last bin 28 to <30° > 28° Parameter Enter & Data Type BinSelect The variable that is tested to determine which bin is selected. The Histogram4D Variable or instruction requires an array dimensioned with at least as many elements as Array histogram dimensions. DataType A code to select the data storage format. Constant Alpha Code_| Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, when the disable variable is #0 the current input is not Variable, or included in the histogram. The histogram that is eventually stored includes the inputs that Expression occurred while the disable variable was 0. Value | Result 0 Process current input #0 Do not process current input Bins The number of bins or subranges to include in the histogram bin select range. The width Constant of each subrange is equal to the bin select range (UpLim - LowLim) divided by the number of bins. Section 6. Data Table Declarations and Output Processing Instructions Parameter Enter & Data Type Form The Form argument is 3 digits - ABC Constant Code | Form A=0 Reset histogram after each output. A=1 Do not reset histogram. B=0 Divide bins by total count. B=1 Output total in each bin. c=0 Open form. Include outside range values in end bins. C= Closed form. Exclude values outside range. 101 means: Do not reset. Divide bins by total count. Closed form. WtVal The variable name of the weighted value. Enter a constant for a frequency distribution of Constant or the BinSelect value. Variable LoLim The lower limit of the range covered by the bin select value. Constant UpLim The upper limit of the range of the bin select value. Constant Histogram4D (BinSelect, Source, DataType, DisableVar, Bins1, Bins2, Bins3, Bins4, Form, WtVal, LoLim1, UpLim1, LoLim2, UpLim2, LoLim3, UpLim3, LoLim4, UpLim4) Processes input data as either a standard histogram (frequency distribution) or a weighted value histogram of up to 4 dimensions. The description of the Histogram instruction also applies to the Histogram4D instruction. The difference is that the Histogram4D instruction allows up to four bin select inputs (dimensions). The bin select values are specified as variable array. Each of the bin select values has its own range and number of bins. The total number of bins is the product of the number of bins in each dimension (Bins1 x Bins2 x Bins3 x Bins4). 6-19 Section 6. Data Table Declarations and Output Processing Instructions 6-20 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 ‘\\\\\N\\\\ VARIABLES and CONSTANTS //////////I11 Public RPM, Gear, Port(4) Dim Bin(2) ‘AAA OUTPUT SECTION /////MMIMMIMIIL1 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 bins for RPM range 0 to 8000 ‘Open form so that RPM >8000 is included in 7000 to 8000 bin EndTable ‘\\AAAY PROGRAM J//////IMIIMIT BeginProg Scan (100,mSec,3,0) PulseCount (RPM, 1,1 ,1,1,0.4225,0) | ‘RPM from pick up on 142 tooth fly wheel ‘60 rpm/142 Hz = 0.42253... Portget (Port(1),1) 'There are digital inputs to ports 1 to 4 Portget (Port(2),2) ‘If C1 is high then the care is in first gear Portget (Port(3),3) 'C2 indicates 2nd gear etc. Portget (Port(4),4) IF Port(1) then Gear = 1 If Port(2) Then Gear = 2 If Port(3) Then Gear = 3 If Port(4) Then Gear = 4 Bin(1) = Gear Bin(2) = RPM CallTable RPMvsG Next Scan EndProg Section 6. Data Table Declarations and Output Processing Instructions LevelCrossing (Source, DataType, DisableVar, NumLevels, 2ndDim, CrossingArray, 2ndArray, Hysteresis, Option) Parameter Enter & Data Type Source The variable that is tested to determine if it crosses the specified levels. If a two Variable or dimensional level crossing is selected, the source must be an array. The second Array element of the array (or the next element beyond the one specified for the source) is the variable that is tested to determine the second dimension of the histogram. DataType A code to select the data storage format. Constant Alpha Code | Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, when the disable variable is +0 the current input is not Variable, or included in the histogram. The histogram that is eventually stored includes the inputs that Expression occurred while the disable variable was 0. Value | Result 0 Process current input #0 Do not process current input NumLevels The number levels on which to count crossings. This is the number of bins in which to Constant store the number of crossings for the associated level. The actual levels are input in the Crossing Array. A count is added to a bin when the Source goes from less than the associated level 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 The second dimension of the histogram. The total number of bins output = Constant NumLevels*2ndDim. Enter | for a one dimensional histogram consisting only of the number of level crossings. If 2ndDim is greater than 1, the element of the source array following the one tested for level crossing is used to determine the second dimension. Crossing The name of the Array that contains the Crossing levels to check. Because it does not Array make sense to change the levels while the program is running, the program should be Array written to load the values into the array once before entering the scan. 2ndArray The name of the Array that contains the levels that determine the second dimension. Array Because it does not make sense to change the levels while the program is running, the | program should be written to load the values into the array once before entering the scan. Hysteresis The minimum change in the source that must occur for a crossing to be counted. Constant Option The Option code is 3 digits - ABC Constant Code | Form A=0 Count on falling edge (source goes form > level to <level) A=1 Count on rising edge (source goes from < level to >level) B=0 Reset histogram counts to 0 after each output. B=1 Do not reset histogram; continue to accumulate counts. Cc=0 Divide count in each bin by total number of counts in all bins. C= Output total counts in each bin. 101 means: Count on rising edge, reset count to 0 after each output, output counts. Processes data with the Level Crossing counting algorithm. The output is a two dimensional Level Crossing Histogram. One dimension is the levels crossed; the second dimension, if used, is the value of a second input at the time the crossings were detected. The total number of bins output = 6-21 Section 6. Data Table Declarations and Output Processing Instructions 3.5 2.5 1.5 0.5 6-22 NumLevels*2ndDim. For a one dimensional level crossing histogram, enter | for 2ndDim. The source value may be the result of a measurement or calculation. Each time the data table with the Level Crossing instruction 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 level). FIGURE 6.4-1. Example Crossing Data As an example of the level crossing algorithm, assume we have a one dimension 3 bin level crossing histogram (the second dimension =1) and are counting crossings on the rising edge. The crossing levels are 1, 1.5, and 3. Figure 6.4-1 shows some example data. Going through the data point by point: Point Source Action Bin 1 Bin 2 Bin 3 (level=1 — (level=1.5) — (level=3) ) 1 0.5 First value, no 0 0 0 counts 2 1.2 Add one count to 1 0 0 first bin, the signal crossed 1 3 1.4 No levels crossed, 1 0 0 no counts 4 0.3 Crossed a level 1 0 0 but was falling edge, no counts 5 33 Add one count to 2 1 1 first, second, and third bins, the signal crossed 1, 1.5 and 3. Section 6. Data Table Declarations and Output Processing Instructions 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. ee ‘Crossing Levels —— Crossing Source | | = = = 2nd Dim Boundary | = —2ndDim Source | 1 ee a 0 1 2 3 4 5 6 FIGURE 6.4-2. Crossing Data with Second Dimension Value Point Crossing 2ndDim Action Source Source i 0.5 a First value, no counts 2 1.2 1.8 Add one count to first crossing, second 2D bin, the signal crossed 1 Histogram: 1.25<2D<2.25 2.25<2D<3.25 Cross 1 Cross 1.5 Cross 3 3 1.4 al No levels crossed, no counts 4 0.3 od Crossed a level but was falling edge, no counts 5 333 257 Add one count to first, second, and third crossing bins in the third 2D bin, the signal crossed 1, 1.5 and 3. 6-23 Section 6. Data Table Declarations and Output Processing Instructions Histogram: 2D < 1.25 1.25<2D<2.25 2.25<2D<3.25 Cross 1 Cross 1.5 Cross 3 Note that the first bin of the second dimension is always “open”. Any value less than the specified boundary is included in this bin. The last bin of the second dimension is always “closed”. It only includes values that are less than its upper boundary and greater than or equal to the upper boundary of the previous bin. If you want the histogram to be “open” on both ends of the second dimension, enter an upper boundary 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 histogram. Ifa one dimension level crossing histogram is selected (1 entered for the second dimension) the name of the Crossing Array can also be entered for the 2nd Array to avoid declaring an unused array. The program must load the values into these arrays. The array specifying the boundaries of the second dimension is loaded with the upper limits for each bin. For example, assume the second dimension is 3, and the upper limits loaded into the array containing the second dimension boundaries are 1, 3, and 6. The value of each element (bin) of the histogram can be either the actual number of times the signal crossed the level associated with that bin or it can be the fraction of the total number of crossings counted that were associated with that bin (i.e., number of counts in the bin divided by total number of counts in all bins). The hysteresis determines the minimum change in the input that must occur before a crossing is counted. If the value is too small, “crossings” could be counted which are in reality just noise. For example, suppose 5 is a crossing level. If the input is not really changing but is varying from 4.999 to 5.001, a hysteresis of 0 would allow all these crossings to be counted. Setting the hysteresis to 0.1 would prevent this noise from causing counts. Maximum (Reps, Source, DataType, DisableVar, Time) This instruction stores the MAXIMUM value that occurs in the specified Source variable over the output interval. Time of maximum value(s) is OPTIONAL output information, which is selected by entering the appropriate code in the time parameter. 6-24 Section 6. Data Table Declarations and Output Processing Instructions Parameter Enter & Data Type Reps The number of maximum values to determine. When repetitions are greater than 1, the Constant source must be an array. Source The name of the Variable that is the input for the instruction. Variable DataType A code to select the data storage format. Constant Alpha Code | Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point | DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, when the disable variable is 40 the current input is not Variable, or checked for a new maximum. The maximum that is eventually stored is the maximum Expression that occurred while the disable variable was 0. Value Result Process current input #0 Do not process current input Time Option to store time of Maximum. When time is output, the maximums for all reps are output first followed by the respective times at which they occurred. Constant Value | Result 0 Do not store time 1 Store time Minimum (Reps, Source, DataType, DisableVar, Time) This instruction stores the MINIMUM value that occurs in the specified Source variable over the output interval. Time of minimum value(s) is OPTIONAL output information, which is selected by entering the appropriate code for Parameter Enter & Data Type Reps The number of minimum values to determine. When repetitions are greater than 1, the Constant source must be an array. Source The name of the Variable that is the input for the instruction. Variable DataType A code to select the data storage format. Constant | Alpha Code | Data Format IEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, when the disable variable is 40 the current input is not Variable, or checked for a new minimum. The minimum that is eventually stored is the minimum that Expression occurred while the disable variable was 0. Value Result Process current input Do not process current input Time Option to store time of Minimum. When time is output, the minimum values for all repetitions are output first followed by the times at which they occurred. Constant Value | Result Do not store time 1 Store time 6-25 Section 6. Data Table Declarations and Output Processing Instructions RainFlow (Source, DataType, DisableVar, MeanBins, AmpBins, Lowlimit, Highlimit, MinAmp, Form) Parameter Enter & Data Type Source The variable that is tested to determine which bin is selected Variable DataType A code to select the data storage format. Constant Alpha Code__| Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, when the disable variable is #0 the current input is not Variable, or included in the histogram. The histogram that is eventually stored includes the inputs that Expression occurred while the disable variable was 0. Value | Result 0 Process current input #0 Do not process current input MeanBins This parameter allows sorting by the mean value of the signal during a stress strain cycle. Constant The number entered is the number of bins or subranges to sort the mean values into. Enter | to disregard the signal value and only sort by the amplitude of the signal. The width of each subrange is equal to the HiLimit - LowLimit divided by the number of bins. The lowest bin’s minimum value is the low limit and the highest bin’s maximum value is the High limit AmpBins The number of bins or subranges to sort the amplitude of a stress strain cycle into. The Constant width of each subrange is equal to the HiLimit - LowLimit divided by the number of bins. LowLim The lower limit of the input signal and the Mean Bins. Constant UpLim The upper limit of the input signal and the Mean Bins. Constant MinAmp The minimum amplitude that a stress strain cycle must have to be counted. Constant Form The Form code is 3 digits - ABC Constant Code | Form A=0 Reset histogram after each output. A=1 Do not reset histogram. B=0 Divide bins by total count. B=1 Output total in each bin. Cc=0 Open form. Include outside range values in end bins. C=1 Closed form. Exclude values outside range. 101 means: Do not reset. Divide bins by total count. Closed form. Processes data with the rainflow counting algorithm, essential to estimating cumulative damage fatigue to components undergoing stress/strain cycles. Data can be provided by making measurements in either the standard or the burst mode. The Rainflow Instruction can process either a swath of data following the burst mode, or it can process "on line" similar to other processing instructions. The output is a two dimensional Rainflow Histogram. One dimension is the amplitude of the closed loop cycle (i.e., the distance between peak and valley); the other dimension is the mean of the cycle (i.e., [peak value + valley value]/2). The value of each element (bin) of the histogram can be either the 6-26 Section 6. Data Table Declarations and Output Processing Instructions actual number of closed loop cycles that had the amplitude and average value associated with that bin or the fraction of the total number 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 example, if the lower limit is 100 and the upper limit is 150, and there are 5 amplitude bins, the maximum amplitude is 150 - 100 = 50. The amplitude change between bins and the upper limit of the smallest amplitude bin is 50/5 = 10. Cycles with an amplitude, A, less than 10 will be counted in the first bin. The second bin is for 10 < A < 20, the third for 20 < A < 30, etc. In determining the ranges for mean bins, the actual values of the limits are used as well as the difference between them. The lower limit of the input data is also the lower limit of the first mean bin. Assume again that the lower limit is 100, the upper limit 150, and that there are 5 mean bins. In this case the first bin is for cycles which have a mean value M, 100 < M < 110, the second bin 110 <M < 120, etc. If Cy is the count for mean range m and amplitude range a, and M and N are the number of mean and amplitude bins respectively, then the output of one repetition is arranged sequentially as (C),1, Ci, .... Cin, C21, C22, ... Cun). Multiple repetitions are sequential in memory. Shown in two dimensions, the output is: Ci C2. . : Cin Cr, Ci2 . . . Con Cu, Cu : : : Cun The histogram can have either open or closed form. In the open form, a cycle that has an amplitude larger than the maximum bin is counted in the maximum bin; a cycle that has a mean value less than the lower limit or greater than the upper limit is counted in the minimum or maximum mean bin. In the closed form, a cycle that is beyond the amplitude or mean limits is not counted. The minimum distance between peak and valley, MinAmp, determines the smallest amplitude cycle that will be counted. The distance should be less than the amplitude bin width ([high limit - low limit]/no. amplitude bins) or cycles with the amplitude of 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 6-27 Section 6. Data Table Declarations and Output Processing Instructions 6-28 Sample (Reps, So urce, DataType) This instruction stores the current value(s) at the time of output from the specified variable or array. Parameter Enter & Data Type _ Reps The number of values to sample. When repetitions are greater than 1, the source must be Constant an array. Source The name of the Variable to sample. Variable DataType A code to select the data storage format. Constant Alpha Code | Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point SampleMaxMin (Reps, Source, DataType, DisableVar) The SampleMaxMin instruction is used to sample one or more variable(s) when another variable (or any variable in an array of variables) reaches its maximum or minimum for the defined output period. The SampleMaxMin instruction is placed inside a DataTable declaration, following the Maximum or Minimum instruction that will be used trigger the sample. SampleMaxMin samples whenever a new maximum or minimum is detected in the preceding instruction. When a new sample is taken, the previous value(s) are discarded. The sample(s) recorded in the data table will be those taken when the last maximum or minimum occurred. The number of values output by SampleMaxMin is determined only by its source and destination parameters; not by repetitions in the preceding instruction. When the Repetitions parameter for the preceding Maximum or Minimum instruction is greater than 1, SampleMaxMin will sample whenever a new maximum or minimum occurs in any of the variables in the Maximum/Minimum source array. To ensure the sample is taken only when a new maximum or minimum occurs in a single specific variable, the preceding maximum or minimum instruction must have repetitions=1. Parameter Enter & Data Type Reps The number of values to sample. When repetitions are greater than 1, the source Constant must be an array. Source The Source is the name of the variable or variable array that is sampled when a Variable new maximum or minimum occurs for the preceding Maximum or Minimum instruction. DataType Select the format in which to save the data Constant Entry | Description | IEEE4 | IEEE four-byte floating point | FP2 Campbell Scientific two-byte floating point Section 6. Data Table Declarations and Output Processing Instructions Parameter Enter & Data Type DisableVar The DisableVar is a Constant, Variable, or Expression that is used to determine Constant, whether the current measurement is included in the values to evaluate for a Variable or maximum or minimum Expression Value _| Result 0 | Process current input #0 | Do not process current input StdDev (Reps, Source, DataType, DisableVar) StdDev calculates the standard deviation of the Source(s) over the output interval. 1 (ie 2 2 i=N 8(x) = ae > | /N]/N i=1 i=1 where 8( x) is the standard deviation of x, and N is the number of samples Parameter Enter & Data Type Reps The number of standard deviations to calculate. When repetitions are greater than 1, the Constant source must be an array. Source The name of the Variable that is the input for the instruction. Variable DataType A code to select the data storage format. Constant Alpha Code_| Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, when the disable variable is 40 the current input is not Variable, or included in the standard deviation. The standard deviation that is eventually stored is the Expression standard deviation of the inputs that occurred while the disable variable was 0. Value Result Process current input #0 Do not process current input Totalize (Reps, Source, DataType, DisableVar) This instruction stores the total(s) of the values of the source(s) over the given output interval. Parameter Enter & Data Type Reps The number of totals to calculate. When repetitions are greater than 1, the source must be Constant an array. Source The name of the Variable that is the input for the instruction. Variable 6-29 Section 6. Data Table Declarations and Output Processing Instructions 6-30 Parameter Enter & Data Type DataType A code to select the data storage format. Constant Alpha Code_| Data Format TEEE4 IEEE 4 byte floating point FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs Constant, are processed. For example, when the disable variable is #0 the current input is not Variable, or included in the total. The total that is eventually stored is the total of the inputs that Expression occurred while the disable variable was 0. Value Result Process current input #0 Do not process current input WindVector (Repetitions, Speed/East, Direction/North, DataType, DisableVar, Subinterval, SensorType, OutputOpt) WindVector processes wind speed and direction from either polar (wind speed and direction) or orthogonal (fixed East and North propellers) sensors. It uses the raw data to generate the mean wind speed, the mean wind vector magnitude, and the mean wind vector direction over an output interval. Two different calculations of wind vector direction (and standard deviation of wind vector direction) are available, one of which is weighted for wind speed. Parameter Enter & Data Type Repetitions The number of wind sets (speed/direction or East/North) to calculate results for. Constant Speed/East The source variables for wind speed and direction or, in the case of orthogonal Dir/North sensors, East and North wind speeds. If repetitions are greater than 1 the source Variables or | variables must be arrays containing elements for all repetitions. Arrays L DataType A code to select the data storage format. Constant Alpha Code_| Data Format IEEE4 IEEE 4 byte floating point | FP2 Campbell Scientific 2 byte floating point DisableVar A non-zero value will disable intermediate processing. Normally 0 is entered so Constant, all inputs are processed. For example, when the disable variable is 40 the Variable, or | current input is not included in the total. The total that is eventually stored is the Expression 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 | The number of samples per sub-interval calculation. Enter 0 for no sub-interval |_ Constant calculations. SensorType | The type of wind sensors Constant Value_| Sensor Type 0 Speed and Direction 1 East and North Section 6. Data Table Declarations and Output Processing Instructions Parameter Enter & Data Type OutputOpt Value _| Outputs (for each rep) Constant 0 1. Mean horizontal wind speed, S. 2. Unit vector mean wind direction, @1. 3. Standard deviation of wind direction, o(@1). Standard deviation is calculated using the Yamartino algorithm. This option complies with EPA guidelines for use with straight- line Gaussian dispersion models to model plume transport. 1 1. Mean horizontal wind speed, S. Unit vector mean wind direction, 1. Mean horizontal wind speed, S. Resultant mean wind speed, U. Resultant mean wind direction, Ou. Standard deviation of wind direction, o(Ou). oN | This standard deviation is calculated using Campbell Scientific's wind speed weighted algorithm. Use of the Resultant mean horizontal wind direction is not recommended for straight-line Gaussian dispersion models, but may be used to model transport direction in a variable-trajectory model. When a wind speed sample is 0, the instruction uses 0 to process scalar or resultant vector wind speed and standard deviation, but the sample is not used in the computation of wind direction. The user may not want a sample less than the sensor threshold used in the standard deviation. If this is the case, write the datalogger program to check wind speed, and if it is less than the threshold set the wind speed variable equal to 0 prior to calling the data table. Standard deviation can be processed one of two ways: 1) using every sample 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’. Standard deviation of horizontal wind fluctuations from sub-intervals is calculated as follows: 6(©)=[((6®,?+(6O,)? ...1( 6@y)?)/M]}!2 where o(@) is the standard deviation over the output interval, and o®, ... oO, are sub-interval standard deviations. ' EPA On-site Meteorological Program Guidance for Regulatory Modeling Applications. 6-31 Section 6. Data Table Declarations and Output Processing Instructions 6-32 A sub-interval is specified as a number of scans. The number of scans for a sub-interval is given by: Desired sub-interval (secs) / scan rate (secs) For example if the scan rate is 1 second and the data interval is 60 minutes, the standard deviation is calculated from all 3600 scans when the sub-interval is 0. With a sub-interval of 900 scans (15 minutes) the standard deviation is the average of the four sub-interval standard deviations. The last sub-interval is weighted if it does not contain the specified number of scans. Measured raw data: Calculations: S; = horizontal wind speed ©; = horizontal wind direction Ue; = east-west component of wind Un; = north-south component of wind N = number of samples North FIGURE 6.4-3. Input Sample Vectors In Figure 6.4-3, the short, head-to-tail vectors are the input sample vectors described by S; and oO ; » the sample speed and direction, or by Ue; and Unj, the east and north components of the sample vector. At the end of output interval T, the sum of the sample vectors is described by a vector of magnitude U and direction Ou. If the input sample interval is t, the number of samples in output interval T is N = 7/t. The mean vector magnitude is V =U/N. Scalar mean horizontal wind speed, S: S=(Zs;)/N where in the case of orthogonal sensors: S=(Ue;+Un;’)'? Unit vector mean wind direction, ©1: @1=Arctan (Ux/Uy) Section 6. Data Table Declarations and Output Processing Instructions where Ux=(Zsin ©;)/N Uy=(Zcos ;)/N or, in the case of orthogonal sensors Ux=(Z(Ue/U;))/N Uy=(2(Un/U;))/N where U=(Ue?+Un)"” Standard deviation of wind direction, o(@1), using Yamartino algorithm: o(@1)=are sin(e)[1+0.1547 e°] where, . e=[1-((Ux)*+(Uy))}"” and Ux and Uy are as defined above. Resultant mean horizontal wind speed, U: U=(Ue+Un*)'? FIGURE 6.4-4. Mean Wind Vector where for polar sensors: Ue=(ZS; Sin ©;)/N Un=(2S; Cos ©;)/N or, in the case of orthogonal sensors: Ue=(2Ue;)/N Un=(£Un;)/N Resultant mean wind direction, Ou: @©u=Arctan (Ue/Un) Standard deviation of wind direction, o(@u), using Campbell Scientific algorithm: o(@u)=81(1-U/S)'” 6-33 Section 6. Data Table Declarations and Output Processing Instructions The algorithm for o(6u) is developed by noting (Figure 6.4-4) that Cos (©,') = U, /s,; where ©,'= ©, — Ou FIGURE 6.4-5. Standard Deviation of Direction The Taylor Series for the Cosine function, truncated after 2 terms is: Cos (@,') =1-(@,')? /2 For deviations less than 40 degrees, the error in this approximation is less than 1%. At deviations of 60 degrees, the error is 10%. The speed sample may be expressed as the deviation about the mean speed, 5,=5/+S Equating the two expressions for Cos (0‘) and using the previous equation for Sy; 1-(©,')? /2 =U, /(s,'+S) Solving for (@,' , one obtains; (@,') =2-2U, /S-(@,;')'s,/S +2s,/S Summing (O iy over N samples and dividing by N yields the variance of @u. Note that the sum of the last term equals 0. N (o(Ou))? = (0, / N =2(1-U/S)-}'(@,')’s;)/ NS i=l 6-34 Section 6. Data Table Declarations and Output Processing Instructions The term, > ((@,')’s,')/ NS , 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, MT. In these tests, the maximum differences in o(@u) = (>. (@,')?/ N)"” and o(@u) = (2(1-U/ S))"? have never been greater tan a few degrees. The final form is arrived at by converting from radians to degrees (57.296 degrees/radian). o(@u) = (201-U /S))"? = 81 -U / S)"? 6-35 Section 7. Measurement Instructions 7.1 Voltage Measurements VoltDiff — Differential Voltage Measurement... VoltSE — Single-ended Voltage Measurement... 7.2 Thermocouple Measurements Measure the Output of Thermocouples and Convert to Temperature. TCDiff — Differential Voltage Measurement of Thermocouple... TCSE — Single-ended Voltage Measurement of Thermocouple... Resistance Bridge Measurements Bridge measurements combine an excitation with voltage measurements and are used to measure sensors that change resistance in response to the phenomenon being measured. These sensors include RTDS, thermistors, potentiometers, strain gages, and pressure and force transducers. 7.3 Half Bridges MBE al 6 Va E gS 1h aac cdots vac et st obena bate naceecesetetaveset ctata nacteveesergsaees BrHalf3W — Three Wire Half Bridge... BrHalf4W — Four Wire Half Bridge 7.4 Full Bridges BrFull — Four Wire Full Bridge BrFull6W — Six Wire Full Bridge . 7.5 Excitation ExciteV - Sets the specified switched voltage excitation channel to the voltage specified... SW12 7.6 Self Measurements Battery — Measures battery voltage or current Calibrate — Adjusts the calibration for analog measurements. InstructionTimes - Returns the execution time of each instruction .. a PanelTemp — (Used as a reference for thermocouple measurements)....... 7-15 7.7 Digital /O CheckPort - Returns the status of a control port.........cccecesessseseseseeseseeeseeeees 715 PeriodAvg - Measures the period or the frequency of a signal on a single=ended! Chantel joc. ccctexecescececccse\ oevasasaassscscesssssn censasetsuccesivcanssevsss 7-16 PortsConfig - Used to configure one or more control ports as either input or output PortGet - Reads the status of one of the eight control ports Section 7. Measurement Instructions 7-2 PortSet — Sets Digital Ports PulseCount — Pulse/Frequency Measurement PulseCountReset - Resets Pulse Counters and Running Averages Used in Pulse Count Instruction IPUISCP OT ssscssscctassesnesvatesossesen ReadIO — Reads State of Digital I/O Ports. SDI12Record - Used to retrieve the results from an SDI-12 sensor.. Vibrating Wire WritelO — Sets Digital Outputs 7.8 Specific Sensors CS110 CS616.... HydraProbe .. SlowAntenna Therm107, Therm108, Therm109.. 7.9 Peripheral Devices AM2ST - Controls the AM25T multiplexer... CS7500 - Communicates with the CS7500 open path CO) sensor CSAT3 - Communicates with the CSAT3 sonic anemometer.... SDMAO4 - Sets the voltage to an SDM-AO4 output device. SDMCAN - Measures and controls the SDM-CAN interface ... SDMCD16AC — Controls an SDM-CD16AC, SDMCD 16, or SDM-CD16D 16 channel relay/control port device..........ccceeeeees 7-36 SDMINTS — Allows the use of the SDM-INTS8, 8 channel interval timer, Withitlne CR QOO set asaidoteerdaauitestaslccisttsntidevetereualcieutateasets 7-36 ISAT 1,6 oo adc tate hc eda dtp ede ottssbagt dota scented pegs stu ote seeotaataese 7-39 SDMSIO4 — Controls and transmits/retrieves data from a CSI SIO4 MNtCTACE asec scsisinensnscssssesscsnssecsavascsscassscavecssersavceeutcosscessssencsssnsacussivinsees TAO SDMSpeed - Changes the rate that the CR1000 uses to clock the SDM antes seecsssvcas sescanvacstzccscsssscssaaveeerse ssssiasestassusscvsssassuevestenseaserscessesttcssase 7-45 SDMTrigger - Allows the CR1000 to synchronize when measurements ALS HVA cossctattectevedesvsstaconsatatacneditaeas adestdtzateee! vadoutgetdortisctscttetdontcosauta 7-45 SDMSW8A - Controls the SDM-SW8A 8-channel switch closure module . - 7-45 SDMXS0.. TDR100... Section 7. Measurement Instructions 7.1 Voltage Measurements VoltDiff (Dest, Reps, Range, DiffChan, RevDiff, SettlingTime, Integ, Mult, Offset) Diff. Channel H Diff. Channel L. This instruction measures the voltage difference between the HI and Low inputs of a differential channel. Both the high and low inputs must be within + 5V of the datalogger's ground (See Common Mode Range, Section 3.2). With a multiplier of one and an offset of 0, the result is in millivolts or volts depending on the range selected. VoItSE (Dest, Reps, Range, SEChan, MeasOfs, SettlingTime, Integ, Mult, Offset) S.E. Channel Ground This instruction measures the voltage at a single ended 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. Channel H ® Thermocouple Diff. Channel L This instruction measures a thermocouple with a differential voltage measurement and calculates the thermocouple temperature (°C) for the thermocouple type selected. The instruction adds the measured voltage to the voltage calculated for the reference temperature relative to 0° C, and converts the combined voltage to temperature in °C. The ranges that are specified with a code ending in C (e.g., mV2_5C) briefly (10 1s) connect the differential input to reference voltages prior to making the voltage measurement to insure that it is within the common mode range and to test for an open thermocouple. 7-3 Section 7. Measurement Instructions TCSE (Dest, Reps, Range, SEChan, TCType, TRef, MeasOfs, SettlingTime, Integ, Mult, Offset) S.E. Channel ® Thermocouple Ground _ This instruction measures a thermocouple with a single-ended voltage measurement and calculates the thermocouple temperature (°C) for the thermocouple type selected. The instruction adds the measured voltage to the voltage calculated for the reference temperature relative to 0° C, and converts the combined voltage to temperature in °C. Voltage and Thermocouple Parameters Parameter Enter & Data Type Dest Variable | The Variable in which to store the results of the instruction. When Reps are used the or Array results are stored in an array with the variable name. An array must be dimensioned to have elements for all the Reps. Reps The number of repetitions for the measurement or instruction. Constant Range Alpha Code | Voltage Range Constant mV5000 + 5000 mV mV2500 + 2500 mV mV250 +250 mV mvV25 +25mV mvV7_5 +7.5mV mV2_5 +2.5mV Autorange | mV2_5—mV5000 | Selects range (Sect. 3.1) mV250C +250 mV | The mV250C, mV25C, mV7_SC, and mV25C +25 mV | mV2_5SC ranges pull the channel into mV7_5C +7.5mV | common mode range and check for open mV2_5C +2.5 mV | input AutorangeC | mV2_5—mV250 | Selects C range DiffChan The differential channel number on which to make the first measurement. When Reps are Constant used, subsequent measurements will be automatically made on the following channels. If the channel is entered as a negative number, all reps occur on that channel. SEChan The single-ended channel number on which to make the first measurement. When Reps Constant are used, subsequent measurements will be automatically made on the following channels. If the channel is entered as a negative number, all reps occur on that channel. TCType Alpha Code | Thermocouple Type Constant TypeT Copper Constantan TypeE Chromel Constantan TypeK Chrome! Alumel TypeJ Tron Constantan TypeB Platinum Rhodium TypeR Platinum Rhodium TypeS Platinum Rhodium TRef The name of the variable that is the reference temperature for the thermocouple Variable measurements. Section 7. Measurement Instructions Parameter Enter & Data Type 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 MeasOfs Code Value | Result the Ground offset voltage is subtracted from single Constant | ended measurements. False 0 Offset voltage is corrected from background calibration True 40 Offset voltage is measured each scan SettlingTime | The time in microseconds to delay between setting up a measurement (switching to the Constant channel, setting the excitation) and making the measurement. (1 microsecond resolution) Entry | Voltage Range | Integration | Settling Time 0 All 250 pS 450 uS (default) 0 All _50Hz, 60Hz | 3 mS (default) >=100 All All uS entered Integ The time spent on integration in microseconds for each of the channels measured. Constant Entry Integration 250 250 pS _60Hz or 16667 16,667 pS (reject 60 Hz noise) 50 Hz or 20000 _| 20,000 uS (reject 50 Hz noise) Mult, Offset | A multiplier and offset by which to scale the raw results of the measurement. See the Constant, measurement description for the units of the raw result; a multiplier of one and an offset Variable, of 0 are necessary to output in the raw units. For example, the TCDiff instruction Array, or measures a thermocouple and outputs temperature in degrees C. A multiplier of 1.8 and Expression an offset of 32 will convert the temperature to degrees F. 7.3 Half Bridges BrHalf (Dest, Reps, Range, SEChan, ExChan, MeasPEx, ExmV, RevEx, SettlingTime, Integ, Mult, Offset) Vx X = result w/mult = 1, offset = 0 Ry M1 Ve! Rs Xo V, Rg, +R; This Instruction applies an excitation voltage, delays a specified time and then makes a single ended voltage measurement. The result with a multiplier of 1 and an offset of 0 is the ratio of the measured voltage divided by the excitation voltage. 7-5 Section 7. Measurement Instructions 7-6 BrHalf3W (Dest, Reps, Range, SEChan, ExChan, MeasPEx, ExmV, RevEx, SettlingTime, Integ, Mult, Offset) Vx X = result w/mult = 1, offset = 0 Ry Vi V xa 2e=M Re 2 Vy -Vy Ry Rs This Instruction is used to determine the ratio of the sensor resistance to a known resistance using a separate voltage sensing wire from the sensor to compensate for lead wire resistance. The measurement sequence is to apply an excitation voltage and make two voltage measurements on two adjacent single-ended channels: the first on the reference resistor and the second on the voltage sensing wire from the sensor. The two measurements are used to calculate the resulting value (multiplier = 1, offset = 0) that is the ratio of the voltage across the sensor to the voltage across the reference resistor. BrHalf4W (Dest, Reps, Range1, Range2, DiffChan, ExChan, MeasPEx, ExmV, RevEx, RevDiff, SettlingTime, Integ, Mult, Offset) Vy X = result w/mult = 1, offset = 0 V2 Rs xa v2 Re VOR vA Ry This Instruction applies an excitation voltage and makes two differential voltage measurements, then reverses the polarity of the excitation and repeats the measurements. The measurements are made on sequential channels. The result is the voltage measured on the second channel (V2) divided by the voltage measured on the first (V}). The connections are made so that Vq is the voltage drop across the fixed resistor (Rg), and V2 is the drop across the sensor (Rg). The result with a multiplier of 1 and an offset of 0 is Vz / Vy which equals Rg / Rg. Section 7. Measurement Instructions Half Bridge Parameters Parameter Enter & Data Type Dest The Variable in which to store the results of the instruction. When Reps are used the Variable or results are stored in an array with the variable name. An array must be dimensioned to Array have elements for all the Reps. Reps The number of repetitions for the measurement or instruction. Constant Range Alpha Code | Voltage Range Constant mV5000 +5000 mV mV2500 +2500 mV mV250 +250 mV mV25 +25 mV mV7_5 +7.5mV mV2_5 +2.5mV Autorange | mV2_5—mV5000 | Selects range (Sect. 3.1) mV250C +250 mV | The mV250C, mV25C, mV7_SC, and mV25C +25 mV | mV2_5SC ranges pull the channel into mV7_5C +7.5 mV | common mode range and check for open mV2_5C +2.5 mV | input AutorangeC | mV2_5—mvV250 | Selects C range SEChan The single-ended channel number on which to make the first measurement. When Reps Constant are used, subsequent measurements will be automatically made on the following single- ended channels. If the channel is entered as a negative number, all reps occur on that channel. ExChan Enter the excitation channel number to excite the first measurement. Constan Alpha Code/ Result Code Channel VX1 4] 1 Switched excitation channels, are switched to the excitation voltage. VX2 | 2 for the measurement and switched off between measurements. VX3 | 3 MeasPEx The number of sensors to excite with the same excitation channel before automatically Constant advancing to the next excitation channel. To excite all the sensors with the same excitation channel, the number should equal the number of Reps. ExmV The excitation voltage in millivolts. Allowable range + 2500 mV. RevEx may be used to Constant excite with both a positive and negative polarity to cancel offset voltages. RevEx Code Value | Result (Reversing requires twice as much time to complete) Constant False 0 Excite only with the excitation voltage entered True 40 A second measurement is made with the voltage polarity 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 7-7 Section 7. Measurement Instructions 7.4 Full Bridges Parameter Enter & Data Type SettlingTime The time in microseconds to delay between setting up a measurement (switching to the Constant channel, setting the excitation) and making the measurement. (1 microsecond resolution) Entry | Voltage Range | Integration Settling Time 0 All 250 nS 450 pS (default) 0 All _50Hz, _60Hz | 3 mS (default) >=100 All All LS entered Integ The time spent on integration in microseconds for each of the channels measured. Constant Entry Integration 250 250 nS _60Hz or 16667 16,667 pS (reject 60 Hz noise) 50 Hz or 20000 20,000 1S (reject 50 Hz noise) Mult, Offset A multiplier and offset by which to scale the raw results of the measurement. Constant, Variable, Array, or Expression BrFull (Dest, Reps, Range, DiffChan, ExChan, MeasPEx, ExmV, RevEx, RevDiff, SettlingTime, Integ, Mult, Offset) vx X = result w/mult = 1, offset = 0 Ry R, Vv. x=1000M4 = 1000 rote } 1 Vy R3+R, Ry +R, Rs 2 This Instruction applies an excitation voltage to a full bridge and makes a differential voltage measurement of the bridge output. The resulting value (multiplier = 1, offset = 0) is the measured voltage in millivolts divided by the excitation voltage in volts (i.e., millivolts per volt). Section 7. Measurement Instructions BrFull6W (Dest, Reps, Range1, Range2, DiffChan, ExChan, MeasPEx, ExmV, RevEx, RevDiff, SettlingTime, Integ, Mult, Offset) X = result w/mult = 1, offset = 0 Ry X= 1000¥2 = 1000{ 1 Rg Re } R3+Rq Ry+Ro This Instruction applies an excitation voltage and makes two differential voltage measurements. The measurements are made on sequential channels. The result is the voltage measured on the second channel (V7) divided by the voltage measured on the first (V;). The result is 1000 times V> / Vy or millivolts output per volt of excitation. The connections are made so that Vj is the measurement of the voltage drop across the full bridge, and V2 is the measurement of the bridge output. Full Bridge Parameters Parameter Enter & Data Type Dest The Variable in which to store the results of the instruction. When Reps are used the Variable or results are stored in an array with the variable name. An array must be dimensioned to Array have elements for all the Reps. Reps The number of repetitions for the measurement or instruction. Constant Range Alpha Code | Voltage Range Constant mV5000 + 5000 mV mV2500 + 2500 mV mV250 +250 mV mvV25 +25mV mV7_5 +7.5mV mV2_5 +2.5mV Autorange | mV2_5—mV5000 | Selects range (Sect. 3.1) mvV250C +250 mV | The mV250C, mV25C, mV7_5C, and mV25C +25 mV | mV2_5C ranges pull the channel into mV7_5C + 7.5 mV | common mode range and check for open mV2_5C +2.5 mV | input AutorangeC | mV2_5-—mV250 | Selects C range DiffChan The differential channel number on which to make the first measurement. When Reps are Constant used, subsequent measurements will be automatically made on the following differential channels. If the channel is entered as a negative number, all reps occur on that channel. 7-9 Section 7. Measurement Instructions Parameter Enter & Data Type ExChan Enter the excitation channel number to excite the first measurement. Constan Alpha Code/ Result Code Channel VX1 41 Switched excitation channels, are switched to the excitation voltage. VX2 | 2 for the measurement and switched off between measurements. VX3 | 3 MeasPEx The number of sensors to excite with the same excitation channel before automatically Constant advancing to the next excitation channel. To excite all the sensors with the same excitation channel, the number should equal the number of Reps. ExmV The excitation voltage in millivolts. Allowable range + 2500 mV. RevEx may be used to Constant excite with both a positive and negative polarity to cancel offset voltages. RevEx Code Value Result (Reversing requires twice as much time to complete) Constant False 0 Excite only with the excitation voltage entered True 40 A second measurement is made with the voltage polarity 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 | The time in microseconds to delay between setting up a measurement (switching to the Constant channel, setting the excitation) and making the measurement. (1 microsecond resolution) Entry Voltage Range Integration Settling Time 0 All 250 pS 450 pS (default) 0 All _50Hz, 60 Hz | 3 mS (default) >=100 All All uS entered Integ The time spent on integration in microseconds for each of the channels measured. Constant Entry Integration 250 250 wS _60Hz or 16667 16,667 uS (reject 60 Hz noise) 50 Hz or 20000 20,000 pS (reject 50 Hz noise) Mult, Offset A multiplier and offset by which to scale the raw results of the measurement. Constant, Variable, Array, or Expression 7.5 Excitation 7-10 ExciteV (ExChan, ExmV, XDelay) This instruction sets the specified switched voltage excitation channel to the voltage specified. The XDelay parameter is used to specify the length of time the excitation channel is enabled, after which, the channel is set low and the datalogger moves on to the next instruction. If the XDelay is set to 0, the excitation channel will be enabled and the voltage will be held until the end of the program scan or until another instruction sets an excitation voltage. Section 7. Measurement Instructions Parameter Enter & Data Type ExChan Enter the excitation channel number to excite the first measurement. Constan Alpha Code/ Result Code Channel VX1] 1 Switched excitation channels, are switched to the excitation voltage. VX2 | 2 for the measurement and switched off between measurements. VX3 | 3 ExmV The excitation voltage in millivolts. Allowable range + 2500 mV. Constant XDelay Specifies the length of time the excitation is enabled, after which, the channel is set low and the datalogger moves on to the next instruction. If XDelay is set to 0, the excitation will be on until the end of the program scan or until another instruction sets an excitation voltage. SW12 (State) The SW12 instruction is used to set a Switched 12-volt supply high or low. The datalogger has a switched 12-volt output with two terminals. This switched 12 volts is used to provide a continuous 12-volt supply to external peripherals. At room temperature the switched 12-volt supply can source 900 mA between the SW-12 terminal and Ground. The State parameter indicates whether the switched 12 volts is High (non-zero) or low (0). NOTE The SW-12 supply is unregulated and can supply up to 900 mA at 20C and up to 630 mA at 50C. A resettable polymeric fuse protects against over-current. Reset is accomplished by removing the load or turning off the SW-12 for several seconds. Parameter Enter & Data Type State The value of this parameter determines if the 12V is on or off Constant Value_| Result Vari iable OF 0 The SW-12 ports are switched off (OV) Expression 40 The SW-12 ports are switched On (Connected to supply voltage) 7.6 Self Measurements Battery (Dest) This instruction reads the battery voltage and stores it in the destination variable. The units for battery voltage are volts. 7-11 Section 7. Measurement Instructions 7-12 Calibrate (Dest, AllRanges) The Calibrate instruction places the CR1000 self calibration under program control. Placing the Calibrate instruction in the program disables the automatic self calibration that is normally run in the background (Section 3.8). The Calibrate parameters are optional and are only used to place the results of the calibration in a variable array. With no parameters the Calibrate instruction does not return data. Parameter Enter & Data Type Dest If present the array must contain at least 60 elements (more if excitation is used in the Array program. With no parameters no data are returned. AllRanges Option to calibrate ranges not being used. Dest must be entered before AllRanges Constant parameter Alpha Code | Value Result False =0 Calibrate only Voltage ranges used in program True #40 Calibrate all Voltage ranges NOTE In most cases the background calibration is adequate and the calibrate instruction should not be used in the program. There are three valid situations for using the Calibrate instruction: 1) With the normal set of measurements there is not time for the Calibration to run in the background but the program can periodically stop making measurements and run the calibration in a separate scan. 2) The CR1000 will experience extremely 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 run, the message: “Warning when Fast Scan x is running background calibration will be disabled.” will be returned when the program is compiled (x is the number of the fast scan where the first fast scan entered in the program is 1, the next scan is 2, etc.) If you see this message you have the options of letting the scan run without any calibration (if the temperature remains constant there will be little shift, Section 3.8), reducing the number of measurements or the time it takes to make them (e.g., shorten the integration), or periodically changing to a different scan to run the calibration. In cases of rapid temperature change, such as bringing a vehicle from equilibrium at -30°C to a hot Arizona day, running the Calibration instruction in the program can improve the accuracy of the measurements. It has to be a rapid change to require this; the background calibration filters new readings and has a time constant (63% response to a step change) of approximately 36 seconds. When the calibration instruction is run in the program the calibration is completely updated each time the instruction is run. Section 7, Measurement Instructions Unless the AllRanges option is selected, the calibrate instruction only measures the range and integration combinations that occur in the measurements in the program. For the 250 us and zero integration calibrations multiple measurements are averaged for the calibration values. The 250 us integration calibration averages five measurements and the zero integration calibration averages ten measurements. The Calibration instruction can occur in a fast scan or in a slow sequence scan. In a fast scan the entire calibration is completed at once. In a slow sequence scan the calibration measurements are separated into sections that can be spliced on to the end of fast sequence scans. If it is necessary to update the calibration more rapidly than is done by the background calibration, try running the Calibrate instruction in the fast scan with the measurements. If there isn’t time for it to run there it can be placed in a slow sequence scan, but remember, unless the slow scan is faster than about 40 seconds the calibration isn’t being updated any faster than with the background calibration. Running Calibrate in a slow sequence scan is not 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 1s 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 order, followed by the calibrations of the excitations if any. If a range is not calibrated, 0 will be returned for the gain and offset. Table 7.7-1. Calibrate Return Value Decode Array Element | Description zero integrate 5000 mV single ended offset 2 zero integrate 5000 mV differential offset 3 zero integrate 5000 mV gain 4 zero integrate 1000 mV single ended offset 5 zero integrate 1000 mV differential offset 6 7 8 zero integrate 1000 mV gain zero integrate 200 mV single ended offset zero integrate 200 mV differential offset 9 zero integrate 200 mV gain 10 zero integrate 50 mV single ended offset ll zero integrate 50 mV differential offset 12 zero integrate 50 mV gain 13 zero integrate 20 mV single ended offset zero integrate 20 mV differential offset zero integrate 20 mV gai 250 Sec integrate 5000 mV single ended offset 17 250 Sec integrate 5000 mV differential offset 250 Sec integrate 5000 mV gain 250 uSec integrate 1000 mV single ended offset 7-13 Section 7. Measurement Instructions 250 Sec integrate 1000 mV differential offset 250 Sec integrate 1000 mV gain 250 Sec integrate 200 mV single ended offset 250 Sec integrate 200 mV differential offset 250 Sec integrate 200 mV gain 250 Sec integrate 50 mV single ended offset 250 Sec integrate 50 mV differential offset 250 Sec integrate 50 mV gain 250 uSec integrate 20 mV single ended offset 250 Sec integrate 20 mV differential offset 250 uSec scriptsizeintegrate 20 mV 60 Hz rejection 5000 mV single ended offset 60 Hz rejection 5000 mV differential offset 60 Hz rejection 5000 mV gain 60 Hz rejection 1000 mV single ended offset 60 Hz rejection 1000 mV differential offset 60 Hz rejection 1000 mV gain 60 Hz rejection 200 mV single ended offset 60 Hz rejection 200 mV differential offset 60 Hz rejection 200 mV gain 60 Hz rejection 50 mV single ended offset 60 Hz rejection 50 mV differential offset 60 Hz rejection 50 mV gain 60 Hz rejection 20 mV single ended offset 60 Hz rejection 20 mV differential offset 60 Hz rejection 20 mV gain 50 Hz rejection 5000 mV single ended offset 50 Hz rejection 5000 mV differential offset 50 Hz rejection 5000 mV gain 50 Hz rejection 1000 mV single ended offset 50 Hz rejection 1000 mV differential offset 50 Hz rejection 1000 mV gain 50 Hz rejection 200 mV single ended offset 50 Hz rejection 200 mV differential offset 50 Hz rejection 200 mV gain 50 Hz rejection 50 mV single ended offset 7-14 50 Hz rejection 50 mV differential offset 50 Hz rejection 50 mV gain 50 Hz rejection 20 mV single ended offset 50 Hz rejection 20 mV differential offset 50 Hz rejection 20 mV gain Section 7. Measurement Instructions InstructionTimes (Dest) The InstructionTimes instruction returns the execution time of each instruction in the program. The InstructionTimes instruction loads the Dest array with execution times for each instruction in the program (in microseconds). InstructionTimes must appear before the BeginProg statement in the program. Each element in the array corresponds to a line number in the program. To accommodate all of the instructions in the program, the array must be dimensioned to a number greater than or equal to the total number of lines in the program, including blank lines and comments. The Dest array must also be dimensioned as a long integer (e.g., Public Array(20) AS LONG). Note that the execution time for an instruction may vary. For instance, it will take longer to execute instructions when the datalogger is communicating with another device. PanelTemp (Dest, Integ) This instruction measures the panel temperature in °C. Parameter & Data Type Enter Dest Variable The Variable in which to store the results of the instruction. Integ Constant The time spent on integration in microseconds for each of the channels measured. Entry Integration 250 250 pS _60Hz or 16667 | 16,667 pS (reject 60 Hz noise) _50 Hz or 20000 | 20,000 uS (reject 50 Hz noise) 7.7 Digital /O CheckPort (Port) CheckPort is a function that returns the status of a control port. CheckPort returns True (-1) if the specified control port is high or False (0) if the control port is low. CheckPort can be used on the right side of an expression (e.g., Variable = CheckPort (Port)) or as an expression. CheckPort has only one parameter, Port, the number of the port (1-8) to check. Caution: The value returned may not be valid if using the control port as a serial port or as a pulse counting port. 7-15 Section 7. Measurement Instructions 7-16 PeriodAvg (Dest, Reps, Range, SEChan, Threshold, PAOption, Cycles, Timeout, Mult, Offset) This instruction measures the period of a signal on any single-ended input channel. The specified number of cycles are timed with a resolution of 92 ns, making the resolution of the period measurement 92 ns divided by the number of cycles chosen. Parameter Enter & Data Type Dest The Variable in which to store the results of the instruction. When Reps are used the Variable or results are stored in an array with the variable name. An array must be dimensioned to Array have elements for all the Reps. Reps The number of repetitions for the instruction on adjacent channels. Constant Range The voltage range for the measurement, which determines the gain applied to the signal Constant prior to a zero-crossing detector. Maximum frequency decreases with increasing gain. Range Gain Signal (pk-pk)' Minimum Maximum Code Min Max Pulse Frequency” Width mV250 1 500 mV 10.0 V 2.5 us 200 kHz mvV25 10 10 mV 2.0V 10 ps 50 kHz mV7_5 33 5mV 2.0V 62 Ls 8 kHz mV2_5 100 2mV 2.0V 100 prs 5 kHz : Signals must cross threshold to trigger the voltage comparator. > Maximum frequency equals 1/(Twice Minimum Pulse Width) for 50% duty cycle signals. SEChan The single-ended channel number on which to make the first measurement. If the channel Constant is entered as a negative number, all reps occur on that channel. Threshold The voltage in millivolts that the input must cross for a count to occur. For a signal Constant centered around CR1000 ground (Figure 7.7-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 comparator switching at 2.5 V. PAoption Specifies whether to output the period in ps or the frequency in kHz.. Numeric Code _| Voltage Range 0 Period of the signal is returned 1 Frequency of the signal is returned Cycles The number of cycles to be measured for the average calculation. Constant Timeout The maximum time duration (in msec) that the logger will wait for the number of Cycles Constant to be measured for the average calculation. Mult, Offset | A multiplier and offset by which to scale the raw results of the measurement. Constant, Variable, Array, or Expression Low-level signals are amplified prior to a voltage comparator for the period averaging measurement. The internal voltage comparator is referenced to the user-entered threshold. The threshold parameter allows a user to reference the internal voltage comparator to voltages other than 0 V. For example, a threshold of 2500 mV allows a 0 to 5 V digital signal to be sensed by the internal comparator without the need of any additional input conditioning circuitry. The threshold allows direct connection of standard digital signals, but is not recommended for small amplitude sensor signals. For sensor amplitudes less than 20 mV pk-pk a dc blocking capacitor, see Figure 7.7-1, is Section 7. Measurement Instructions recommended to center the signal at CR1000 ground (threshold = 0) because of offset voltage drift along with limited accuracy (+ 10 mV) and resolution (1.2 mV) of a threshold other than 0. The minimum pulse width requirements increase (maximum frequency decreases) with increasing gain as shown in range parameter. Signals larger than the specified maximum for a range will saturate the gain stages and prevent operation up to the maximum specified frequency. Back-to-back diodes, Figure 7.7-1, are recommended to limit large amplitude signals to within the input signal ranges. CAUTION Noisy signals with slow transitions through the voltage threshold have the potential for extra counts around the comparator switch point. A voltage comparator with 20 mV of hysteresis follows the voltage gain stages. The effective input referred hysteresis equals 20 mV divided by the selected voltage gain. The effective input referred hysteresis on the + 25 mV range is 2 mV; consequently, 2 mV of noise on the input signal could cause extraneous counts. For best results, select the largest input range (smallest gain) that will meet the minimum input signal requirements. C 1pF © To single - ended input Sensor with Silicon diodes DC such as 1N4001 offset °S FIGURE 7.7-1. Input conditioning circuit for low-level and high level period averaging. Figure 7.7-1 shows a circuit that capacitively couples an input signal to center it around ground and also limits the amplitude of the input to allowable levels. The capacitor C is a de blocking capacitor for offset voltage removal. Resistor R1 is used to bias the datalogger side of the input circuit to ground. The reactance of the de blocking capacitor (Xc = (2-1-f-C)-1) and resistor R1 form a voltage divider at low frequencies (R1/(R1 + Xc)) that attenuates the applied input signal. This attenuation sets a lower limit on low-frequency operation and the minimum size of R1. The circuit attenuates the input signal by a factor of 2 at 16 Hz. The back-to-back silicon diodes D1 and D2 provide ESD protection of capacitor C and the sensor, and also limit the amplitude of large amplitude 7-17 Section 7. Measurement Instructions 7-18 sensor signals. These diodes clip large amplitude signals to approximately 1.4 V pk-pk which is within the recommended input signal ranges for all range codes. Diodes D1 and D2 along with resistor R1 are recommended to limit large amplitude sensor signals, even when dc blocking capacitor C is not used. Sensors outputting large voltages may cause large currents to flow through these back-to-back diodes. A current limiting resistor may be desirable to minimize these currents in some situations. The current flow through these clipping diodes may also induce single-ended offset voltages if it returns into the +] ground terminals. Single-ended offset voltages of up to 2 1V/mA of current that flows into the + ground terminals can be induced across the front panel. The back-to-back diodes can be tied into the G ground terminals, rather than * ground terminals, if this is a problem. PortsConfig (Mask, Function) The PortsConfig instruction is used to configure one or more control ports as either input or output. By default, ports are configured as input. The PortsConfig instruction may be needed if a port is configured as output by a WritelO or PortSet instruction and then subsequently needs to function as an input. Parameter & Data Type Enter Mask The Mask parameter is used to select which ports will be affected by this instruction. It is a binary representation of the ports (reading from left to right, the ports are represented as 8, 7, 6...1). Ifa port position is set to 1, the datalogger configures that port. Binary numbers are entered by preceding the number with "&B". Leading zeros can be omitted. As an example, if &B110 is entered for this parameter, ports 3 and 2 will be configured, based on the Function parameter. Function The function parameter is used to configure the port. A binary value is entered to set each port location. 0 configures the port for input; a 1 configures the port for output. Using the above example mask, if the Function parameter is set to &B110, ports 3 and 2 will be configured for output (port 1 uses the code for input, but it is not affected because of the mask). PortGet (Dest, Port) The PortGet function is used to read the status of one of the eight control ports. Remarks This instruction will read the status of the specified port and place the result in the Dest variable. Parameter Enter & Data Type Dest The variable in which to store the result of the instruction. A | is stored if the port is Variable high; 0 is stored if the port is low. Port The control port number (1-8) for which the status should be obtained. Constant Section 7. Measurement Instructions PortSet (Port, State) This Instruction will set the specified port high or low. Parameter Enter & Data Type Port The number of the port (1-8) to set with the instruction. Constant, Variable, or Expression State The state (high or low) to set the port to. Constant, Code | Value | State Variable, or True 0 Low Expression False #0 High PulseCount (Dest, Reps, PChan, PConfig, POption, Mult, Offset) Pulse Channel Ground Parameter Enter & Data Type Dest The Variable in which to store the results of the instruction. When Reps are used the Variable or results are stored in an array with the variable name. An array must be dimensioned Array to have elements for all the Reps. Reps The number of repetitions for the measurement or instruction. Constant PChan The number of the pulse channel (1 or 2) for the measurement. Constant Control ports can be used to measure high frequency or switch closure configurations. A 1 is placed in front of the control port number to specify the control port, i.e., control port 7 is specified by entering 17. PConfig A code specifying the type of pulse input to measure. Constant Code Input Configuration 0 High Frequency 1 Low Level AC 2 Switch Closure POption A code that determines if the raw result (multiplier = 1, offset = 0) is returned as Constant counts or frequency. 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 eriod over which the frequency is averaged in milliseconds. 7-19 Section 7. Measurement Instructions 7-20 Parameter Enter & Data Type Mult, Offset | A multiplier and offset by which to scale the raw results of the measurement. See Constant, the measurement description for the units of the raw result; a multiplier of one and an Variable, offset of 0 are necessary to output in the raw units. For example, the TCDiff Array, or instruction measures a thermocouple and outputs temperature in degrees C. A Expression multiplier of 1.8 and an offset of 32 will convert the temperature to degrees F. The PulseCount instruction is used to measure counts or frequency on one of the pulse channels. NOTE The PulseCount instruction can not be used in a Slow Sequence scan. 20k 0. CR1000 Pi FIGURE 7.7-2. Conditioning Large Voltage Pulses The maximum input voltage on a pulse channel is +20 V. Refer to Figure 7.7-2 if reducing input voltage is required. e Pulse Channels Maximum Input Voltage: +20 V High Frequency Input e Pulse Channels Minimum Pulse Width: 1.2 microsecond Maximum Frequency: 400 kHz (50% Duty Cycle) Lower Threshold: 1.5 V* Upper Threshold: 3.5 V* When a pulse channel is configured for high-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 Section 7. Measurement Instructions counted if centered around +2.5 V with deviations > + 2.5 V for > 1.2 microseconds. Low Level AC (Pulse Channels Only) Input Hysteresis: 15 mV Maximum Input Voltage: 20 V peak-to-peak Input Voltage and Frequency Range (16 bit counter required above 2.56 kHz) 20 mV 1.0 Hz to 1 kHz 200 mV 0.5 Hz to 10 kHz 1000mV_ 0.3 Hz to 16 kHz Switch Closure e Pulse Channels A switch closure is connected between P1..P2 and analog ground. When the switch is open, the CR1000 pulls the pulse channel to 5 V through a 100 kOhm impedance. When the switch is closed, the pulse channel is pulled to ground. The count is incremented when the switch opens. Minimum Switch Closed Time: 5 ms Minimum Switch Open Time: 6 ms Maximum Bounce Time: 1 ms open without being counted PulseCountReset PulseCountReset is used to reset the pulse counters and the running averages used in the pulse count instruction. The 16 bit counters can count up to decimal 65535. More counts than 65535 result in an over-range condition. With each scan, the CR1000 reads the counts accumulated since the last scan and then resets the counter. If the scans stop, as in a program with more that one Scan loop, the counter continues to accumulate counts until another scan is initiated or it over-ranges. If the running averaging is in use, the over-range value will be included in the average until for the duration of the averaging period (e.g., with a 1000 millisecond running average, 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. PulsePort (Port, Delay) This instruction toggles the state of a port, delays the specified amount of time, toggles the port, and then delays a second time. The second delay in the instruction allows it to be used to create a 50 percent duty cycle clock. The instruction has the following parameters: Parameter Enter & Data Type Port The control port that should be set by the instruction. The number of the Constant port (1-8) is entered: Delay The amount of time, in microseconds, that the instruction should delay after Array each toggle of the port 7-21 Section 7. Measurement Instructions 7-22 ReadlO (Dest, Mask) ReadIO is used to read the status of selected control I/O channels (ports) on the CR1000. 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) signifying 0. For example, if ports 1 and 3 are high and the rest low, the binary representation is 00000101, or 5 decimal. The mask parameter is used to select which of the ports to read, it too is a binary representation of the ports, a 1 means pay attention to the status of the port, a 0 means ignore the status of the port (the mask is "anded" with the port status; the "and" operation returns a 1 for a digit if the mask digit and the port status are both 1 and a 0 if either or both is 0). CRBasic allows the entry of numbers in binary format by preceding the number with "&B". For example if the mask is entered as &B100 (leading zeros can be omitted in binary format just as in decimal) and ports 3 and 1 are high as in the previous example, the result of the instruction will be 4 (decimal, binary = 100); if port 3 is low, the result would be 0. Examples ReadIO(Port3, &B100) 'read port 3 if port 3 is high then ‘Port3 = 4, if port 3 is low then Port3 = 0 SDI12Recorder (Dest, SDIPort, SDIAddress, SDICommand, Multiplier, Offset) The SDI12Recorder instruction is used to retrieve the results from an SDI-12 sensor. Each execution of the SDI12Recorder instruction sends an (address)M! and then an (address)DO! M! instructs the sensor to make the measurement; DO! is a request for the data. See the CRBasic Editor for the detailed description of the parameters and commands. VibratingWire (Dest, Reps, Range, SEChan, ExChan, StartFreq, EndFreq, TSweep, Steps, DelMeas, NumCycles, DelReps, Multiplier, Offset) The Vibrating Wire instruction is used to measure a vibrating wire sensor with a swept frequency (from low to high). The period of the response is measured and 1/T? is calculated. T is the period of the measured signal in milliseconds. Parameter Enter & Data Type Dest The Dest parameter is a variable in which to store the results of the measurement. Reps The Reps parameter is the number of times the measurement should be made. Measurements are made on consecutive channels. If the Reps parameter is greater than 1, the Dest parameter must be a variable array. Section 7. Measurement Instructions Parameter Enter & Data Type Range The Range parameter is the voltage range for the measurement. An alphanumeric or the numeric code can be entered: Alphanumeric | Numeric | Description | mv250 [2 +250 mV mV25 3 +25 mV mV7_5 4 +7.5 mV mV2_5 [5 +2.5 mV SEChan The SEChan argument is the number of the single-ended channel on which to make the first measurement. If the Reps parameter is greater than 1, the additional measurements will be made on sequential channels. If the SEChan number is entered as a negative value, all Reps will be performed on the same channel. ExChan The ExChan argument is used to specify the excitation channel to use for the first measurement. If the Reps parameter is greater than 1, the excitation channel used for subsequent measurements will be incremented with each measurement. An alphanumeric or numeric code can be entered: Alphanumeric | Numeric | Description VX1 1 Excitation channel 1 VX2 2 Excitation channel 2 VX3 3 Excitation channel 3 StartFreq The StartFreq parameter is the frequency, in Hertz, at which to start the excitation. StartFreq must be greater than 20 Hz. EndFreq The EndFreq parameter is the frequency, in Hertz, at which to end the excitation. EndFregq must be less than 5000 Hz. TSweep TSweep is the duration, in milliseconds, of the frequency sweep. Steps Steps is the number of step changes in frequency to sweep from the start frequency (StartFreq) to the end frequency (EndFreq). DelMeas The DelMeas parameter is used to specify the number of microseconds to delay before measuring the return signal after the frequency sweep is completed. NumCycles__| NumCycles is the number of cycles to measure. DelReps The DelReps parameter is used to specify the number of microseconds to delay between each measurement repetition. Mult, Offset | The Mult and Offset parameters are each a constant, variable, array, or expression by which to scale the results of the measurement. With a multiplier (mult) of 1 and an offset of 0, the output is 1/T”, where T is the period of the measured signal in milliseconds. WritelO (Mask, Source) WritelO is used to set the status of selected control I/O channels (ports) on the CR1000. (See Also PortSet.) 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) signifying 0. For example, if ports 1 and 3 are high and the rest low, the binary representation is 00000101, or 5 decimal. The source value is interpreted as a binary number and the ports set accordingly. The mask parameter 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 7-23 Section 7. Measurement Instructions just as in decimal) and the source is 5 decimal (binary 101) port 3 will be set high and port 2 will be set low. The mask indicates that only 3 and 2 should be set. While the value of the source also has a 1 for port 1, it is ignored because the mask indicates 1 should not be changed. Example WritelO (&B100, &B100) _' Set port 3 high. Parameter Enter & Data Type Mask The Mask allows the read or write to only act on certain ports. The Mask is Constant ANDed with the value obtained when reading and ANDed with the source before writing. Source The Variable or number that is to be written to the I/O ports. Constant Variable 7.8 Specific Sensors 7-24 CS110 ( Dest, Leakage, Status, Integ, Mult, Offset ) The CS110 instruction is used to measure an electric field by means of a CS110 electric field meter. See the CRBasic Editor or the CS110 manual for details on the instruction. CS616 (Dest, Reps, SEChan, Port, MeasPerPort, Mult, Offset ) The CS616 instruction is used to enable and measure a CS616 water content reflectometer. This instruction outputs a period measurement in microseconds. Parameter Enter & Data Type Dest The Dest parameter is the variable or variable array in which to store the results of the measurement. Dest must be dimensioned to at least the number of Reps. Reps The Reps parameter is the number of measurements that should be made using this instruction. If Reps is greater than 1, Dest must be an array dimensioned to the size of Reps. SEChan The SEChan parameter is the number of the single-ended channel on which to make the first measurement. If the Reps parameter is greater than 1, the additional measurements will be made on sequential channels. Port The Port parameter is the control port (1-8) that will be used to enable the CS616 sensor. MeasPerPor | The MeasPerPort parameter is the number of control ports to be used to control t the CS616 sensor(s). If Reps is set to 4, MeasPerPort = 4 will result in the same port being used for all measurements. MeasPerPort = 1 will result in four sequential ports being used for the measurements. MeasPerPort = 2 will result in one port being used for the first two measurements, and the next port being used for the next two measurements. Section 7. Measurement Instructions | Mult, Offset Parameter Enter & Data Type The Mult and Offset parameters are each a constant, variable, array, or expression by which to scale the results of the measurement. HydraProbe (Dest, SourceVolts, ProbeType, SoilType) The HydraProbe instruction is used to measure the Stevens Vitel Hydra Probe sensor. Parameter Enter & Data Type Dest The variable array that will hold the values returned from the Hydra Probe Array sensor. This variable must be dimensioned to 11. The sensor returns the following measurements: soil type (1 = sand, 2 = silt, 3 = clay), real dielectric constant, imagined dielectric constant, temperature, real dielectric constant with temperature correction, imagined dielectric constant with temperature correction, water content (fraction by volume), salinity (grams of NaCl per liter), soil conductivity (S/m), soil conductivity with temperature correction (S/m), soil water conductivity with temperature correction (S/m). SourceVolts The variable array that will hold the voltages returned by the sensor (V1, V2, Array V3, and V4). This variable must be dimensioned to 4. ProbeType A code identifying which version of the Hydra Probe is being measured. Constant Code __| Description 0 Standard Probe (5V output for V4) 1 Probe Type A (2.5 V output for V4) SoilType A code to indicate the type of soil Constant Code __| Description 1 Sand 2 Silt 3 Clay SlowAntenna See CS110 manual. Therm107 (Dest, Reps, SEChan, ExChan, SettlingTime, Integ, Mult, Offset) Therm108 (Dest, Reps, SEChan, ExChan, SettlingTime, Integ, Mult, Offset) Therm109 (Dest, Reps, SEChan, ExChan, SettlingTime, Integ, Mult, Offset) The Therm107, Therm108, and Therm109 instructions are used to measure the 107, 108, and109 thermistors, respectively. The syntax for all three instructions is the same. The instruction makes a half bridge voltage measurement and processes the results using the Steinhart-Hart calculation. The output is temperature in degrees C. 7-25 Section 7. Measurement Instructions Parameter & Data Type Enter Dest Dest is the variable in which the results of the measurement will be stored. If the Reps parameter is greater than one, Dest must be an array dimensioned large enough to hold the results for all repetitions. Reps The Reps parameter is the number of times the measurement should be made. Measurements are made on consecutive channels. If the Reps parameter is greater than 1, the Dest parameter must be a variable array. SEChan The SEChan argument is the number of the single-ended channel on which to make the first measurement (1-16). If the Reps parameter is greater than 1, the additional measurements will be made on sequential channels. ExChan The ExChan is the excitation channel number (1-3) to use to excite the thermistor. If multiple thermistors are measured with one instruction, all repetitions will use the same excitation channel. An alphanumeric or numeric code can be entered. SettlingTime The SettlingTime parameter is the amount of time to delay after setting up a measurement and before making the measurement. Refer to the table below for default SettlingTimes. Entry | Range | Integratio | Settling Time n 0 All 250 ms 450 ms (default) 0 All 50Hz 3 ms (default) 0 All 60Hz 3 ms (default) >100_ | All All ms entered Integ The Integ parameter is the amount of time, in microseconds, to integrate a signal for the channel being measured. Option | Description 250 Performs a 250 microsecond integration. 60Hz_| Performs a 16.667 millisecond integration; filters 60 Hz noise. 50Hz_| Performs a 20 millisecond integration; filters 50 Hz noise. Mult, Offset The Mult and Offset parameters are each a constant, variable, array, or expression by which to scale the results of the measurement. With a multiplier (mult) of 1 and an offset of 0, the output is temperature in degrees C. With a multiplier of 1.8 and an offset of 32, the output is temperature in degrees F. 7.9 Peripheral Devices 7-26 AM25T (Dest, Reps, Range, AM25TChan, DiffChan, TCType, Tref, ClkPort, ResPort, VxChan, RevDiff, SettlingTime, Integ, Mult, Offset) This Instruction controls the AM25T Multiplexer. Parameter Enter & Data Type Dest Variable | The Variable in which to store the results of the instruction. When Reps are used the or Array results are stored in an array with the variable name. An array must be dimensioned to have elements for all the Reps. Reps The number of channels to measure on the AM25T. Enter 0 to just measure Temperature. Section 7. Measurement Instructions Parameter Enter & Data Type Range Alpha Code | Voltage Range Constant mV5000 +5000 mV mV2500 +2500 mV mvV250 +250 mV mV25 +25 mV mvV7_5 +7.5mV mV2_5 +2.5mV Autorange | mV2_5—mV5000 | Selects range (Sect. 3.1) mV250C +250 mV | The mV250C, mV25C, mV7_5C, mV25C +25 mV | and mV2_SC ranges pull the channel mV7_5C +7.5 mV | into common mode range and check mV2_5C +2.5 mV | for open input AutorangeC |_mV2_5—mV250 | Selects C range Am25tChan _ | The starting input channel on the multiplexer. Constant DiffChan The Differential channel that will be used to make the actual measurements Constant from the AM25T. If the channel is entered as a negative number, all reps occur on that channel. TCType The Thermocouple Type Code.. Enter -1 to return voltage measurements. Constant Tref The variable in which to store/read the AM25T reference temperature. Variable ClkPort The Digital Output port number that will be used to clock the AM25T. One Constant clock port may be used with several AM2STs. ResPort The Digital Output port number that will be used to enable and reset the Constant AM25T. Each AM2S5T must have it's own unique Reset line VxChan The Excitation Channel number that will be used to provide excitation for Constant the PRT reference temperature measurement. If 0 is entered for the excitation channel, the temperature is not measured. 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 40 A second measurement is made after reversing the inputs to cancel offsets SettlingTime | The time in microseconds to delay between setting up a measurement (switching to Constant the channel, setting the excitation) and making the measurement. (1 microsecond resolution) Entry | Voltage Range | Integration | Settling Time 0 All 250 pS 450 pS (default) 0 All _50Hz, _60Hz | 3 mS (default) >=100 All All S entered Integ The time spent on integration in microseconds for each of the channels measured. Constant Entry Integration 250 250 pS _60Hz or 16667 16,667 [1S (reject 60 Hz noise) 50 Hz or 20000 20,000 1S (reject 50 Hz noise) Mult, Offset | A multiplier and offset by which to scale the raw results of the measurement. See Constant, the measurement description for the units of the raw result; a multiplier of one and an Variable, offset of 0 are necessary to output in the raw units. For example, the TCDiff Array, or instruction measures a thermocouple and outputs temperature in degrees C. A Expression multiplier of 1.8 and an offset of 32 will convert the temperature to degrees F. 7-27 Section 7. Measurement Instructions 7-28 CS7500 (Dest, Reps, SDMAddress, CS7500Cmd) Communicates with the CS7500 open path CO, and H,O 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 on the number of Repetitions and on the selected Command. Command __| Input Variable Length per CS7500 O and 1 2 2 4 3 3 4 11 5 3 Reps The Reps parameter determines the number of CS7500 gas analyzers with which to communicate using this instruction. The CS7500s must have sequential SDM addresses if the Reps parameter is greater than 1 SDMAddress The SDMAddress parameter defines the address of the CS7500 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 CS7500 that it communicates with. The SDM address is entered as a base 10 number, unlike older, jumper- settable SDM instruments that used base 4. CS7500Cmd The CS7500Cmd parameter requests the data to be retrieved from the sensor. The command is sent first to the device specified by the SDMAddress parameter. If the Reps parameter is greater than 1, subsequent CS7500s will be issued the command with each rep. The results for the command will be returned in the array specified by the Dest parameter. A numeric code is entered to request the data: Code _| Description 0 Get CO2 & H20 molar density (mmol/m3) 1 Get CO2 & H20 absorptance 2 Get internal pressure estimate (kPa), auxiliary measurement A, auxiliary measurement B, and cooler voltage (V) 3 Get cell diagnostic value, output bandwidth (Hz), and programmed delay [230 + (delay * 6.579)] (msec) 4 Get all data (CO2 molar density (mmol/m3), H2O molar density (mmol/m3), CO2 absorptance, H2O absorptance, internal pressure estimate (kPa), auxiliary measurement A, auxiliary measurement B, cooler voltage (V), cell diagnostic value, output bandwidth (Hz), and programmed delay [230 + (delay * 6.579)] (msec)) 5 Get CO2 & H20 molar density (mmol/m3) and internal pressure estimate (kPa) Section 7. Measurement Instructions 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 Reps The Dest parameter is a variable in which to store the results of the measurement. This variable must be dimensioned to a length of five to hold the CSAT3 Ux, Uy, Uz, speed of sound, and diagnostic data. The Reps parameter is the number of times the measurement should be made. Measurements are made on consecutive channels. If the Reps SDMAddress _| parameter is greater than 1, the Dest parameter must be a variable array. The SDMAddress parameter defines 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. Command Commands 90 - 92 send a measurement trigger to the CSAT3 with the SDM address specified by the SDMAddress argument. The CSAT3 also sends data to the datalogger. Options 97 - 99 get data after a group trigger, SDMTrigger(), from the CSAT3 specified by the SDMAddress parameter without triggering a new CSAT3 measurements. The CSAT() instruction must be preceded by the SDMTrigger() instruction in order to used Options 97-99. Code | Description 90 Trigger and Get wind & speed of sound data 91 Trigger and Get wind & sonic temperature data 92 Trigger and Get wind & speed of sound data minus 340 m/s 97 Get wind & speed of sound data minus 340 m/s after a Group Trigger 98 Get wind & sonic temperature data after a Group Trigger 99 Get wind & speed of sound data after a Group Trigger Parameter & Data Type Enter Rate The Rate argument sets the CSAT3’s execution parameter. This parameter tells 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 Execution Parameter to 6 Hz 10 Set Execution Parameter to 10 Hz 12 Set Execution Parameter to 12 Hz 20 Set Execution Parameter to 20 Hz 30 Set Execution Parameter to 30 Hz 60 Set Execution Parameter to 60 Hz 61 Set Execution Parameter to 60 Hz to 10 Hz Oversample Mode 62 Set Execution Parameter to 60 Hz to 20 Hz Oversample Mode 7-29 Section 7. Measurement Instructions 7-30 SDMAO4 (Source, Reps, SDMAdress) This instruction is used to set the voltage to an SDM-AO4 four-channel analog output device. The SDMAO4 instruction has the following parameters: Parameter & Data Type Enter Source The Source parameter is the variable that holds the voltage, in millivolts, which should be sent to the SDM-AO4. If multiple SDM-AO4s are to be triggered with one instruction, this parameter must be an array dimensioned to the size of the Reps. Reps The Reps parameter determines the number of SDM-AO4 devices to supply a voltage using this instruction. The SDM-A04s must have sequential SDM addresses if the Reps parameter is greater than 1. SDMAddress The SDMAddress parameter defines the address of the SDM-AO4 to which a voltage should be applied. Valid SDM addresses are 0 through 14. Address 15 is reserved for the SDMTrigger instruction. The SDM address is entered as a base 10 number, unlike older, jumper- settable SDM instruments that used base 4. SDMCAN (Dest, SDMAddress, TimeQuanta, TSEG1, TSEG2, ID, DataType, StartBit, NumBits, NumVals, Multiplier, Offset) The SDMCAN instruction is used to measure and control the SDM-CAN interface. Multiple SDM instructions may be used within a program. The initial function of the instruction is to configure the SDM-CAN interface when the datalogger program is compiled. Subsequent instructions can be used to determine what data is passed between the CAN-bus network and the datalogger, set and/or read the SDM-CAN's internal switches, and read and/or reset detected errors. The SDMTrigger instruction can be used to trigger simultaneous measurements from one or more SDM-CANs and other SDM devices connected to the datalogger. When the SDMTrigger instruction is encountered in a program, it broadcasts a special SDM message which causes all the SDM- CAN devices to copy the last data values captured from the CAN-bus into the working data buffers. Refer to the SDM-CAN manual for additional help. The CANBUS instruction has the following parameters: Parameter Enter & Data Type Dest The Dest parameter is a variable array in which to store the results of the measurement. It must be an array of sufficient size to hold all of the values that will be returned by the function chosen (defined by the DataType parameter). Section 7. Measurement Instructions Parameter Enter & Data Type 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 entered as a base 10 number, unlike older, jumper- settable SDM instruments that used base 4. TimeQuanta | Three time segments are used to set the bit rate and other timing parameters for the CAN-bus network, TimeQuanta, TSEG1, and TSEG2. These parameters are entered as integer numbers. The relationship between the three time segments is defined as: toit = tq + tose + trseG2 The first time segment, the synchronization segment (S-SG), is defined by the TimeQuanta parameter. To calculate a suitable value for TimeQuanta, use the following equation: TimeQuanta = t, *8*10° where tq = the TimeQuanta. There are between 8 and 25 time quanta in the bit time. The bit time is defined as 1/baud rate. TSEG1 The second time segment, TSEGI, is actually two time segments known as the propagation segment and phase segment one. The value entered is determined by the characteristics of the network and the other devices on the network. It can be calculated as: Tsgc1 = trseci / tq TSEG2 The third time segment, TSEG2 (the phase segment two), is defined by the TSEG2 parameter. The value of TSEG2 can be calculated using the equation: TsgG2 = trsgc2 /tq The relative values of TSEG1 and TSEG2 determine when the SDM-CAN samples the data bit. ID Each device on a CAN-bus network prefaces its data frames with an 11 or 29 bit identifier. The ID parameter is used to set this address. The ID is entered as a single decimal equivalent. Enter a positive value to signify a 29 bit ID or a negative value to signify an 11 bit ID. DataType The DataType parameter defines what function the CANBUS instruction will perform. This instruction can be used to collect data, buffer data for transmission to the CAN-bus, transmit data to the CAN-bus, read or reset error counters, read the status of the SDM-CAN, read the SDM-CAN's OS signature and version, send a remote frame, or read or set the SDM-CAN's internal switches. Enter the numeric value for the desired option: 7-31 Section 7, Measurement Instructions 7-32 Parameter Enter & Data Type Value Description 1 Retrieve data; unsigned integer, most significant byte first 2 Retrieve data; unsigned integer, least significant byte first 3 Retrieve data; signed integer, most significant byte first 4 Retrieve data; signed 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 existing data. 9 Build data frame in SDM-CAN memory; signed integer, most significant byte first. Overwrite existing data. 10 Build data frame in SDM-CAN memory; signed integer, least significant byte first. Overwrite existing data. 11 Build data frame in SDM-CAN memory; 4-byte IEEE floating point number; most significant byte first. Overwrite existing data. 12 Build data frame in SDM-CAN memory; 4-byte IEEE floating point number; least significant byte first. Overwrite existing data. 13 Build data frame in SDM-CAN memory; unsigned integer, most significant byte first. Logical "OR" with existing data. 14 Build data frame in SDM-CAN memory; unsigned integer, least significant byte first. Logical "OR" with existing data. 15 Build data frame in SDM-CAN memory; signed integer, most significant byte first. Logical "OR" with existing data. 16 Build data frame in SDM-CAN memory; signed integer, least significant byte first. Logical "OR" with existing data. 17 Build data frame in SDM-CAN memory; 4-byte IEEE floating point number; most significant byte first. Logical "OR" with existing data. 18 Build data frame in SDM-CAN memory; 4-byte IEEE floating point number; least significant byte first. Logical "OR" with existing data. 19 Transmit data value to the CAN-bus; unsigned integer, most significant byte first. 20 Transmit data value to the CAN-bus; unsigned integer, least significant byte first. 21 Transmit data value to the CAN-bus; signed integer, most significant byte first. 22 Transmit data value to the CAN-bus; signed integer, least significant byte first. 23 Transmit data value to the CAN-bus; 4-byte IEEE floating point number; most significant byte first. 24 Transmit data value to the CAN-bus; 4-byte IEEE floating point number; least significant byte first. 25 Transmit previously built data frame to the CAN-bus. 26 Set up previously built data frame as a Remote Frame Response. Section 7. Measurement Instructions Parameter & Data Type Enter 27 28 29 30 31 32 Read Transmit, Receive, Overrun, and Watchdog errors. The errors are placed consecutively in the array specified by the Dest parameter. 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. 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 SDM-CAN is involved in bus activities; one or more error counters is greater than or equal to 96. 0002 The SDM-CAN is not involved in bus activities; error counters are less than 96. 0003 The SDM-CAN is not involved in bus activities; one or more error counters is greater than or equal to 96. Read SDM-CAN operating system and version number; results are placed in two consecutive array variables beginning with the variable specified in the Dest parameter. Send Remote Frame Request. Set SDM-CAN's internal switches. The code is stored in the array specified in the Dest parameter and is entered in the form of ABCD. Switch Code Description A 0 Currently not used; set to 0. B 0 SDM-CAN returns the last value captured from the network, even if that value has been read before (default). 1 SDM-CAN returns -99999 if a data value is requested by the datalogger and a new value has not been captured from the network since the last request. 2-9 Currently not used. 0 Disable I/O interrupts (default). 1 Enable I/O interrupts, pulsed mode. 2 Enable I/O interrupts, fast mode. 3-7 Currently not used. 8 Place the SDM-CAN into low power stand-by mode Leave switch setting unchanged. D 0 Listen only (error passive) mode. CAN transmissions are not confirmed. 1 Transmit once. Data will not be retransmitted in case of error or loss of arbitration. Frames received without error are acknowledged. \o 7-33 Section 7. Measurement Instructions Parameter Enter & Data Type | 33 7 8 9 Self-reception. A frame transmitted from the SDM-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. 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 to use if the SDM- CAN is to be used to transmit data. Transmit once; self-test. The SDM-CAN will perform a successful transmission even if there is no acknowledgement from an external CAN node. Frames received correctly from an external node are acknowledged. Self-reception; self -test. The SDM-CAN will perform a successful transmission even if there is no acknowledgement from an external CAN node. Frames received correctly from an external node are acknowledged. SDM-CAN will receive its own transmission. Normal; self-test. The SDM-CAN will perform a successful transmission even if there is no acknowledgement from an external CAN node. Frames received correctly from an external node are acknowledged. Not defined. Not defined. Leave switch setting unchanged. Read SDM-CAN's internal switches. Place results in the array specified in the Dest parameter. StartBit frame. The StartBit parameter is used to identify the least significant bit of the data value within the CAN data frame to which the instruction relates. The bit number can range from 1 to 64 (there are 64 bits ina CAN data frame). The SDM-CAN adheres to the ISO standard where the least significant bit is referenced to the right most bit of the data frame. If a negative value is entered, the least significant bit is referenced to the left most bit of the data 7-34 Section 7. Measurement Instructions Parameter & Data Type NumBits Enter The NumBits parameter is used to specify the number of bits that will be used in a transaction. The number can range from | 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 number of bits, depending upon the data type selected. NumVals The NumVals parameter defines the number of values (beginning with the value stored in the Dest array) that will be transferred to or from the datalogger during one operation. For each value transferred, the Number of Bits (NumBits) will be added to the Start Bit number so that multiple values can be read from or stored to one data frame. Mult, Offset The Mult and Offset parameters are each a constant, variable, array, or expression by which to scale the results of the measurement. NOTE If more than one Canbus Instruction is used within a datalogger program, the values used for TimeQuanta, TSEG1 and TSEG2 must be the same for each instruction. CANBUS Example The following example reads a 16-bit engine speed value from a CAN-bus network running at 250K baud. 'Set Scan Rate Const Period=1 Const P_Units=2 "VVVVVVVVA\\\ CANBUS Constants //////////// '------------------------- Physical Network Parameters 'Set SDM-CAN to 250K Const TQUANT=4 Const TSEG1=5 Const TSEB2=2 ‘ Data Frame Parameters ‘ Canbus Block1 ‘Collect and retrieve 16-bit data value ‘Data Type 1, unsigned integer, most significant byte first Const CANREP1=1 'Repetitions Const ADDR1=0 ‘Address of SDM-CAN module Const DTYPE1I=1 ‘Data values to collect Const STBIT1=33 ‘Start position in data frame Const NBITS1=16 ‘Number of bits per value Const NVALS1=1 ‘Number of values Const CMULT1=0.4 "Multiplier 7-35 Section 7. Measurement Instructions Const COSET1=0 ‘Offset Dim CANBIk1(CANREP1) ‘Dimensioned Dest "\\\\\\\\\\\\ Aliases and other Variables //////// Alias Canblk1(1)=Engine_Speed "VVVVVVVAVVAVVV\ PROGRAM ////////////////1 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 SDMCD16AC (Source, Reps, SDMAddress) The SDMCD16AC instruction is used to control an SDM-CD16AC, SDM- CD16, or SDM-CD16D 16 channel relay/control port device. A port on an SDM-CD16xx is enabled/disabled (turned on or off) by sending a value to it using the SDMCD16AC instruction. A non-zero value will turn the port on; a zero value will turn it off. The values to be sent to the SDM- CD16AC are held in the Source array. Parameter & Data Type Source Array Reps Constant SDMAddress Constant Enter The array which holds the values that will be sent to the SDM-CD16AC to enable/disable its ports. An SDM-CD16AC has 16 ports; therefore, the source array must be dimensioned to 16 times the number of Repetitions (the number of SDM-CD16AC devices to be controlled). As an example, with the array CDCtrl(32), the value held in CDCtrl(1) will be sent to port 1, the value held in CDCtrl(2) will be sent to port 2, etc. The value held in CDCtrl(32) would be sent to port 16 on the second SDM-CD16AC.. The Reps parameter is the number of SDM-CD16AC devices to be controlled with this instruction. The address of the first CD16AC that will be controlled with this instruction. Valid SDM addresses are 0 through 15. If the SDMTrigger instruction is used in the program, address 15 should not be used. If the Reps parameter is greater than 1, the datalogger will increment the SDM address for each subsequent device that it communicates with. SDMINTS8 (Dest, Address, Config8_5, Config4_1, Funct8_5, Funct4_1, OutputOpt, CaptureTrig, Mult, Offset ) 7-36 This Instruction allows the use of the SDM-INTS8, 8 Channel Interval Timer, with the CR1000. The SDM-INTS is a (S)ynchronous (D)evice for the (M)easurement of intervals, counts between events, frequencies, periods, and/or time since an event. See the SDM-INT8 manual for more information about its capabilities. Section 7. Measurement Instructions Parameter & Data Type Dest Variable or Array Enter The array where the results of the instruction are stored. For all output options except Capture All Events, the Dest argument should be a one- dimensional array with as many elements as there are programmed INT8 channels. If the "Capture All Events" OutputOption is selected, then the Dest array must be two dimensional. The magnitude of first dimension should be set to the number of functions (up to 8), and the magnitude of the second dimension should be set to at least the number of events to be captured. The values will be loaded into the array in the sequence of all of the time ordered events captured from the lowest programmed channel to the time ordered events of the highest programmed channel. Address Constant The address is entered as a base 10 number. Valid addresses are 0 to 15. The INTS8 is addressable using internal jumpers. The jumpers are set at the factory for address 00. See Appendix A of the INT8 manual for details on changing the INT8 address. Config8_5 Config4 1 Constants Each of the 8 input channels can be configured for either high or low level voltage inputs, and for rising or falling edges. Config8_5 is a four digit code to configure the INT8's channels 5 through 8. Config4_1 is a four digit code to configure the INT8'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 low level voltage signals. Digit | Edge High level, rising edge High level, falling edge Low level, rising edge Low level falling edge Funct8_5 Funct4_1 Constants Each of the 8 input channels can be independently programmed for one of eight different timing functions. Funct8_5 is a four digit code to program the timing functions of INT8 channels 5 through 8. Funct4_1 is a four digit code to program the timing functions of INT8 channels | through 4. See section 5.3 of the INT8 manual for further details about these functions. Digit | Results 0 None il Period (msec) between edges on this channel 2 Frequency (kHz) of edges on the channel 3 Time between an edge on the previous channel and the edge on this channel (msec) 4 time between an edge on channel | and the edge on this channel (msec) 3 Number of edges on channel 2 between the last edge on channel 1 and the edge on this channel using linear interpolation 6 Low resolution frequency (kHz) of edges on this channel 7 Total number of edges on this channel since last interrogation 8 Integer number of edges on channel 2 between the last edge on channel 1 and the edge on this channel. 7-37 Section 7. Measurement Instructions 7-38 Parameter & Data Type Enter For example, 4301 in the second function parameter means to return 3 values: the period for channel 1, (nothing for channel 2) the time between an edge on channel 2 and an edge on channel 3, and the time between an edge on channel | and an edge on channel 4. The values are returned in the sequence of the channels, 1 to 16. Note: the destination array must be dimensioned large enough to hold all the functions requested. OutputOpt Code to select one of the five different output options. The Output Option that is selected will be applied to the data collection for all of the INT8 channels. The numeric code for each option is listed below with a brief explanation of each. See the INT8 manual for detailed explanations of each option. Code | Result 0: Average of the event data since the last time that the INT8 was interrogated by the datalogger. If no edges were detected, 0 will be returned for frequency and count functions, and 99999 will be returned for the other functions. The INT8 ceases to capture events during communications with the logger, thus some edges may be lost. 32768 | Continuous averaging, which is utilized when input frequencies 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 "”nnn" milliseconds. The datalogger program is delayed by this instruction while the INT8 captures and processes the edges for the specified time duration and sends the results back to the logger. If no edges were detected, 0 will be returned for frequency and count functions, and 99999 will be returned for the other functions. -nnnn | Instructs the INT8 to capture all events until "nnn" edges have occurred on channel 1, or until the logger addresses the INT8 with the CaptureTrig argument true, or until 8000 (storage space limitation) events have been captured. When the CaptureTrig argument is true, the INT8 will return up to the last nnnn events for each of the programmed INTS8 channels, reset its memory and begin capturing the next nnnn events. The Dest array must be dimensioned large enough to receive the captured events. -9999 | Causes the INT8 to perform a self memory test. The signature of the INT8's PROM is returned to the datalogger. RESULT CODE DEFINITION 0 Bad ROM -0 Bad ROM, & bad RAM positive integer ROM signature, good RAM negative integer ROM signature, bad RAM Section 7. Measurement Instructions Parameter Enter & Data Type CaptureTrig | This argument is used when the "Capture All Events" output option is used. Constant, When CaptureTrig is true, the INT8 will return the last nnnn events. Variable, or Expression Mult, Offset | A multiplier and offset by which to scale the raw results of the Constant, measurement. See the measurement description for the units of the raw Variable, result; a multiplier of one and an offset of 0 are necessary to output in the Array, we raw units. For example, the TCDiff instruction measures a thermocouple Expression and outputs temperature in degrees C. A multiplier of 1.8 and an offset of 32 will convert the temperature to degrees F. SDMIO16 (Dest, Status, Address, Command, Mode Ports 16-13, Mode Ports 12-9, Mode Ports 8-5, Mode Ports 4-1, Mult, Offset) The SDMIO16 instruction is used to set up and measure an SDM-IO16 control port expansion device. The ports on the SDM-IO16 can be configured for either input or output. When configured as input, the SDM-IO16 can measure the logical state of each port, count pulses, and measure the frequency of and determine the duty cycle of applied signals. The module can also be programmed to generate an interrupt signal to the datalogger when one or more input signals change state. When configured as an output, each port can be set to 0 or 5 V by the datalogger. In addition to being able to drive normal logic level inputs, when an output is set high a ‘boost’ circuit allows it to source a current of up to 100 mA, allowing direct control of low voltage valves, relays, etc. Parameter Enter & Data Type Dest The variable or variable array in which to store the results of the measurement (Command codes | - 69, 91, 92, 99) or the Source value for the Command Codes (70 - 85, 93 - 98). The variable array for this parameter must be dimensioned to accommodate the number of values returned (or sent) by the instruction. Status The variable in which to store the result of the command issued by the instruction. If the command is successful a 0 is returned; otherwise, the value is incremented by 1 with each failure. SDMAddress | The SDMAddress parameter defines the address of the SDM-IO16 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 SDM-IO16 that it communicates with. Note: CRBasic dataloggers use base 10 when addressing SDM devices. Edlog programmed dataloggers (e.g., CR10X, CR23X) used base 4 for addressing. 7-39 Section 7. Measurement Instructions Parameter Enter & Data Type Command The following are valid command options: Command Code Description 1 Read port 1's accumulated counts into Dest 2 Read port 2's accumulated counts into Dest 3 Read port 3's accumulated counts into Dest 4 Read port 4's accumulated counts into Dest 5) Read port 5's accumulated counts into Dest 6 Read port 6's accumulated counts into Dest 7 Read port 7's accumulated counts into Dest 8 Read port 8's accumulated counts into Dest 9 Read port 9's accumulated counts into Dest 10 Read port 10's accumulated counts into Dest 11 Read port 11's accumulated counts into Dest 12 Read port 12's accumulated counts into Dest 13 Read port 13's accumulated counts into Dest 14 Read port 14's accumulated counts into Dest 15 Read port 15's accumulated counts into Dest 16 Read port 16's accumulated counts into Dest 17 Read ports 1-4's accumulated counts into Dest (Dest must be dimensioned to 4) 18 Read ports 5-8's accumulated counts into Dest (Dest must be dimensioned to 4) 19 Read ports 9-12's accumulated counts into Dest (Dest must be dimensioned to 4) 20 Read ports 13-16's accumulated counts into Dest (Dest must be dimensioned to 4) 21 Read ports 1-8's accumulated counts into Dest (Dest must be dimensioned to 8) 22 Read ports 9-16's accumulated counts into Dest (Dest must be dimensioned to 8) 23 Read ports 1-16's accumulated counts into Dest (Dest must be dimensioned to 16) 24 Read port 1's frequency into Dest 25 Read port 2's frequency into Dest 26 Read port 3's frequency into Dest 27 Read port 4's frequency into Dest 28 Read port 5's frequency into Dest 29 Read port 6's frequency into Dest 30 Read port 7's frequency into Dest 31 Read port 8's frequency into Dest 32 Read port 9's frequency into Dest 33 Read port 10's frequency into Dest 34 Read port 11's frequency into Dest 35 Read port 12's frequency into Dest 36 Read port 13's frequency into Dest 37 Read port 14's frequency into Dest 7-40 Section 7. Measurement Instructions Parameter Enter & Data Type 38 Read port 15's frequency into Dest 39 Read port 16's frequency into Dest 40 Read ports 1-4's frequency into Dest (Dest must be dimensioned to 4) 41 Read ports 5-8's frequency into Dest (Dest must be dimensioned to 4) 42 Read ports 9-12's frequency into Dest (Dest must be dimensioned to 4) 43 Read ports 13-16's frequency into Dest (Dest must be dimensioned to 4) 44 Read ports 1-8's frequency into Dest (Dest must be dimensioned to 8) 45 Read ports 9-16's frequency into Dest (Dest must be dimensioned to 8) 46 Read ports 1-16's frequency into Dest (Dest must be dimensioned to 16) 47 Read port 1's duty cycle into Dest 48 Read port 2's duty cycle into Dest 49 Read port 3's duty cycle into Dest 50 Read port 4's duty cycle into Dest Si Read port 5's duty cycle into Dest 52, Read port 6's duty cycle into Dest 53 Read port 7's duty cycle into Dest 34 Read port 8's duty cycle into Dest 55 Read port 9's duty cycle into Dest 56 Read port 10's duty cycle into Dest 57 Read port 11's duty cycle into Dest 58 Read port 12's duty cycle into Dest 59 Read port 13's duty cycle into Dest 60 Read port 14's duty cycle into Dest 61 Read port 15's duty cycle into Dest 62 Read port 16's duty cycle into Dest 63 | Read ports 1-4's duty cycle into Dest (Dest must be dimensioned to 4) 64 Read ports 5-8's duty cycle into Dest (Dest must be dimensioned to 4) 65 Read ports 9-12's duty cycle into Dest (Dest must be dimensioned to 4) 66 Read ports 13-16's duty cycle into Dest (Dest must be dimensioned to 4) 67 Read ports 1-8's duty cycle into Dest (Dest must be dimensioned to 8) 68 Read ports 9-16's duty cycle into Dest (Dest must be dimensioned to 8) 69 Read ports 1-16's duty cycle into Dest (Dest must be dimensioned to 16) [70 Set port 1's debounce time from Dest 7-41 Section 7. Measurement Instructions 7-42 Parameter Enter & Data Type 71 Set port 2's debounce time from Dest 72 Set port 3's debounce time from Dest 73 Set port 4's debounce time from Dest 74 Set port 5's debounce time from Dest 75 Set port 6's debounce time from Dest 76 Set port 7's debounce time from Dest 71 Set port 8's debounce time from Dest 78 Set port 9's debounce time from Dest 79 Set port 10's debounce time from Dest 80 Set port 11's debounce time from Dest 81 Set port 12's debounce time from Dest 82 Set port 13's debounce time from Dest 83 Set port 14's debounce time from Dest 84 Set port 15's debounce time from Dest 85 Set port 16's debounce time from Dest 86 Set port 16-13 from Mode parameter 87 Set port 12-9 from Mode parameter 88 Set port 8-5 from Mode parameter 89 Set port 4-1 from Mode parameter 90 Set port 16-1 from Mode parameters 91 Read state of ports 1-16 into one variable (Dest). The result is a 16 bit decimal representation from 0-65535. 92 Read state of ports 1-16 into 16 separate variables (Dest must be dimensioned to 16). Dest(1) holds the state of port 1, Dest(2) port 2, etc. State is represented by 0 or 1. 93 Set state of ports 1-16 from a single variable (Dest). Dest should be a 16 bit decimal representation from 0-65535. 94 Set state of ports 1-16 from 16 separate variables (Dest must be dimensioned to 16). Dest(1) sets the state of port 1, Dest(2) port 2, etc. State is represented by 0 or 1. 95 Set direction of ports 1-16 from a single variable (Dest). Dest should be a 16 bit decimal representation from 0- 65535. 96 Set direction of ports 1-16 from 16 separate variables (Dest must be dimensioned to 16). Dest(1) sets the direction of port 1, Dest(2) port 2, etc. Direction is represented by 0 or 1. 97 Set interrupt mask of ports 1-16 from a single variable (Dest). Dest should be a 16 bit decimal representation from 0-65535. 98 Set interrupt mask of ports 1-16 from 16 separate variables (Dest should be dimensioned to 16). Dest(1) sets port 1, Dest(2) port 2, etc. The mask is represented by 0 or 1. 99 Read the OS signature, OS version and counters for watchdog resets and communication errors into 4 separate variables (Dest must be dimensioned to 4). Using this command also resets the counters. Section 7. Measurement Instructions Parameter Enter & Data Type Mode The Mode parameter configures a bank of four ports when a Command code 86 through 90 is used (if any other Command Code is used, enter 0 for the Mode). Mode is entered as four digits, where each digit indicates the setting for a port. Ports are represented from the highest port number to the lowest, from left to right (e.g., 16 15 14 13; 12 11 109;8765;4321). There isa Mode for Ports 16 - 13, 12 - 9, 8-5, and4- 1. The valid codes are: Code _| Description 0 Output logic low 1 Output logic high | 2 | Input digital, no debounce filter | 3 Input switch closure 3.17 msec debounce filter 4 Input digital interrupt enabled, no debounce filter 5 Input switch closure interrupt enabled 3.17 msec, debounce filter 6 Undefined a Undefined 8 Undefined 9 No change Mult, Offset | The Mult and Offset parameters are each a constant, variable, array, or expression by which to scale the results of the measurement. SDMSIO4 (Dest, Reps, SDMAddress, Mode, Command, Param1, Param2, ValuesPerRep, Multiplier, Offset) The SDMSIO4 instruction is used to control and transmit/retrieve data from a Campbell Scientific SDM-SIO4 Interface (4 Channel Serial Input/Output device). See the SDM-SI04 Serial Input Interface manual for operation details. For instructions used for serial input and output without the SDM-SIO4, see Section 12. Parameter Enter & Data Type Dest The Dest parameter is the variable in which to store the results of the instruction when retrieving data from the SIO4. If data is being sent to the S104, then Dest becomes the source array for the data to be sent. The Dest array must be at least as large as the Reps parameter value multiplied by the ValuesPerRep parameter value. Reps The Reps parameter defines the number of sequential SIO4s that will be called by the instruction. The datalogger will poll the SIO4 with the address set by the Address parameter first, receive or send the number of values set by the ValuesPerRep parameter next, and then poll the SIO4 with the next sequential address. If the Reps parameter is 2, the ValuesPerRep is 3, and the Command parameter is set to receive, then three values from the first SIO4 would be sent to the first three elements of the Dest array, and three values from the second SIO4 would be received and written to the forth through sixth elements of the Dest array. 7-43 Section 7. Measurement Instructions 7-44 Parameter Enter & Data Type SDMAddress | The SDMAddress parameter defines the address of the SIO4 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 S104 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 The mode parameter defines which port the instruction will affect. Code Description 1 Send/Receive Port 1 2 Send/Receive Port 2 3 Send/Receive Port 3 4 Send/Receive Port 4 5 Send to all Ports (global) Command The Command parameter is used to configure the SIO4. The commands are listed briefly below. See the SDM-SIO4 manual for details. Code Description 1 Poll of available data. 2 Get EPROM and memory signatures. 3 Flush all receive buffers. 4 Send data to datalogger. 5 Return number of watchdog errors, invalid command executed, and lithium battery voltage. 6 Flush transmit buffer. 7 Activate command line. 8 Poll TX buffers for data. 9 Flush converted data buffer. 66 Send single-byte data to datalogger. 67 Get return code. 320 Send byte data to SDM-SIO4. 321 Execute command line command. 1024 Send string to S104. 1025 Transmit a byte. 1026 Serial port status. 1027 Manual handshake mode. 2049 Communication parameters. 2054 Set up receive filter. 2304 Transmit string and/or data to device (formatter/filter). 2305 Transmit bytes. Param1 Param] is the first parameter that should be passed on to the SIO4 for the selected Command. Refer to the SDM-SIO4 manual for details. Param2 Param2 is the second parameter that should be passed on to the SIO4 for the selected Command. Refer to the SDM-SIO4 manual for details. ValuesPerRep | The ValuesPerRep parameter is the number of values to be sent or received from each SIO4 each time this instruction is performed. Mult, Offset | These parameters are the multiplier and offset with which to scale the values received by the datalogger from the SIO4. Section 7. Measurement Instructions SDMSpeed (BitPeriod) Changes the rate that the CR1000 uses to clock the SDM data. Slowing down the clock rate may be necessary when long cables lengths are used to connect the CR1000 and SDM devices. Parameter Enter & Data Type BitPeriod The time per bit, in microseconds. The shortest allowable BitPeriod is 30 Constant or us. Thirty microseconds is the default BitPeriod if the SDMSpeed variable Instruction is not in the program. SDMTrigger When SDMTrigger is executed, the CR1000 sends a "measure now" group trigger to all connected SDM devices. SDM stands for Synchronous Device for Measurement. SDM devices make measurements independently and send the results back to the datalogger serially. The SDMTrigger instruction allows the CR1000 to synchronize when the measurements are made. Subsequent Instructions communicate with the SDM devices to collect the measurement results. Not all SDM devices support the group trigger; check the manual on the device for more information. SDMSW8A (Dest, Reps, SDMAddress, FunctOp, SW8AStartChan, Mult, Offset) The SW8A instruction is used to control the SDM-SW8A Eight-Channel Switch Closure module, and store the results of its measurements to a variable array. Parameter Enter & Data Type Dest The variable in which to store the results of the SW8A measurement. The Variable or variable array for this parameter must be dimensioned to the number of Array Reps. Reps The number of channels that will be read on the SW8A. If (StartChan Constant +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_ | The address of the first SW8A with which to communicate. Valid SDM Constant addresses are 0 through 15. If the SDMTrigger instruction is used in the program, address 15 should not be used. If the Reps parameter used more channels than are available on the first SW8A, the datalogger will increment the SDM address for each subsequent device that it communicates with. 7-45 Section 7. Measurement Instructions 7-46 Parameter Enter & Data Type FunctOp The FunctOp is used to determine the result that will be returned by the Constant SW8A. Numeric | Function Code 0 Returns the state of the signal at the time the instruction is executed. A 0 is stored for low and a 1 is stored for high. I Retums the duty cycle of the signal. The result is the percentage of time the signal is high during the scan interval. 2 Returns a count of the number of positive transitions of the signal. 3 Returns a value indicating the condition of the module: positive integer: ROM and RAM are good negative value: RAM is bad Zero: ROM is bad StartChan The first channel that should be read on the SW8A. If the Reps parameter is Constant | greater than 1, measurements will be made on sequential channels. Mult, Offset A multiplier and offset by which to scale the raw results of the measurement. See Constant, the measurement description for the units of the raw result; a multiplier of one and an Variable, offset of 0 are necessary to output in the raw units. For example, the TCDiff Array, or instruction measures a thermocouple and outputs temperature in degrees C. A Expression multiplier of 1.8 and an offset of 32 will convert the temperature to degrees F. SDMX50 (SDMAddress, Channel) SDMX5S0 allows individual multiplexer switches to be activated independently of the TDR100 Instruction. SDMX5S0 is useful for selecting a particular probe to troubleshoot or to determine the apparent cable length. Because it is usually easy to hear the multiplexer(s) switch, the SDMX50 instruction is a convenient method to test the addressing and wiring of a level of multiplexers: Program the datalogger to scan every few seconds with the SDM address for the multiplexer(s) and channel 8. The Instruction always starts with channel 1 and switches through the channels to get to the programmed channel. Switching to channel 8 will cause the most prolonged noise. Remember each multiplexer level has a different SDM Address. Level 1 multiplexers should be set to the address 1 greater than the TDR100, Level 2 multiplexers should be set to the address 2 greater than the TDR100 and Level 3 multiplexers should be set to the address 3 greater than the TDR100. If the SDMX50 multiplexers for a given level are connected and have their addresses set correctly they should all switch at the same time. Section 7. Measurement Instructions Parameter Enter & Data Type SDMAddress | The SDMAddress of the SDMX50 to switch. Valid SDM addresses are 0 Constant through 14. Channel The SDMX50 channel to switch to (1-8) Constant TDR100 (Dest, SDMAddress, Option, Mux/ProbeSelect, WaveAvg, Vp, Points, CableLength, WindowLength, ProbeLength, ProbeOffset, Mult, Offset) This instruction can be used to measure one TDR probe connected to the TDR100 directly or multiple TDR probes connected to one or more SDMX50 multiplexers. Parameter & Data Type Dest Enter The Dest parameter is a variable or variable array in which to store the results of the measurement. The variable must be dimensioned to accommodate all of the values returned by the instruction, which is determined by the Option parameter. SDMAddress The SDMAddress parameter defines the address of the TDR100 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 TDR100 that it communicates with. Note: CRBasic dataloggers are programmed using the base 10 address (0- 14) Edlog programmed dataloggers (e.g., CR10X, CR23X) used base 4 Option The Option parameter determines the output of the instruction. Code_| Description 0 Measure La/L (ratio of apparent to physical probe rod length) 1 Collect Waveform values - Outputs reflection waveform values as an array of floating point numbers with a range of -1 to 1. The waveform values are prefaced by a header containing values of key parameters for this instruction (averaging, propagation velocity, points, cable length, window length, probe length, probe offset, multiplier, offset) 2 Collect Waveform plus First Derivative - Returns (2*n-5)+9 values where n is the number of waveform reflection values specified by the Points parameter. 3 Measure Electrical Conductivity - Outputs a value that when multiplied by the Multiplier parameter determines soil bulk electrical conductivity in S/m. Mux/ ProbeSelect The Mux/Probe Select parameter is used to define the setup of any multiplexers and attached probes in the system. The addressing scheme used is ABCR, where A = level 1 multiplexer channel, B = level 2 multiplexer channel, C = level 3 multiplexer channel, and R = the number of consecutive probes to be read, starting with the channel specified by the ABC value (maximum of 8). 0 is entered for any level not used. 7-47 Section 7. Measurement Instructions 7-48 Parameter & Data Type Enter WaveAvg The WaveAvg parameter is used to define the number of waveform reflections averaged by the TDR100 to give a single result. A waveform averaging value of 4 provides good signal-to-noise ratio under typical applications. Under high noise conditions averaging can be increased. The maximum averaging possible is 128. The Vp parameter allows you to enter the propagation velocity of a cable when using the instruction to test for cable lengths or faults. Vp adjustment is not necessary for soil water content or electrical conductivity measurement and should be set to 1.0 for output Option 1, 2, or 3. Points The Points parameter is used to define the number of values in the displayed or collected waveform (20 to 2048). An entry of 251 is recommended for soil water measurements. The waveform consists of the number of Points equally spaced over the WindowLength. CableLength The CableLength parameter is used to specify the cable length, in meters, of the TDR probes. Ifa 0 is entered for the Option parameter, cable length is used by the analysis algorithm to begin searching for the TDR probe. Ifa 1 or 2 is entered for the Option parameter, cable length is the distance to the start of the collected waveform. The value used for CableLength is best determined using PCTDR100 with the Vp = 1.0. Adjust the CableLength and WindowLength values in PCTDR100 until the probe reflection can be viewed. Subtract about 0.5 meters from the distance associated with the beginning of the probe reflection. Note that the specified CableLength applies to all probes read by this instruction; therefore, all probes must have the same cable lengths. WindowLength The WindowLength parameter specifies the length, in meters, of the waveform to collect or analyze. The waveform begins at the CableLength and ends at the CableLength + WindowLength. This is an apparent length because the value set for Vp may not be the actual propagation velocity. For water content measurements, the WindowLength must be large enough to contain the entire probe reflection for probes with 20 to 30 cm rods. A Vp = 1 and Window length = 5 is recommended. ProbeLength The ProbeLength parameter specifies the length, in meters, of the probe rods that are exposed to the medium being measured. The value of this parameter only has an affect when Option 0, La/L, is used for the measurement. ProbeOffset The ProbeOffset is an apparent length value used to correct for the portion of the probe rods that may be encapsulated in epoxy and not surrounded by soil or other medium being measured. This value is supplied by Campbell Scientific for the probes we manufacture. The value of this parameter only has an affect when Option 0, La/L, is used for the measurement. Mult, Offset The Mult and Offset parameters are each a constant, variable, array, or expression by which to scale the results of the measurement. Section 8. Processing and Math Instructions ABS (Source) Operators i Raise to Power 7 Multiply / Divide + Add - Subtract = Equals > Not Equal > Greater Than < Less Than >= Greater Than or Equal <= Less Than or Equal Returns the absolute value of a number. Syntax x= ABS (source) Remarks Source can be any valid numeric expression. The absolute value of a number is its unsigned magnitude. For example, ABS(-1) and ABS(1) both return 1. ABS Function Example The example finds the approximate value for a cube root. It uses ABS to determine the absolute difference between two numbers. Dim Precision, Value, X, X1, X2 ‘Declare variables. Precision = .00000000000001 Value = Volt(3) 'Volt(3) will be evaluated. X1 = 0: X2 = Value 'Make first two guesses. ‘Loop until difference between guesses is less than precision. Do Until Abs(X1 - X2) < Precision X= (X1 + X2)/2 If X * X * X - Value < 0 Then ‘Adjust guesses. X1=X Else X2=X End If Loop 'X is now the cube root of Volt(3). 8-1 Section 8. Processing and Math Instructions 8-2 ACOS (Source) The ACOS function returns the arc cosine of a number. Syntax x = ACOS (source) Remarks The source can be any valid numeric expression that has a value between -1 and | inclusive. The ACOS function takes the ratio of two sides of a right triangle and returns the corresponding angle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse. The result is expressed in radians and is in the range -7/2 to 7/2 radians. To convert degrees to radians, multiply degrees by 7/180. To convert radians to degrees, multiply radians by 180/z. ACOS is the inverse trigonometric function of COSINE, 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 x. By definition, a full circle is 2x radians. ACOS(0) is 7/2 radians (90 degrees). Public Pi ‘Declare variables. Pi=2 * ACOS( 0) ‘Calculate Pi. AddPrecise (PrecisionVariable, X) The AddPrecise function allows you to do high precision totalizing of variables or manipulation of high precision variables. Syntax AddPrecise ( PrecisionVariable, X ) Remarks In this function, the variable X is added to the PrecisionVariable. Every reference to the PrecisionVariable will cause a 32 bit extension of its mantissa to be saved and used internally. A normal single precision float has 24 bits of mantissa; therefore, this new precision is 56 bits. This function can be useful when trying to find the difference between two high precision variables. PrecisionVariable The PrecisionVariable is the variable that will be affected by the precision add. Xx The X variable is the value that will be added to the PrecisionVariable. It may or may not be a high precision variable, depending upon whether it has been declared as such in a previous AddPrecise or MovePrecise instruction. AND Section 8. Processing and Math Instructions Used to perform a logical conjunction on two expressions. Syntax result = expr] And expr2 Remarks If, and only if, both expressions evaluate True, result is True. If either expression evaluates False, result is False. The following table illustrates how result is determined: Ifexprl is | And expr2is | The result is True True True True False False False True False False False False The And operator also performs a bit-wise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in result according to the following truth table: If bit in expr] is | And bitin expr2is | The result is 0 0 0 0 1 0 1 0 0 1 1 1 And Operator Example The example assigns a value to Msg that depends on the value of variables A, B, and C, assuming that no variable is a Null. If A= 10, B = 8, and C= 6, both expressions evaluate True. Because both expressions are True, the And expression is also True. Dim A, B, C, Msg ‘Declare variables. A=10:B=8:C=6 ‘Assign values. If A>B And B>C Then ‘Evaluate expressions. Msg = True Else Msg = False End If 8-3 Section 8. Processing and Math Instructions 8-4 ASIN (Source) ATN (Source) The ASIN function returns the arc sin of a number. Syntax x = ASIN (source) Remarks Source can 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 -1/2 to 1/2 radians. To convert degrees to radians, multiply degrees by 7/180. To convert radians to degrees, multiply radians by 180/r. ASIN is the inverse trigonometric function of Sin, which takes an angle as its argument and returns the length ratio of the side opposite the angle to the hypotenuse. ASIN Function Example The example uses ASIN to calculate x. By definition, a full circle is 27 radians. ASIN(1) is 2/2 radians (90 degrees). Public Pi ‘Declare variables. Pi=2 * ASin(1 ) ‘Calculate Pi. Returns the arctangent of a number. Syntax x = ATN (source) Remarks Source can be any valid numeric expression. The Atn 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 the angle divided by the length of the side adjacent to the angle. The result is expressed in radians and is in the range -7/2 to 7/2 radians. To convert degrees to radians, multiply degrees by 7/180. To convert radians to degrees, multiply radians by 180/z. Atn is the inverse trigonometric function of Tan, which takes an angle 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). Section 8. Processing and Math Instructions ATN2() Atn FunctionExample The example uses Atn to calculate x. By definition, a full circle is 27 radians. Atn(1) is 2/4 radians (45 degrees). Dim Pi "Declare variables. Pi=4 * Atn(1) ‘Calculate Pi. The ATN2 function returns the arctangent of y/x. Syntax x= ATN2(Y, X) Remarks ATN2 function calculates the arctangent of Y/X returning a value in the range from Pi to -Pi radians, using the signs of both parameters to determine the quadrant of the return value. ATN2 is defined for every point other than the origin (X = 0 and Y = 0). Y and X can be variables, constants, or expressions. To convert degrees to radians, multiply degrees by 7/180. To convert radians to degrees, multiply radians by 180/n. Pi/2 -Pi/2 ATN2 is the inverse trigonometric function of TAN, which takes an angle as its argument and returns the ratio of two sides of a right triangle. Do not confuse ATN2 with the cotangent, which is the simple inverse of a tangent (I/tangent). ATN2 Function Example The example uses ATN2 to calculate x. By definition, a full circle is 2x radians. ATN2(1,1) is 7/4 radians (45 degrees). Dim Pi ‘Declare variables. Pi=4 * ATN2(5, 5) ‘Calculate Pi. 8-5 Section 8. Processing and Math Instructions 8-6 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., Temp(1)); it is the first element in the array to include in the average. The Swath is the number of elements to include in the average. ee X(i) Dest= swath Where X(j) = Source Parameter Enter & Data Type Dest The variable in which to store the results of the instruction. Variable Swath The number of values of the source array to average. Constant Source The name of the variable array that is the input for the instruction. Array Average Spatial Output Example This example uses AvgSpa to find the average value of the five elements Temp(6) through Temp(10) and store the result in the variable AvgTemp. AvgSpa(AvgTemp, 5, Temp(6)) AvgRun (Dest, Reps, Source, Number) Calculates a running average of a measurement or calculated value. Syntax AvgRun (Dest, Reps, 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. yn % Dest = es N Where X y is the most recent value of the source variable and X, y-1 1s the previous value (_X, is the oldest value included in the average, i.e., N-1 values back from the most recent). Section 8. Processing and Math Instructions Parameter Enter & Data Type Dest The variable or array in which to store the average(s). Variable or Array Reps When the source is an array, this is the number of variables in the array to Constant calculate averages for. When the source is not an array or only a single variable of the array is to be averaged, reps should be 1. Number The number of values to include in the running average. Constant Source The name of the variable or array that is to be averaged. Array Cos (Source) Example BeginProg ‘Program begins here Scan( RATE, RUNITS, 0,0) 'Scan 1(mSecs), ' Volt Blocks VoltDiff(HiVolts, VREP1, VRNG1, 5, 1,0, VDLY1, VINT1, VMULT1, VOSET1) AvgRun(AvgOut,1,HiVolts,100 ) 'Put the average of 100 HiVolts in AvgOut CallTable MAIN 'Go up and run Table MAIN Next Scan ‘Loop up for the next scan EndProg ‘Program ends here Returns the cosine of an angle specified in radians. Syntax x = Cos (source) Remarks Source can be any valid numeric expression measured in radians. The Cos function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side 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 7/180. To convert radians to degrees, multiply radians by 180/r. Cos Function Example 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) ‘Calculate Pi. Degrees = Volts(1) 'Get value to convert. Radians = Degrees * (Pi/ 180) ‘Convert to radians. Ans = Cos(Radians) ‘The Cosine of Degrees. EndProg 8-7 Section 8. Processing and Math Instructions CosH (Source) The COSH function returns the hyperbolic cosine of an expression or value. Syntax x = COSH (source) Remarks The COSH function takes a value and returns the hyperbolic cosine [COSH(x) = 0.5(ex + e-x)] for that value. COSH Function Example The example uses COSH to calculate the hyperbolic cosine of a voltage input and store the result in the Ans variable. Public Voltl, Ans ‘Declare variables. BeginProg Scan (1,Sec,3,0) VoltDiff (Volt1,1,mV5000,1,True ,200,500,1.0,0) ‘Return voltage on DiffChan1 Ans = COSH( Volt1 ) NextScan EndProg Spatial Covariance The CovSpa instruction computes the covariance(s) of sets of data that are loaded into arrays. Syntax CovSpa(Dest, NumOfCov, SizeOfSets, CoreArray; DatArray) CovSpa calculates the covariance(s) between the data in the CoreArray and one or more data sets in the DatArray. The covariance of the sets of data X and Y is calculated as: Dixy, YX DY, Cov(X, Y) = = - #1 | n n Where n is the number of values in each data set (SizeofSets). X, and Y, are the individual values of X and Y . Section 8. Processing and Math Instructions Parameter Enter & Data Type Dest The Variable in which to store the results of the instruction. When multiple covariances are Variable or calculated, the results are stored in an array with the variable name. An array must be Array dimensioned to at least the value of NumOfCov. NumOfCov | The number of covariances to be calculated. If four data sets are to be compared against a Constant fifth set, this would be set to four. SizeOfSets The number of values in the data sets for the covariance calculations. Constant CoreArray The array that holds the core data set. The covariance of core data with each of the other sets Array is calculated independently. The data need to be consecutive in the array. If the first data value is not the first point of the array, the first point of the data set must be specified in this | parameter. DatArray The array that contains the data set(s) for calculating the covariance with the CoreSet. When Array multiple covariances are calculated, the data sets have to be loaded consecutively into one array. The array must be dimensioned to at least the value of NumOfCov multiplied by SizeOfSets. For example, if each set of data has 100 elements (SizeOfSets), and there are 4 covariances (NumOfCov) to be calculated, then the DatArray needs to be dimensioned to 4 x 100 = 400. If the first value of the first set is not the first point of the array, the first point of the data set must be specified in this parameter. DewPoint (Dest, Temp, RH) Parameter Enter & Data Type Dest The variable in which to store the dew point temperature (°C). Variable Temp The variable that contains air temperature (°C). Variable RH The variable that contains RH (%). | The dew point instruction calculates the dew point temperature from previously measured values of RH and air temperature. While end results may not be quite as accurate as those from a dedicated dew point sensor, they are acceptable for a wide range of applications. Calculating Dew Point Measure the relative humidity (RH) and air temperature (T,; units °C) with the appropriate instruction for the sensors you are using. Dew point temperature is calculated as follows: 1. The saturation vapor pressure (S,,; units kPa) is calculated using Lowe’s equation (see SatVP). 2. The vapor pressure (V,; units kPa) is calculated from V, = RH * S,,/ 100). 3. The dew point (Td; units °C) is calculated from the inverse of a version of Tetens’ equation, optimized for dewpoints in the range -35 to 50°C: 8-9 Section 8. Processing and Math Instructions 8-10 smo vEMH AZ-OV °C 10: +20: -304 40: -50: 60: T,=(C, *In(v,/C))/(C,. In(v,/C,)) where: C, = 0.61078 C, = 17.558 C, = 241.88 Error in the Estimation of Dew Point Tetens’ equation is an approximation of the true variation of saturated vapor pressure as a function of temperature. However, the errors in using the inverted form of the equation result in dew point errors much less than 0.1°C. The largest component of error, in reality, comes from errors in the absolute calibration of the temperature and RH sensor. Figure 8-1 shows how dew point varies as a function of temperature and humidity. It can be seen that the response is non-linear with respect to both variables. Errors in the measurement of RH and temperature thus form a complex function in relation to the resultant error in estimated dew point. In practice, the effect of errors in the calibration of air temperature can be taken to translate to an equivalent error in dew point, e.g. if the air temperature sensor is 0.2°C high, then the estimated dew point is approximately 0.2°C high. Figure 8-2 shows the errors in dew point as a function of a ‘worst case’ 5% error in the calibration of the RH sensor. For sensors installed in the field there are additional errors associated with exposure of the sensor, e.g. sensors in unaspirated shields get slightly warmer than true air temperature in conditions of low wind speeds and high solar radiation. However, if the RH and air temperature sensors are installed in the same shield and are thus exposed identically, the estimate of dew point is not subject to the same error as the measurement of air temperature would be. This is because the temperature sensor will measure the actual temperature of the RH sensor, which is what is required for the derivation of air vapor pressure and thereby dew point. 50: 55°C 40 30 40°C 20. 104 25°C 10°C 199°C RELATE HUMIDITY Section 8. Processing and Math Instructions FIGURE 8-1. Dew Point Temperature over the RH Range for Selected Air Temperatures 5 D E 4 Ww 3 Pp e 4 J 1 | —+-—4 N 1 ie 0. 1p 15 BoB RD an 4 boo} 190 E f ? = R R 2 0 R 3 o 4 ic 5 RELATIVE HUMIDITY — Enor + 5RH a& 2C -* Error - 5RH at 2C = Enor + SRH at 2°C —® Error - SRH @& 25°C —* = Error - 5RH at 55°C —e Enor + SRHat 5°C FIGURE 8-2. Effect of RH Errors on Calculated Dew Point (+5 RH Unit Error at Three Air Temperatures) Exp NOTE Returns e (the base of natural logarithms) raised to a power. Syntax x = Exp (source) Remarks If the value of the source exceeds 709.782712893, an Overflow error occurs. The constant e is approximately 2.718282. The Exp function complements the action of the Log function and is sometimes referred to as the antilogarithm. Exp FunctionExample The example uses Exp to calculate the value of e. Exp(1) is e raised to the power of 1. 'Exp(x) is e “x so Exp(1) is e “1 ore. Dim ValueOfE ‘Declare variables. BeginProg ValueOfE = Exp(1) ‘Calculate value of e. EndProg FFTSpa (Dest, N, Source, Tau, Units, Option) The FFTSpa performs a Fast Fourier Transform on a time series of measurements stored in an array and places the results in an array. It can also 8-11 Section 8. Processing and Math Instructions 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 instruction (Section 6) and FFTSpa is that FFT is an output instruction that stores the results in a data table and FFTSpa stores its results in an array. Parameter Enter & Data Type Dest The array in which to store the results of FFT. Array Source The name of the Variable array that contains the input data for the FFT. Variable N Number of points in the original time series. The number of points must be a power Constant of 2 (i.e., 512, 1024, 2048, etc.). Tau The sampling interval of the time series. Constant Units The units for Tau. Constant Alpha Numeric Code Code Units USEC 0 microseconds MSEC it milliseconds SEC 2 seconds MIN 3 minutes Options A code to indicate what values to calculate and output. Constant Code | Result 0 FFT. The output is N/2 complex data points, i.e., the real and imaginary parts of the FFT. The first pair is the DC component and the Niquist component. This first pair is an exception because the DC and Niquist components have no imaginary part. 1 Amplitude spectrum. The output is N/2 magnitudes. With Acos(wt); A is magnitude. 2 Amplitude and Phase Spectrum. The output is N/2 pairs of magnitude and phase; with Acos(wt - o); A is amplitude, @ is phase (- 1,1). 3 Power Spectrum. The output is N/2 values normalized to give a power spectrum. With Acos(wt - 6), the power is A?/2. The summation of the N/2 values yields the total power in the time series signal. 4 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. 5 Inverse FFT. The input is N/2 complex numbers, organized as in the output of option 0, which is assumed to be the transform of some real time series. The output is the time series whose FFT would result in the input array. 8-12 T=N*tau: the length, in seconds, of the time series. Processing field: “FFT,N,tau,option”. Tick marks on the x axis are 1/(N*tau) Herz. N/2 values, or pairs of values, are output, depending upon the option code. Section 8. Processing and Math Instructions Normalization details: Complex FFT result i, i= 1.. N/2: ai*cos(wi*t) + bi*sin(wi*t). wi = 2n(i-1)/T. i = atan2(bi,ai) (4 quadrant arctan) Power(1) = (al? + b1?)/N?_ (DC) Power(i) = 2*( ai’ + bi’)/N® (i =2..N/2, AC) PSD(i) = Power(i) * T = Power(i) * N * tau Al = sqrt(al? + b1”)/N (DC) Ai = 2*sqrt(ai’ + bi)/N (AC) Notes: Frac (Source) Power is independent of the sampling rate (1/tau) and of the number of samples (N). The PSD is proportional to the length of the sampling period (T=N* tau), since the “width” of each bin is 1/T. The sum of the AC bins (excluding DC) of the Power Spectrum is the Variance (AC Power) of the time series. The factor of 2 in the Power(i) calculation is due to the power series being mirrored about the Niquist frequency N/(2*T); only half the power is represented in the FFT bins below N/2, with the exception of DC. Hence, DC does not have the factor of 2. The Inverse FFT option assumes that the data array input is the transform of a real time series. Filtering is performed by taking an FFT on a data set, zeroing certain frequency bins, and then taking the Inverse FFT. Interpolation is performed by taking an FFT, zero 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 long as aliasing is avoided. Returns the fractional part of a number. Syntax x = Frac (source) Remarks Returns the fractional portion of the number within the parentheses. GetRecord (Dest, TableName, RecsBack) Retrieves one record from a data table. Syntax GetRecord (Dest, TableName, RecsBack) 8-13 Section 8. Processing and Math Instructions 8-14 IfTime Remarks The GetRecord instruction retrieves one entire record from a data table. The destination array must be dimensioned large enough to hold all the fields in the record. Parameter Enter & Data Type Dest The destination variable array in which to store the fields of the record. The Array array must be dimensioned large enough to hold all the fields in the record. TableName | The name of the data table to retrieve the record from. name RecsBack The number of records back from the most recent record stored to go to Const. Or retrieve the record (1 record back is the most recent). variable The IfTime instruction is used to return a number indicating True (-1) or False (0) based on the datalogger's real-time clock. Syntax IfTime (TintolInt, Interval, Units) The IfTime function returns True (-1) or False (0) based on the scan clock. Time is kept internally by the datalogger as the elapsed time since January 1, 1990, at 00:00:00 hours. The interval is synchronized with this elapsed time (i.e., the interval is true when the Interval divides evenly into this elapsed time). The time into interval allows an offset to the interval. The IfTime 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 which the IfTime instruction is true is 1 of its specified Units. For example, if IfTime specifies 0 into a 10 minute interval, it could be true when the scan clock specified any time within the first minute of the ten minute interval. With 0 into a 600 second interval, the interval is still 10 minutes but it could only be true during the first 1 second of that interval. IfTime will only return true once per interval. For example, a program with a 1 second scan that tests IfTime(0,10, min) -- 0 minutes into a 10 minute interval — each scan will execute the instruction 60 times during the minute that it could be true. It will only return true the first time that it is executed, it will not return true again until another interval has elapsed. Section 8. Processing and Math Instructions IF IMP Parameter Enter & Data Type TintoInt The time into interval sets an offset from the datalogger’s clock to the constant interval at which the IfTime will be true. For example, if the Interval is set at 60 minutes, and TintoInt is set to 5, Iffime will be True at 5 minutes into the hour, every hour, based on the datalogger's real-time clock. If the TintoInt is set to 0, the IfTime statement is True at the top of the hour. Interval The Interval is how often IfTime will be True. constant Units The time units for TintoInt and Interval Constant Alpha Code Units Usec microseconds Msec milliseconds Sec seconds Min minutes Hr hours Day days 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 Enter & Data Type Expression The Variable or expression to test. Expression or Variable True: return TrueValue 0 False: return FalseValue TrueValue The Value (or expression determining the value) to return if the test condition is true Constant Variable or Expression FalseValue The Value (or expression determining the value) to return if the test condition is Constant False Variable or Expression The IMP function is used to perform a logical implication on two expressions. Syntax result = expression! IMP expression2 Remarks The following table illustrates how Result is determined: 8-15 Section 8. Processing and Math Instructions If expression! is | And expression2 is | The result is True True True True False False False True True False False True False Null True The IMP operator performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in result according to the following table: If bit in expression! is | And bit in expression2 is | The result is 0 0 i 0 1 1 1 0 0 1 1 1 Int, Fix Return the integer portion of a number. Syntax x = Int (source) x = 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 the first negative integer less than or equal to number, whereas Fix returns the first negative integer greater than or equal to number. For example, Int converts -8.4 to -9, and Fix converts -8.4 to -8. Int and Fix Function Example This example illustrates the use of Int and Fix. 8-16 Ln (Source) Log (Source) LOG10 (number) Section 8. Processing and Math Instructions Dim A, B, C, D "Declare variables. BeginProg A= Int(-99.8) ‘Returns -100 B = Fix(-99.8) ‘Returns -99 C= Int(99.8) ‘Returns 99 D= Fix(99.8) ‘Returns 99 EndProg Returns the natural logarithm of a number. Ln and Log perform the same function. Syntax x = Log (source) x = Ln (source) Remarks The source can be any valid numeric expression that results in a value greater than 0. The natural logarithm is the logarithm to the base e. The constant e is approximately 2.718282. You can calculate base-n logarithms for any number x by dividing the natural logarithm of x by the natural logarithm of n as follows: 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 l= 1 To3 ‘Do three times. M =Log(Exp(1) * I) Next I EndProg The LOG10 function returns the base 10 logarithm of a number. Syntax x = LOG10 (number) Remarks The LOG10 function returns the logarithm base 10 of a number. 8-17 Section 8. Processing and Math Instructions 8-18 The Number argument can be any valid numeric expression that has a value greater than 0. You can calculate base-n logarithms for any number x by dividing the logarithm base 10 of x by the logarithm base 10 of n as follows: LOGN( x ) = LOG10( x ) / LOG10(n ) LOG10 Function Example This example uses the LOG10 instruction to calculate the log base 2 of 1000. Dim LOG2_1000 "Declare variables. LOG2_1000 = LOG10(1000)/ LOG10(2) 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 particular element in an array (e.g., Temp(1)); it is the first element in the array Parameter Enter & Data Type Dest The variable in which to store the maximum. Variable Swath The number of values of the source array in which to search for the Constant maximum. Source The name of the variable array that is the input for the instruction. Array" MaxSpa Function Example This example uses MaxSpa to find the maximum value of the five elements Temp(6) through Temp(10) and store the result in the variable MaxTemp. MaxSpa(MaxTemp, 5, Temp(6)) MinSpa (Dest, Swath, Source) Finds the minimum value in an array. Syntax MinSpa(Dest, Swath, Source) Remarks Find the minimum value 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., Temp(1)); it is the first element in the array to check for the minimum. The Swath is the number of elements to compare for the minimum. Section 8. Processing and Math Instructions Parameter Enter | |_& Data Type Dest The variable in which to store the results of the instruction. Variable | Swath The number of values of the source array in which to search of the Constant minimum. Source The name of the variable array that is the input for the instruction. Array 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(MinTemp, 5, Temp(6)) Mod Divides two numbers and returns only the remainder. Syntax result = operandI Mod operand2 Remarks The modulus, or remainder, operator divides operand! by operand2 (rounding floating-point numbers to integers) and returns only the remainder as result. For example, in the expression A = 19 Mod 6.7, A (which is result) equals 5.6. The operands can be any numeric expression. Mod Operator Example The example uses the Mod operator to determine if a 4-digit year is a leap year. Dim TestYr, LeapStatus ‘Declare variables. TestYr = 1995 If TestYr Mod 4 = 0 And TestYr Mod 100 = 0 Then ‘Divisible by 4? If TestYr Mod 400 = 0 Then ‘Divisible by 400? LeapStatus = True Else LeapStatus = False End If Elself TestYr Mod 4 = 0 Then LeapStatus = True Else LeapStatus = False End If Move (Dest, Reps, Source, Reps) Moves a block or fills an array. Syntax Move(Dest, Reps, Source, Reps) Remarks Block Move or fill array. 8-19 Section 8. Processing and Math Instructions 8-20 Parameter Enter & Data Type = Dest The variable in which to store the values from the source. Variable or Array Reps The number of elements in the destination array to fill. Constant Source The name of the variable array or expression that is the source of the values Array or to move. Expression Reps The number of repetitions for the measurement or instruction. If source reps Constant is less than destination reps, the remainder of destination is filled with that last value of source. Move Function Example The example uses the Move function. Move(x, 20, y, 20) "move array y into array x Move(x, 20, 0.0, 1) ‘fill x with 0.0. MovePrecise (PrecisionVariable, X) NOT The MovePrecise function allows you to move a high precision variable into another input location. Syntax MovePrecise ( PrecisionVariable, X ) Remarks In this function, the variable X is moved into the PrecisionVariable as a high precision value. Every reference to the PrecisionVariable will cause a 32-bit extension of its mantissa to be saved and used internally. A normal single precision float has 24 bits of mantissa; therefore, this new precision is 56 bits. PrecisionVariable The PrecisionVariable is the variable that will be affected by the precision move. Xx The X variable is the value that will be moved to the PrecisionVariable. It may or may not be a high precision variable, depending upon whether it has been declared as such in a previous AddPrecise or MovePrecise instruction. The NOT function is used to perform a logical negation on an expression. Syntax result = NOT expression Or Section 8. Processing and Math Instructions Remarks The following table illustrates how Result is determined: Ifexpris | The result is True False | True Null | Null The NOT operator also inverts the bit values of any variable and sets the corresponding bit in result according to the following truth table: If bit in expr] is NOT Operator Example The result is The example sets the value of the variable Msg depending on the 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 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 is | The result is True True True True False True False True True False False False 8-21 Section 8. Processing and Math Instructions The Or operator also performs a bit-wise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in result according to the following truth table: If bit in expr] is | And bit in expr2is | The result is 0 0 0 0 1 1 1 0 1 1 1 1 Or Operator Example The example sets Msg that depends on the value of variables A, B, and C, assuming that no variable is a Null. If A= 10, B=8, and C= 11, the left expression is True and the right expression is False. Because at least one comparison expression is True, the Or expression evaluates True Dim A, B, C ‘Declare variables. A=10:B=8:C=11 ‘Assign values. If A>B Or B>C Then ‘Evaluate expressions. Msg = True Else Msg = False. End If PeakValley (DestPV, DestChange, Reps, Source, Hysteresis) Peak Valley is used to detect peaks and valleys (local maxima and minima) in a signal. When a new peak or valley is detected, the new peak or valley and the change from the previous peak or valley are stored in variables. Parameter & Data Type Enter DestPV Variable or array Variable or array in which to store the new peak or valley. When a new peak or valley is detected, the value of the peak or valley is loaded in the destination. PeakValley will continue 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 greater than 1, the array must be dimensioned to Reps+1. The additional element is used to flag when a new peak or valley is detected in any of the source inputs. The flag element is stored after the changes [e.g., changevar(Reps+1)] and is set to -1 (true) when a new peak or valley is detected and set to 0 (false) when none are detected. Reps Constant The number inputs to track the peaks and valleys for. Each input is tracked independently. When reps are greater than | the source and DestPV arrays must be dimensioned to at least the number of repetitions; DestChange must be dimensioned to Reps+1. 8-22 Section 8. Processing and Math Instructions Parameter & Data Type Source Variable or Array Enter The variable or array containing the inputs to check for peaks and valleys. Hysteresis Constant Variable or expression The minimum amount the input has to change to be considered a new peak or valley. This would usually be entered as a constant. The following example uses sine and cosine signal inputs to illustrate the use of PeakValley with two repetitions. Data Table PV1 stores the peaks and valleys from the cosine wave. PV2 stores the peaks and valleys from the sine wave. PV3 stores the peaks and valleys from both. Public Dim XY(2) Const Pi=4*ATN(1) ‘Define Pi for converting degrees to radians DataTable(PV 1,Change(1),500) ‘Peaks and valleys for first signal, triggered when ‘Change(1) is not 0. Sample(1,PeakV(1),IEEE4) ‘DataTable PV1 holds the peaks and valleys for XY(1) EndTable DataTable(PV2,Change(2),500) ‘Peaks and valleys for second signal, triggered 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 not have a table storing ‘peaks and valleys for several signals, it would use individual tables for the ‘signals. DataTable(P VBoth,Change(3),500) Sample(2,Peak V(1),IEEE4) EndTable BeginProg Scan(500,mSec,0,0) Deg=Deg+5 XY(1)=Cos(Deg*Pi/180) ‘Compute the cosine as input XY(1) XY(2)=Sin(Deg*Pi/180) ‘Compute the sine as input XY(2) 8-23 Section 8. Processing and Math Instructions 8-24 PeakValley(PeakV(1),Change(1),2,XY(1),0.1) ‘Find the peaks and ‘valleys for both ‘inputs. Hysteresis ‘= 0.1] CallTable PV1 CallTable PV2 CallTable PVBoth Next Scan EndProg PRT (Dest, Reps, Source, Mult, Offset) Used to calculate temperature from the resistance of an RTD. Syntax PRT (Dest, Reps, Source, Mult, Offset) Remarks This instruction uses the result of a previous RTD bridge measurement to calculate the temperature. The input (Source) must be the ratio Rs/RO, where Rs is the RTD resistance and RO the resistance of the RTD at 0° C. The temperature is calculated according to the DIN 43760 specification adjusted (1980) to the International Electrotechnical Commission standard. The range of linearization is -200° C to 850° C. The error in the linearization is less than 0.001° C between -200 and +300° C, and is less than 0.003° C between -180 and +830° C. The error (T calculated - T standard) is +0.006° at -200° C and -0.006° at +850° C. Parameter Enter & Data Type Dest The variable in which to store the temperature in degrees C. Variable or Array Reps The number of repetitions for the measurement or instruction. Constant Source The name of the variable or array that contains the Rs/RO value(s). Variable or Array Mult, Offset | A multiplier and offset by which to scale the raw results of the Constant, measurement. See the measurement description for the units of the raw Variable, result; a multiplier of one and an offset of 0 are necessary to output in the Array, or raw units. For example, the TCDiff instruction measures a thermocouple Expression and outputs temperature in degrees C. A multiplier of 1.8 and an offset of 32 will convert the temperature to degrees F. Section 8. Processing and Math Instructions Randomize (Source) RealTime Initializes the random-number generator. Syntax Randomize (source) Remarks The argument number can be any valid numeric expression. Number is used to initialize the random-number generator by giving it a new seed value. If you omit number, the value returned by the Timer function is used as the new seed value. If Randomize is not used, the Rnd function returns the same sequence of random numbers every time the program is run. To have the sequence of random numbers change each time the program is run, place a Randomize statement with no argument at the beginning of the program. Used to pick out year, month, day, hour, minute, second, usecond, day of week, and/or day of year from the CR1000 clock. Syntax RealTime(Dest) Remarks The destination array must be dimensioned to 9. RealTime Example This example uses RealTime to place all time segments in the Destination array. If the remark (‘) is removed from the first 8 Sample statements and the last Sample statement is remarked, the results will be exactly the same. Public rTime(9) Alias rTime(1) = Year Alias rTime(2) = Month Alias rTime(3) = Day Alias rTime(4) = Hour Alias rTime(5S) = Minute Alias rTime(6) = Second Alias rTime(7) = uSecond Alias rTime(8) = WeekDay Alias rTime(9) = Day_of_Year DataTable (VALUES, 1, 100) DatalInterval(0, 1, mSec, 0) ' Sample(1, Year, IEEE4) " Sample(1, Month, IEEE4) ' Sample(1, Day, IEEE4) ' Sample(1, Hour, IEEE4) ' Sample(1, Minute, IEEE4) ' Sample(1, Second, IEEE4) ' Sample(1, uSecond, IEEE4) ' Sample(1, WeekDay, IEEE4) ‘declare as public and dimension rTime to 9 ‘assign the alias Year to rTime(1) ‘assign the alias Month to rTime(2) ‘assign the alias Day to rTime(3) ‘assign the alias Hour to rTime(4) ‘assign the alias Minute to rTime(5) ‘assign the alias Second to rTime(6) ‘assign the alias uSecond to rTime(7) ‘assign the alias WeekDay to rTime(8) ‘assign the alias Day_of_Year to rTime(9) ‘set up data table ‘set up data table ‘place Year in VALUES table ‘place Month in VALUES table ‘place Day in VALUES table ‘place Hour in VALUES table ‘place Minute in VALUES table ‘place Second in VALUES table ‘place uSecond in VALUES table ‘place WeekDay in VALUES table 8-25 Section 8. Processing and Math Instructions 8-26 " Sample(1, Day_of Year, IEEE4) ‘place Day_of Year in VALUES table Sample(9, rTime(), IEEE4) ‘place all 9 segments in VALUES table EndTable BeginProg Scan (1, Sec, 0, 0) RealTime(rTime()) CallTable VALUES Next Scan EndProg RectPolar (Dest, Source) Converts from rectangular to polar coordinates. Parameter Enter & Data Type Dest Variable array in which to store the 2 resultant values. The length of the Variable vector is stored in the specified destination element and the angle, in array radians(+ 7), in the next element of the array _ Source The variable array containing the X and Y coordinates to convert to Polar Variable coordinates. The X value must be in the specified array element and the Y Array 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,AngIDeg Const Pi=4*ATN(1) Alias XY(1)=X Alias XY(2)=Y Alias Polar(1)=Length Alias Polar(2)=AnglRad DataTable(RtoP, 1,500) Sample(1,Deg,IEEE4) Sample(2,XY ,IEEE4) Sample(2,Polar,IEEE4) Sample(1,AnglDeg,IEEE4) EndTable BeginProg For Deg=0 to 360 XY(1)=Cos(Deg*Pi/180) ‘Cos and Sin operate on radians XY(2)=Sin(Deg*Pi/180) RectPolar(Polar,XY) AnglDeg=Polar(2)*180/Pi ‘Convert angle to degrees for comparison w/Deg CallTable RtoP Next Deg EndProg Section 8. Processing and Math Instructions RMSSpa (Dest, Swath, Source) Used to compute the RMS value of an array. Syntax RMSSpa(Dest, Swath, Source) Remarks Spatial RMS, Calculate the root mean square of values in an array. Dest = Where X(j) = Source Parameter & Data Type Enter Dest Variable The variable in which to store the RMS value. Swath Constant The number of values of the array to include in the RMS calculation. Source Array The name of the variable array that is the input for the instruction. 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 | 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 for the next number in the random-number sequence. The value of the Number argument determines how the random number will be generated: Value Description <0 The same number each 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 To have the program generate a different random-number sequence each time it is run, use the Randomize statement with no Number argument to initialize the random-number generator before RND is called. 8-27 Section 8. Processing and Math Instructions 8-28 To produce random integers in a given range, use this formula: INT( ( upperbound - lowerbound + 1 ) * RND + lowerbound ) Here, upperbound is the highest number in the range, and lowerbound is the lowest number in the range. SatVP (Dest, Temp) SatVP calculates saturation vapor pressure (over water Svpw) in kilopascals from the air temperature (°C) and places it in the destination variable. The algorithm for obtaining Svpw from air temperature (°C) is taken from: Lowe, Paul R.: 1977, “An approximating polynomial for computation of saturation vapor pressure,” J. Appl. Meteor, 16, 100-103. Saturation vapor pressure over ice (Svpi) in kilopascals for a 0°C to -50°C range can be obtained using SatVP and the relationship Svpi = -.00486 + 85471 Svp +2441 Svp’ where Svpw is derived by SatVP. This relationship was derived by Campbell Scientific from the equations for the Svpw and the Svpi given in Lowe’s paper. Parameter Enter & Data Type Dest Variable in which to store saturation vapor pressure (kPa). Temp Variable containing air temperature (°C). StrainCalc (Dest, Reps, Source, BrZero, BrConfig, GF, v) Converts the output of a bridge measurement instruction to microstrain. Syntax StrainCale (Dest, Reps, Source, BrZero, BrConfig, GF, v) Remarks Calculates microstrain, ,.€, from the appropriate formula for the bridge configuration. All are electrically full bridges, the quarter bridge, half bridge and full bridge strain gages refer to the number of active elements (i.e., strain gages), 1,2, or 4 respectively. Parameter Enter & Data Type Dest Variable to store strain in. Reps Number of strains to calculate, Destination, source, and zero variables must be dimensioned accordingly. Section 8. Processing and Math Instructions Parameter Enter & Data Type BrConfig Bridge configuration code for strain gages The bridge configuration code can be entered as a positive or negative number: +code: V, = 0.001(Source — Zero) ; bridge configured so its output decreases with increasing strain. - code: V, = —0.001( Source — Zero); bridge configured so output increases with strain. This is the configuration for a quarter bridge using CSI’s 4WFB350 Terminal Input Module (i.e., enter the bridge configuration code as -1 for 1/4 bridge with TIM.) Cod | Configuration e 1 ae -4.10°V, r bri n Een mer, Quarte ge strain gauge GF(1+2V,) 2 Half bridge strain gauge, one gage parallel to strain, the other at 90° to strain: -4.10°v, GF[(1+v)-2V,(v-1)] i] Half bridge strain gauge, one gage parallel to +€, the other parallel to —€: pe = -2.10°v, E= " GF 4 Full bridge strain gage, 2 gages parallel to +€, the other 2 parallel to —: -10°v, GF 5 Full bridge strain gage, half the bridge has 2 gages parallel to +€ and —€: the other half +ve and —Vé: -2.108v, GF(v+1) 6 Full bridge strain gage, one half +€ and —Vé, the other half Ve and +€.: pe = pe = -2-10°v, ee GF I(v+1)-V, (v— DI Source The source variable array for the measurement(s), the input is expected as millivolts out per volt in (the result of the full bridge instruction with a multiplier of 1 and an offset of 0. BrZero The variable array that holds the unstrained reading(s) in millivolts out per volt in. GF Gage Factor. The gage factor can 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. 8-29 Section 8. Processing and Math Instructions 8-30 StrainCale Example This example uses StrainCalc to find the microstrain value of a bridge output. "Program name: STRAIN.DLD Public Count, ZStrain, StMeas, Strain, Flag(8) —' Declare all variables as public ‘Data Table STRAINS samples every measurement when user Sets Flag(1) High DataTable(STRAINS,Flag(1),-1) DataInterval(0,0,0,100) ‘Interval = Scan, 100 lapses Sample (1,Strain,leee4) EndTable ‘DataTable ZERO_1 stores the "zero" measurements DataTable(ZERO_1,Count>99,100) ‘Trigger on Count 100 Average(1,ZStrain,[EEE4,0) EndTable ‘Subroutine to measure Zero, Called on first pass or when user sets Flag(2)low Sub Zero Count = 0 ‘Reset Count Scan(10,mSec,0,100) ‘Scan 100 times BrFull(ZStrain, 1,mV50,5,1,6,7,1,5000,1,0,0,100,1,0) Count = Count + 1 ‘Increment Counter used By DataTable CallTable ZERO_1 ‘Zero_1 outputs on last scan (Count=100) Next Scan ZStrain = ZERO_1.ZStrain_Avg(1,1) ‘Set ZStrain = averaged value Flag(2) = True End Sub BeginProg Scan(10,mSec,0,0) ‘Scan 10(mSecs) If Not Flag(2) Then Zero BrFull(StMeas, 1,mV50,5,1,6,7,1,5000,1,0,0,100,1,0) StrainCalc(Strain,1,StMeas,ZStrain,-1,2,0) CallTable STRAINS ‘Strains outputs only when Flag(1)=True Next Scan EndProg Section 8. Processing and Math Instructions Sgn (Source) Sin (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 "Declare variables. Number = Volt(1) ‘Get user input. Select Case Sgn(Number) ‘Evaluate Number. Case 0 ‘Zero. Msg =0 Case 1 ‘Positive. Msg= 1 Case -1 ‘Negative. Msg = -1 End Select Returns the sine of an angle. Syntax x = Sin (source) Remarks Source can be any valid numeric expression measured in radians. The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite 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 7/180. To convert radians to degrees, multiply radians by 180/r. Returns the sine of the value in parentheses. The input must be in radians. 8-31 Section 8. Processing and Math Instructions Sin Function Example The example uses Sin to calculate the sine of an angle from a Volt input. Dim Degrees, Pi, Radians, Ans ‘Declare variables. Pi=4 * Atn(1) ‘Calculate Pi. Degrees = Volt(1) ‘Get input. Radians = Degrees * (Pi/ 180) ‘Convert to radians. Ans = Sin(Radians) ‘The Sine of Degrees. 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 Voltl, Ans "Declare variables. BeginProg Scan ( 1, min, 3, 0) VoltDiff(Volt1,1,mV5000,1,True,100,500,1,0) ‘Returns voltage on Channel(1) to Volt(1) Ans = SINH( Volt] ) 'The Hyperbolic Sine of Volt1. NextScan EndProg Sqr (Source) Returns the square root of a number. Syntax x = Sqr (number) Remarks The argument number can be any valid numeric expression that results in a value greater than or equal to 0. Returns the square root of the value in parentheses. 8-32 Section 8. Processing and Math Instructions Sqr Function Example The example uses Sqr to calculate the square root of Volt(1) value. Dim Msg, Number ‘Declare variables. Number = Volt(1) ‘Get input. If Number < 0 Then Msg =0 “Cannot determine the square root of a negative number. Else Msg = Sqr(Number) End If StdDevSpa (Dest, Swath, Source) Used to find the standard deviation of an array. Syntax StdDevSpa(Dest, Swath, Source) Remarks Spatial standard deviation. RI= (( (i i=j+swath i=j+swath 2 \ Dest =(( » X(i)? -( x0) / sae / swath i=j Where X(j) = Source Parameter Enter & Data Type Dest The variable in which to store the results of the instruction. Variable or Array Swath The number of values of the array over which to perform the specified Constant operation. Source The name of the variable array that is the input for the instruction. Array Tan (Source) Returns the tangent of an angle. Syntax x = Tan (source) Remarks Source can be any valid numeric expression measured in radians. Tan takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite an angle divided by the length of the side adjacent to the angle. To convert degrees to radians, multiply degrees by 7/180. To convert radians to degrees, multiply radians by 180/n. 8-33 Section 8. Processing and Math Instructions 8-34 TANH (Source) Tan Function Example The example uses Tan to calculate the tangent of an angle from a Volt(1) input. Dim Degrees, Pi, Radians, Ans ‘Declare variables. Pi=4 * Atn(1) ‘Calculate Pi. Degrees = Volt(1) ‘Get user input. Radians = Degrees * (Pi / 180) ‘Convert to radians. Ans = Tan(Radians) ‘The Tangent of Degrees. The TANH function returns the hyperbolic tangent of an expression or value. Syntax x = TANH (Source) Remarks The TANH function returns the hyperbolic tangent [ tanh(x) = sinh(x)/cosh(h) ] for the value defined in Source. TANH Function Example The example uses TANH to calculate the hyperbolic tangent of a voltage input. Public Voltl, Ans "Declare variables. VoltDiff(Volt1,1,mV5000,1,True, 100,500, 1,0) ‘Returns voltage on Channel(1) to Volt(1) Ans = TANH( Voltl ) 'The Hyperbolic Tangent of Volt1. Timelntolnterval (Tintolnt, Interval, Units) The TimelIntoInterval (or IfTime) instruction is used to return a logic level of True or False based on the datalogger's real-time clock. Syntax Variable = TimelntoInterval( TintoInt, Interval, Units ) or If TimeIntoInterval ( TintoInt, Interval, Units ) Remarks When encountered by the datalogger program, the TimeIntoInterval statement is evaluated True (-1) or False (0) based on the datalogger's real-time clock. Time is kept internally by the datalogger as the elapsed time since January 1, 1990, at 00:00:00 hours. When the Interval divides evenly into this elapsed time, the TimeIntoInterval is set True. The TimelIntoInterval instruction can be used to set the value of a variable to -1 or 0 (first syntax example), or it can be used as an expression for a Condition (second syntax example). Section 8. Processing and Math Instructions The TimelntoInterval instruction has the following parts: TintoInt The TintoInt, or time into interval, argument allows the programmer to define an offset from the Interval at which the TimeIntoInterval statement will be evaluated true. For example, if the Interval is set at 60 minutes, and TintoInt is set to 5, TimeIntoInterval will be True at 5 minutes into the hour, every hour, based on the datalogger's real-time clock. If the TintoInt is set to 0, the TimeIntoInterval statement is True at the top of the hour. Interval The Interval is how frequently the TimeIntoInterval statement will be evaluated True, based on the datalogger's real-time clock. Units The Units argument is used to specify the units on which the TintoInt and Interval arguments will be based. The options are microseconds, milliseconds, seconds, minutes, hours, or days. Notes: TimelntoInterval must be placed within a scan to function. This instruction is also known as IfTime. Either keyword can be used within the program. VaporPressure (Dest, Temp, RH) The VaporPressure instruction calculates the ambient vapor pressure (Vp) from previously measured values for air temperature and RH. The instruction first calculates saturation vapor pressure from air temperature using Lowe’s equation (see SatVP). Vapor pressure is then calculated by multiplying by the fractional RH: Vp = SatVp x RH/100 WetDryBulb (Dest, Temp, WetTemp, Pressure) WetDryBulb calculates vapor pressure in kilopascals from the wet and dry- bulb temperatures in °C. This algorithm type is used by the National Weather Service: Vp = Svpwet - A (1 + B*Tw)(Ta - Tw) P Vp = ambient vapor pressure in kilopascals Svpwet = saturation vapor pressure at the wet-bulb temperature in kilopascals Tw = wet-bulb temperature, °C Ta = ambient air temperature, °C P = air pressure in kilopascals A= 0.000660 B=0.00115 Although the algorithm requires an air pressure entry, the daily fluctuations are small enough that for most applications a fixed entry of the standard pressure at the site elevation will suffice. If a pressure sensor is employed, the current pressure can be used. 8-35 Section 8. Processing and Math Instructions 8-36 XOR Parameter Enter & Data Type Dest The variable in which to store Vp (kPA). Temp The variable containing air temperature (dry-bulb °C). RH The variable containing RH (%). WetTemp The variable containing wet-bulb temperature (°C). Pressure The variable containing atmospheric pressure (kPa). The XOR function is used to perform a logical exclusion on two expressions. Syntax result = exprl XOR expr2 Remarks If only one of the expressions evaluates True, result is True. If either expression is a Null, result is also a Null. When neither expression is a Null, result is determined according to the following table: If expr] is | And expr2is | The result is True True False True False True False True True False False False | The XOR operator also performs a bit-wise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in result according to the following truth table: If bit in expr/] is | And bit in expr2 is | The result is 0 | 0 0 0 1 1 1 0 1 1 1 0 Section 8. Processing and Math Instructions XOR Operator Example The example sets the variable Msg based on the value of variables A, B, and C, assuming that no variable is a Null. If A = 10, B = 8, and C = 11, the left expression is True and the right expression is False. Because only one comparison expression is True, the XOR expression evaluates True. Dim A, B, C "Declare variables. A=10:B=8:C=11 ‘Assign values. If A >B XOR B>C Then "Evaluate expressions. 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 Inverse Cotangent Arccotan = Atn(X) + 1.5708 Hyperbolic Secant HSec = 2 / (Exp(X) + Exp(-X)) Hyperbolic Cosecant HCosec = 2 / (Exp(X) - Exp(-X)) Hyperbolic Cotangent HCotan = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X)) Inverse Hyperbolic Sine HArcsin = Log(X + Sqr(X * X + 1)) Inverse Hyperbolic Cosine HArccos = Log(X + Sqr(X * X - 1)) Inverse Hyperbolic Tangent | HArctan = Log((1 + X)/(1 - X))/2 Inverse Hyperbolic Secant HAresec = Log((Sqr(-X * X + 1) + 1)/ X) Inverse Hyperbolic Cosecant HArccosec = Log((Sgn(X) * Sqr(X * X + 1) +1)/ X) Inverse Hyperbolic Cotangent HArccotan = Log((X + 1)/(X- 1))/2 Logarithm LogN = Log(X) / Log(N) 8-37 Section 9. Program Control Instructions BeginProg ... EndProg The BeginProg instruction is used to mark the beginning of a program. EndProg marks the end of a program. Syntax BeginProg EndProg Remarks All of the instructions for the main program fall between the BeginProg and EndProg statements. Program Variables, DataTables, and Subroutines must be defined before the main program. BeginProg Example The following code shows 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)=SECONDS ALIAS TIME(7)=mSECONDS ALIAS TIME(8)=DAY_OF_WEEK ALIAS TIME(9)=DAY_OF_YEAR ‘Define the DataTable, METDATA DataTable (METDATA,1,1000) DataInterval (0,1,Min,10) Sample (1, WINDSP,FP2) Totalize (1,RAIN,FP2,False ) EndTable 'Main program - Read datalogger real-time clock ‘Measure 2 pulse count channels and Call DataTable BeginProg Scan (1,Sec,3,0) RealTime (TIME) Section 9. Program Control Instructions 9-2 Call CallTable PulseCount (WINDSP, 1,1 ,1,1,1.0,0) PulseCount (RAIN, 1,2,2,0,1.0,0) CallTable METDATA NextScan EndProg The Call statement is used to transfer program control from the main program to a subroutine. Syntax Call Name(list of variables) Remarks Use of the Call keyword when calling a subroutine is optional. The Call statement has these parts: Call Call is an optional keyword used to transfer program control to a subroutine. Name The Name parameter is the name of the subroutine to call. List of Variables or Constants The 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. Ifa constant is passed to one of the subroutine declared “variables”, that “variable’ becomes a constant and its value cannot be changed by the subroutine. > Call Statement Example See Sub description in Section 5. Used to call a data table. Syntax CallTable Name Remarks CallTable is used in the main program to call a DataTable. DataTables are listed in the declaration section of the program prior to BeginProg. When the DataTable is called, it will process data as programmed and check the output condition. CallTable Example Section 9. Program Control Instructions This example uses CallTable to call the ACCEL table. CallTable ACCEL Data ... Read ... Restore Used to mark the beginning of a data list. Syntax Data /ist of constants Read [VarExpr] Restore Remarks Data function: A /ist of floating point constants that can be read (using Read) into an Array Variable. Parameter: A Jist of floating point constants. Reads Data from Data declaration into 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 1=1To5 Read x(1) Next I For l= 1To5 Read y(1) Next I This next example uses Restore to read 1, 2, 3, 4 into both X() and Y() variables. Data 1, 2, 3,4 Forl=1To4 Read X(1) Next I Restore ForI=1To4 Read Y(1) Next I 9-3 Section 9. Program Control Instructions 9-4 ClockSet (Source) Sets the CR1000 clock from the values in an array. The most likely use for this is where the CR1000 can input the time from a more accurate clock than its own (e.g., a GPS receiver). The input time would periodically or conditionally be converted into the required variable array and ClockSet would be used to set the CR1000 clock. Source Array The source must be a seven-element array . array(1)..array(7) should hold respectively year, month, day, hours, minutes, seconds, and microseconds.. Delay (Option, Delay, Units) Used to delay the program. Syntax Delay Option Delay(Delay, Units) Remarks The Delay instruction is used to delay the measurement task sequence or the processing instructions for the time period specified by the Delay and Units arguments, before progressing to the next measurement or processing instruction. The Scan Interval should be sufficiently 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 Enter & Data Type DelayOption | Code Result Constant 0 Delay will affect the measurement task sequence. Processing will continue to take place as needed in the background. When this option is chosen, the Delay instruction must not be placed in a conditional statement. 1 Delay will affect processing. Measurements will continue as called for by the task sequencer. Delay The numeric value for the time delay. Constant Units The units for the delay. Constant Alpha Numeric Code Code Units USEC 0 microseconds MSEC 1 milliseconds SEC 2 seconds MIN 3 minutes Section 9. Program Control Instructions Do ... Loop Repeats a block of statements while a condition is true or until a condition becomes true. Syntax 1 Do [{While | Until} condition] [statementblock] [Exit Do] [statementblock] Loop Syntax 2 Do [statementblock] [Exit Do] [statementblock] Loop [{While | Until} condition] The Do...Loop statement has these parts: Part Description Do Must be the first statement in a Do...Loop control structure. While Indicates that the loop is executed while condition is true. Until Indicates that the loop is executed until condition is true. condition Numeric expression that evaluates true (nonzero) or false (0 or Null). statementblock 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 immediately following the Loop. When Do...Loop statements are nested, control is transferred to the Do...Loop that is one nested level above the loop in which the Exit Do occurs. Loop Ends a Do...Loop. Do...Loop Statement Example The example creates an infinite Do...Loop that can be exited only if Volt(1) is within a range. Dim Reply "Declare variable. Do Reply = Volt(1) If Reply > 1 And Reply < 9 Then 'Check range. Exit Do 'Exit Do Loop. EndIf Loop Alternatively, the same thing can be accomplished by incorporating the range test in the Do...Loop as follows: Section 9. Program Control Instructions 9-6 Dim Reply "Declare variable. Do Reply = Volt(1) Loop Until Reply > 1 And Reply <9 The next example show the use of Wend. While X > Y ‘Old fashioned way of looping. Wend Do While X > Y "Much better FileManage The FileManage instruction is used to manage files from within a running datalogger program. Syntax FileManage( "Device: FileName", Attribute ) Remarks FileManage is a function that allows the active datalogger program to manipulate program files that are stored in the datalogger. The FileManage instruction has the following parameters: Parameter Enter & Data Type Device; The "Device:Filename" argument is the file that should be manipulated. The Filename Device on which the file is stored must be specified and the entire string Text must be enclosed in quotation marks. Device = CPU, the file is stored in datalogger memory. Device = CRD, the file is stored on a PCMCIA card.. Attribute The Attribute is a numeric code to determine what should happen to the file Constant affected by the FileManage instruction. The Attribute codes are actually a bit field. The codes are as follows: Bit Decimal Description bit 0 1 Program not active bit 1 2 Run on power up bit 2 4 Run now bits 1 & 2 6 Run now and on power up bit 3 8 Delete bit 4 16 Delete all Section 9. Program Control Instructions FileManage Example The statement below uses FileManage to run TEMPS.CRS, which is stored on the datalogger's CPU, when Flag(2) becomes high. If Flag(2) then FileManage( "CPU:TEMPS.CR5" 4) '4 means Run Now FileMark (TableName) Parameter Enter & Data Type TableName | The name of the data table in which to insert the filemark.. | name For... Next FileMark is used to insert a filemark into a data file. The filemark can be used by the decoding software to indicate that a new file should be started at the mark. This capability to create multiple files only exists in the binary to ASCII converter. To make use of it files must be stored to a CF card and retrieved from the logger files screen or by removing the card and transferring the file directly to the computer. FileMark is placed within a conditional statement in order to write the filemark at the desired time. 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...Next loop control structure. Must appear before any other part of the structure. counter Numeric variable used as the loop counter. The variable cannot be an array element or a record element. start Initial value of counter. To Separates start and end values. end Final value of counter. Step Indicates that increment is explicitly stated. increment Amount counter is changed each time through the loop. If you do not specify Step, increment defaults to one. statementblock Program lines between For and Next that are executed the specified number of times. 9-7 Section 9. Program Control Instructions 9-8 Exit For Only used within a For...Next control structure to provide an alternate way to exit. Any number of Exit For statements may be placed anywhere in the For...Next loop. Often used with the evaluation of some condition (for example, If...Then), Exit For transfers control to the statement immediately following the Next. Next Ends a For...Next loop. Causes increment to be added to counter. The Step value controls loop execution as follows: When Step is Loop executes if Positive or 0 counter <= end Negative counter >= end Once the loop has been entered and all the statements in the loop have executed, Step is added to counter. At this point, either the statements in the loop execute again (based on the same test that caused the loop to execute in the first place), or the 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 10 Next K Next J Next I Note If you omit the variable in a Next statement, the value of Step increment is added to the variable associated with the most recent For statement. If a Next statement is encountered before its corresponding For statement, an error occurs. For...Next Statement Example The example runs one For..Next loop inside another. Dim I, J 'Declare variables. For J=5 To 1 Step -1 ‘Loop 5 times backwards. For I= 1 To 12 ‘Loop 12 times. rae "Run some code. Next I a ‘Run some code. Next J "Run some code. This next example fills odd elements of X up to 40 * Y with odd numbers. For |= 1 To 40 * Y Step 2 X(1)=I1 Next I Section 9. Program Control Instructions If... Then... Else Statement Allows conditional execution, based on the evaluation of an expression. Syntax 1 If condition Then thenpart [Else elsepart] Syntax 2 If condition] Then [statementblock-1] [Elself condition? Then [statementblock-2] } [Else [statementblock-n] ] Endlif Syntax 1 Description The single-line form is often useful for short, simple conditional tests. Syntax 1 has these parts: Part Description If Begins the simple If... Then control structure. condition An expression that evaluates true (nonzero) or false (0 and Null). Then Identifies actions to be taken if condition is satisfied. thenpart Statements or branches 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: Part Description statements One or more CRBasic statements, separated by colons. Note You can have multiple statements with a condition, but they must be on the same line and separated by colons, as in the following statement: IfA>10 Then A=A+1:B=B+A:C=C+B Syntax 2 Description The block form of If... Then...Else provides more structure and flexibility than the single-line form and is usually easier to read, maintain, and debug. Syntax 2 has these parts: 9-9 Section 9. Program Control Instructions 9-10 Part Description If Keyword that begins the block If... Then decision control structure. condition] Same as condition used in the single-line form shown above. Then Keyword used to identify the actions to be taken if a condition is satisfied. statementblock-1 One or more CRBasic statements executed if condition] is true. Elself Keyword indicating that alternative conditions must be evaluated if condition! is not satisfied. condition2 Same as condition used in the single-line form shown above. statementblock-2 One or more CRBasic statements executed if condition2 is true. Else Keyword used to identify the actions taken if none of the previous conditions are satisfied. statementblock-n One or more CRBasic statements executed if condition] and condition2 are both false. Endlif Keyword that ends the block form of the If... Then. In executing a block If, CRBasic tests condition, the first numeric expression. If the expression is true, the statements following Then are executed. If the first expression is false, CRBasic begins evaluating each Elself 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 EndIf. The Else and Elself clauses are both optional. You can have as many Elself clauses as you like in a block If, but none can appear after an Else clause. Any of the statement blocks can contain nested block If statements. CRBasic looks at what appears after the Then keyword to determine whether or not an If statement is a block If. If anything other than a comment appears after Then, the statement is treated as a single-line If statement. A block If statement must be the first statement on a line. The Else, Elself, and EndIf parts of the statement can have nothing but spaces in front of them. The block If must end with an EndIf statement. For Example Ifa> 1 And a<= 100 Then Elself a = 200 Then EndIf Tip Select Case may be more useful when evaluating a single expression that has several possible actions. Section 9. Program Control Instructions RunProgram If...Then ... Else Statement Example The example illustrates the various forms of the If...Then...Else syntax. Dim X, Y, Temp( 5 ) "Declare variables. X= Temp( 1 ) If X < 10 Then Y=1 'l digit. Elself X < 100 Then Y=2 '2 digits. Else Y=3 '3 digits. EndIf ‘Run some code ‘Run some code The RunProgram instruction is used to run a datalogger program file from the active program file. Syntax RunProgram ( "Device:FileName", Attrib ) Remarks The RunProgram has the following parameters: "Device:FileName" The "Device:Filename" argument is the file that should be executed. 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 stored on a PCMCIA card. Attribute The Attribute is a numeric code to determine what should happen to the file called by the RunDLDFile instruction. The Attribute codes are actually a bit field. The codes are as follows: Bit Decimal | Description bit] | 2 Run on power up bit2 | 4 Run now RunProgram Example The statement below uses RunProgram to run TEMPS.DLD, which is stored on the datalogger's CPU, when Flag(2) becomes high. If Flag(2) then RunProgram ("CPU:TEMPS.DLD"4) —'4 means Run Now 9-11 Section 9. Program Control Instructions 9-12 ResetTable Scan ... NextScan Used to reset a data table under program control. Syntax ResetTable( TableName ) Remarks ResetTable is a function that 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 Used to establish the program scan rate. Syntax Scan(Interval, Units, Option, Count) ... [Exit Scan] Next Scan The measurements, processing, and calls to output tables bracketed by the Scan...NextScan instructions determine the sequence and timing of the datalogger program. The Scan instruction determines how frequently the measurements within the Scan...NextScan structure are made, controls the buffering capabilities, and sets the number of times to loop through the scan. Parameter Enter & Data Type Interval Enter the time interval at which the scan is to be executed. The interval may Constant be in ms, s, or minutes, whichever is selected with the Units parameter. The minimum scan interval is 10 milliseconds. The maximum scan interval is 30 minutes. Units The units for the time parameters. Constant Alpha Code MSEC milliseconds SEC seconds MIN minutes Section 9. Program Control Instructions Parameter & Data Type Option Constant Enter The Option parameter determines how data will be buffered during the Scan...NextScan process. The options are: Option | Result 0,1,0or2 | The datalogger uses two buffers when processing measurements. When a measurement begins on a scan, the values of the previous scan are loaded into a buffer. This allows processing to finish on the previous scan during measurement of the current scan. >3 The datalogger uses three or more buffers when processing measurements, based on the 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. Ifa 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 (10 measurements)/(buffered scan) x 1000 buffered scans)]. The buffer size plus the size of any Output Tables stored in SRAM should not exceed 2 megabytes. If the processing ever lags behind by more than the buffer allocated, the datalogger will discard the buffered values and synchronize back up to the current measurement The SlowSequence instruction does not allow for this buffering scheme even though Scan is used to signify the start of a scan in a slow sequence. In SlowSequence, the measurements are stored in a single buffer. Processing of this buffer is completed before the NextScan measurements are made. Count Integer The number of times to execute the Scan/NextScan loop. Enter 0 for infinite looping. SelectCase ... EndSelect Executes one of several statement blocks depending on the value of an expression. Syntax SelectCase testexpression [Case expressionlist] [statementblock-1] ] [Case expressionlist2 [statementblock-2] ] [CaseElse [statementblock-n] ] EndSelect The Select Case syntax has these parts: 9-13 Section 9. Program Control Instructions Part Description SelectCase testexpression Case expressionlist CaseElse EndSelect Begins the SelectCase decision control structure. Must appear before any other part of the SelectCase structure. Any numeric or string expression. If testexpression matches the expressionlist associated with a Case clause, the statementblock following that Case clause is executed up to the next Case clause, or for the final one, up to the EndSelect. Control then passes to the statement following EndSelect. If testexpression matches more than one Case clause, only the statements following the first match are executed. Sets apart a group of CRBasic statements to be executed if an expression in expressionlist matches testexpression. The expressionlist consists of a comma-delimited list of one or more of the following forms. expression expression To expression Is compare-operator expression statementblock Elements statementblock-1 to statementblock-n consist of any number of CRBasic statements on one or more lines. Keyword indicating the statementblock to be executed if no match is found between the testexpression and an expressionlist in any of the other Case selections. When there is no CaseElse statement and no expression listed in the Case clauses matches testexpression, program execution continues at the statement following EndSelect. Ends the Select Case. Must appear after all other statements in the Select Case control structure. The argument expressionlist has these parts: Part Description expression To Any numeric expression. Keyword used to specify a range of values. If you use the To keyword to indicate a range of values, the smaller value must precede To. Although not required, it is a good idea to have a CaseElse statement in your SelectCase block to handle unforeseen festexpression values. You can use multiple expressions or ranges in each Case clause. For example, the following line is valid: Case | To 4,7 To 9, 11, 13 SelectCase statements can be nested. Each SelectCase statement must have a matching EndSelect statement. 9-14 Section 9. Program Control Instructions SelectCase Example The example uses SelectCase 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 SelectCase X ‘What is X. Case 0 To 9 "Must be less than 10. "Run some code. M553 ‘Run some code. Case 10 To 99 ‘Must be less than 100. ‘Run some code. ne ‘Run some code. CaseElse ‘Must be something else. wees ‘Run some code. EndSelect EndIf Else SelectCase Y "What is Y. Case 1, 3,5, 7,9 It's odd. ie ‘Run some code. Case 0, 2, 4, 6, 8 'It's even. Sis i ‘Run some code. CaseElse ‘Out of range. ‘Run some code. is we ‘Run some code. EndSelect EndIf ‘Run some code. ‘Run some code. SetSecurity (security[1], security[2], security[3]) Security[I] are constants. SetSecurity only executes at compile time. If security[I] is 0 then security[>I] are set to 0 also. Security[I] is in the range of 0..65535. Highest level locks out all communication. The next locks out those that set values or set the clock and program download and upload. The last level locks out only the file upload and download. We will coordinate this with a setting that is entered by the keyboard. 9-15 Section 9. Program Control Instructions 9-16 SetStatus ("FieldName", Value) The SetStatus instruction is used to change the value for a setting in the datalogger's Status table. Syntax SetStatus ( "FieldName", Value ) Remarks The FieldName parameter is the name of the setting to be changed; the name must be enclosed in quotes. The Value parameter is the value to which that field should be set. If the value being set is a string (such as in Messages or StationName), it must be enclosed in quotes. The following settings can be changed: FieldName Description Low12VCount An error counter indicating the number of times the 12V supply has dropped below the allowable level. Low5VCount An error counter indicating the number of times the 5V supply has dropped below the allowable level. MaxProcTime The maximum amount of time that it has taken to execute the program. Messages A field that can be used to hold a string value in the datalogger's Status table. The string must be enclosed in quotes. SkippedScan An error counter indicating the number of times a Scan has been missed because the datalogger was busy with another task (such as the previous scan). SkippedSlowScan An error counter indicating the number of times a SlowScan has been missed. SkippedRecord An error counter indicating the number of times a record was supposed to be stored but wasn't. StationName The name of the datalogger station. VarOutOfBound An indication that a variable is not dimensioned large enough to hold the values being returned. WatchdogErrors An error counter indicating the number of times the datalogger has had to reset its processor. Set to 0 to reset counter. For all Status table settings except Messages and StationName, setting the value to 0 resets the error indicator. This can be useful for troubleshooting purposes. Section 9. Program Control Instructions Slow Sequence The SlowSequence instruction is used to mark the beginning of a section of code that will run concurrently with the main program although typically at a slower rate. Syntax SlowSequence Remarks The SlowSequence statement marks the end of the main program and begins a separate, lower priority program. The instructions for the slow sequence program are executed when the main program is not running as time allows. It is possible to have up to four different SlowSequences for measurements that are not needed at the rate of the primary scan interval. The datalogger tags on measurement instructions from the SlowSequence scans to the normal scan. The CR1000 automatically runs a SlowSequence to update the calibration table. The measurements in a single "scan" of the SlowSequence may be spread out over a longer time period because the measurements can be parceled into multiple primary scans. When more than one SlowSequence is used in a program, certain combinations of the main program scan rate and the SlowSequence scan rates may result in a lower priority SlowSequence never being executed. If the interval for a higher priority SlowSequence arrives before 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. Subroutines and DataTables that are called by a SlowSequence are declared after the SlowSequence instruction. Data written to SlowSequence DataTables will be time stamped with the start time of the last SlowSequence scan. 9-17 Section 9. Program Control Instructions SlowSequence Example ‘CR1000 Series Datalogger ‘Slow Sequence Example Public Temp107, PanelT, BattVolts DataTable (T107,True,-1) DataInterval (0,1,Min,10) Average (1,Temp107,FP2,False) EndTable BeginProg Scan (1,Sec,10,0) Therm107 (Temp107,1,1,Vx1,0,250,1.0,0) CallTable T107 NextScan ‘First Slow Sequence Scans once a minute and stores hourly average SlowSequence DataTable (TPanel,True,-1) DataInterval (0,1,Hr,10) Average (1,PanelT,FP2,False) EndTable Scan (1,Min,3,0) PanelTemp (PanelT,250) CallTable TPanel NextScan ‘Second Slow Sequence Scans every 30 minutes and stores daily average and min. SlowSequence DataTable (BattV,True,-1) DataInterval (0,1,Day,10) Average (1,BattVolts,FP2,False) Minimum (1,BattVolts,FP2,False,False) EndTable Scan (30,Min,3,0) Battery (BattVolts) CallTable BattV NextScan EndProg 9-18 Section 9. Program Control Instructions SubScan (Subinterval, Units, Count) ... NextSubScan The SubScan instruction is used to control an AM16/32 multiplexer or to measure some analog inputs at a faster rate than the program scan. Syntax SubScan (SubInterval, Units, Count) Measurements and processing NextSubScan Remarks The SubScan/NextSubScan instructions are placed within the Scan/NextScan instructions of a program. NOTE SubScans cannot be nested or placed in a SlowSequence. Pulse Count or SDM measurements cannot be used within a SubScan. Parameter Enter & Data Type SubInterval | The time interval between subscans. Enter 0 for no delay between subscans. Constant Units The unit of time for the SubInterval. Constant Alpha Code _| Units usec microseconds msec milliseconds sec Seconds Count The number of times to loop through the subscan each time the scan runs. Constant The maximum number is 65,535. Timer (TimNo, Units, TimOpt) Used to return the value of a timer. Remarks Timer is a function that returns the value of a timer. TimOpt is used to start, stop, reset and start, stop and reset, or read without altering the state (running or stopped). Multiple timers, each identified by a different number (TimNo), may be active at the same time. Syntax variable = Timer(TimNo, Units, TimOpt) 9-19 Section 9. Program Control Instructions 9-20 Parameter Enter & Data Type TimNo An integer number for the timer (e.g., 0, 1, 2,. . .) Use low numbers to Constant, conserve memory; using TimNo 100 will allocate space for 100 timers even Variable, or | if it is the only timer in the program. Expression Units The units in which to return the timer value. Constant Alpha Numeric Code Code Units USEC 0 microseconds MSEC 1 milliseconds SEC 2 seconds MIN 3 minutes TimOpt The action on the timer. The timer function returns the value of the timer Constant after the action is performed Code | Result 0 start 1 stop 2 reset and start 3 stop and reset 4 read only 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. Condition The Condition is any expression that can be evaluated True (nonzero) or False (0 and Null). If Condition is true, all statements in StatementBlock are executed until the Wend statement is encountered. Control then returns to the While statement and Condition is again checked. If Condition is still true, the process is repeated. If Condition it is not True, execution resumes with the statement following the Wend statement. StatementBlock The StatementBlock is the portion of the program that should be repeated until the loop is terminated. These instructions lie between the While and Wend statements. Section 9. Program Control Instructions Wend The Wend statement ends the While...Wend control structure. NOTE The Do...Loop provides another 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 9-21 Section 10. Custom Keyboard Display Menus CRBasic has the capability of creating a custom keyboard display menu for a datalogger program. The custom menu can either appear as submenu of the standard CR1000 menu or it can take the place of the standard menu and contain the standard menu as a submenu. An item in the custom menu may do one of four things: 1) display the value of a variable or a field in a data table. 2) display the value of a variable/flag and allow the user to change that value. 3) provide a link to another custom menu. 4) provide a link to the standard menu. Syntax DisplayMenu (MenuName, 0) DisplayValue (""MenultemName", tablename.fieldname ) Menultem (""MenultemName", Variable ) MenuPick (Item1, Item2, Item3...[tem7 ) SubMenu (MenuName ) Menultem ("MenultemName", Variable ) EndSubMenu EndMenu The DisplayMenu and EndMenu instructions mark the beginning and ending of a custom menu definition. Variables and stored data can be displayed as an item in a menu with the DisplayValue instruction. The Menultem instruction creates an item that displays the value of a variable and allows the value to be edited. The Menultem can be set up to be edited either by keying in a new numeric value or by selecting an option from a pick list. MenuPick is use to create a pick list for Menultem. A link to another user menu can be created with the SubMenu and EndSubMenu functions. Example: ‘CR1000 Example for Custom Menu ‘Declare Variables for panel temperature, two thermocouples, a [down] counter ‘and a flag to determine if the count is active or not: Public Tpnl, Ttc(2) Public Counter, CountFlag ‘Declare constants for menu display: Const Yes = True Const No = False ‘Define DataTable Temp: DataTable (Temp,1,1000) Datainterval (0,60,Sec,10) Average (1,Tpnl,|EEE4,0) Average (2,Ttc(),IEEE4,0) EndTable 10-1 Section 10. Custom Keyboard Display Menus 10-2 ‘Define Custom Menu: DisplayMenu ("Example Custom Menu",1) SubMenu("Current Temperatures") DisplayValue("Panel Temp", Tpnl) DisplayValue("TC 1",Ttc(1)) DisplayValue("TC 2",Ttc(2)) EndSubMenu SubMenu("Last 1 Min. Averages") DisplayValue("Panel Temp", Temp. Tpni_Avg(1,1)) DisplayValue("TC 1",Temp.Ttc_Avg(1,1)) DisplayValue("TC 2",Temp.Ttc_Avg(2,1)) EndSubMenu SubMenu ("Play with Down Count") Menultem ("Enable",CountFlag) MenuPick (Yes,No) ‘Create a pick list with constants Menultem("Down Count",Counter) MenuPick(15,30,45,60) ‘Create a pick list for Counter ‘While the counter can be reloaded with the above menu item, ‘using a sub menu allows slightly more descriptive text: SubMenu("Reload Down Counter") Menultem("Pick Count",Counter) MenuPick(15,30,45,60) ‘Create a pick list for Counter Menultem("Enter No.",Counter) ‘no pick list = user enters # EndSubMenu EndSubMenu EndMenu ‘Main Program BeginProg Scan (1,Sec,3,0) PanelTemp (Tpnl,250) TCDiff (Ttc(),2,mV20C ,1,TypeT,Tpnl,True ,0,250,1.0,0) If CountFlag Then Counter=Counter-1 If Counter <=0 Then Counter=0 Endif CallTable Temp NextScan EndProg DisplayMenu/EndMenu Syntax: DisplayMenu ("MenuName", AddtoSystem) menu definition (DisplayValue, Menultem, and SubMenu) EndMenu The DisplayMenu/EndMenu instructions are used to mark the beginning and ending of a custom menu. The DisplayValue, Menultem, and SubMenu/EndSubMenu instructions are used to define what will be displayed in the custom menu. Section 10. Custom Keyboard Display Menus Parameter Enter & Data Type MenuName _| The text that will be shown as the heading for the custom menu. The string is Text limited to 20 characters, and it should be enclosed in quotation marks. AddtoSystem | This constant determines if the custom menu is a sub menu or replaces the Constant standard menu.. Value_| Result 0 Standard menu is submenu of Custom #0 Custom menu is submenu of Standard DisplayValue ("MenultemName", Source) The Display Value instruction is used to define the menu text and associated Variable or Data Table field to be displayed in the custom menu. The MenultemName parameter is the text that will appear on the left of the line in the custom menu. Up to 10 characters will be displayed along with the value of the source. The name should be enclosed in quotation marks. The source must be a variable or a field from a data table. Values displayed using Display Value cannot be edited. Note: DisplayValue does not allow the keyboard operator to change the value. Use Menultem to display a variable and allow the operator to change the value. Parameter & Data Type Enter MenultemName | The text that will be shown as the heading for the custom menu. The Text string is limited to 20 characters, and it should be enclosed in quotation marks. Source The source of the value to display to the right of the text Variable or “MenultemName” The source must be a variable or a field from a data TableName.Field table. Values displayed using DisplayValue cannot be edited. Menultem ("MenultemName", Source) The Menultem instruction is used to display the value of a variable and allow the user to change the value. Text can be displayed in place of a numeric value if MenuPick is used to create a pick list of constants. The constants must be defined in the program. The MenultemName parameter is the text that appear on the left of the line in the custom menu. The name is limited to 20 characters, but only 10 characters will be displayed when the variable value is shown (the entire 20 characters will be shown when the value is edited). MenultemName should be enclosed in quotation marks. The Variable parameter is the variable name of the value to be displayed. Values displayed using Menultem can be edited, either by typing in a value directly or by creating a pick list of values using MenuPick. Note: Use DisplayValue to display variable values without allowing them to be changed. 10-3 Section 10. Custom Keyboard Display Menus 10-4 Parameter & Data Type Enter MenultemName | The text that will be shown as the heading for the custom menu. The Text string is limited to 20 characters, and it should be enclosed in quotation marks. Source The source of the value to display to the right of the text Variable “MenultemName” The source must be a variable. MenuPick (Item1, Item2, Item3, ..., Item7) The MenuPick instruction is used to create a pick list of values that the preceding Menultem variable can be set to. When MenuPick is used, the pick list is the only way to set the variable from the custom menu. The pick list can contain constants (see example). The constants must be defined in the program. When the list contains constants, the variable value shown in Menultem will be displayed as the constant name (text) if the numeric value of the variable equals the constant. The MenuPick instruction must immediately follow the Menultem instruction for which a list of options is being generated. A pick list can contain up to seven items. Each item in the list is separated from the next by a comma. SubMenu/EndSubMenu Syntax: SubMenu ("MenuName") menu definition (DisplayValue, Menultem, and SubMenu) EndSubMenu The SubMenu/EndSubMenu instructions are used to define the beginning and end of a custom menu screen one level below the current menu. The MenuName parameter is the text that will be shown on the datalogger's display in the current menu and as the heading for the submenu. The string is limited to 20 characters, and it should be enclosed in quotation marks. EndSubMenu marks the end of the custom menu definition. The DisplayValue, Menultem, and SubMenu instructions are used to define the submenu. Parameter Enter & Data Type MenuName | The text that will be shown as the heading for the Sub menu. The string is Text limited to 20 characters, and it should be enclosed in quotation marks. Section 11. String Functions 11.1 Expressions with Strings 11.1.1 Constant Strings Fixed (constant) strings can be used in expressions using quotation marks “”. For example, FirstName = “Mike” causes the string variable FirstName to be assigned “Mike”. 11.1.2 Add Strings Strings can be concatenated using the ‘+’ operator. For example, FullName = FirstName + “ “‘ + MiddleName + “ “* + LastName (The “ “‘ puts a space between the names.) 11.1.3 Subtraction of Strings String 1-String2 results in an integer in the range of -255..+255. Starting with the first character in each string, the characters in string2 is subtracted from the character in string] until the difference is non-zero or until the end of each string is reached. This is mainly used to determine if the strings are the same or not. 11.1.4 String Conversion to/from Numeric Conversion of Strings to Numeric and Numeric to Strings is done automatically when an assignment is made from a string to a numeric or a numeric to a string, if possible. For example: Public Value ‘ default, a IEEE4 float Public SensorString AS String * 8 ‘an ASCII reading from a sensor Value = SensorString * 1.8 + 32 ‘Sensor string is converted to the IEEE4 Value and scaled from Celsius to Fahrenheit. Example: Tag an ID onto the end of a list of names: Dim ID AS long Public Names(10) AS STRING * 8 For ID=1 to 10 Names(ID) = “ITEM”+ID Next ID The array of Names(10) becomes “ITEM1”, “ITEM2”,...,"ITEM10” 11-1 Section 11. String Functions 11.1.5 String Comparison Operators The comparison operators =, >,<,<>, >= and <= operate on strings. The equality operators perform the string subtraction operation noted above and apply the appropriate rule to return either TRUE or FALSE. Example: Find the name “Mike” in the array of Names For ID = 1 to 10 If Names(ID) = “Mike” 11.1.6 Sample () Type Conversions and other Output Processing Instructions The Sample() instruction will do the necessary conversion if the source data type is different than the Sample() data type. The conversion of floats and longs to strings will allocate 12 bytes per field to hold the string. For all other output processing instructions, except when using a reps of 1, the source data type must be the same as the data type specified in the instruction. (Only the first element of the source is converted from Long to Float if necessary. Therefore, this makes a rep of | legal.) Strings are disallowed in all output processing instructions except Sample(). 11.2 String Manipulation Functions CHR(c) Used mainly to express non-printable ASCII characters. C ranges from 0..255. Note that 0 will terminate a string and therefore is useful only if this characters needs to be output. Example: Add a carriage return, line feed to a string at the end. X = “Line”+Chr(13)+Chr(10) FormatFloat (Float, FormatString) The FormatF loat instruction is used to convert a floating point value into a string. Syntax String = FormatFloat (Float, FormatString) Remarks The string conversion of the floating point value is formatted based on the FormatString. See the CRBasic Editor help for parameter details. 11-2 Section 11. String Functions InStr (Start, SearchString, SoughtString, SearchOption ) The InStr instruction is used to find the location of a string within a string. Syntax Variable = InStr (Start, SearchString, SoughtString, SearchOption ) Remarks This instruction returns the integer position of the SoughtString parameter. If the SoughtString is not found, the instruction returns 0. See the CRBasic Editor help for parameter details. LowerCase (SourceString) Returns a lower case string of SourceString Mid (SearchString, Start, Length) The Mid instruction is used to return a substring that is within a string. Syntax String = Mid ( SearchString, Start, Length ) Remarks The Start and Length parameters are used to determine which part of the SearchString is returned. Regardless of the value of the Length parameter, the returned string will be no longer than the original string. See the CRBasic Editor help for parameter details. SplitStr (ResultString, SearchString, FilterString, NumSplit, SplitOption) The SplitStr instruction is used to return an array of strings or numerics from a search string. Syntax SplitStr ( ResultString, SearchString, FilterString, NumSplit, SplitOption ) Remarks The FilterString and SplitOption help to define the array returned by the SplitStr instruction. See the CRBasic Editor help for parameter details. 11-3 Section 11. String Functions StrComp (String1, String2) The StrComp function is used to compare two strings by subtracting the characters in one string from the characters in another. Syntax Variable = StrComp ( String], String2 ) Remarks The StrComp instruction is typically used to determine if two strings are identical. Starting with the first character in each string, the characters in String2 are subtracted from the characters in String] until the difference is non- zero or until the end of String2 is reached. The result of this instruction is an integer in the range of -255 to +255. If 0 is returned, the strings are identical. UpperCase (SourceString) Returns an upper case string of SourceString 11-4 Section 12. Serial Input and Output Functions This set of instructions and functions are meant to be used with (non-PakBus) serial sensors and controllers and for purposes of dialing and paging through generic text based devices. They cover the functionality of the traditional P15 and P97 instructions with additional flexibility. DialModem (ComPort, BaudRate, DialString, ResponseString) The DialModem instruction is used to send a modem dial string out one of the datalogger's ports. Syntax DialModem ( ComPort, BaudRate, DialString, ResponseString ) or variable = DialModem ( ComPort, BaudRate, DialString, ResponseString ) Remarks The DialModem instruction performs a SerialOpen, multiple SerialOuts, and a SerialClose. If this instruction is set equal to a variable, a -1 will be returned if the ResponseString is successfully received or a 0 will be returned if it isn't. DialModem can be used within the DialSequence/EndDialSequence commands to specify a communication route to be used for a PakBus datalogger, or it can be used within the BeginProg/EndProg statements to send the dial string any time the instruction is executed. When used within the DialSequence/EndDialSequence commands, set DialModem equal to a variable that will be used as the DialSuccess parameter for EndDialSequence. The variable will be monitored by the EndDialSequence instruction. If the call is unsuccessful, the link will be closed. See the CRBasic Editor help for parameter details. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. DialSequence (PakBusAddr) The DialSequence/EndDialSequence instructions are used to define the code necessary to route packets to a PakBus datalogger. Syntax DialSequence ( PakBusAddr ) dialing instructions; e.g., DialSuccess = DialModem (ComPort, DialString, ResponseString) EndDialSequence (DialSuccess ) 12-1 Section 12. Serial Input and Output Functions 12-2 Remarks The DialSequence instruction indicates the beginning of the code; the EndDialSequence indicates the ending. The code is entered in the declarations section of the program, prior to the main program (defined by the BeginProg/EndProg instructions). Any time an instruction in the main program requires that communication be made with the remote datalogger identified by the PakBusAddr parameter, the DialSequence code for that datalogger will be executed. The code will also be executed if the datalogger receives a message from another PakBus device that needs to be routed to the remote datalogger. Each instruction has one parameter: PakBusAddr The PakBusAddr parameter identifies the PakBus address of the remote datalogger with which the host datalogger is trying to communicate. Valid entries are 0 through 4094. Each PakBus device in the network must have a unique address. DialSuccess The DialSuccess parameter is a variable that will be monitored for the success/failure of the communication attempt. If the communication attempt fails, the communication link will be closed. A variable holding the result of DialModem can be used for this parameter. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. DialVoice (DialString) The DialVoice instruction is used to define the dialing string for a COM310 voice modem. Syntax DialVoice (DialString) Remarks If the DialVoice instruction is set equal to a variable, a -1 (True) will be returned if the communication attempt was successful or a 0 (False) will be returned if it failed. VoiceHangup is used after the communication attempt to hang up the voice modem. DialString The DialString is the telephone number and any other codes used to dial the modem. A comma in the DialString inserts a 2 second pause. When creating code for voice modems, the VoiceKey instruction should be used to add a delay before the EndVoice instruction is executed. Otherwise, the datalogger will end the VoiceSpeak command before the spoken message is completed. Section 12. Serial Input and Output Functions ModBusMaster (ResultCode, ComPort, BaudRate, ModBusAddr, Function, Variable, Start, Length, Tries, TimeOut) The ModBusMaster instruction sets up a datalogger as a ModBus master device to send or retrieve data to/from a ModBus slave. Syntax ModBusMaster ( ResultCode, ComPort, BaudRate, ModBusAddr, Function, Variable, Start, Length, Tries, TimeOut ) Remarks The datalogger supports ModBus functions 01-05, 15, and 16 (see Function parameter below). The ModBusMaster instruction can be placed outside of the main program (defined by BeginProg/EndProg). See the CRBasic Editor help for parameter details. ModBusSlave (ComPort, BaudRate, ModBusAddr, DataVariable, BooleanVariable) The ModBusSlave instruction sets up a datalogger as a ModBus slave device. Syntax ModBusSlave ( ComPort, BaudRate, ModBusAddr, DataVariable, BooleanVariable) Remarks This instruction sets up a ModBus slave device to respond to the data request of a ModBus master. Supported ModBus functions are 01, 02, 03, 04, 05, 15, and 16. See the CRBasic Editor help for parameter details. Notes: The datalogger communicates in RTU mode (not ASCII mode) to other ModBus devices. The communications port, baud rate, data bits, stop bits, and parity are set in the ModBus driver for PC-based software or on the PLC. The datalogger usually goes into sleep mode after 40 seconds of inactivity on the communications port. After going to sleep with some interface methods it sometimes takes a packet of incoming data to wake it up and then a retry packet to get the message through. For example, the first byte of the packet is spent waking up the SC32A/B or SC929, so a packet retry within 40 seconds is required to get a complete ModBus packet into the datalogger for processing. If packets continue arriving before the 40 second timeout, the datalogger should respond very quickly to the new packets. If necessary, you can tie pin 3 of the datalogger's CS I/O port to 5V to keep the datalogger awake. The drawback to this approach is that the average current draw will be higher than if the datalogger is allowed to go into its low power sleep mode between infrequent ModBus queries. Some ModBus devices (e.g., some RTUs made by Bailey Controls that use less common CPUs) require reverse word order (MSW/LSW) in the floating point format. The datalogger currently does not support this less common word order. (There are experimental versions of some datalogger operating systems 12-3 Section 12. Serial Input and Output Functions 12-4 that have used the reverse word order.) Some software packages have a set setting to work with this original ModBus format. For example, the “Modicon 32-bit floating point order (0123 vs. 3210)” advanced option must be enabled for the ModBus object in National Instruments’ Lookout. ModemHangup (ComPort) ... EndModemHangup The ModemHangup and EndModemHangup instructions are used to enclose code that should be run when a COM port hangs up communication. Syntax ModemHangup ( ComPort ) instructions to be run upon hangup EndModemHangup Remarks The ModemHangup instruction indicates the beginning of the code; the EndModemHangup indicates the ending. The code is entered in the declarations section of the program, prior to the main program (defined by the BeginProg/EndProg instructions). When the datalogger detects that a COM port is hanging up, the ModemHangup code will be run. This instruction set is most often used with modems that must be sent a command sequence to disconnect and go into a low power state. Note that each COM port operates independently; therefore, commands to hang up modems can be processed concurrently. ComPort The ComPort parameter specifies the communication port and mode for this instruction. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. SerialClose (ComPort) The SerialClose instruction is used to close a communications port that was previously opened by the SerialOpen instruction. Syntax SerialClose (ComPort) Remarks If this instruction is set equal to a variable, the result will be True (-1) of the port was opened or False (0) if it was already closed. The ComPort parameter specifies the communication port that should be closed. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. Section 12. Serial Input and Output Functions SerialFlush (ComPort) The SerialF lush instruction is used to clear any characters in the serial input buffer. Syntax SerialFlush ( ComPort ) Remarks This instruction clears the buffer and leaves the port open. If the input buffer should be cleared before each execution of SerialIn, place SerialFlush in the code before the SeriallIn instruction. The ComPort parameter specifies the communication port buffer that should be cleared. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. Serialln (Dest, ComPort, TimeOut, TerminationChar, MaxNumChars) The SerialIn instruction is used to set up a communications port for receiving incoming serial data. Syntax Serialln ( Dest, ComPort, TimeOut, TerminationChar, MaxNumChars ) Remarks Incoming data is stored in the destination array until the TerminationChar is received, MaxNumChars value is met, or the TimeOut parameter is exceeded. Incoming characters are buffered in ring memory, the size of which is determined by the SerialOpen parameter. The buffer can be cleared using the SerialFlush instruction. The SerialIn instruction has the following parameters: See the CRBasic Editor help for parameter details. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. SeriallnBlock (ComPort, Dest, MaxNumberBytes) The SerialInBlock instruction stores incoming serial data. If set equal to a variable or used in place of an expression, it will return the number of bytes received. Syntax SerialInBlock ( ComPort, Dest, MaxNumberBytes ) Remarks Incoming serial data, up to the value defined in MaxNumberBytes, will be stored in the Dest parameter. SerialInBlock will not wait for the return of characters. If no new characters are received since the last execution of the instruction, 0 will be returned by the instruction. This instruction can be used 12-5 Section 12. Serial Input and Output Functions 12-6 as the expression for the NumberBytes parameter in the SerialOutBlock instruction. ComPort The ComPort parameter specifies the communication port and mode that will be used when receiving the binary data. See the CRBasic Editor help for parameter details. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. SerialOpen (ComPort, BaudRate, Format, TXDelay, BufferSize) The SerialOpen instruction is used to set up one of the datalogger's ports for communication with a non-PakBus device. Syntax SerialOpen ( ComPort, BaudRate, Format, TXDelay, BufferSize ) Remarks When the SerialOpen instruction is executed, the serial port is "opened" and subsequent textual messages will flow in and out of the port in between PakBus packets. The data will be redirected away from the terminal mode input based on subsequent SerialIn and SerialOut instructions. See the CRBasic Editor help for parameter details. Note: SerialFlush is used to clear the buffer. For PakBus communication, BufferSize can normally be left at 0. However, during communication with some devices it may be necessary to limit the packet size (BufferSize) and add a delay (TXDelay) for communication to be successful. For example, PakBus packets are 1000 bytes. The largest packet that an RF95 can accommodate is 248 bytes. Setting the buffer to 240 would limit the packet size and ensure that the RF95's buffer was not exceeded. A delay (e.g., 500,000 ms) would ensure that each packet has sufficient time to arrive at its destination before the next packet is transmitted. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. SerialOut (ComPort, OutString, WaitString, NumberTries, TimeOut) The SerialOut instruction is used to transmit a string over one of the datalogger's communication ports. Syntax SerialOut ( ComPort, OutString, WaitString, NumberTries, TimeOut ) Remarks If this instruction is set equal to a variable, the number of characters output is returned. Ifa delay is needed before outputting the string, it should be entered in the TXDelay parameter of the SerialOpen instruction. If the OutString and WaitString variables are not formatted as a string, they will be converted to a string by the datalogger. Section 12. Serial Input and Output Functions One of three conditions determines when the datalogger should proceed to the next instruction: when the WaitString is received, the NumberTries is exhausted, or the TimeOut is met. See the CRBasic Editor help for parameter details. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. SerialOutBlock (ComPort, Expression, NumberBytes) The SerialOutBlock instruction is used to send binary data out a serial port. Syntax SerialOutBlock ( ComPort, Expression, NumberBytes ) Remarks This instruction is needed when the data to be transmitted contains a null value. (The SerialOut instruction is terminated with a null value, thus, the transmission of binary data is required.) It can also be used when the number of bytes to be output is variable, or when the device receiving the transmitted data requires that data to be in a binary format. See the CRBasic Editor help for parameter details. This instruction runs sequentially from the processing task sequencer, regardless of whether the datalogger is in pipeline or sequential mode. 12-7 Section 13. PakBus Communication Instructions This set of instructions is used to communicate with other PakBus devices. In general they specify a COM port and a PakBus address. If the route to the device is not yet known, it will try a direct route through the COM port. If the route is through a neighbor that must first be dialed, then it will first try to dial using the user specified DialSequence. The PakBus Address parameter is a variable, so it can be used in a For loop, for example. The ComPort parameter is restricted to the following predefined constants: ComRS232 ComME Com310 ComSDC7 ComSDC8 Coml1 (C1,C2) Com2 (C3,C4) Com3 (C5,C6) Com4 (C7,C8) COIDNAARWNK This parameter sets a default com port in the case that the route to the remote node is not yet known. The Baud Rate on asynchronous ports will default to 9600 baud unless set otherwise by a SerialOpen() function defined in 5.1 or if the port is opened by an incoming packet at some other baudrate. The Baud Rate parameter on the asynchronous ports (ComRS232, ComME, Com1, Com2, Com3,and Com4) is restricted to 300,1200,4800,9600,19200,38400,57600, 115200, with a default of 9600. (The bit rate on the synchronous ports is to be determined.) The instructions in general include a ResultCode variable indicating if it was successful or not. The ResultCode will be set to 0 if successful. If communication fails, it will increment. If the communication succeeds but there is some error indicated the response code, then the ResultCode is set to the negative of the response code. The possible non-zero response codes (negated) are: 1 Read Only or Permission denied 2 Out of Space in the remote 3. Syntax Error 16 Invalid Table Name or Field Name 17 Data type conversion not supported 18 Memory bounds violation 19 20 Out of memory in the host 21 Cannot route to remote (communication no attempted) 13-1 Section 13. PakBus Communication Instructions 13-2 ClockReport The Timeout parameter in these instructions is in units of .01 seconds. If 0 is used, then the default timeout defined by the time of the best route is used. PakBus “Hop Metrics” are used to calculate this time. Presently there is not a number of tries parameter. It is easy to retry within CRBasic: For I = 1 to 3: SetSettings(ResultCode,....): if ResultCode = 0 Exit For (If needed, we can add a retry parameter or default to more than one try.) These communication instructions will by default wait for a response or timeout before the program moves on to the next instruction. They of course can be used in a SlowSequence Scan. Optionally the ComPort parameter can be negated, which will cause the instruction not to wait for a response or timeout. This will make the instruction execute faster but any data that it retrieves and the ResultCode will be set asynchronously with the Scan, i.e., whenever the communication is complete. The ClockReport instruction sends the datalogger's internal clock value to a remote datalogger in the PakBus network. Syntax ClockReport ( ComPort, RouterAddr, PakBusAddr ) Remarks This instruction initiates a one-way transmission of the datalogger's clock value to a remote datalogger. No response is returned from the remote datalogger. If the remote datalogger has a PakBusClock instruction with this datalogger's address, the remote will set its clock according to the transmitted time value. See the CRBasic Editor help for parameter details. Note: By default, LoggerNet uses PakBus address 4094 and PC400 uses 4093. PakBusClock (PakBusAddr) Routes (Dest) When the datalogger program contains a PakBusClock instruction, the datalogger will set its clock to the clock value of a sending datalogger with the specified PakBus address. Syntax PakBusClock ( PakBusAddr ) Remarks The PakBusAddr parameter is the address of the remote datalogger from which this datalogger will accept a ClockReport. The ClockReport instruction is used in the remote datalogger to send its clock value to this datalogger. The Routes instruction returns a list of known dynamic routes for a PakBus datalogger. Section 13. PakBus Communication Instructions Syntax Routes ( Dest ) Remarks This instruction stores four values for each known route into the Dest parameter. The four values for each route are: ComPort used for communication, neighbor PakBus address, destination PakBus address, and expected response time (in milliseconds). The list of routes is terminated with a-1. Dest must be an array dimensioned large enough to accommodate the number of routes (4*routes), plus one for the termination character. SendData (ComPort, RouterAddr, PakBusAddr, DataTable) The SendData instruction is used to send the most recent record from a data table to a remote PakBus device. Syntax SendData ( ComPort, RouterAddr, PakBusAddr, DataTable ) Remarks This instruction can be used to send data to a PC running the LoggerNet server. When received, LoggerNet will store the data in a file under a name that follows its naming convention, as specified in the Setup window of the software. See the CRBasic Editor help for parameter details. Note: By default, LoggerNet uses PakBus address 4094 and PC400 uses 4093. DataTable The DataTable parameter is the name of the table from which the last record should be sent. SendGetVariables (ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, SendVariable, SendSwath, GetVariable, GetSwath) The SendGetVariables instruction is used in a remote datalogger to send an array of values to the host datalogger, and/or retrieve an array of data from the host datalogger. Syntax SendGetVariables ( ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, SendVariable, SendSwath, GetVariable, GetSwath ) Remarks When the SendGetVariables instruction is used in a datalogger, data transmission times are controlled by a host datalogger. Most often, this instruction is preceded by the TimeUntilTransmit instruction to trigger the execution of the SendGetVariables instruction. The program in the host datalogger must contain the NetWork instruction, which sets the times that the remote dataloggers should respond. If security is enabled in the host datalogger, it must be unlocked to level 2 for this instruction to be successful. 13-3 Section 13. PakBus Communication Instructions 13-4 See the CRBasic Editor help for parameter details. SendTableDef (ComPort, RouterAddr, PakBusAddr, DataTable) The SendTableDef instruction is used to send the table definitions from a data table to a remote PakBus device. Syntax SendTableDef ( ComPort, RouterAddr, PakBusAddr, DataTable ) Remarks This instruction can be used to send table definitions from a datalogger to a PC running the LoggerNet server. See the CRBasic Editor help for parameter details. SendVariables (ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, "TableName", "FieldName", Variable, Swath) The SendVariables instruction is used to send value(s) from a variable or variable array to a data table in a remote datalogger. Syntax SendVariables ( ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, "TableName", "FieldName", Variable, Swath ) Remarks Values can only be sent to the remote datalogger's Public or Status table. The Dest and Swath parameters are used to determine what values will be sent to the remote datalogger. The first value to be sent is defined with Dest, and the number of values is specified by Swath. The most recent value(s) stored in the table are sent. If security is enabled in the remote datalogger, it must be unlocked to level 2 for this instruction to be successful. See the CRBasic Editor help for parameter details. SetSettings (ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, Settings) The SetSettings instruction is used to set one or more settings in a remote datalogger. Syntax SetSettings ( ResultCode, ComPort, RouterAddr, PakBusAddr, Security, TimeOut, Settings ) Remarks This instruction can be used to set one or more existing PakBus settings or user-created settings in the datalogger. If security is enabled in the remote datalogger, it must be unlocked to level 1 for this instruction to be successful. See the CRBasic Editor help for parameter details. Section 13. PakBus Communication Instructions Note: By default, LoggerNet uses PakBus address 4094 and PC400 uses 4093. TimeUntilTransmit The TimeUntilTransmit instruction returns the time remaining, in seconds, before communication with the host datalogger. Syntax TimeUntilTransmit Remarks The TimeUntilTransmit value is derived from the time slot information that is sent by the host datalogger. If the host datalogger has not yet sent time slot information, this instruction will use a random time interval between 0 and 60 seconds until communication with the host is made. A typical use of this instruction is to trigger the execution of the SendGetVariables instruction when the datalogger's communication time slot occurs (e.g., If TimeUntilTransmit = 0 Then SendGetVariables). 13-5 Appendix A. CR1000 Status Table The CR1000 status table contains current system operating status information that can be accessed from the running CR1000 program or monitored by PC software. There is also a way to view the status information from the keyboard. Table 1 shows the variables in the status table and a brief explanation of each follows. Status Fieldname Description Variable|Default [Normal User can |Info [Type Range change? [Type IFileMark A value created by the PC software IRecNum [The record number for this set of data L [TimeStamp The time the record was generated ___[Time OS Version [The version of the Operating System [String Status |OSDate [Date the OS was released. String Status OSSignature |The Operating System Signature Integer Status SerialNumber |Machine specific serial number. Stored [Integer |_ i a Status in FLASH memory. IRevBoard \Hardware revision number. Stored in [Integer |_ a a Status IFLASH memory. | StationName' IName of the machine. Stored in String § [|_ Yes Config FLASH memory. _| |PakBusAddress” [Logger PakBus address. Integer |] 1 to 3999 |Yes Config IPB |ProgName [Running program name. String L Status StartTime (Time that the program began running. [Time Status |RunSignature Signature of the current running Integer |_ a a Status [program file. \ProgSignature Signature of the compiled binary data [Integer |_ lL a Status structure for the current program. This value is independent of comments ladded or non functional changes to the [program |Battery (Current value of the battery voltage. {Float = [_ 9.6-16 a IMeasu |This measurement is made in the Volts Ire [background calibration. |PanelTemp Current panel temperature Float = |_ E a IMeasu jmeasurement. This measurement is Ire Imade in the background calibration. |WatchdogErrors* The number of Watchdog errors that [Integer |0 0 (Can Reset|Error Ihave occurred while running this - 0 rogram. LithiumBattery* Current value of the Lithium battery [Float a 12.7-3.6 | IMeasu oltage. This measurement is updated Volts Ire iin the background calibration. Appendix A. CR1000 Status Table Status Fieldname Description ear Default ype INormal Range User can change? Info [Type ILow12VCount’ loccurrences of the 12VLow signal [being asserted. When this condition is detected the logger ceases making lmeasurements and goes into a low [power mode until the system voltage is lup to a safe level. |Keeps a running count of the number offInteger 0 (Can Reset = 0 Error ILow5VCount occurrences of the SVExtLow signal being asserted. Keeps a running count of the number offInteger {0 (Can Reset = 0 |Error ICompileResults (Contains any error messages that were generated by compilation or during run time. String Error StartUpCode® |A code variable that allows the user to Iknow how the system woke up from [poweroff. String 0 Status Error |ProgErrors |The number of compile (or runtime) errors for the current program. Integer [Error |VarOutOfBound’ INumber of times an array was accessed lout of bounds. Integer |0 (Can Reset Error SkippedScan INumber of skipped scans that have occurred while running the current scan. Integer {0 Error 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 a value for the system slow scan and each of the users scans. Integer |0 jarray Reset = 0 Error SkippedRecord’ Variable array that tells how many lrecords have been skipped for a given table. Each table has its own entry in this array. Integer |0 larray Can [Reset = 0 Error ErrorCalib* |A counter that is incremented each time la bad calibration value is measured. (The value is discarded (not included in ithe filter update) and ErrorCalib is incremented. Integer |0 |Error \MemorySize (Total amount of SRAM (bytes) in this device. 2097152 (2M) 4194304 (4M) Status |MemoryFree [Amount (in bytes) of unallocated Imemory on the CPU (SRAM). The user Imay not be able to allocate all of free Imemory for data tables as final storage Imust be contiguous. As memory is allocated and freed there may be holes that are unusable for final storage, but that will show up as free bytes. integer Status A-2 Appendix A. CR1000 Status Table Status Fieldname Description Type ni [Normal User can |Info Range \ProgMemFree [Amount of free space in the CPU Iramdisk that is used to store program files. Integer 0 - 95232 \CommsMemFree [Array of two values. First value is bytes| small blocks available. Integer free, the second value is the number of Jarray of 2 1) 2000- 15000 |FullMemReset A value of 98765 written to this location will do a full memory reset. |Full Memory Reset will reinitialize IRAM Disk, FinalStorage, PakBus Imemory, and return DevConfig arameters back to defaults. Integer 0 Enter 98765 to [Reset |DataRecordSize umber of records in a table. Each ible has its own entry in this array. SecsPerRecord [Output interval for a given table. Each table has its own entry in this array. \DataFillDays Time in days to fill a given table. Each ltable has its own entry in this array. (CardStatus Contains a string with the most recent card status info. String Status CardBytesFree” Gives the number of bytes free on the (Card. Integer Status |MeasureOps \This is the number of task sequencer lopcodes required to do all lmeasurements in the system. This value includes the Calibration opcodes compile time) and the system slow sequence opcodes. Integer Status |MeasureTime The time in microseconds required by the hardware to make the Imeasurements in this scan. The sum of all integration times and settling times. \Processing will occur concurrent with this time so the sum of measure time land process time is not the time lrequired in the scan instruction. Integer Status \ProcessTime [Time in microseconds that it took to n through processing on the last scan. ime is measured from the end of the EndScan instruction (after the easurement event is set) to the eginning of the EndScan (before the ait for the measurement event begins) for the subsequent scan. Integer Status MaxProcTime The maximum time in microseconds equired to run through processing for e current scan. This value is reset when the scan exits. Integer Can Status [Reset = 0 Appendix A. CR1000 Status Table Status Fieldname Description Variable|Default|Normal |User can |Info ype Range change? e [LastSlowScan |The last time that this slow scan Integer |_ a Z Status executed. If the user has slow scans larray jthen this variable becomes an array with a value for the system slow scan land each of the users scans. SlowProcTime™ [The time in microseconds required to {Integer |_ | | Status process the current slow scan. Ifthe _ array juser has slow scans then this variable [becomes an array with a value for the system slow scan and each of the users scans. IMaxSlowProcTime™ (The maximum time in microseconds [Integer |_ a | Status required to process the current slow _ [array scan. If the user has slow scans then |this variable becomes an array with a value for the system slow scan and leach of the users scans. PortStatus |Array of Boolean values giving the [Boolean [False |Trueor Yes Status state of the control ports. The values _ array of [False lare updated every 500mS. 8 | PortConfig Array of strings explaining the use of {String [Input [Inputor |_ Status the associated control port. Valid larray of jOutput entries are: Input, Output, SDM, SDI- [8 12, Tx, and Rx. Security” |An array of the (3) Security settings [Integer |0,0,0 |0- 65535 [Yes Status (will not be shown if security is larray of (0 is no enabled). 3 security) ICommsActive™ ay of Boolean values telling if [Boolean |False, [True or |_ Status communications is currently active on |array of |except |False he corresponding port. Aliased to 9 for the ICommActiveRS232, CommActiveME, lactive ICommActiveCOM3 10, ICOM iCommActiveSDC7, ICommActiveSDC8, (CommActiveCOM1, (CommActiveCOM2, (CommActiveCOM3, ICommActiveCOM4 (CommsConfig ‘ay of values telling the Integer |RS232- loor4 | Config onfiguration of comm ports. Aliased |array of |SDC8 o CommConfigRS232, 9 = \CommConfigME, ICOM 1- (CommConfigCOM3 10, 4=0 (CommConfigSDC7, (CommConfigSDC8, (CommConfigCOM1, (CommConfigCOM2, (CommConfigCOM3, (CommConfigCOM4 A-4 Appendix A. CR1000 Status Table Status Fieldname Description 'Variable|Default|Normal |User can |Info Type Range change? [Type [Baudrate”* |Array of baudrates for comms. Aliased |Integer |RS232=|1200, Yes, can |Config to: BaudrateRS232, BaudrateME, jarray of |- 2400, lalso use IBaudrateCOM310, BaudrateSDC7, 9 115200 4800, SerialOut |BaudrateSDC8, BaudrateCOM1, IME- |9600, instructio audrateCOM2, BaudrateCOM3, ISDC8 =19.2k, in to setup. [BaudrateCOM4 115200 [38.4k, 57.6k, ICOM1-|115.2k 4=0 IsRouter is the CR1000 configured to act as [Boolean [False 0 or 1 Yes Config router IPB |PakBusNodes Number of nodes (approximately) that [Integer |50 =50 Yes Config will exist in the PakBus network. This IPB value is used to determine how much Imemory to allocate for networking. (CentralRouters(1) - (8)'° {Array of (8) PakBus addresses for Integer |0 il Yes Config central routers. jarray of IPB 8 |Beacon (Beacon Interval) |Array of Beacon intervals (in seconds) |Integer |0 0 - approx. /Yes Config for comms ports. Aliased to array of 165,500 IPB I|BeaconRS232, BeaconME, 9 |BeaconCOM310, BeaconSDC7, |BeaconSDC8, BeaconCOM1, IBeaconCOM2, BeaconCOM3, |BeaconCOM4 \Verify Array of verify intervals (in seconds) [Integer |0 lo— approx.|__ |Status for com ports. Aliased to VerifyRS232, Jarray of 165,500 |VerifyME, VerifyCOM310, 9 VerifySDC7, VerifySDC8, |VerifyCOM1, VerifyCOM2, [VerifyCOM3, VerifyCOM4 |MaxPacketSize IMaximum number of bytes per data [_ 1000) | a collection packet Messages (Contains a string of messages that can String [_ LY es be entered by the user. CalGain” Calibration table of Gain values. Each |Float — |_ a \Calib integration / range combination has a __ array of gain associated with it. These numbers |18 lare updated by the background slow sequence if needed in the program. CalSeOffSet” Calibration table of single ended offset |Integer |_ close toO |_ Calib values. Each integration / range larray of combination has a single ended offset {18 associated with it. These numbers are lupdated by the background slow sequence if needed in the program. A-5 Appendix A. CR1000 Status Table Status Fieldname Description Variable|Default [Normal User can |Info [Type Range change? CalDiffOffset” Calibration table of differential offset [Integer lose to 0 values. Each integration / range larray of combination has a differential offset {18 associated with it. These numbers are jupdated by the background slow sequence if needed in the program. 1 10 11 12 13 The StationName instruction can also be used in a program to write to this field. Pak Bus Addresses 1 to 4094 are valid. Addresses >= 4000 are generally used for a PC by PC200, PC400, or LoggerNet. Watchdog errors are automatically reset upon compiling a new program. Replace the lithium battery if <2.7V. See section 1.10.2 for replacement directions. The 12V low comparator has some variation, but typically triggers at about 9.0 volts. The minimum specified input voltage of 9.6 V will not cause a 12 V low, but a 12 V low condition will stop the program execution before the CR1000 will give bad measurements due to low of supply voltage. Currently not being used (12/1/2004) The Variable out of Bounds error occurs when a program tries to write to an array variable outside of its declared size. It is a programming error that causes this, and should not be ignored. When the datalogger detects that a write outside of an array is being attempted it does not perform the write and increments the VOOB in the status table. The compiler and pre-compiler can only catch things like reps too large for an array etc. If an array is used in a loop or expression the pre-compiler does not (in most cases cannot) check to see if an array will be accessed out of bounds (i.e. accessing an array with a variable index such as arr(index) = arr(index-1), where index is a variable). The self calibration is run automatically in a slow scan (Section 3.8.) The order of tables is the order in which they are declared. Card bytes free is shown = -1 when no card is present. displays large number until a SlowScan runs. MaxSlowProcTime displays 0 until a SlowScan runs. Security can be changed via DeviceConfig, CR1000KD, PBGraph, StatusTable, and SetSecurity instruction. Shows -1 if security code has not been given/deactivated. Appendix A. CR1000 Status Table 14 15 16 17 When the SerialOpen instruction is used CommsConfig is loaded with the format parameter of that instruction. Currently (11/2004), the only formatting option available is 0 = No error checking. PakBus communication can occur concurrently on the same port If the port was previously opened (in the case of the CP UARTS) for PakBus, or if the port is always opened ( CS-9pin, and RS232) for PakBus the code will be 4. The value show is the initial baud rate the CR1000 will use. A negative value will allow the CR1000 to auto baud but will dictate at which baud rate to begin A list of up to 8 PB addresses for routers that can act as Central Routers. See DeviceConfig for more information. (1) 5000 mV range 250 uS integration, (2) 2500 mV range 250 uS integration, (3) 250 mV range 250 uS integration, (4) 25 mV range 250 uS integration, (5) 7.5 mV range 250 uS integration, (6) 2.5 mV range 250 uS integration, (7) 5000 mV range 1/60 Hz integration, (8) 2500 mV range 1/60 Hz integration, (9) 250 mV range 1/60 Hz integration, (10) 25 mV range 1/60 Hz integration, (11) 7.5 mV range 1/60 Hz integration, (12) 2.5 mV range 1/60 Hz integration, (13) 5000 mV range 1/50 Hz integration, (14) 2500 mV range 1/50 Hz integration, (15) 250 mV range 1/50 Hz integration, (16) 25 mV range 1/50 Hz integration, (17) 7.5 mV range 1/50 Hz integration, (18) 2.5 mV range 1/50 Hz integration Campbell Scientific Companies Campbell Scientific, Inc. (CSD 815 West 1800 North Logan, Utah 84321 UNITED STATES www.campbellsci.com info@campbellsci.com Campbell Scientific Africa Pty. Ltd. (CSAf) PO Box 2450 Somerset West 7129 SOUTH AFRICA www.csafrica.co.za sales@csafrica.co.za Campbell Scientific Australia Pty. Ltd. (CSA) PO Box 444 Thuringowa Central QLD 4812 AUSTRALIA www.campbellsci.com.au info@campbellsci.com.au Campbell Scientific do Brazil Ltda. (CSB) Rua Luisa Crapsi Orsi, 15 Butanta CEP: 005543-000 Sao Paulo SP BRAZIL www.campbellsci.com.br suporte@campbellsci.com.br Campbell Scientific Canada Corp. (CSC) 11564 - 149th Street NW Edmonton, Alberta TSM 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 Terre Neuve - Les Ulis 91967 COURTABOEUF CEDEX FRANCE www.campbellsci.fr campbell.scientific@wanadoo.fr Campbell Scientific Spain, S. L. . Psg. Font 14, local 8 08013 Barcelona SPAIN www.campbellsci.es info@campbellsci.es Please visit www.campbellsci.com to obtain contact information for your local US or International representative. MODEL 090D BAROMETRIC PRESSURE SENSOR OPERATION MANUAL DOCUMENT 090D-9800 1600 Washington Blvd. Regional Sales & Service Grants Pass, Oregon 97526 3206 Main St., Suite 106 | Telephone 541-471-7111 Rowlett, Texas 75088 Facsimile 541-471-7116 Telephone 972-412-4715 Met One Facsimile 972-412-4716 Instruments Barometric Pressure Sensor Model 090D Operation Manual 1.0 GENERAL INFORMATION nen 090D Barometric Pressure Sensor uses an active solid-state device to sense barometric pressure. Self-contained electronics provide a regulated voltage to the solid state sensor and amplification for the signal output. 1.2 A 1169-XX Sensor Cable _is a 4-conductor shielded, vinyl jacketed cable. Length is given in -XX feet on each cable part number label. TABLE 1-1 Model 090D-26/32-1 Pressure Sensor Specifications Performance Calibrated Range 26-32" (standard)* Calibrated Operating Range -18°C to +50°C Operating temperature range -40°C to +50°C Resolution Infinite Accuracy +0.04 in Hg (41.35 mb) or Accuracy +0.125% FS Output 0-1V DC (standard)* *Refer to model number of sensor. Example: OS90D -26/32 -1 4 |oN Basic Mod # Range ("Hg) Output Voltage (In this example, the sensor output is O-1v for a range of 26 to 32" Hg) Electrical Characteristics Power Requirement 11ma @ 12 VDC Sensor Output 0-1 VDC Standard 0-5 VDC Optional Physical Characteristics Weight 2 Ibs. 5 oz. (1.05 Kg) Dimensions 5.5" x 5" x 7.5" (14x12x19 cm) O90D-9800 6/97 4.0 | MAINTENANCE AND TROUBLESHOOTING 4.1 eneral Maintenance Schedule. A. Inspect pressure inlet port occasionally to insure it is free of obstruction. No other periodic maintenance or calibration is required. B. Inspect sensor for proper operation per Section 3.1. 4.2 090D Pressure Sensor Maintenance. The pressure sensor is an inherently stable device that does not require periodic service or recalibration. Should service or recalibration become necessary, the sensor must be returned to the factory. Always inspect Model O90D Pressure Sensor to make sure that inlet port is clean and free from ‘obstructions. AUK POWER. COM R ED +\2v GEN SIG COM Sever TERN, seLD MODEL O9OD BAROMETRIC PRESURE SENSOR CABLE CONNECTIONS (See Section 2.2) 090D-9800 6/97 REV. &.) TITUE CHNS ,wse". . OFOB-1". V4 I.D. TUBING TOLERANCES a 42 O:D, PIPE eexcert a8 wore: DECIMAL MOUNTS DETAIL , O9OD DRAWN BY MATERIAL DATE DRAWING S)iels) NUMBER TRACED may Warranty Products manufactured by Met One Instruments, Inc: are warranted against defects in material and workmanship for a period of one (1) year from the date of shipment from the factory. Offered products not manufactured by Met One Instruments, Inc. will be warranted to the extent and in the manner warranted by the manufacturer of that product. Any product found to be defective during the warranty period will, at the option of Met One Instruments, Inc., be replaced or repaired. In no case shall the liability of Met One Instruments, Inc. exceed the purchase price of the product. This warranty may not apply to products that have been subject to misuse, negligence, accident, acts of nature or that have been altered or modified other than by Met One Instruments, Inc. Consumable items such as bearings and batteries are not covered under this warranty. Other than the warranty set forth herein, there shall be no other warranties, whether expressed, implied or statutory, including warranties of fitness or merchantability. Service Any product being returned to Met One Instruments, Inc. for service, repair or calibration must be assigned a return authorization (RA) number. Please call (541) 471-7111 or (972) 412-4715 for an RA number and shipping instructions. Products manufactured by Met One Instruments, Inc. that are returned for service, repair or calibration are warranted against defects in material and workmanship for ninety(90) days from date of shipment, under the same conditions as stated above. 9/99 praannanynanny