Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01

Question: I want to call a piece of cicode on the entry of a page, but I don't want to put the cicode in the page entry function. How is it possible to do this?

Under most conditions you should use the page entry cicode to do this, but there are a few cases when you may want to do it from the animation databases. If you do this operation from the advanced animation then you code belongs to the page and is more generic and transportable.

You can do this via the PageInfo function to check how many times the page has been updated and then call your cicode on the first display. For example:

IF PageInfo(7) = 0 THEN
   ! cicode to do only once

You would then call this cicode from the Advanced animation. The first time the page is displayed PageInfo(7) will return 0 and you cicode will run, after that PageInfo(7) will return 1 etc, so the IF expression will fail and you code will not execute.