Applies To:
  • CitectSCADA 3.00

Question: I am using the cicode function TagRead in a report to read several hundred variables and the report seems to take a long time to execute. Why does the report take so long to run?

I imagine your report looks something like this:

data1 = TagRead("Tag1");
data2 = TagRead("Tag2");
data3 = TagRead("Tag3");
data4 = TagRead("Tag4");

The function TagRead() will issue a read request to the I/O Server and will not return until the data is send back from the I/O Server. This may require a read from the physical I/O Device which could take several seconds. If you have several hundred TagRead() function calls they will all add up and the report may take several minutes to execute. This time will greatly depend on the performance of the physical I/O Device you are communicating with and the cache time in the I/O Server. If you don't really need to use the TagRead function you will get much better performance in a report if you put the tags directly into a report. For example:

data1 = Tag1;
data2 = Tag2;
data3 = Tag3;
data4 = Tag4;

With this report the Citect compiler optimised all the read requests when it compiles the report so that all the tags will be read in one request to the I/O Server. This will greatly increase the speed of the report.