Hello All,
Can someone please advise on how I can get control port 1 to switch off for one minute at midnight and be on the rest of the time on a CR1000 .
This switching action would be used to control a PSW12 , wired to reset a communications device at midnight or somewhere close.
Any help would be much appreciated.
Thanks.
Hi Cellectronic,
You may try this code, place at the end of the program just above "EndProg";
SlowSequence Scan Scan (60,Sec,2,0) If TimeIntoInterval(0,1440,Min) Then PortSet(1,0) Delay(1,60,Sec) PortSet(1,1) EndIf Next Scan
Rgds,
Thein
The most reliable way would be to use the TimeIsBetween instruction added in OS28.
This line placed in your scan would keep C1 low the first minute of the day. It will be high the rest of the day.
PortSet (1 ,TimeIsBetween (1,1440,1440,min))
Here's more information on the TimeIsBetween() instruction
Hi to All,
If you do not use the SW12 port, remember that for C1..C8 port you need a power circuit (transistor and / or relay, there are example on logger manual) to turn on and off a device, and in any case also the SW12 has a current limit which can control, about one ampere to 12v, then about 10W.
Smile