Hi,
I can't figure how to retrieve data on a SMP3-1 Kipp & Zonen pyranometer, I have seen the instruction manual, the comlunication manual, and I'm working with CRBasic to make a simple program but, all value still zero.
'CR350 Series Datalogger 'Declare Public Variables Public PTemp, batt_volt,ModbusData(20),Result 'Define Data Tables DataTable (Test,1,-1) DataInterval (0,30,Sec,10) Minimum (1,batt_volt,FP2,0,False) Sample (1,PTemp,FP2) Sample (1,ModbusData(),FP2) EndTable 'Main Program BeginProg Scan (5,Sec,0,0) PanelTemp (PTemp,50) Battery (batt_volt) 'Retrieve Modbus Data ModbusClient (Result,Com2,19200,1,4,ModbusData(),5,20,3,100) 'Enter other measurement instructions 'Call Output Tables CallTable Test NextScan EndProg
I'm looking for the values 5, 6, 10 and 11 on the input registers.
(link of the pyranometer : https://www.kippzonen.com/Product/266/SMP3-Pyranometre)
Waht Am I missing ?
EDIT : I said a SMP3-1 (twice) but it's a SMP3-A for "amperage" because there also a 4-20mA ouput.
Hey,
I tried like hours to deal with it but, I couldn't figure it out, I have no clue to success with this, and that's a real problem for me here, I should already had put this on the field :/.
Somebody have an idea on this ?
Hey,
I just hope that someone who can solve this problem will see it.
Hey,
I'm desperately trying to up the topic expecting some help ; CR350 have been bought because it can communicate in modbus, but It doesn't seem to work properly.
I think a quick look of an expert could solve our problem and allow us to pursue our work.
Bye
Hi Everyone.
SMP Pyranometers Default settings: 19200,N,E,1
For Campbell ModBusClient command, you have to add (1) at sensors registers No.
So if you want to read the register No 05, then you have to ask for register No 06.
Below you can find a sample program for CR350 & SMP10 (it is similar to SMP3)
I read only registers 5 & (that means 6 & 7 fior Campbell)
My pyranometer ModBus Address: 03
'CR350 Series Datalogger 'SMP Pyranometer 'Date: 15.07.2025 'Program author: Spyros Drikos @ Scientific Enterprises 'Declare Constants 'Declare Public Variables Public ModBusResult Public SMP10 Public SMP10_TC Public PTemp, Batt_volt 'Declare Private Variables Dim SMP10_RawProcessed(10) As Long 'Array to hold the raw ModBus data 'Define Data Tables DataTable (SMP10_Measurements,1,-1) 'Set table size to # of records, or -1 to autoallocate. DataInterval (0,1,Min,10) Sample (1,ModBusResult,FP2) Sample (1,SMP10_TC,FP2) Sample (1,SMP10,FP2) Minimum (1,Batt_volt,FP2,False,False) Sample (1,PTemp,FP2) EndTable 'Main Program BeginProg 'Open COM2 serial port for ModBus RS485 Communication SerialOpen (Com2,19200,2,0,500,4) 'Set SW12V High all the time for sensors Power supply (if needed) SW12 (SW12_1,1 ) SW12 (SW12_2,1 ) Scan (2,Sec,0,0) PanelTemp (PTemp,60) Battery (Batt_volt) 'Enter other measurement instructions 'SMP10 (RS485 Address : 03) '--------------------------------------- 'Connections: ModBus RS485 'Gray (RS485+) --- COM2 (Tx) 'Yellow (RS485-) -- COM2 (Rx) 'White (Supply +) -- 12V 'Black (Supply -) -- G 'Blue (RS485 Gnd) -- G 'ModBus Communication 'settings: 19200,8,E,1 '------------------------ 'For Campbell DataLoggers: Register No = Register No +1 ModbusClient (ModBusResult,Com2,19200,3,3,SMP10_RawProcessed(6),6,2,3,200,1) 'ModbusClient SMP10_TC = SMP10_RawProcessed(6)'Temperature corrected Radiation SMP10 = SMP10_RawProcessed(7)'Uncorrected Radiation (for calibration only) If ModBusResult > 0 Then SMP10_TC = 9999 SMP10 = 9999 EndIf 'Call Output Tables CallTable SMP10_Measurements NextScan EndProg