Campbell Scientific CR6 CR6 Measurement and Control System - Page 281
SDI-12 Sensor Mode
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 281 highlights
Section 7. Installation program can be coded to parse the response and issue subsequent SDI-12 commands based on a programmer customized evaluation of the response. For more information on parsing strings, see Input Programming Basics (p. 253). CRBasic Example 57. Using an SDI-12 Extended Command ' the use of SDI-12 extended commands. In this example, 'a temperature measurement, tt.tt, is sent to a CH200 Charging Regulator using the command 'XTtt.tt!'. The response from the CH200 should be '0OK', if 0 is the SDI-12 address. ' 'Declare Variables Public PTemp As Float Public SDI12command As String Public SDI12result As String 'Main Program BeginProg Scan(20,Sec,3,0) PanelTemp(PTemp,250) SDI12command = "XT" & FormatFloat(PTemp,"%4.2f") & "!" SDI12Recorder(SDI12result,C3,0,SDI12command,1.0,0) NextScan EndProg 7.9.17.2.2 SDI-12 Sensor Mode SDI-12 sensor mode is not active in CR6 operating system version 1. The SDI12SensorSetup() / SDI12SensorResponse() instruction pair programs the CR6 to behave as an SDI-12 sensor. A common use of this feature is the transfer of data from the CR6 to other Campbell Scientific dataloggers over a single-wire interface (terminal configured for SDI-12 to terminal configured for SDI-12), or to transfer data to a third-party SDI-12 recorder. Details of using the SDI12SensorSetup() / SDI12SensorResponse() instruction pair can be found in the CRBasic Editor Help. Other helpful tips include: Concerning the Reps parameter in the SDI12SensorSetup(), valid Reps when expecting an aMx! command range from 0 to 9. Valid Reps when expecting an aCx! command are 0 to 20. The Reps parameter is not range-checked for valid entries at compile time. When the SDI-12 recorder receives the sensor response of atttn to a aMx! command, or atttnn to a aCx! command, only the first digit n, or the first two digits nn, are used. For example, if Reps is mis-programmed as 123, the SDI-12 recorder will accept only a response of n = 1 when issuing an aMx! command, or a response of nn = 12 when issuing an aCx! command. When programmed as an SDI-12 sensor, the CR6 will respond to SDI-12 commands M, MC, C, CC, R, RC, V, ?, and I. See table SDI-12 Commands for Transparent Mode (p. 271) for full command syntax. The following rules apply: 1. A CR6 can be assigned only one SDI-12 address per SDI-12 port. For example, a CR6 will not respond to both 0M! AND 1M! on SDI-12 port C1. However, different SDI-12 ports can have unique SDI-12 addresses. Use a separate SlowSequence for each SDI-12 port configured as a sensor. 281