Sign in to follow this  
Followers 0
skjomcs

trigger camera systems with timers micrologix

3 posts in this topic

----¦SW1¦--------------------------¦Timer1 Done bit NC¦-------------------¦Timer1(TON)¦-------- ¦parallel rung¦------------------------------------------------------------------¦parallel rung¦ ¦Timer1 TT bit¦---------------------------------------------------------------¦Timer2(TON)¦-------- ----¦timer2 TT bit¦------------------------------¦OP1(trig camera)¦-------- ----¦IP1 (cam res)¦---------------------------¦MOVE Timer 1 ACC to N1¦----- ----¦N1 greater than N2¦-----------------------¦MOVE N1 to N2¦------------ Note: micrologix 1200 rslogix500 timer 1: preset= 200ms timer 2 preset=20ms Trying to set up the following: When a switch closes (SW1) want to continually trigger a cognex insight camera every 200ms. I.E as long as switch is closed a trigger is sent every 200ms. the trigger sent is a pulse of duration 20ms. I am then trying to monitor how long after the trigger is sent does the camera system return its result and what is the max time taken over a number of triggers. the above is trying to do this by turning on timer 1 for 200ms, turning on timer 2 for a 20 ms pulse. I then wait for the camera result (IP1), when the result arrives i move the timer 1 accumulator value to an integer. I then compare this value to the highest cycle time taken and if it is higher than a previous result i move it into integer N2. What im trying to achieve is that when i turn the switch off, the value in N2 shows the longest time it took for the camera system to return a result over approx 10,000 triggers (or whenever the switch is opened again). im not sure how i set up is correct however and would like any pointers. is it possible to use the move function like this to move a timer accumulator or is it a very inaccurate way of capturing the cycle time?

Share this post


Link to post
Share on other sites
One shot your IP1 (cam res) or you will test and store multiple times on one camer shot. Check your scan time. Your greatest time could be high by that amount.

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