Jump to content

Simon's Blog

  • entries
    4
  • comments
    3
  • views
    12,581

PLC Scan Time (Enhanced Family)


Simon

4,026 views

A lot of my time is spent explaining/verifying/demonstrating. The attached program shows the scan time for a V1040/V1210 and also demonstrates the logic required to do the same for any of the Enhanced family of PLCs.

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.

from: http://forum.unitron...rch__1#entry458

ScanTime Tester.vlp

3 Comments


Recommended Comments

Hi Simon,

One other trick to measure the scan time is to use the Interval function backards. If you Put the Interval End function in a subroutine that is scanned once every PLC update, and the Interval Start function just after that, it will include the entire scan time. If you want it to exclude the time spent executing ladder code, just put the End in the very first network, and the Start as the very last block executed.

Have you come up with any numbers regarding the speed of the V570 VS the V1040/V1210? I am curcious if the V1040 or V1210 might in fact run a bit slower than the V570 just due to having to manage the larger screens. However, I remember having heard it said that the Logic Controller and the HMI controller are two separate chips, so maybe that would leave the PLC scan time identical to the V570. That's assuming of course they used the same chip in all three, which also may or may not be true.

D

Link to comment

I haven't done any relative comparison. However, the programmer who triggered this post has generously provided the following feedback:

I found the amount of variables on the screen greatly effects the scan time, the page I was operating with a large amount of variables was making the cycle scan time slow to 4mS & when I changed screens (to one with only 4 variables) the scan time dropped to 1mS with no change to the plc code.

This means that I can achieve my customers requested scan time of 1mS by just changing screens at the appropriate time with no issues.

So the screen does affect scan time, but this suggests it relates more to the number of variables rather than the size of the screen. 4ms still looks pretty good for any general purpose PLC task.

Link to comment
I haven't done any relative comparison. However, the programmer who triggered this post has generously provided the following feedback:

So the screen does affect scan time, but this suggests it relates more to the number of variables rather than the size of the screen. 4ms still looks pretty good for any general purpose PLC task.

Simon,

That is really great information to know. I would not have expected it to affect scan time to that degree. As you pointed out, most projects don't require a super fast scan time, so I hardly ever notice.

Thanks for the info!

Damian

Link to comment
Guest
Add a comment...

×   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...