Clusters in Menu

Maybe I'm just having a brain cramp here.

Ran into a situation where I need different pages on the menu depending which cluster I am in.

I put an "IF" statement in the menu command line, which works fine as long as I don't change clusters.

With an unclustered reference, the tag value remains with the first cluster after the project has been started up.

How do I get the tag to follow the current cluster?


A little further information - page changes between software revisions - I am trying to avoid having to load a new project every time the project revision changes.  A tag in the PLC contains the revision number.

Parents
  • 2018 or version 8. Patch 30.

    menu command is:
    IF U_SW_VER_PV < 9 THEN WinNew("CHASSIS") else WinNew("CHASSIS_II") END

    (actually, the WinNew is in a wrapper function, and that is where the cluster gets assigned.)
    Each of the calls works flawlessly - calling the correct page.
    Pages are intentionally left without cluster context so it can ba assigned when called.

    U_SW_VER_PV is what is not getting updated predictably.
    I have a tag that keeps track of the cluster, so TagRead would likely work.
    Hence,
    IF (TagRead(U_SW_VER_PV,0,ClusterName) < 9 THEN WinNew("CHASSIS") else WinNew("CHASSIS_II") END
    should work (where ClusterName is a local variable that stores the Cluster Name).

    Mike
Reply
  • 2018 or version 8. Patch 30.

    menu command is:
    IF U_SW_VER_PV < 9 THEN WinNew("CHASSIS") else WinNew("CHASSIS_II") END

    (actually, the WinNew is in a wrapper function, and that is where the cluster gets assigned.)
    Each of the calls works flawlessly - calling the correct page.
    Pages are intentionally left without cluster context so it can ba assigned when called.

    U_SW_VER_PV is what is not getting updated predictably.
    I have a tag that keeps track of the cluster, so TagRead would likely work.
    Hence,
    IF (TagRead(U_SW_VER_PV,0,ClusterName) < 9 THEN WinNew("CHASSIS") else WinNew("CHASSIS_II") END
    should work (where ClusterName is a local variable that stores the Cluster Name).

    Mike
Children
No Data