Home > Anaheim > HMI/PLC > Anaheim HMIPLC Release note for Version 16 all20110601 Users Guide

Anaheim HMIPLC Release note for Version 16 all20110601 Users Guide

    Download as PDF Print this page Share this page

    Have a look at the manual Anaheim HMIPLC Release note for Version 16 all20110601 Users Guide online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 523 Anaheim manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.

    							
     
    Click macro  button, it displays: 
     
    6. Draw picture directly on the scr een(Descriptions of  drawing  functions) 
        In order to facilitate to draw some  conventional pictures(like line, cycle and polygon 
    and so on) , there is a group of drawing func tions in HMI macro. User can call these 
    drawing functions in  MacroEntry function. 
    The drawing function use HMI rectangular coordi nate: the origin is at the top left of 
    screen, X axis increase from left to righ t , Y axis increase from top to bottom. 
    1 Structure definition   
    Add three new structures: PenParam、BrushParam  and Point  
    (1) PenParam structure  
    						
    							
    typedef struct penparam 
    { 
        short type;    
        short width;   
        int color;     
    }PenParam; 
    Penparam is used to set the type, width., co lor attribute of a pen, their ranges are in 
    the following form: 
    Parameters’ 
    name Value Explain   
    PS_NULL No brush 
    PS_SOLID Smooth linear () 
    PS_DASH  Lineation () 
    PS_DOT  Dotted line(.) 
    PS_DASHDOT Dot dash line () 
    Type 
    PS_DASHDOTDOTDouble dots dash line() 
    Width 1~8(Units:  Pixel )If the input value is smaller than the 
    minimum1, the system set it minimum 
    automatically; If the  input value is bigger 
    than the maximum 8, system set it 
    maximum automatically.     
    Color 0~65535 Suggest using the RGB(r, g, b) to set 
    color,  the range of r, g, b  is 0~255 。
    System will switch the RGB(r, g, b) values 
    according to the HMI color parameters 
    (2) Brush structure: 
    typedef struct brushparam 
    {     
        int type;     
        int foreColor;   
        int backColor;   
    }BrushParam; 
    BrushParam is used to set the type,  foreground color and background color of a 
    Brush, Bush type is used to set    the filling mode:  Graphics filling and gradient filling.  their 
    ranges are in the following form: 
    Parameters’ name Value Explain 
    BFS_NOBRUSH No  filing   
    BFS_SOLID  
    BFS_DENSE1  
    BFS_DENSE2  
    BFS_DENSE3  
    BFS_DENSE4  
    Type 
    BFS_DENSE5   
    						
    							
    BFS_DENSE6  
    BFS_DENSE7  
    BFS_DENSE8  
    BFS_DENSE9  
    BFS_DENSE10  
    BFS_DENSE11  
    BFS_DENSE12  
    BFS_FDIAG1   
    BFS_BDIAG1   
    BFS_FDIAG2   
    BFS_BDIAG2  
    BFS_FDIAG3   
    BFS_BDIAG3   
    BFS_VER1  
    BFS_HOR1  
    BFS_VER2  
    BFS_HOR2  
    BFS_VER3  
    BFS_HOR3  
    BFS_DIAGCROSS  
    BFS_CROSS  
    BFS_HORGRDT_FTTD 
     
    BFS_HORGRDT_FDTT 
     
    BFS_HORGRDT_FETC  
     
    BFS_HORGRDT_FCTE 
     
    BFS_VERGRDT_FLTR 
     
     
       
    						
    							
    BFS_VERGRDT_FRTL 
     
    BFS_VERGRDT_FETC 
     
    BFS_VERGRDT_FCTE 
     
    BFS_OUPGRDT_FLTTRD 
     
    BFS_OUPGRDT_FRDTLT 
     
    BFS_OUPGRDT_FETC  
     
    BFS_OUPGRDT_FCTE 
     
    BFS_ODWNGRDT_FRTTLD
     
    BFS_ODWNGRDT_FLDTRT
     
     
    BFS_ODWNGRDT_FETC 
      
    						
    							
    BFS_ODWNGRDT_FCTE 
     
    BFS_CONGRDT_FLTTRD 
     
    BFS_CONGRDT_FRTTLD 
     
    BFS_CONGRDT_FRDTLT 
     
    BFS_CONGRDT_FLDTRT 
     
    BFS_CENGRDT_FETC  
     
    BFS_CENGRDT_FCTE  
     
    ForeColor 0~65535 Suggest using the 
    RGB(r, g, b) to set color, 
    the range of r, g, b  is 
    0~255 。System will switch 
    the RGB(r, g, b) values 
    according to the HMI 
    color parameters 
    BackColor 0~65535 Suggest using the 
    RGB(r, g, b) to set color, 
    the range of r, g, b  is 
    0~255 。System will switch 
    the RGB(r, g, b) values  
    						
    							
    according to the HMI 
    color parameters 
    (3) Point Structure   
    Parameters of Point Structure are simple: x means X    axis coordinate of point; y 
    means Y axis coor dinate of point 
    2 Drawing functions 
    (1) Rectangle:  DrawRect (x,y,w,h,pen,brh) 
    Explains for the parameters are as follows:  
    Parameter Type Explain 
    x int X axis coordinate of rectangle’s top left(units :
    pixels ) 
    y int Y axis coordinate of  rectangle’s top left(units:
    pixels ) 
    w int Rectangle’s width (units:pixels ) 
    h int Rectangle’s height (units:pixels ) 
    pen PenParam Pen of rectangle border 
    brh BrushParamBrush of rectangle filling   
    (2) Rounded rectangle: DrawRndRect(x, y, w, h, radius, pen, brh) 
    Explains for the parameters are as follows: 
     
    Parameter Type Explain 
    x int X axis coordinate of  rectangle’s top left(units :
    pixels ) 
    y int Y axis coordinate of  rectangle’s top left(units:
    pixels ) 
    w int Rectangle’s width (units:pixels ) 
    h int Rectangle’s height (units:pixels ) 
    radius int Round corner’ radius 
    pen PenParam Pen of rectangle border 
    brh BrushParamBrush of rectangle filling   
    (3)Elliptic : DrawEclips (x, y, w, h, pen, brh) 
    Explains for the parameters are as follows: 
     
    Parameter Type Explain 
    x int X axis coordinate of elliptic outer frame’s top left
    (units :pixels ) 
    y int Y axis coordinate of  elliptic outer frame’s top left
    (units :pixels ) 
    w int Elliptic outer frame’s  width(units :pixels ) 
    h int Elliptic outer frame’s  height(units :pixels ) 
    pen PenParam Pen of elliptic border 
    brh BrushParamBrush of elliptic filling   
    (3) Linear: DrawLine (x1, y1, x2, y2, pen)  
    						
    							
    Explains for the parameters are as follows: 
    Parameter Type Explain 
    x1 int X axis coordinate of linear starting point units:
    pixels ) 
    y1 int Y axis coordinate of linear starting point (units:
    pixels ) 
    x2 int X axis coordinate of linear end point (units:pixels )
    y2 int Y axis coordinate of linear end point (units :pixels )
    pen PenParam Pen of linear 
    (4) Polygon:  DrawPolyg (pts, n, pen, brh)  
    Explains for the parameters are as follows: 
    Parameters Type Explain 
    pts Point * First address of polygon top coordinate data   
    n int Polygon vertex 
    pen PenParam Pen of polygon border 
    brh BrushParamBrush of polygon filling 
    (5) Cycle arc:  DrawArc(x, y, w, h, start, end, pen) 
    Explains for the parameters are as follows: 
     
    Parameter Type Explain 
    x int X axis coordinate of arc outer frame’s top left
    (units :pixels ) 
    y int Y axis coordinate of arc outer frame’s top left
    (units :pixels ) 
    w int Arc outer frame’s  width(units :pixels ) 
    h int Arc outer frame’s  height(units :pixels ) 
    start int Start angle of arc 
    end int End angle of arc 
    pen PenParam Pen of  arc border 
    (6)  Sector: DrawPie(x, y, w, h, start, end, pen, brh) 
    Explains for the parameters are as follows: 
    Parameter Type Explain 
    x int X axis coordinate of  sector outer frame’s top left
    (units :pixels ) 
    y int Y axis coordinate of sector  outer frame’s top left
    (units :pixels ) 
    w int Sector outer frame’s  width(units :pixels ) 
    h int Sector outer frame’s  height(units :pixels ) 
    start int Start angle of Sector 
    end int End angle of sector 
    pen PenParam Pen of sector border 
    brh BrushParamBrush of sector filling 
    As to drawing functions , the  color can use RGB values dire ctly, system will deal with  
    						
    							
    it, because there is a correspondence between 65526 colors and RGB. 
    int MacroEntry() 
    { 
     PenParam pen; 
       BrushParam brh; 
     Point pts[5]; 
          short buf[2] = {0}; 
     
      pts[0].x = 0; 
      pts[0].y = 0; 
      pts[1].x = 100; 
      pts[1].y = 0; 
      pts[2].x = 120; 
      pts[2].y = 150; 
      pen.type = 1; 
      pen.width = 0; 
      pen.color = RGB(0, 0, 0XFF); 
      brh.type = BFS_ODWNGRDT_FRTTLD;    
    brh.foreColor = RGB(0, 0, 0);   
    brh.backColor = RGB(255, 255,255);   
      DrawRect(0, 0, 400, 400, pen, brh); 
    } 
    23 Gradient effect of static graphics   
          As to the static closed graphics, add a function of Fountain Fill, this function is 
    very useful when drawing a vector graphic.  For example, draw a channel that has the 
    Gradient effect. As shown in the picture:  
    						
    							
     
    24 Polygon scaling entirely 
        As to polygon, add the function of widening and narrowing  entirely, this function can 
    maintain the entire shape when changing the size of graphic . 
    As shown in the picture,  when the mouse shape is , change the vertexes of 
    polygon, when the  mouse shape is 
    , change the entire size of polygon. 
     
     
    25 Image Library 
    Image Library in V1.6 modifies a lot,  change the browsing mode from file tree to 
    image library, so that the users can search the images intuitively,. In this way, using the 
    function of  Import Graphics is more quick and convenient. At the same time ,divide the 
    display area into two parts, display all the graphics in the upper part, and display the state 
    of selected graphic in the lower part. 
    EV5000 supports the vector graphic and bitmap,  the bitmap’s format is .bg, and 
    bitmap is composed of pictures  or photos in .bmp, .gif, .jpg, .png format. Too many 
    bitmaps will affect the processing speed of  HMI, better not use too many bitmaps, use 
    vector graphics as you can. The vector’s form at is .vg, and vector can be drawn by points  
    						
    							
    lines cycles and so on in EV5000. 
    There are three ways to enter the Image Library interface:  
    1, click Graphics in component attributes, then click  Import graphics to enter the 
    Image Library  interface(take the Bit State Switch for example): 
     
    2 Click the Import graphics Library(I)  in Draw(w) menu to enter the  Image Library 
    interface  
    						
    All Anaheim manuals Comments (0)