Unclear behaviour of VAR field in USER_Buttons setting tab


Results 1 to 4 of 4

Thread: Unclear behaviour of VAR field in USER_Buttons setting tab

  1. #1
    Registered
    Join Date
    Aug 2006
    Location
    USA
    Posts
    17
    Downloads
    0
    Uploads
    0

    Default Unclear behaviour of VAR field in USER_Buttons setting tab

    It looks like before executing preset user button action to execute C programm the ActionIndex is writtent the persistVariable[VAR]. Why and what for is that?
    Strangelly the offset is user defined as the value of VAR field, while value written to board is hardcoded to be ActionIndex.
    Any explanation? How can we be sure it will not overwrite some persist variable used by other threads/programs?

    Similar Threads:


  2. #2
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2883
    Downloads
    0
    Uploads
    0

    Default Re: Unclear behaviour of VAR field in USER_Buttons setting tab

    Hi funding33,

    The Action Index is passed as a parameter so a C Program might determine which Action invoked it. This allows you to have multiple Actions use the same C Program which might simplify things in certain cases. See the Exec Prog description here.

    The Var field allows you to use any Variable you wish.

    You must keep track of which persist Variables are being used for which purpose. Its ok to use the same variable for multiple programs as long as they don't use the same variable at the same time.

    HTH
    Regards

    TK
    http://dynomotion.com


  3. #3
    Registered
    Join Date
    Aug 2006
    Location
    USA
    Posts
    17
    Downloads
    0
    Uploads
    0

    Default Re: Unclear behaviour of VAR field in USER_Buttons setting tab

    ok, clear. And (-1) seems to be a way to disbale this feature when not required. Thanks.



  4. #4
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2883
    Downloads
    0
    Uploads
    0

    Default Re: Unclear behaviour of VAR field in USER_Buttons setting tab

    You are correct.

    Thanks

    TK
    http://dynomotion.com


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Unclear behaviour of VAR field in USER_Buttons setting tab

Unclear behaviour of VAR field in USER_Buttons setting tab