View Full Version : time base control logic
May 25th, 2010, 05:43 AM
S:4/1 what is this in control logic?
May 25th, 2010, 06:25 AM
Specify the system you are referring to. I suppose you are referring to a free running clock bit but different AB systems have a different time base.
May 25th, 2010, 07:01 AM
I think when he said "control logic" he meant to say "ControlLogix" ... if so, the picture below might give some basic ideas ...
note that since the ControlLogix "CurrentValue" increments in micro-seconds you'll have to play around to select a useful bit number ... (the bit "1" mentioned in the original question is probably going to be toggling WAY too fast) ...
secret handshake: the S:4 "Free Running Clock" available in RSLogix500 isn't built-in with RSLogix5000 ... you have to use a GSV instruction to retrieve the data - store the data in an appropriate set of tags - and then you can use the data in your program ...
if this "CurrentValue" data location doesn't meet your needs, give us more details about what you're trying to accomplish ... the GSV can access other data too ... and to be honest, if you just want to toggle a bit on and off, a "home brew" free running timer rung might be easier to set up in the long run ...
May 25th, 2010, 11:34 AM
In addition to using WALLCLOCK time as Ron mentioned, you can also create your own free running timer in RSLogix5000 by just creating an unconditional timer and using the .ACC bits of the timer. Never reset this timer, it will never reach its preset.
|Timer Free_Running_Clock +-(DN)
Unconditionally unlatch Free_Running_Clock.ACC.30 so that the timer will never time out. It will count to 1073741.824 seconds and then start over.
Now you can access each bit in the ACC word, with each bit behaving similar to the S:4, except now you have 29 bits available for use instead of 16.
The bit on time is 2Y milliseconds where Y is the bit number 0-29. The duty cycle is 2 times the bit on time, just like in S:4.
Free_Running_Timer.ACC.0 = 1mS (2mS duty cycle)
Free_Running_Timer.ACC.1 = 2mS
Free_Running_Timer.ACC.2 = 4ms