Applies To: |
|
Summary: |
Question: If I set the [Page]ScanTime=0 the update cycle on my pages is still around 100ms. My PLC can respond in 20ms so I should be able to get an update rate of 20ms. How can I make the update faster? |
Solution: |
The setting of the [Page]ScanTime (see
also Q1891) has a lower limit of around 50
ms. This limit is as the Citect Page Animation system will request
data via the Citect request manager. The Citect request manger has
a scheduling timer which will limit the minimum scan time to 50 ms.
If you set [Page]ScanTime=0, the scan time of the page will have a
lower limit of 50 ms. This has been done to prevent overloading, as
many users will set the [Page]ScanTime=0 to get the fastest
response time.
If you must have faster performance than 50 ms then you can adjust the scheduling timer of the Citect request manager. The scheduling timer is controlled by the parameter [Req]Delay (default 50ms). If you set the [Req]Delay=1 and [Page]ScanTime=0 then the lower limit on page scan time will be a few milliseconds. The actual scan time will depend on how fast the I/O Server and I/O Device can return the data. If you adjust these parameter you should make sure that you do not overload the CPU and network traffic. If you have a network system you will also need to adjust the parameter [LAN]Delay. This parameter adjusts the delay in sending network packets to allow more data to be blocked into each packet. With smaller delays, Citect will send many small packets instead of fewer larger ones. You should set this parameter on all Citect computers on the network and be very careful you do not cause overloading of the system by setting this parameter to small. Recommend you adjust this to 10ms. You can check the actual page scan times by displaying the PAGE table stats in the Citect debug kernel. The PAGE table stats is show below: Handle 7 Length 20 Offset 0. 0 The page scan time is shown in the row titled 'Citect 0' for window 0. If you have more than one window open you will see Citect 1 etc. The first three numbers are the minimum (0.101) maximum (1.675) and average (0.265) cycle times in seconds. So these figures show that the page is updating on average 265 ms with a minimum of 101 ms. You can reset these counters by using the STATS command in the kernel. The parameters [Page]ScanTime and [Req]Delay are included in version 3.40, 4.20 and later. |
Keywords: |
Related Links
Attachments