Changing in CBM name of global variable which is used in Graphic
In application I have global variable FIRC1 type of RealIO. FIRC1 is linked with analog input of controller and used as input in PIDLoop. Also FIRC1.Value is used for visualization on graphic picture. If I change name FIRC1 in global variable table, PIDLoop becoms faulty and I have to manually re-define for the new name. Also visualization based on old name FIRC1.Value becomes faulty as far it can't be found.
Is this by design? Is there possibility to automatically synchronize new name in every place in system where old name was used? Or I'm doing something in wrong way?
Thanks.
Voted best answer
Hi,
If you change the name of the variable it will automatically disconnect itself from every point it is used.So it will not work in PID Loop or Graphics.
So you can
1.Either change the name everywhere where variable i used and that stands for graphics also.
2.You can Map the new variable to the previous name so that you don't have to change it every where
E.g.. your previous variable was FIRC1 and type RealIO
Consider a new variable at global level only say ABC as RealIO.
Now you can use Structure text or move block in FBD on any other method and do
ABC.Value := FIRC1.Value( in case you need only value in graphics)
You can also assign the Various interaction parameters in case you need them.
and about name uploader that only helps in viewing the name in FP or so..I believe it will not work but you can give it a shot.
Also remeber to replace FIRC1 in hardware editor with your ABC or any new variable you are using and make sure the mapping is done at very starting of the logic(In first pane most likely) as controller should scan the change before implementing it..
Hope this will wrk for you
Regards
pankaj jain
Answers
Hello,
Regarding your query on renaming the variable after it's usage, there is no automatic replacement available.
1) You can use (Ctrl+H) Find & Replace tool in control builder to replace the name in control module/Program.
2) You can use Data Reference tool in Graphic builder to replace all usages in the HMI.
Hope it's of some help to you.
Regards,
Vishal
Vishal,
thanks for your reply. I will check it a bit later. What you can say about aspect Name Uploader in Control Structure\Applications\Application? For what Name Uploader used?
Please note that the Variables will not get automatically replaced, if you change a variable name. After a change you need to download the controller for this new variable to come to effect. No need to run Name uploader if you have not changed "Name" or "Description" parameters within the module.
You will have to update the variables in CBM by either using Find replace option (CTR+H)in CBM and Resolve Reference in the Graphics Builder.
Add new comment