Thumbnail

EZ Chart

Basic 4 series bar chart for comparing your robots sensor values at a glance.

+ 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 Graphs category tab.
  7. Press the EZ Chart icon to add the control to your project.

Manual

EZ-Script Basic Example Usage:

Code:


#Set Titles
ControlCommand("EZ Chart", SetTitle, "EZ Robot Sensors")
ControlCommand("EZ Chart", SetSeriesTitle, 0, "Front Sensor")
ControlCommand("EZ Chart", SetSeriesTitle, 1, "Right Sensor")
ControlCommand("EZ Chart", SetSeriesTitle, 2, "Left Sensor")
ControlCommand("EZ Chart", SetSeriesTitle, 3, "Back Sensor")

#Set inital bar colors
ControlCommand("EZ Chart", SetSeriesColor, 0, 50,50,50)
ControlCommand("EZ Chart", SetSeriesColor, 1, 100,100,100)
ControlCommand("EZ Chart", SetSeriesColor, 2, 150,150,150)
ControlCommand("EZ Chart", SetSeriesColor, 3, 200,200,200)

:loop
# Assign random numbers as grid values
$randSeries1 = GetRandom(70, 100 )
ControlCommand("EZ Chart", SetSeriesValue, 0, $randSeries1)
$randSeries2 = GetRandom( 90, 100 )
ControlCommand("EZ Chart", SetSeriesValue, 1, $randSeries2)
$randSeries3 = GetRandom( 0, 90 )
ControlCommand("EZ Chart", SetSeriesValue, 2, $randSeries3)
$randSeries4 = GetRandom( 0, 30 )
ControlCommand("EZ Chart", SetSeriesValue, 3, $randSeries4)

#Conditional warning coloring
if ($randSeries1 > 95) then
ControlCommand("EZ Chart", SetSeriesColor, 0, 255,0,0)
Else
ControlCommand("EZ Chart", SetSeriesColor, 0, 50,50,50)
endif

Sleep( 100 )
Goto (loop)


Versions
10/22/2015 V3.0 Can change color of bars. Can change color of bars conditionally using EZ-Script. See script example.

11/12/2015 V4.0 RGB Colors are now integers. Refer to series by number instead of string. Additional code clean up.