Thumbnail

Smart Variable Watcher

This is a smarter variable watcher that replaces the standard built-in version. This version uses less CPU for large projects.

+ How To Add This Control To Your Project (Click to Expand)
  1. Make sure you have the latest version of ARC installed.
  2. Select the Get button in this page to download the archive file.
  3. Double click the downloaded archive file to execute installer.
  4. The installer will add this control to ARC.
  5. Load ARC and press the Project -> Add Control button from the menu.
  6. Choose the Scripting category tab.
  7. Press the Smart Variable Watcher icon to add the control to your project.

Manual

This is a smarter variable watcher that replaces the standard built-in version. This version uses less CPU for large projects.

When large arrays are defined, it may take a long time for the grid to render the data. However, once rendered, the data will update much faster than the ARC built-in variable watcher. 

User-inserted image


1) The name of the variable. The variables in [ brackets ] are internal values and are not variables. For example, the volume or speed are set with functions. They are displayed here for convenience.

2) The type of the variable. I.E. string, number, array, etc...

3) Displays the number of characters if this is a string type

4) The value of the variable

5) Manually refreshes the variable list and data. This may be necessary if a variable has been deleted by using a ClearVariable command. If your code clears a variable and you're wanting the variable to no longer display in the list, press the Refresh button.

6) Clear all variables and their stored data

7) Display the string data as hex values

*Note: It is not recommended to run a production project with this robot skill. This is due to the resources needed for this skill. If variables are updated often, the processor will be updating this robot skill often and that takes performance from other robot skills that control the robot. This was designed for debugging, not for production use. 

Future dev ideas:
- cache updates to a nonblocking list and update the grid in an interval
- allow specifying what variables to watch (or maybe just an option to ignore arrays)

#1  
I'm curious, I use many variables in my large project. I have several scripts that pause and wait for some of these variable change before restarting. Will using the Smart Variable Watcher effect this function?
PRO
Synthiam
#2  
Dave - any of the variable watchers are for debugging. If you're debugging and need a variable watcher, use the smart variable watcher. There's no need to add any variable watchers if you don't need them. But if you do need one, use the smart variable watcher instead.
PRO
Synthiam
#3  
Dave - also i should add that I left the original variable watcher in ARC for legacy purposes. It can still be used for small projects.
#4  
Thanks DJ! Good to know. I'm trying to stay up to speed with all the changes but sometimes I get behind. 

I do have a variable watcher in my project. I didn't know it was eating up so much CPU. It's seems I was always adding to and debugging so I never removed it. Didn't think it was a problem and I had a lot of things going on. Thanks for the streamlined VW. 

I've been spending most of my robot time this past couple years building robots and installing hardware because of a couple large B9 Robot rebuilds I'm doing. It's been a slow road. I've just been using basic ARC projects to test different section and functions of the robots. I'll soon (re)start the software/programming process on a grand scale. I'm really excited about all the new things ARC can do compared to just 3 years ago. Can't wait to get them into my robot.