Appendix B. MS-80M example
program
(p. 12) provides wiring for the example program. Although, this program is for the
CR1000X, other CRBasic data loggers are programmed similarly.
Table B-1: Wiring for example program
Wire Color
Function
CR1000X
Green
RS-485A
C5
White
RS-485B
C6
Red
Power in (12 V)
12V
Black
Power ground
G
Yellow
RS-485 G
G
Clear
Shield
⏚
(analog ground)
CRBasic Example 1: CR1000X program that measures the MS-80M
' Variables associated with Pyranometer 1 (MS-80M)
Dim
ModbusMS80_1(2)
As Float
Public
ModbusResult_1
Public
MS80M_Irradiance
As Float
Unit
s MS80M_Irradiance=W/m²
Public
MS80M_InternalTemp
As Float
Units
MS80M_InternalTemp = DegC
DataTable
(OneMin,True,-1 )
Datainterval
(0,1,Min,10)
Average
(1,MS80M_Irradiance,IEEE4,False)
StdDev
(1,MS80M_Irradiance,IEEE4,False)
Maximum
(1,MS80M_Irradiance,IEEE4,False,False)
Minimum
(1,MS80M_Irradiance,IEEE4,False,False)
Average
(1,MS80M_InternalTemp,IEEE4,False)
StdDev
(1,MS80M_InternalTemp,IEEE4,False)
Maximum
(1,MS80M_InternalTemp,IEEE4,False,False)
Minimum
(1,MS80M_InternalTemp,IEEE4,False,False)
EndTable
BeginProg
MS-80M Secondary Standard Pyranometer with RS-485 Modbus Communication
12