CRBasic Example 1: CR1000X program that measures the CS325DM using Modbus
SerialClose
(ComC7)
SerialOpen
(ComC7,19200,2,0,10000,4)
SerialFlush
(ComC7)
Scan
(1,Sec,0,0)
PanelTemp
(PTemp,15000)
Battery
(Batt_volt)
'CS325DM
ModbusMaster
(ModbusResult,ComC7,19200,18,3,Modbus_CS325DM,2,3,1,100,2)
CS325DM_ModbusResult = MBDecode(ModbusResult)
If
ModbusResult = 0
Then
CS325DM_Irradiance = Modbus_CS325DM(1)
CS325DM_Isc = Modbus_CS325DM(2)
'Short-Circuit Current
CS325DM_PVTemp = Modbus_CS325DM(3)
'PV Temperature
Else
CS325DM_Irradiance = NAN
CS325DM_Isc = NAN
CS325DM_PVTemp = NAN
EndIf
CallTable
OneMin
NextScan
EndProg
Table A-2: Analog example program wiring
Wire color
1
CR1000X terminal
Description
Brown
12V
12 VDC
White/brown stripe
G
Power and signal ground
Orange
⏚
Ground
Green
⏚
Ground
White/orange stripe
SE15
Irradiance input
White/green stripe
SE16
Temperature input
Clear
⏚
Shield
1
The white/blue striped and blue wires are not used for analog programming.
CS325DM Silicon Irradiance Reference Sensor
11