Jump to content

Recommended Posts

Posted
Hi, Wonder if any one has ever used the Bit Words 343 and 345 they are supposed to compare Date and Time values from the PLC clock I need to make contacts at certain times of the day, would it be possible to turn contacts on and off using these Bit Words. Regards Peter

Posted
Always mention the CPU type you are working with. Not sure what you mean with Bit Words 343 and 345. I guess you are referring the Auxilary Relay area words that contain the PLC RTC values? You can use the MOVD function and move the digits hours and minutes into a single word so you can use them in comparison instructions.
Posted
Sorry I am using a CJ1M the programming manual talks about words 343 for greater than date/time and 345 for less than date/time I want to use these as a means to begin logging data for a programme I run in conjunction with Supervisor so I want totals to be started counting at 0600 then stopped at 1400, another contact turned on at 1400 then turned off at 2200, and another contact turned on at 2200 and turned off at 0600. I tried forcing the contacts on using Supervisor but every time power was lost to the PLC I had to reforce the contacts. Regards Peter
Posted
CJ1M you will have the following RTC data: A351 Minutes & Seconds A352 Hours & Date A353 Year & Month A354 Day of the week You can use MOVD to move the data you need to compare into a single word e.g. HHMM
Posted
Correct! You might want to consider if you want the time to follow daylight saving, have a look at this FB download: http://forums.mrplc.com/index.php?autocom=...mp;showfile=588
Posted (edited)
Attached is 1 example, possibly the way I would do it. I have allowed for a separate start/stop variable from CX-Supervisor for each shift, whereas, you may want shifts to roll 1 to the other, then you could use the Shift 1 Finish as Shift 2 Start etc. or, you may want a gap between shifts, so this will allow for that. Hope this helps. Clock_Example.cxp Edited by lostcontrol
Posted
ANDW is a great mask - I use it all the time. Use #FF00 and $00FF.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...