RobotStudio event

graph control RAB 5.12

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
Peter12009-05-15 09:28:43

Comments

  • Hi Peter ...
     

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

     

    Thanks

     

    Carlos Martinez
    ABB
  • kioog
    kioog ✭✭
    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
    Peter12009-05-15 13:16:43
  • 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

     
    Carlos Martinez
    ABB
  • kioog
    kioog ✭✭
    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?

     
  • Hi Peter,
     

    How is all things going on?

     
    Carlos Martinez
    ABB