Jump to content
OMRON Forums

Local Variables


bradp
 Share

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

[quote=brad] If I use a local variable in a script PLC or motion program can I see its value in the IDE watchwindow? [/quote] There is a structure associated with each script PLC and motion program to view data for that program. Local variables are called "L" variables and they are part of the structure. If you made the following PLC Open PLC 3 L5=L5+1 Close Then the structure "Plc[3].Ldata.L[5]" will contain the value of the variable and can be used in the IDE watch window. A corresponding structure exists for motion programs "Prog[n].Ldata.L[n]" where "n" are the index numbers. If the IDE auto assignment of variable names was used then your PLC would be something like the following. Open PLC 3 local MyVar MyVar = MyVar + 1 Close In this case the intellisense in the IDE will have the structure Plc.3.MyVar which you can use in any IDE window that supports intellisense.
Link to comment
Share on other sites

  • 5 weeks later...
This is not working (anymore?) with the actual firmware (23. June) and IDE (0.5(B1)). Is there another way to use it now? **************************************************** If the IDE auto assignment of variable names was used then your PLC would be something like the following. Open PLC 3 local MyVar MyVar = MyVar + 1 Close In this case the intellisense in the IDE will have the structure Plc.3.MyVar which you can use in any IDE window that supports intellisense. ****************************************************
Link to comment
Share on other sites

  • 1 year later...
Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...