Appendix A. Example programs
(p. 9) provides wiring for
(p. 9) over RS-485.
provides wiring for
(p. 12) uses analog voltage measurements.
Table A-1: Modbus example program wiring
Wire color
1
CR1000X terminal
Description
Blue
C7
RS-485 A-
White/blue stripe
C8
RS-485 B+
Brown
12V
12 VDC
White/brown stripe
G
Power and signal ground
Orange
⏚
Ground
Green
⏚
Ground
Clear
⏚
Shield
1
The white/orange and white/green wires are not used for Modbus RS-485 programming.
CRBasic Example 1: CR1000X program that measures the CS325DM using Modbus
'CR1000X Series Data Logger
'CS325DM-L RC18 Reference Cell
Public
PTemp :
Units
PTemp = °C
Public
Batt_volt :
Units
Batt_volt = VDC
Dim
ModbusResult
Public
CS325DM_ModbusResult
As String *
26
Dim
Modbus_CS325DM(3)
Public
CS325DM_Irradiance :
Units
CS325DM_Irradiance = W/m²
Public
CS325DM_Isc :
Units
CS325DM_Isc = Amps
Public
CS325DM_PVTemp:
Units
CS325DM_PVTemp = °C
DataTable
(OneMin,1,-1)
DataInterval
(0,1,Min,10)
Minimum
(1,Batt_volt,FP2,False,False)
Sample
(1,PTemp,FP2)
Average
(1,CS325DM_Irradiance,IEEE4,CS325DM_Irradiance = NAN)
StdDev
(1,CS325DM_Irradiance,IEEE4,CS325DM_Irradiance = NAN)
CS325DM Silicon Irradiance Reference Sensor
9