Jump to content
OMRON Forums

How to Watch Global Variables


JeffLowe

Recommended Posts

In Global Definitions.pmh I have a user variable defined as: [code]Ptr OutputWord1->u.user:$4.0.32; // Front Panel 1 Output[/code] My plcs use these fine and share them, but I don't understand how to add them to the watch window. Adding local variables is easy with the PLC.n. structure, but globals give me a syntax error. Thx.
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Jeff, The global, csglobal and ptr variables can be used just by calling their name in any of the script PLCs or motion programs. However, if you want to access them through the watch window or the terminal window, you should call them with complete structure name: [code]Ptr.OutputWord1 Global.MyVar1 CSGlobal[3].MyCSVar[/code] First line will show the content of the memory pointed to by your pointer, the second one will report the value of the global variable MyVar1 and the third one shows the value of MyCSVar in coordinate system 3 (CS numbers starts from 0)
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...