Possible missing operand between tags (W1021)

Hi,

I'm doing an upgrade from CitectSCADA 7.2 to AVEVA Plant SCADA 2020R2.

During compile I get the following warning:

Possible missing operand between tags (W1021)

The context is:

Line[1]:AssWin("P_motor",210,100,1+2+4+8,"T51_OR1_FORC","T51_OR1_START","T51_OR1_STOPP","T51_OR1_FORC")+WinTitle("=51:1"){;}

Can anyone tell me what is wrong?

Parents
  • You have 2 separate commands. Each one needs to end with a semicolon. By using a + sign in between them, you have an expression -- to calculate the sum of the values returned from the two functions. It would technically work if you turned the expression into a command by writing something like ResultTag = AssWin("P_motor",210,100,1+2+4+8,"T51_OR1_FORC","T51_OR1_START","T51_OR1_STOPP","T51_OR1_FORC")+WinTitle("=51:1");

    However, the correct way to do it would be:

    AssWin("P_motor",210,100,1+2+4+8,"T51_OR1_FORC","T51_OR1_START","T51_OR1_STOPP","T51_OR1_FORC");

    WinTitle("=51:1");

  • Thanks a lot for your quick replys!

    However the compiler still gives the same warning and context...thou I replaced the + with ;

    I attach a screenshot of the object which use this code:

    Br

    Andreas

  • OK - I'm not sure if you can have two statements in the earlier graphics keyboard commands.  You could test this by moving the 2 statements into a function and call that function from the button.

    Another method would be to get it out of the Page Keyboard commands and into the project - a bit more of a pain if you want the pop-up from only this page.

    I'm trying to figure out the "Page Keyboard Commands" dialog - this looks to be earlier graphics.  You may just want to add the symbol with the latest graphics builder - that can easily handle two commands per item.

  • I tried this out in 2020R2 using v3/v4 objects like you have. I get the same error using the + sign. I don't get any compile error using a semicolon.

    Make sure that after you edit this genie and save it, you go to the Tools menu and choose 'Update Pages in Active and Included Projects'. That will apply your change to all instances of that genie throughout your project. If you don't do that, then you will still get the error on each page that uses the genie, and the error will show the + sign in the context (which shows it was not updated).

    It would be best to replace the v3/v4 graphic objects with the v5 and later style objects. They are much easier to work with and have more features. However, I know that can be a huge amount of work if there are still a lot of old objects in your project, and if you make a mistake, you could break existing project functionality and need to re-test. Usually, I just replace v3/4 objects if I have to edit the object for some other reason (or if it is no longer supported, like the Flood Fill object).

  • Problem solved, it was me not having made the "Update Pages"...

    So your solution, Eric Black, with replacing the + with ; worked fin!

    Thank you all! Slight smile

Reply Children
No Data