Quantcast
Channel: Allen Bradley / Rockwell Automation Latest Topics
Viewing all articles
Browse latest Browse all 3755

CLX Rate of Change AOI?

$
0
0
Is there a prebuilt Rate of Change routine in CLX? If there is I can't find it, so: I've been trying to figure out the timing routine for a rate of change AOI and I'm stumped. I would like for everything to be contained in the AOI. I would use structured text language. I originally thought that I would just use a timer and call the routine every X seconds. Interval would be Preset / 10.0 but that would mean using an external timer. It's not a horrible solution but way back in my S7300/400 days I wrote a routine that calculated elapsed time between calls based on the system clock for use in a PID loop reset and derivative calculation. I was trying to write my own PID loop. Why? Because... :) This isn't that exacting of a calculation requirement so I was hoping for something simple. The calc is for tank rate of change and direction. Since tanks vary in capacity and inflow / outflow the time interval needs to be adjustable. No longer than a minute. No less than 5s or so. It looks like I can use a TONR in a structured text routine but I didn't have much luck when I tried to code one. Maybe I should have put the timer in the local group? Ideally the AOI would be drag and drop into a function block routine and I could map the IO via STX.

Viewing all articles
Browse latest Browse all 3755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>