Author Topic: Timer variation PLC and WinTrilogic  (Read 13047 times)

woody

  • Newbie
  • *
  • Posts: 12
  • I'm a llama!
    • View Profile
Timer variation PLC and WinTrilogic
« on: July 24, 2012, 10:59:05 PM »
Hi everyone.

Just finished my PLC ladder code for my new E10+relay. I am Really happy with it. I ended up needing more timers than were available but I managed to work around that by making some of the available ones generic timers and an internal relay coil opening/closing different rungs of ladder as needed.

So from the documentation, the timers by default are 0.1s decrements yes? I also read that a value of 1000 = 100 seconds.

So by my calculations, max value (9999) is about 16.7 minutes? Not exact, but close enough. Did I get that right or did I calculate that wrong?  (10000 / 10)/60 = 16.6667

Anyway I started a timer in simulation mode (WinTrilogi) and monitored it with my PC clock. After the timer expired I calculated the time to be 17.5 minutes. I did this a few times to check my results. Each time, a timer with the value of 9999 would take about 17 and a half minutes.

I would like my actual PLC timers to run as close to 4 hours and another as close to 30 minutes as possible. I was wondering if anyone could confirm for me that the timer in the PLC will be 16.7 minutes like I calculate or closer to the 17.5 minutes like the simulation mode shows? Keeping in mind that I am using counters to extend the range of my timers.

I am unable to load ladder onto my PLC to test at this point in time as I am in another country.

I presume the difference has to do with the software implementation in simulate mode. Maybe something to do with weired numbers like 1024  :)

I would just like to get my code as close to perfect as I can so it is ready to upload to my E10 when I go back home in a few more days.

Thanks,

Woody

woody

  • Newbie
  • *
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Timer variation PLC and WinTrilogic
« Reply #1 on: July 24, 2012, 11:37:50 PM »
And I just read that you can change the timers from 0.1s to 999.9s so I might do that rather than using a counter :) I can probably make them 60.0s timers and fix my issue by using whole minutes etc. I shall read a bit more before posting next time
*EDIT*
"4 timers (0.1s to 999.9s)" Silly me, you can't change the timers counting speed as my brain was thinking. 0.1 to 999.9s is just the values 1-9999. Each decrement is of course 0.1s x your value... Pretty much just scrap this comment, my problem in original comment still exists though.

Regards,

Woody
« Last Edit: July 25, 2012, 06:41:16 AM by woody »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Timer variation PLC and WinTrilogic
« Reply #2 on: July 25, 2012, 09:49:02 AM »
The timer simulation on the PC is just an approximation and not meant to be highly accurate. On the actual PLC  it will run for 1000  seconds if you set the timer to 9999, and that is 16.7 minutes

To get a 4 hours timer, you can construct a 1 minute timer (timer SV = 599) and use the timer contact to trigger a counter. The counter SV = 239 which will counts down to zero in 240 minute (i.e 4 hours).  The same 1 minute timer contact can feed into another counter with SV = 29 to get a 30 minutes timer.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

woody

  • Newbie
  • *
  • Posts: 12
  • I'm a llama!
    • View Profile
Re:Timer variation PLC and WinTrilogic
« Reply #3 on: July 25, 2012, 10:49:10 AM »
Thanks Support :)

That is pretty much what I did. I wanted a 5.5 hour and a 0.5 hour timer so I set timers to 9000 and made them pulse a counter (in retrospect I could have used one 9000 timer).

For 0.5 hours I made the counter 1
For 5.5 hours I made the counter 21

Originally I made the counters 2 and 22 but then realised when simulating that the timer will count down and pulse the counter which only initialises it. Therefor, a counter set to 1 will actully see 2 pulses before it hits 0 and changes state of its contacts.

All I really wanted to confirm was that a timer set to 9999 was infact 16.6 minutes or there abouts and not a full minute out like my simulation was showing. Thank you for your confirmation I wont have to change any more of my code I suspect.

I'm really enjoying your product. I can see lots of potential for my side projects. Thanks once again.

Woody
« Last Edit: July 25, 2012, 10:51:26 AM by woody »