Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR1000 and Datagarrison Satellite Station


Maestropolo Sep 21, 2012 11:03 PM

Hi All,
My name is Paul Celicourt, a PhD student working with Michael Piasecki, Faculty at The City College of New York.

I am attempting to use a Datagarrison Satellite Station http://upwardinnovations.com/upward/DataGarrisonSatelliteStation.pdf to transmit data collected with a CR1000 configured as a ModBus Slave device to a website. But, I am having really hard time to make it working.

I have found out that the Datagarrison Device uses an SBD9602 Satellite Transceiver and more importantly an Onset's Hobo Weather Station as logger(part number H21-001).

My codes are the following:

'CR1000 Series Datalogger
SequentialMode
Public PTemp, batt_volt,Rec_No, Last_Rec_No, Dataout
Public RxResponse As Boolean,ModBusSource(10)As String *20,
'Define Data Tables
DataTable (Test,1,1000)
DataInterval (0,5,Min,10)
Maximum(1,batt_volt,FP2,False,True)
Average(1,PTemp,FP2,False)
EndTable
'Define Subroutines
Sub AssignData
Rec_No=Test.Record(1,1) 'Get the current record number,
Dataout=Rec_No>Last_Rec_No 'compare current record number to last record number
If Dataout Then
ModBusSource(1)=Test.TimeStamp(4,1)
ModBusSource(2)=Test.PTemp_Avg(1,1)
ModBusSource(3)=Test.batt_volt_Max(1,1)
Last_Rec_No=Rec_No
EndIf
Exit Sub
EndSub

'Main Program
BeginProg
SerialOpen (ComRS232,19200,0,0,1000)
ModBusSlave (ComRS232,19200,1,ModBusSource(),RxResponse,0)
Last_Rec_No=0
Scan (10,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
CallTable Test
Call AssignData
NextScan
EndProg

If anybody had previous experience in that matter, please help me make it working.

Thanks in advance


Sam Sep 24, 2012 10:33 PM

Paul,
I can find any information in the Data Garrison documentation that mentions ModBus. Everything points to Hobo sensors. It sounds like you need a bit more information. What docs pointed you towards ModBus as the interface for the Data Garrison? How about SDI-12, does it support that?


Maestropolo Sep 25, 2012 05:41 PM

Sam,

Thank you for you reply and your willingness to help me out.

There is a terminal strip with 6 ports (Ground, RS485+, RS485-,SDI,SW,V+) that is used to communicate with the Hobo weather station. This is what pointed me to use the ModBus protocol to pass the data stored by the CR1000 to the Hobo weather station.

I wanted to use the SDI-12 protocol, while the port is in the terminal strip, the configuration window does not allow me to send SDI-12 commands to the CR1000.

It is very likely that the ModBus protocol is the only option that I have.


Maestropolo Jan 21, 2013 06:36 PM

Sam,
I finally got this thing sorted out with the code:
ModBusSlave (ComRS232,19200,1001,ModBusSource(1),RxResponse,2)

Thnak you.


Sam Jan 21, 2013 09:13 PM

Paul,
Thank you for the follow up. It looks like you have "1001" in the Modbus address parameter. Is that correct? Modbus addresses are only 1 byte 0-255, with most unit restricting the address to 1-247. That seems highly suspicious. I see that you also needed to use option 2, 4 byte floating point or long, with no byte reversal. That makes sense (while reviewing this it seems to me that we should make option 2 the default value for that parameter in the CRBasic editor). Anyway, I am very curious about the whole "1001" thing.


Maestropolo Jan 22, 2013 05:47 PM

Sam,
I was having a hard time in figuring out how to make the two devices talking one to the other. I used the ModBusAdrr 1 and have not had any results. Then, I used the following statement of the CRBasic Editor help which did not solve the problem but did not harm the program also.

"The ModBusAddr can be used to specify an offset for the starting register. Enter Starting Register * 1000 + the address. (i.e., the most significant digits specify the offset and the last three digits specify the ModBus address)".

The way I understood this is that I needed to both specify the starting register (ModBusSource(1)) and the address of the CR1000 configured as a ModBus Slave device. So, 1001 was used to take care of this.

Overall, what really solve the problem is the "VarDataType=2" and the linking of the devices using RS232 serial connection. During the testing, with "VarDataType=0", we (I and Tom of Upward Innovations) got the bytes reversed while the CRBasic tutorial said that there is no reversal of the byte order. This might something that CSI may need to look into.

Let me know please if I am wrong.


Altenburger Sep 9, 2020 01:49 AM

This post is under review.

Log in or register to post/reply in the forum.