mcc Posted September 15, 2010 Report Share Posted September 15, 2010 Hi I'm new to the Unitronics PLC's and I have a V350-35-B1. I'm trying to make my own scan time calculator program, I know how I want to do it I just don't know how to implement it. Here how I see it, I have an always on bit turning on a timer that is counting down in hundredths of a second. I have a counter that counting the number of scans. I have an initial on relay that turns on at the first scan and only the first scan that captures the start time from the timer. Then when the counter reaches 100000 scans it captures the stop time and then subtract the stop time from the start time. It's simple enough but as I look into the Vision program I find that I don't have timers that count down in the hundredths of seconds, the power-up bit which I though ran on the first scan actually runs before the program scan. So is there a way for me to implement this? Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted September 16, 2010 MVP 2023 Report Share Posted September 16, 2010 The scan time in ms is already in the PLC in SI 0. Joe T. Link to comment Share on other sites More sharing options...
linxchas Posted September 16, 2010 Report Share Posted September 16, 2010 SL 20 - scan time in units of 10 microseconds Link to comment Share on other sites More sharing options...
Phil Salkie Posted September 16, 2010 Report Share Posted September 16, 2010 If the internal scan time value is not what you are looking for, you can use a timer of 10 or 100 seconds duration and count the number of scans in that time period. You can then divide by some multiple of ten to get various resolutions of timing (basically, moving the decimal point on the result to get scan time in milliseconds, 10 X microseconds, etc.) Link to comment Share on other sites More sharing options...
mcc Posted September 21, 2010 Author Report Share Posted September 21, 2010 Well the point is to make my own scan timer. Thanks for the suggestion Phil. Is that really true about SL 20 being the scan time in units of 10 microseconds. I've look in the manual and the help files and have not found where it states that. Link to comment Share on other sites More sharing options...
Emil Posted September 21, 2010 Report Share Posted September 21, 2010 SL20 - in V570 gives the scan time in units of 250 ns. In V130 and V350 - in units of 200 ns. In standard Vision models it's not supported. Small tip - you can measure execution time of any part of your program via the function Interval. You can find it in VisiLogic > Utilities > Debug. It's described in Help topic On Line Test Mode. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now