For my program I want to read out my sensor every minute (Scan(60,Sec,5,0)).
However, I have one sensor (a self calibrating soil heat flux plate) that needs to read out data every second. Therefore I have created a subScan within the main Scan (SubScan(1,sec,60)) . I want to calibrate this sensor every day. 170 seconds after the start of each calibration, I need to read out my sensor. I wanted to do this using the 'TImeIntoInterval' command:
If (TimeIntoInterval (startCalibration+170, calibrationInterval, Sec)) Then
.....
EndIf
This is not possible, it gives the following error:
"Scan interval must be integrally divisible into interval.Error(s) detected in the program".
It seems to me that the function TimeIntoInterval does not work because I use an interval smaller than the interval of the main Scan (even though this is programmed in the subscan). Does anyone have a suggestion to solve this issue.
Thanks a lot in advance!
Hanne
This post is under review.
Run the main table at one second and do an "if time" to measure and do which you need only every minute.
Be careful however that within the 170 seconds of calibration interval you will also have 2 one-minute measurements.
for example, you could use a flag to block the measure per minute, if you are in the calibration phase.
Smile
This post is under review.
This post is under review.