darrenj said:This is one post i will be keeping an eye on.....
If the HSC only updates once per scan..what is the point in a high speed counter?
if the plc only looks at it every say 20 milliseconds but my value is changing every 10 milliseconds then the potential for missing something is high..
I am only wondering because of this...
my first control logix job was a filling machine...everything on the machine was timed according to where the cam was at any given time..(I had to remove and old Giddings and lewis processor because they could get spare parts for it anymore)..the old G&L used a resolver..so i stayed with that..stictly because it was critical where the cam was..if power was removed and turned back on they wanted to be able to fire up the machine right away..not have to set a home position..
all was well till trial run..the i noticed that some cartons were empty..turned out that the instruction i had used was looking for a specific value on the resolver..say turn valve X on at 240 deg...well because it would only update the deg every scan every once and a while i would miss that 240..i ended up having to put in a buffer..say turn valve x on if cam between 210 and 260 deg...this works ok..but not how i figured it would work.. i
I figured if an 20 year old PLC can do it bang on the degree then a new state of the art control logix should have no issue...guess i was wrong..and thats my fault for not understanding
would i have been better off putting an encoder in and using a HSC..i guess not if it still updates only once per scan....
?? :confused?
The HSC value is only updated once (every scan) to the HSC:0.ACC word in the ML1100. Any time the HSC:0.ACC value is referenced it will be the same value (per scan). The UA bit that existed in the SLC doesn't exist in the ML1100 however you can use the REF (I/O Refresh instruction) and it will update all the IO along with the HSC.ACC value. Example I can stick a REF instruction at the 1/5, 2/5, 3/5 and 4/5 ths point in a program and each HSC reference afterwards will be updated (not the same as first reading - based on a continuous pulse coming into my counter).
I just told you otherwise two post agoBob A. said:If it matters, I would assume that the count can change anytime, until someone can assure you otherwise.
Bob A.
Alaric said:That is what I advised on the thread I refered to earlier - the first thing to do immediately before starting calculations is to copy HSC:0.ACC to another register. Please note that the HSC:0.ACC is a long integer, therefore I do not recommend using a 16 bit N file. Use L9 or other Long file and use 32 bit math. See the thread in another forum for how to deal with HSC roll over if needed.
Also keep in mind that a timed interrupt routine can be used to read HSC:0 elements at specific intervals.