denise01 Posted June 5, 2012 Report Posted June 5, 2012 Hello Am trying to turn on a output at one minute to six in the morning. It has to be precise. Does any one know the best function to use to do this The PLC is a CJ1M. Many Thanks Peter
Michael Walsh Posted June 7, 2012 Report Posted June 7, 2012 Use comparison instructions (=) with addresses A351 and A352. A351 = MMSS where MM is minutes in BCD format from 00 - 59 and SS is seconds in BCD from 00 - 59 A352 = DDHH where DD is the day of the month in BCD 01 - 31 and HH is the hour in BCD from 00 - 23 You will need to mask out the day of the month. Something like the code below would work:
denise01 Posted June 7, 2012 Author Report Posted June 7, 2012 Many Thanks Michael, I have used the compare functions and the clock functions in the past but never knew how to get a precise time. I am devising a production count to work in association with Supervisor and put three totals up on to a over head monitor this will help me considerably because my PLC clock timings seem to change sometimes. Any way thanks again Regards Peter
BobB Posted June 8, 2012 Report Posted June 8, 2012 The time clock in the PLC is not extremely accurate over time - I would suggest you use an external precision time clock that can be than can be set bu anyone at any time.
PdL Posted June 8, 2012 Report Posted June 8, 2012 If the PLC is equipped with an Ethernet unit, you can sync the RTC with a NTP server...
denise01 Posted June 8, 2012 Author Report Posted June 8, 2012 No unfortunetly I link the CJ1Ms by Hostlink, which I think accounts for some of the problems with time. I maybe need to alter the scan time. Regards Peter
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now