# graph control RAB 5.12

**URL:** <https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767>\
**Category:** Developer Tools\
**Created:** [May 14, 2009, 8:59pm UTC](https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767 "2009-05-14T20:59:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kioog](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kioog](https://tech-community.robotics.abb.com/u/kioog)\
**Post date:** [May 14, 2009, 8:59pm UTC](https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767/1 "2009-05-14T20:59:53Z")

</div>

Hello,

i am trying out the graph control.  
i use

Double PX={1,2,3};  
Double PY={3,2,1};  
graph1.addpoint(PX,PY);

but when i execute the code, i do not see the graph, i tried different things like  
graph1.refresh(), graph1.update() and so on, but i don’t see nothing, only the axes, not the data.

Can we draw different lines in the graph with different colors?  
can i have some info or a working example?

Any help?  
when is there help available for all the new controls available from RAB 5.11?

P.S. maybe this is offtopic, but on one real controller i cannot use hyperterminal to debug memory management, i connect it to the console port, i can see the messages when booting and everything, but when i press “enter”, i don’t get the “-\>” arrow so i cannot type any commands. any idea? hardware failure?  
on another controller it works fine, so it is not my cable or computer.  
Is there a possibility to read the available memory of the FP and write it to a RAB screen?

Kind Regards

Peter

---

<div class="post-metadata">

**Author:** ![carlosmtz2000](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@carlosmtz2000](https://tech-community.robotics.abb.com/u/carlosmtz2000)\
**Post date:** [May 15, 2009, 12:20am UTC](https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767/2 "2009-05-15T00:20:04Z")

</div>

Hi Peter …

I have not tried this code in the RAB 5.12. Could you verify it works?

Thanks

[webwiz/2219/TpsFormGraphStatic.zip](http://forums.robotstudio.com/webwiz/2219/TpsFormGraphStatic.zip)

---

<div class="post-metadata">

**Author:** ![kioog](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kioog](https://tech-community.robotics.abb.com/u/kioog)\
**Post date:** [May 15, 2009, 1:14pm UTC](https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767/3 "2009-05-15T13:14:23Z")

</div>

Hi carlos,

the code works, i use RAB 5.12 on robotware 5.11.02.  
I forgot the define the plotstyle.  
I have a question about the graph control

If i use:  
graph1.XAxis.minvalue=10;  
graph1.XAxis.maxvalue=0;  
the plot is still plotted in X from 0 to 10.  
so is there another way to plot Xdata from 10 to 0 for example  
I want to do this, because i want to plot measuredata in function of a robotposition in search, but sometimes the movement is in +X and sometimes the movement is in -X, but i want to plot the measures from start to finish.  
For the moment i make the Xmeasures negative in case of -X searching so my plot plots well,  
but now i see negative X numbers on the plot, but if it is not possible another way i can live with that.

Kind regards

Peter

---

<div class="post-metadata">

**Author:** ![carlosmtz2000](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@carlosmtz2000](https://tech-community.robotics.abb.com/u/carlosmtz2000)\
**Post date:** [May 15, 2009, 11:44pm UTC](https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767/4 "2009-05-15T23:44:47Z")

</div>

Hi Peter,

Can you send me the RAPID modules or data you are planning to graph?

I can’t promise anything, but we can see if there is a workaround …

BR

---

<div class="post-metadata">

**Author:** ![kioog](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kioog](https://tech-community.robotics.abb.com/u/kioog)\
**Post date:** [May 16, 2009, 12:11am UTC](https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767/5 "2009-05-16T00:11:52Z")

</div>

Hi carlos,

i am reading a log file created in rapid by the robot on a background task that is recording the current robot position and an analogue input while moving the robot.  
the data in the logfile is for example:

1/50/300  
2/55/250  
3/60/210  
4/65/400

where the first data is datacounter, the second the robot X position, the third an analogue input from height sensor

but when i am searching in the other direction my logfile is

1/65/300  
2/60/250  
3/55/210  
4/50/400

for the graph control i now read this logfile line by line, use the second data as Xvalues and the third data as Y-values.

i did it before with drawline,drawellipse, drawstring and calculate the coord of drawing on the screen including scaling and labels on the axis, but is was alot of work.  
i created a 4th data with the position starting from 0, used this data as Xaxis to draw the lines on the screen and use the second data to show the labels ( for example Xmin=65 and Xmax=50.

with the graph control it would be a lot easier and a little fancier.

another question:  
when i used drawline, drawellipse and so on, when i leave my RAB window (for example to view “production window”) and then go back to RAB window, my drawings are gone, i use the form.onpaint method to redraw them, is that normal behaviour and the right way to do it?

---

<div class="post-metadata">

**Author:** ![carlosmtz2000](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@carlosmtz2000](https://tech-community.robotics.abb.com/u/carlosmtz2000)\
**Post date:** [June 22, 2009, 8:16pm UTC](https://tech-community.robotics.abb.com/t/graph-control-rab-5-12/2767/6 "2009-06-22T20:16:33Z")

</div>

Hi Peter,

How is all things going on?
