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
Public PTemp, batt_volt,Rec_No, Last_Rec_No, Dataout
Public RxResponse As Boolean,ModBusSource(10)As String *20,
'Define Data Tables
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
If anybody had previous experience in that matter, please help me make it working.
Thanks in advance
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?
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.
I finally got this thing sorted out with the code:
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.
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.
This post is under review.