Hi,
We want to communicate with a sensor Modbus ASCII with our CR6 but all of my values are 0,00...
What is the problem according you ?
Public PTemp
Public batt
Public ModBus(2), Result
Public ModBusniv(1), Result2
Alias ModBus(1)= Raven_1
Alias ModBus(2)= Raven_2
Alias ModBusniv(1)= Raven_niv
DataTable (Table_Raven,True,-1)
DataInterval (0,1,Sec,10)
Sample (1,batt,FP2)
Sample (1,PTemp,FP2)
Sample (1,Raven_1,FP2)
Sample (1,Raven_2,FP2)
Sample (1,Raven_niv,FP2)
EndTable
'Main Program
BeginProg
'Define com port parameters for Raven sensor communication
SerialOpen (ComC1,-19200,23,100,50,4)
Scan (100,mSec,0,0)
'Panel Temperature
PanelTemp (PTemp,15000)
'Main battery voltage
Battery (batt)
'Sensor Water level and water temperature measurements, ModBus data
ModbusMaster (Result,ComC1,19200,1,3,ModBus(),1014,2,3,100,10)
ModbusMaster (Result2,ComC1,19200,1,16,22,4000,1,3,100,10)
ModbusMaster (Result2,ComC1,19200,1,3,ModBusniv(),4000,1,3,100,10)
'Call Output Tables
CallTable Table_Raven
NextScan
EndProg
........................
The sensor is :
RS485 two wires
19200, 8 bits, 2 stop bits, no parity
Modbus ASCII, bit HI-LO
Float32 for holding register.
We have values at 1014 and 4000, code 03.
We have connected the modbus on C1 and C2
Do you see a problem in my code ?
Thank you,
Remi
I suggest using the sniffer mode of the CR6 terminal to watch ComC1. Look at the message you are sending out to the sensor to see if it matches what you expect. Also look to see if we are getting any reponse from the sensor.
https://www.campbellsci.com/videos/sdi12-sensors-watch-or-sniffer-mode
If the datalogger outputs the command as you expect, it might be a cabling issue. Try swapping the A and B wires. Some manufacturers label them opposite.
Hi,
I am connected to CR6 and in the termnial emulator, after a 'open terminal', nothing happen....
What is the problem ?
Thank you
Remi