Hello,
I am trying to create a program that will allow me to use a RMY 81000 and a Rotorod pollen counter for the CR1000. So far I have created a program to control the RMY 81000 and now I want to be able to control the pollen counter. The Rotorod must be on the SW12 port and cycle on for 1min then off for 9mins then repeat again.
I would like to be able to have a timestamp of when the SW12 switch is powered on so I can go back to outputs from the RMY 81000 and compare the data.
I can email my program that I have for the RMY to whoever thinks they can help me with this.
Thanks,
Will
Hi Will,
Unless I'm missing something, this is straight forward enough (I'm no advanced user!)
Add a variable called Rotorod As Boolean
Then add this in to your scan:
If TimeIntoInterval(0,10,Min) Then Rotorod = True
If TimeIntoInterval(1,10,Min) Then Rotorod = False
If Rotorod = True Then SW12(1)
If Rotorod = False Then SW12(0)
Then it just be a case of logging the variable Rotorod in a table.
This will power on the SW12 on the top of a 10 minute interval e.g. 11:00, 11:10, 11:20 and off 1 minute in to the 10 minute interval 11:01, 11:11, 11:21 etc
If instead you'd want to turn it on after an event and then off after a minute, so you weren't waiting for a 10 minute interval to pass, then you could incorporate a counter.
Depending on your scan rate, change Rotorod to be true after the counter reaches a certain value. If you were on 10 second scans it would be:
If Counter = 0 Then Rotorod = True
Counter = Counter + 1
If Counter >= 6 Then Rotorod = False
If Counter >= 60 Then Counter = 0
It may need tweaking a little and also watch out to make sure the code for the RMY81000 isn't causing any skipped scans or it may mess up the counter. Otherwise, I think that's all you need.
Michael