Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Control port switching ,Help please.


cellectronic Feb 5, 2016 08:00 AM

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.


Thein Feb 5, 2016 08:21 AM

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


JDavis Feb 5, 2016 04:03 PM

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))


jra Feb 5, 2016 04:10 PM

Here's more information on the TimeIsBetween() instruction

https://www.campbellsci.com/blog/do-more-than-store-data


smile Feb 6, 2016 10:53 AM

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

Log in or register to post/reply in the forum.