Sign in to follow this  
Followers 0
slcman

Compactlogix expert question...

9 posts in this topic

Hi all, here is my issue: I use a compactlogic (1769-L32E v17), photoeye (1769-IQ32T), and encoder (1769-HSC quad encoder X4) for mesuring book on production line. Logic is easy, on rising edge I wrote current count value in a DINT, do the same for falling edge and then I substract Falling edge - rising edge and multiple by belt ratio. Formula is: (FallingEdge - RisingEdge) * BeltRatio [i do little more detect encoder count rollover] Logic work but varies a lot. I have +/- 10 mm on 290mm book to much for quality control. I think myt scan time affect my reading and I search how fix it. 1- I decrease input filter on 1769-IQ32T to 1 msec 2- I decrease RPI for virtual backplane to 2msec 3- I decrease system Overhead time slice to 10% in Controller properties -> Advenced tab 4- My scan is around 3 msec, some time more for short period. I look for instruction like IIM in SLC serie, this instruction doesn't exist for compact logix (only IOT for output). Knowledge base answer id 28816 - MicroLogix 1500 Controller(s) can scan the onboard I/O faster than any 1769 expasion I/O.. http ://rockwellautomation.custhelp.com/app...ail/a_id/28816 My last solution is to create a periodic task (2msec) for monitor this input and do rising / falling current count write. but all logic scan will be increase a lot... Looking for good idea, thanks

Share this post


Link to post
Share on other sites
Look at using an Event Task and trigger it off your input module that has the photoeye. This will help reduce the error caused by processor scan time.

Share this post


Link to post
Share on other sites
This is the best way to do that kind of job but Compactlogix doesn't support input interupt, event task couldn't be trigged by input. This is available only in contrologix plateform. Edited by slcman

Share this post


Link to post
Share on other sites
That should have been your first solution. A periodic task will run the exact same code faster than the continuous task will. That is because the continuous task is the hind leg runt and it is constantly getting kicked off by every other dog in the litter. Open the task monitor tool and see how fast the continuous task is running. Chances are you can put the same code in a periodic task and run the periodic task twice, maybe more, in the amount of time the continuous task takes. Some programmers delete the continuous task. I don't, but nothing important ever goes in it. It will decrease, not increase, your logic scan time. The only thing you have to watch out for in the Compact Logix is that the backplane virtulization task (priority 6) gets a chance to complete. If its not completing and you are seeing a minor watchdog type 4 fault then you may need to adjust the periodic task priorities. Edited by Alaric

Share this post


Link to post
Share on other sites
I do similar logic this afternoon, you're right, the scan didn't increase ( but not decrease yet)

Share this post


Link to post
Share on other sites
can you tell us how fast this conveyor is actually moving? ... specifically, how many mm per second? ... can you post your ACD project file? ...

Share this post


Link to post
Share on other sites
Sorry ROn for the delay, verry bussy this time. Speed is around 2 mm per msec. This means scan time of 3msec, lost 6mm (+/- 3mm). I do a periodic task (2 msec) so I still got error but logic is more stable, not flucation du to scan time. When logic was in periodic task, scan varies from 2 to 5 msec! Really Compactlogix miss input interrupt.

Share this post


Link to post
Share on other sites
One last idea and again, this is highly dependent on what CompactLogix does and does not implement. Do you have access to the update time information? On CLX cards, you can get diagnostic information indicating WHEN the card updated. This is especially useful if you can use the COS (change of state) scan mode because then it gives you a time stamp of exactly when the event happened (down to microsecond resolution). Then when your code executes becomes less important because you can simply use the time stamp information to calculate the timing directly rather than relying on how fast your code executes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0