Applies To:
  • CitectSCADA 3.40 4.20

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
Name        Min    Max    Avg    Min   Max   Avg   Count
(cycle)                   (exec)
Code0       0.000  0.000  0.000  0.000 0.000 0.000 0
Trend Log   0.000  0.000  0.000  0.000 0.000 0.000 0
Trend.Acq.0 0.264  2.747  1.884  0.000 0.017 0.001 20
Digital Alm 0.500  3.378  0.543  0.000 0.022 0.000 69
Analog Alm  0.479  3.400  0.543  0.000 0.000 0.000 69
Advance Alm 0.000  0.000  0.000  0.000 0.000 0.000 0
High Res.Al 0.000  0.000  0.000  0.000 0.000 0.000 0
ArgDig Alm  0.000  0.000  0.000  0.000 0.000 0.000 0
ArgAna Alm  0.000  0.000  0.000  0.000 0.000 0.000 0
Get Alarm   0.392  2.953  1.672  0.000 0.000 0.000 2
Citect 0    0.101  1.675  0.265  0.001 0.239 0.003 140
Code1       0.000  1.036  0.112  0.000 0.033 0.000 201
Code2       0.000  1.005  0.108  0.000 0.002 0.000 211

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:
 

Attachments