Jump to content

Recommended Posts

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

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...