ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

Thumbnail

Smart Variable Watcher

by Synthiam

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

How to add the Smart Variable Watcher robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Scripting category tab.
  5. Press the Smart Variable Watcher icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Smart Variable Watcher robot skill.

How to use the Smart Variable Watcher robot skill

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)

ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

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