Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Watch Global Variables
#1
In Global Definitions.pmh I have a user variable defined as:
Code:
Ptr OutputWord1->u.user:$4.0.32;  // Front Panel 1 Output

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.
Reply
#2
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

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)
Sina Sattari
Hardware Engineering Manager
Delta Tau Data Systems, Inc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)