CompactLogix TON or RTO - Can you change Preset from 100 ms to 100.2 ms , etc.

Join Date
Aug 2016
Location
Virginia
Posts
343
Good Evening ,

I’m using a Shift Register ( BSL ) and I’m using a timer to shift these bits .
At the moment my timer is 100 ms , but I would like to have the option to change it to 100.2 ms , or 100.9 ms , etc.

How would I do that ? It seems like my only option is 100 ms , 101 ms ,
102 ms , etc.

It is probably a dumb question .

Thanks so much ,
 
In the ControlLogix family, the "timebase" for timers is 1 millisecond, and the .Preset and .Accumulator subelements of the timer tag are Double Integers.

So you can't change a Timer preset by any increment smaller than 1 millisecond.

If you have a function that needs closer than 1 ms time precision, it probably needs a dedicated module or a motion controller.
 
To add a little, your timer is likely not accurate to the 1ms resolution anyway, unless your scan time of the task that it is in is 1ms or less. Your timers accuracy depends on the scan time of your task and where in the scan it is evaluated. Watch a timers ACC value, if the task it is in has a scan time of over 1ms, you will see that value will sometimes be greater than the PRE.
 
The previous two replies amply flesh out why you cannot get what you want with the built-in TON timer: it is simply too inaccurate, mainly because the varying scan time adds an extract few ms to the time when the timer can complete and be restarted.

From the original post, it sounds like you are trying to model a [process moving linearly in time] in the PLC with [shifting bits controlled by a repeating TON timer]. If indeed the process is linear enough this can be done, but only if the accuracy of the PLC is up to the task. Since a PLC is not deterministic, its inaccuracies could be too great, and you need a different approach e.g.

  • Hardware solution #1: dedicated module or motion controller, as suggested by KenR.
  • Hardware solution #2: get some hardware to track the process e.g. counting teeth on a conveyor sprocket, or an encoder on the conveyor motor (or whatever hardware is moving).
  • Hardware solution #3: track the actual objects, not their modeled motion, with shifting bits (this may not apply to your process)
  • In-PLC Software solution #1: create your own timing logic using GSV to access the internal 1MHz WallClockTime*.
    • Note that the program scan will never be accurate to a fraction of a millisecond, so this may be a case of "measuring with a micrometer, cutting with a chainsaw."
  • In-PLC Software solution #2: and excuse me for burying the lead i.e. the answer to the OP query, but you can achieve a mean preset e.g. to get a mean 100.9ms .PREset value over time, vary the integer .PREset to be 101ms for nine cycles and then 100ms for one cycle, then nine at 101ms and one at 100ms, etc.
    • CAVEAT I: this only yields a mean .PREset of 101.9 over every ~1009ms. It does nothing to resolve the issues raised in the previous replies about the actual timing accuracy of the rising edges of the TON .DN bit.
    • To do a different mean .PREset, vary the relative count of 100ms vs. 101ms timings.
CAVEAT II: my suggestions above are obviously based on guesses from the limited information in the OP, and NOT AT ALL based on anything close to a comprehensive understanding of your process, so whether they are useful at all is up to you to determine.

* I did some work (see here) with the 10kHz free-running clock (FRC) of a MicroLogix 1100 to evaluate the accuracy of various methods to get a desired flashing rate, and although all were accurate to within a millsecond, the worst results came from using TON timers, and the best from watching the internal FRC (accurate on average to a few microseconds).
 
Good Evening ,

I’m using a Shift Register ( BSL ) and I’m using a timer to shift these bits .
At the moment my timer is 100 ms , but I would like to have the option to change it to 100.2 ms , or 100.9 ms , etc.
,

Just curious, why would you want microsecond precision in a PLC? I'm just thinking that if you need that accuracy, the PLC is not the tool for the job, but can't really think of an application where that resolution would be needed in an industrial setting that wouldn't have a dedicated device for it like position controllers.
 

Similar Topics

Anyone have experience configuring CompactLogix 5370 to Eaton DG1 VFD? I've downloaded both the EDS and AOI for the DG1, yet cannot seem to find...
Replies
2
Views
2,107
Good Morning , We have a HMI application that has not saved recipes since it was put in a few years ago. Just briefly I looked at the...
Replies
4
Views
2,856
Has anyone got a AB to talk to Eaton HMI over ABCIP and have communication be stable?
Replies
0
Views
1,616
any help please , i hav compactlogix+devicenet scanner + flex I/O , i tried to communicate betwwen pc and plc after updating it .when i refresh...
Replies
1
Views
1,939
Hi everyone, i have a compact logic 1769-L18 PLC and I'm using FTalk View ME for the display. I wanted to do some visualization on Grafana. At...
Replies
1
Views
83
Back
Top Bottom