Hi,
I am have connected a WXT520 to my CR6 datalogger. What I want to do is scan each of the different sensors (temp/rh, wind, precipitation) with a different interval.
I have tried using SlowSequence but that has not worked- I just get NAN values.
I have already tested the WXT520 and datalogger with just a single scan and they are both working fine. My code is as follows:
----------------------------------------------------
' Variable and data table definitions '
BeginProg
Scan(30,Sec,0,0)
'Read 3 parameters: air temp, relative humidity, and atmospheric pressure
SDI12Recorder (T1(7),C1, "0","R2!",1.0,0)
CallTable SENSOR_TABLE30s
NextScan
SlowSequence
Scan(3,Sec,0,0)
'Read the 6 wind parameters
SDI12Recorder (T1(1), C1, "0","R1!",1.0,0)
if T1(5)<=0.1 then T1(5)=0
CallTable SENSOR_TABLE3s
NextScan
SlowSequence
Scan(10,Sec,0,0)
'Read the 6 rainfall parameters
SDI12Recorder (T1(10),C1, "0","R3!",1.0,0)
CallTable SENSOR_TABLE10s
NextScan
EndProg
----------------------------------------------------
Could it be because despite the 'separate' sensors, the WXT520 output is only channeled through the C1 port?
Does anyone know a solution?
Thank you very much.
Hi
There are some things that don't convince me. It would take longer to understand where the problem is.
But the most important is that the slow scans are performed only when time remains, advanced of the main scans and at the 30th second the 3 tables (3,10 and 30 sec) are met and since the sdi12 protocol is very slow a conflict is created.
I would do only one main scan rate at 3 sec, acquiring all the measurements and would make 3 datatable to have the 3 types of data.
Maybe you consume a little more energy but you should solve it.
Smile
Thanks for helping!
I am now going with this and it seems to work:
Scan(1,Sec,0,0) 'Read the 6 wind parameters If TimeIntoInterval(0, 30, sec) Then SDI12Recorder (T1(1), C1, "0","R1!",1.0,0) CallTable OneSec EndIf 'Read 3 parameters: air temp, relative humidity, and atmospheric pressure that is sent by the Vaisala If TimeIntoInterval(0, 30, sec) Then SDI12Recorder(T1(7),C1, "0","R2!",1.0,0)
CallTable ThirtySec EndIf 'Read the 6 rainfall parameters If TimeIntoInterval(0, 10, sec) Then SDI12Recorder (T1(10),C1, "0","R3!",1.0,0) CallTable TenSec
EndIf NextScan
Do you see any problems with it? My main goal is to minimize power consumption. Will the 1 second scan interval significantly impact this?
Thank you :)
Hi
in the status it checks if skipped scan errors accumulate.
In an old application, with the same probe, I could not get under 2 seconds for all parameters, even using the R command. If I remember correctly, the R command continuously measures the probes to be faster to respond to the request, therefore increasing consumption. I would like to try to be sure, but now I don't have these tools in the lab. However, I think that with the M command at 10 seconds for all measurements, it will save you energy.
Smile