I have a CR2xx hooked up to a DAA H340-SDI rain gauge. I'm trying to use the aXGT! command to get the sensor's current time.
I've tried two methods and have been unable to get it to work.
My first attempt was to issue the following command
SDI12Recorder(H340Time,3XGT!,1,0)
where H340Time is dimensioned as a 3-member array since the aXGT! command returns three values.
Well, this didn't work. My assumption is that since it's not an aM! command, that the CR2xx does not issue the corresponding aD0! command.
So, I tried the same thing, but added in the aD0! command
SDI12Recorder(H340Time,3XGT!,1,0)
SDI12Recorder(H340Time,3D0!,1,0)
This results in only assigning a value of 3 to H340Time(1). H340Time(2) and H340Time(3) remain 0. The SDI-12 address of the H340 is 3, which is where I think the 3 comes from.
Any ideas on getting this to work?
Thanks,
Jimmy
* Last updated by: lespedeza on 2/22/2010 @ 8:00 AM *
I don't think the XGT! command is supported, it is not listed as such in the Help.
Janet
Jimmy,
I don't have a CR2XX on hand but I'm assuming it has the same terminal support as the CR1000 and CR800. Suggest you connect to the logger using the terminal emulator built into Loggernet and use the "P" option to get to the talk through mode on the port you have the sensor connected to. You can manually enter the SDI commands and see the results. Might help you to figure out the issue.
Not sure why you need the gauge time, why not disregard the logging capabilities of the rain sensor and just measure the tips with the aM! command?
Good luck,
IslandMan
IslandMan,
Thanks for the suggestions. It's really not that big of a deal. I just like redundancy in my programs. The program totalizes rain on a daily basis (via a aM! command), but I also wanted to take advantage of the rain gauge's internal daily totalizer and make sure they were both the same. But to make sure the rain gauge was resetting its daily total, I wanted to make sure the rain gauge's internal clock was correct. Instead of connecting to the datalogger and issuing SDI-12 commands, I was hoping to be able to get this information in a data table via the aXGT! command. An alternative that I've implemented is to use the aXST! command to set the clock using an If IfTime statement on a daily basis.
Regards,
Jimmy
Jimmy,
Looking in the H340SDI Manual
"aD0" a+HH+MM+SS<cr><lf>
Did you try:
SDI12Recorder(H340Time(),3XGT!,1,0)
SDI12Recorder(H340Time(),3D0!,1,0)
Note the change from H340Time to H340Time()
I missed this before. I'm not sure the SDI12Recorder command would treat the Variable as an array without the ().
IslandMan
IslandMan,
Thanks, that's probably the only thing I haven't tried. Since passing array names w/o the parentheses works for the aM! commands, I figured it would work without them for this command. I'll give it a try and report back. Thanks.
Jimmy
I think you will be lucky to get this working.
Reason is that we do not support the standalone "0D!" command - it is used automatically by the logger for standard SDI instructions the logger knows will produce data.
If the logger does not know the instruction at best it sends the instruction but it will not attempt to pickup the response.
We do this to simplify the use of the instruction for the user, but then it restricts flexibility I would agree. I'll raise a request to see if we can look at this.
As I said above, I have confirmed the CR200 datalogger will send the X command but not attempt to pick up data, nor does it support standalone D0 commands. One suggestion that came back was you could try using the R0 command which for some sensors will return the last output value. I very much doubt this will work as the sensor says it does not deal with R0 commands. But it may be worth a try.
Public val(6)
Public result
BeginProg
Scan(5,sec)
SDI12Recorder(result,3XGT!,1,0)
Delay (10,mSec)
SDI12Recorder(val,3R0!,1,0)
NextScan
EndProg
Andrew,
Thanks for the additional information and for your suggestions. I'll give them a try, but as I mentioned previously, I've found a workaround (use XST instead of XGT). The program works fine, it records what I need, but I was just trying to build a little redundancy into the program (which isn't really necessary) and attempting to try something different.
Thanks again,
Jimmy