Home

User Manual

image

Contents

1. E pgToolManagement J 0013 ResetAllarme TRUE 2 Messages 0014 END IF Global variables v 0015 ELSIF NotificaMessaggi Q lt gt 0 THEN 7 0016 CurrAllMsgColl NotificaMessaggi 0 EP Project 44 Resources d 0017 fhFramesetEdit_AllMsqColl foreCol COL NERO Target vars and parameters x Output x acTime f Axe_F_ap r a xe f ci r axe p b n Preprocessing file BmpfolderDw plk completed a ray ey p Preprocessing file Bmpscroll plk completed E All_aznok LeJAxe_f_com rlAxe fo LEJAxe p b2p Preprocessing file BmpLogoTAURO plk completed allupsBatt r Axe f CurrLim r Axe f recu r axe p b n Preprocessing file BmpbtnDiagno plk completed allUpsLine r Axe f CurrReal r Axe f sp r Axe p b3p Ereprocessing me a re at aa ae completed F T Mr T reprocessing file Bmp etup p Complete Analnput Axe_f_err Axe Fyr Axe_p_base Preprocessing file BmpPunta plk completed AnaRampa Lt Axe_f_feed r Axe p acc Axe_p_bran Preprocessing file excal_iec exp completed i AnaTarget r axe f max r axe p bin f Axe_p_brgp Axe drive ready r axe f min r Aaxe p bip r Axe p corr 0 warnings 0 errors Ka gt v 4 gt Target vars PLC vars 7 4 gt Output i Ready ium GDB 0 1000 TCPIP 10 0 0 50 5000 1 1 MAIN ELEMENTS Set of controls BSS ame o E H m g d e a F 42 Each page may contain an arbitrary nu
2. Then either click the point where you want to insert the control or drag a boolean variable from the project tree or the library window You can get information on properties and events of the Button control in paragraph Jll 50 PageLab user manual PA LAB 4 4 8 CHART Chart control draws the static diagram of one or more arrays of values associated In order to insert a Chart control click the corresponding button in the Page toolbar Lh Then click the point where you want to place the control You can get information on properties and events of the Chart control in paragraph 5 14 4 4 9 TREND After assigning up to 8 numerical variables the object will automatically and periodically once every a defined time acquire their values and will draw the corresponding graphic in a dynamic and automatic way In order to insert a Trend control press the corresponding button Page toolbar ee Then click the point where you want to insert the control You can get information on properties and events of the Trend control in paragraph 5 15 4 4 10 PROGRESS BAR It represents the progress of an operation by showing a stained bar in a horizontal or vertical rectangle The length of the bar related to the bar s lenght shows the percentage of the completed operation In order to insert a Progress bar control press the corresponding button in the Page toolbar Then click the point where you want to place the control
3. Save display area to memory Parameter Description x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page x2 Bottom down x coordinate edge relative to full page y2 Bottom down y coordinate edge relative to full page PageLab user manual 101 et ee LAB Return Value Description Video SaveRect Not sensible always TRUE unsigned char Video WriteFromBuff unsigned short xl unsigned short yl un Signed short x2 unsigned short y2 Restore display area from memory previously saved with Video SaveRect Parameter Description x1 Not sensible saved area has the original coordinates yl Not sensible saved area has the original coordinates x2 Not sensible saved area has the original coordinates y2 Not sensible saved area has the original coordinates Return Value Description Video WriteFromBuff Not sensible always TRUE unsigned char Video Lock unsigned char res Lock the display resources for exclusive access Parameter Description res Reserved Set 0 Return Value Description Video Lock Not sensible return input parameter res unsigned char Video Unlock unsigned char res Unlock the display resource after exclusive access Parameter Description res Reserved Set 0 Return Value Description Video Unlock Not sensible return input parameter res unsigned char Video Sleep unsigned short msec Suspend the task whe
4. When you save the project by clicking the apposite button mi i a Eam m an or when you close the variables editor PageLab adds a new item in the pages tree It cor responds to the local variable which you have just declared Froject k E DemoHMI Project Pages a Properties TF Init Local variables ui fj F Local procedures Page Fi Messages 9 Global variables Global procedures SH Project dl Resources 2 8 2 DECLARING A GLOBAL VARIABLE Let us assume that you want to declare a floating point global variable t right click on the Variables item under the Global variables node of the resources tree and select the Open command in the contextual menu which appears 18 PageLab user manual PA GE ULAB Project x ES DemoHMI Project Properties ER Init EB Local variables me I F Local procedures Page Messages Global variables es variabli Conste m Retains a Global procedures Open a A5 Rezources Follow the steps as shown in paragraph 2 8 1 until the new global variable appears as a new item in the pages tree 2 8 3 IMPORTING THE PLC VARIABLES IN THE PAGELAB PROJECT Usually an HMI project is not a stand alone one but is an interface for a PLC More pre cisely if the PLC project has been carried out with LogicLab you can easily publish some variables to PageLab A variable of the LogicLab project can be exported
5. 96 PageLab user manual ENUM100 19 LongEnter ENUM 100 15 Longleft ENUM100 16 LongRignt ENUM100 E7 LongUp ENUM100 18 LongDown ENUM 100 30 Vk FL ENUM100 al YR EA ENUM100 F WV ES ENUM100 33 VK F4 ENUM 100 34 NR SY ENUM 100 eis VK Fe ENUM 100 36 VR FYR ENUM100 377 YK EG ENUM100 38 WV EST ENUM 100 39 VK FLO ENUM 101 key related actions e 7 ENUM 101 O CALL ENUM101 1 OpenPage ENUM 101 2 Close ENUM101 3 NextField ENUM 101 4 PrevField ENUM 101 9 Edi t ENUM 102 editing mode keys e 7 ENUM102 0 Enter ENUM102 1 LongLeft ENUM102 3 Lett ENUM102 4 Right ENUM102 Up ENUM102 6 Down 7 ENUM 103 color codes A BBGGRR ENUM 103 0 OxO0Q0000000 Bianco ENUM103 1 OxOOFFFFFF Nero ENUM 104 controls appearance e l ENUM104 O Flat ENUM 104 T Raised ENUM104 2 Sunken PageLab user manual PA GE LAB 97 PA GE LAB 98 PageLab user manual PA GE LAB APPENDIX III DESCRIPTION OF PARAMETER FILE As described in section 2 8 4 it is possible to link in PageLab some variables from external device In some objects you can define an explicit or implicit syntax in order to use the parameter mode To use the implicit syntax Device Parametro PageLab requires a PARX file in xml format For example lt parameters gt lt par ipa LOTOO mame Par T
6. Cancel Select one of the target devices listed in the combo box Click Change to confirm your choice Cancel to abort If you confirm PageLab displays the following dialog box Sp This operation requires to save the project e Continue the operation Press Yes to complete the conversion No to quit If you press Yes PageLab updates the project to work with the new target It also makes a backup copy of the project file s in a sub directory inside the project directory so that you can roll back the operation by manually i e using Windows Explorer replacing the project file s with the backup copy PageLab user manual 69 PA GE LAB 70 PageLab user manual PA GE LAEB 5 APPENDIX I PAGE PROPERTIES AND OBJECT PROPERTIES 5 1 FRAME SET 5 1 1 PROPERTIES Properties Available values Description TopDim Top height of the frame pixel BottomDim s l Bottom height of the frame pixel LeftDim Left width of the frame pixel RightDim Right width of the frame pixel enti gt Horizontal space among grid points pixel Vertical space among grid points pixel Default font used when inserting new objects in page Background color selectable from palette In addition this color is also set when inserting new objects in the frame Foreground color selectable from palette This color is set when inserting new objects in the frame Title bar settings can be found in System options
7. You can get information on properties and events of the Progress bar control in para graph 5 12 4 4 11 CUSTOM CONTROL This control is implemented in the firmware You can have several types of custom con trols which are marked by the Control ID property and each type of control may have several instances In order to insert a Custom control press the corresponding button in the Page tool bar Ey Then click the point where you want to insert the control You can get information on properties and events of the Custom control in paragraph 5 13 PageLab user manual 51 PA GE LAEB 4 5 VARIABLES In a PageLab project there are different classes of variables The following paragraphs show you their features 4 5 1 LOCAL VARIABLES Properties E Diagnostica TestVideo video ResetMemo SaveFlash ResetLang CanBus CanBusasy i SE Local variables node a E Local procedures H CanBusSyni H Debug Debugset ResyncProgress H CanBusDeb Orologio FH R Messages H E Global variables HH Global procedures 0 A A A Local variables are variables of the PageLab project You can access them only through the page they were declared from They are listed in the project tree under the Local variables folder Local variables can be used to carry out operations on PLC for example to apply a different scale or to add an offset or system variables or
8. Insert the name of the new procedure prelncrem Cancel Press the OK button Then PageLab adds a new item in the page tree it corresponds to the local variable which has been just declared Project mx Er ay DemoHM Project oe Pages 7 SE Properties ip Init m Local variables E 4 Local procedures prelncrem F SS Page 8 Messages p Global variables gt Variables E Constants 2 Retains ie Global procedures FH Project A Resources Double click on the above mentioned new item the ST language editor opens and lets you either implement or edit the selected procedure s code Write a procedure that applies a unit increment to the n variable 32 PageLab user manual PA GE ULAB Then close the document Insert a new button beside the edit box associated with the n variable and type the char acter in the Text property Let us suppose that you want to execute the prcIncrem procedure by clicking the but ton select the Call action in the Action field and type the procedure s name in the Ac tion par field clion Call chon par prolncrem Every time the user will press the button when executing the HMI n will increase by one and the edit box will show the up to date value 2 11 VISIBILITY AND UPDATING OF CONTROLS As stated in the previous paragraphs each control has its own properties which the user may customize through the properties table fields Some
9. Password show only symbols The Target custom format is a special feature which enables a particular custom for mat implemented on the target The format is specified according with language printf syntax see 5 7 2 2 9 2 EDIT BOX AND PAGELAB LOCAL VARIABLE ASSOCIATION The edit box which you have just inserted lacks an essential element the associated variable to take the values to display from Let us assume that you want to link the edit box to a local variable in order to get information on how to declare a local variable see 2 8 1 i PageLab user manual 23 PA LAB Select the edit box by clicking it once and select the Variable property You can either type the name of the variable or click on the field and open the dialog win dow by clicking on the apposite button sha llPar sie llA eset sle4nalnp svs nalut susBootOn shel anlar sheLandsylr sieLandsylr seLandsylr Filter All Add yanable Cancel You can restrict the research just to the local variables of the Init page consequently only the n variable by using the Filter tool Yariable selection 4dd variable Cancel Select the local variable The Variable field in the table properties refreshes accordantly Variable n Then the Edit box control shows the n local variable s value constantly refreshed 24 PageLab user manual PA GE LAEB 2 9 3 EDIT BOX AND PAGELAB GLOBAL VARIABLE ASSOCIATION The principle
10. Whenever HMI receives a pressure on the object valid only for touchscreen systems OnRelease Whenever HMI releases the pressure on the object valid only for touchscreen systems 84 PageLab user manual PA GE LAEB 5 12 PROGRESS BAR 5 12 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page XDim Width pixel YDim Height pixel Name Name of object Flat plain with use of Border pts and E Flat Raised Border col Sunken Raised Sunken Border _ Border thickness pixel This property is gt 0 i i points sensible only if Appearance is set to Flat Border color selectable from palette This Border color property is sensible only if Appearance is set to Flat or Text is not empty Bar color ee l Color of step bar selectable from palette o FEE Background color selectable from palette Visible status of the object It can be constant TRUE FALSE TRUE or FALSE or linked with a boolean var name variable var name if var name is TRUE the object is visible otherwiseit is hidden Object redraw FALSE the Progress var value is read from memory and updated only when opening page or when a child page is closed TRUE the Progress var value is read from memory and always updated Visible Refresh TRUE FALSE trigger var_name var_name the Progress var value is read from memory an
11. arTrkCol GE lt 0 0 arTrkVis word32 8 var addr address of boolean variable This value is sensible only if the element of arTrkData is not NULL Array of Y axis scale The range of samples for every horizontal division Type of variable of Y Axis scale If constant value arTrkScaleType n tyUndefined Array of offset of Y Axis for every track The arTrkOffset word32 8 displacement of the track from 0 high and low Type array of offset of Y Axis for every track arTrkOffsetType word16 8 If constant value arTrkOffsetType n tyUndefined Array that contains on every step draw the Y Axis label Array of addresses of variables for horizontal bars arTrkBarValueType word16 8 3 Array of types of variable for horizontal bars arTrkScaley word32 8 arTrkScaleType word1l6 8 1YLabelDiv wordl6 8 arTrkBarValue word32 8 3 130 PageLab user manual PA GE LAEB Frame structure FB CHART arTrackBarName word32 8 3 Array of names for horizontal bars arTrkBarCol Array of colors for horizontal bars Output variable Description FUNCTION BLOCK Trend Trend object Frame structure FB TREND Local variables Type Description memVis Visibility status of the previous execution Top left x coordinate edge relative to full Geral wordlo gryl Top left y coordinate edge relative to full page grx2 aac Bottom right x coordinate edge relative to full page gry2 eer Bottom righ
12. cme 22 PageLab user manual PA GE LAB Integers number of digit before comma Decimals number of digit after comma Hexadecimal Uppercase the number is shown as 0 0H representation with up percase H letter Hexadecimal Lowercase the number is shown as 0 0h representation with low ercase h letter Fill with zeros fill the entire editbox controls with O where there are not num bers View always sign show the symbol in editbox Password show only symbols Target custom format the target can define custom format to show the data in a particular way In that case there is a variable on the target with the value of the corresponding user mode Enumerative this representation allows to select a string value corresponding to numeric value defined in Resources under Enumeratives Real format Integers 1 31 256993460 Decimals 1 7 Fill with zeroes View always sign Password E Target custom Format Cancel Integers number of digit before comma Decimals number of digit after comma Fill with zeros fill the entire editbox controls with O whrere there are not numbers View always sign show the symbol in editbox Password show only symbols Target custom format the target can define custom format to show the data in a particular way In that case there is a variable on the target with the value of the corresponding user mode String format Password OK Cancel
13. PA GE LAB User Manual AXEL Revision 3 0 October 2011 PA GE LAB PageLab User Manual Revision 3 0 2011 10 18 Published by Axel S r l Via del Cannino 3 21020 Crosio della Valle Axel S r l 2010 All Rights Reserved II PageLab user manual 1 1 1 2 1 3 2 1 2 2 2 3 231 232 2 4 2 4 1 2 4 2 2 4 3 2 4 4 2 4 5 2 5 2 5 1 25 2 2 6 2 6 1 2 6 2 2 7 27 1 2 8 2 8 1 28 2 2 8 3 2 8 4 2 9 2 9 1 2 9 2 29 3 2 9 4 2 9 5 2 9 6 2 9 7 PA GE ULAB Contents Overview Main elements Run time functionalities Communicating with the target Creating a simple PageLab project Purpose of this chapter Creating a new project Inserting the first age in the project Creating a new page Editing the colors of the page Inserting a secondary page Creating a secondary page Dimensioning and setting the secondary page Viewing the title bar and the system button Assigning a style to the window Choosing the start window Inserting static controls Inserting a line Inserting a rectangle in the page Inserting static images Importing a bitmap in the project Associating an imported bitmap with an image control Text strings Inserting a text string Data management in PageLab Declaring a local variable Declaring a global variable Importing the PLC variables in the PageLab project Inserting field parameters Inserting edit box Inserting an edit box in the page Edit box
14. raised 2 sunken Border thickness It is sensible only if HoOrares byte style O Border color It is sensible when style 0 bordPts gt 0 and not pSelVar 1 fixed Background color when object is selected It is not sensible if pSelVar 0 fixed bordcol word 52 selBackCol word32 PageLab user manual 115 et eh ee Frame structure FB STATICO1 Text color when selected It is not sensible if pSelVar 0 fixed Variable for update FALSE the object is redrawn only when pRefrVar word32 the page is opening or when returning from child page TRUE the object is always redrawn Selection flag for the object Suggest if the object must uses selBackCol and selForeCol Available values FALSE object is never selected TRUE object is always selected var_addr address of boolean variable Number of max characters 0 indicates that numChars word16 the string is drawn with the entire value of Pouring Output variables Type Description selForeCol word32 pselVar word32 FUNCTION BLOCK Image Image object Frame structure FB IMAGE Local variables Type Description memVis Visibility status of the previous execution memSel Selection status of the previous execution Input variables Type Description Handle of the object Must be unique wHnd wordl6 among image objects A T KE Top left x coordinate edge relative to full page y1 word16 Top left y coordinat
15. 4 Properties Events Doc ER an 306 16 Edit_4 Flat K9649 16x32 _F feed r xe p ban tlaxe pg Open the project C Documents and SettingsYazxell8XDesktopyDemoHHINDenc Emex Tr laxe p b3 rlaxe Preprocessing file K96A9_ HMI 1p00 def completed s r POOP P93 Preprocessing file K96A9_HMI_ 1p00 TGT completed F min Tr lave n hase flave nA Tias as m m m m ma m Le le Pee aT men mmm mh mal 4 7 ADVANCED OPERATIONS ON PAGES Advanced operations such as export import copy paste and page based template man agement can be done with PageLab Next paragraphs show these arguments in details 4 7 1 EXPORT IMPORT OF PAGES TO FROM FILES Each page even if of a certain complexity can be saved to be used later in other projects To do so click with the right button on the page node in the project window then select Export page from the menu Project x FE DemoHM Project Pages SER Properties Eig Init E3 Local variables i Local procedures AF Ql Open l Rename i fir Message a Global va e oo Global prt ysriables Import var procedures Export page Export page as template Export yar procedures Insert procedure Remove page Next application asks user to insert the name of the file in which the page will be saved PageLab user manual 55 PA GE LAB Th
16. Global periodic procedure Frame set Pages Navigating between pages Child Pages Pop up pages Asynchronous messages Controls Static Graphic element Edit box Text box PageLab user manual 28 28 29 30 31 33 33 35 35 36 36 37 37 39 39 39 40 40 40 40 41 43 43 43 44 44 46 46 47 47 47 48 48 49 49 49 49 50 4 4 5 4 4 6 4 4 7 4 4 8 4 4 9 4 4 10 4 4 11 4 5 4 5 1 4 5 2 4 5 3 4 5 4 4 6 4 6 1 4 6 2 4 6 3 4 7 4 7 1 4 7 2 4 7 3 4 7 4 4 7 5 4 8 4 8 1 4 8 2 4 8 3 4 8 4 4 8 5 4 9 4 9 1 4 9 2 4 9 3 4 9 4 4 9 5 4 9 6 4 10 4 11 4 11 1 Image Animation Button Chart Trend Progress bar Custom control Variables Local variables Global variables Variables imported from PLC System variables Multiple pages management Association of elements of a set Navigation of the elements of a set Pages numbering Advanced operations on pages Export import of pages to from files Export import procedures and variables Copy paste of pages in the project Rename pages Templates of page management Events Page or control events Key pressure events Events raised by software Procedures that can be associated to events Actions that can be associated to key pressure Resources Fonts Bitmaps Strings table Enumeratives Images lists Sets Automatic documentation Managing projects Selecting the target device PageLab user m
17. If it is a parameter is encoded in this way b0 b7 Subindex parameter b8 b23 IPA parameter b24 b32 Device address Type of data Available values CYBOOL tysInts tyUSInt tyByte tyiInt tyUInt tyword tyDint tyUDInt tyDWord tyReal Min value for edit box variable If bit b16 b17 LSB of field format contains 0 the limit is not set if contains 1 is a constant limit if contains 2 it is a variable limit Max value for edit box variable If bit b14 b15 LSB of field format contains 0 the limit is not set if contains 1 is a constant limit if contains 2 it s a variable limit Identifier of enumerative If O no enumerative associated with this field exists PageLab user manual PA GE ULAB Frame structure FB EDITBOX01 View format encoded in 32 bit bO 0 draw sign only if number is negative 1 draw sign also for positive numbers b1 0 does not print most significant null digits 1 draw zeroes on most significant null digits b2 0 pVar is a variable 1 pVar is a parameter b3 1 right alignment b4 1 center alignment b5 ace a 1 left alignment b10 Exadecimal format with a f lowercase b11 Exadecimal format with A F uppercase b14 b15 0 no max limit 1 constant max limit 2 variable max limit b16 b17 O no min limit 1 constant min limit 2 variable min limit b24 b26 Precision real numbers b27 b31 Width cfr 1 7 2 Flag of v
18. Parameter Description idxDevice Index of device connected idxParam Index of parameter subIdxParam Sub index of parameter pVal Address of variable that contains the read value Parameter type Available values CYBOOL Tyoint tyUsInt TyByte TVInt cCyUint tyWord tyDint tyUDiInt tyDword tyReal tyString Return Value Description Integer values type 0 successful Video GetParam 1 index of parameter not found 2 8 9 system errors 3 type not valid unsigned short Video SsetParam Unsigned char adxDe vice Unsigned short 1dx Param unsigned char subIdxParam unsigned long pVal unsigned char type 112 PageLab user manual PA GE LAB Write a parameter to a device Parameter Description idxDevice Index of device connected idxParam Index of parameter subIdxParam Sub index of parameter pval Address of variable that contains the value to write Parameter type Available values LYBOOL Eyo Int FVUSTAE FYRES Cynt GyULNC CyWord CyDint CyUDiInt tyDword tyReal CYS Ur ing Return Value Description Integer values 0 1 2 8 9 system errors type successful index of parameter not found Video SetParam 3 type not valid 4 read only parameter 5 cannot write now 6 the value is less than the min value 7 the value is more than the max value 8 1 8 FUNCTIONS FOR EVENTS unsigned char Video SendEvent unsigned short msgID unsigned short wPara
19. but relative to bar 3 Bar 3 Color bar 3 Be As Color bar 1 but relative to bar 3 Clear Data var aie Boolean variable If itis TRUE and Refresh is 7 TRUE the chart deletes all the previous data 5 15 2 EVENTS Event Description BeforeUpdate Before the object is redrawn AfterUpdate Immediately after the object is redrawn 92 PageLab user manual PA GE LAEB APPENDIX II FILE FOR TARGET DESCRIPTION The def files contain some definitions of target environment PageLab uses this informa tion for generating custom code The def file consists of two sections It is allowed comment that starts with a semico lon This file is included in pajx file 6 1 TARGET PROPERTIES 6 1 1 DESCRIPTION This section consist of five records which support one or more parameters Each record is on new line and the elements must be separated with spaces or tabs Record Structure Header Description Screen dimension of target measured in pixel SCREEN dimx dimY DimX width DimY height Target board can save and restore video memory SAVESCREEN 0 1 0 no save 1 save and restore Target board has touchscreen i e can use the pressure events TOUCHSCREEN 0 1 0 no touchscreen 1 exists touchscreen REFRESH ERE Refresh time of all objects in page measured in milliseconds FONT FORMAT HH VH Font encoding ColorSET RGB BMP FORMAT SIMULAB
20. colors If var_name is empty the track is not defined and not drawn Track 2 var_name As Track 1 but for track 2 Track 3 var_name As Track 1 but for track 3 Track 4 var_name As Track 1 but for track 4 Track 5 var name As Track 1 but for track 5 Track 6 var name As Track 1 but for track 6 Track 7 var name As Track 1 but for track 7 Track 8 var name As Track 1 but for track 8 Integer value that is the track for Y axis left Track left gt 0 var_name It is admitted a constant value ex 1 If empty means that the chart must not draw the label for Y axis left Track Right As Track Left for the right side Format Left String as printf Format of Y axis left as c printf function Format Right String as printf As Format Left for the right side XLabel gt 0 var_name step for X axis labels How many divisions of horizontal bar must have labels PageLab user manual 87 PA GE LAEB Properties Description Scale factor of x Axis Value range among two X Scale var name divisions of horizontal bars An empty value indicates that the chart is in autoscale mode Name of the variable that contains the array index samples The chart adds the sample values when the Refresh is TRUE If the value Len Data var_name remains unchanged the chart does not add new values The runtime maintains the last value of this field Constant values are not allowed Variable name for the deviation of O for X Offset var_name x Axis le
21. guish the data in local variables visible in the page scope only and global variables vis ible from every page For some controls it is possible to use parameters and sets 2 8 1 DECLARING A LOCAL VARIABLE First of all declare a local variable which you can use just in the specific page where the declaration takes place In the pages tree under the Init page item right click on the Local variables item and select Open in the contextual menu which appears Project 7 X E ES DemoHM Project ER Pages Properties ig Init ak Local proce coen Page il Messages Global variables F Global procedures EF Project The local variables editor window opens It is blank at present Click the New record button in the Project toolbar nn E E A dialog window opens requesting to specify the new variable s basic features We can declare n as a new 16 bit unsigned integer variable PageLab user manual 17 PA LAB Name i Type UINT Sr Array E Attribute Confirm the operation by clicking Ok The new corresponding record is added to the vari ables editor You can change this new variable s features editing the fields of the record which you have just created For example you May assign an initial value different from null and a comment
22. right click on the Pages item of the project tree Project x EEA DemoHMI Project ae joes aa I Pi Page properties ER Messe Display frame set fa Global va Ci i 4 Re Import page FA Global Insert page Impork page From template Import varfprocedures Export var procedures Fi Aesources Select the Insert page option from the menu which has just shown up This causes a dialog box to appear where you have to specify the page name and whether the page is a pop up one or not EF Project Insert the name of the new page Init Pop up Cancel If you do not select the Pop up property when creating it the page is called Child Page Its main feature is that it fits the whole video area Consequently the user cannot define position and size of a child page because they are automatically set depending on the video area and on an eventual frame set see 4 2 Choose to create a child page and call it Init type the name Init in the apposite field and press OK to confirm your choice A new node appears in the pages folder of the project tree Project x EP Pages Properties Global variables Global procedures ER Project 4A Resources 6 PageLab user manual PA GE LAB Double click on the Init item to open the document with this page preview which is blank at the moment OX XXX XXX XX XX XX XXX XXX KK XX XXX KK KK XX XX XX KK KK KK KK A A A 0 4 OOO
23. 1 STATIC It displays a fixed string whose contents cannot be edited when executing In fact you Should specify the text of the string directly or by the association of the ID of a string de fined as resource to support multi language management For project resources and multi language support see paragraph 4 9 In order to insert a Static control press the corresponding button in the Page tool bar Aa Then click the point where you want to insert the control You can get information on properties and events of the Static control in paragraph 5 4 4 4 2 GRAPHIC ELEMENT It displays a static line or rectangle This means that their properties cannot be edited when executing In order to insert a Line control press the corresponding button in the Page toolbar el Then click the point where you want to insert the control In order to insert a Rectangle press the corresponding button in the Page toolbar mi Then click the point where you want to insert the control You can get information on properties and events of the Line and Rectangle controls in paragraphs 5 5 5 6 4 4 3 EDIT BOX It displays the contents of an associated variable In order to insert an Edit box click the corresponding button in the Page toolbar abl Then either click the point where you want to insert the control or drag a variable from the project tree or from the library window You can get information on properties and events of th
24. But the user must define at least all the elements of 102 enumerative id 100 en key key encoding one byte en val string with key name Enumerative 101 With this key you can define new actions the names will be shown in Action field of actions table id 101 en key action identifier en val string with action name This enumerative has a well defined number of lines The following table shows you the corresponding actions en_key Action 0 Calls local or global procedures 1 Opens child page 2 Closes current page 3 Selects next object Edit Box Button etc 94 PageLab user manual PA GE LAEB en_key Action 4 Selects previous object Edit Box Button etc 9 Enters editing mode Edit Box Button 10 Leaving not implemented The string en val is arbitrary Enumerative 102 Selection and edit functions id 102 en key identifier of edit function en val string with the name of associated string The name of this field en val must be the same of en val of 100 enumerative so that PageLab associates an edit function with a key This enumerative has a well defined number of lines See the actionsin the table below en_key Edit function Confirms modifications and leaves editing mode Loses modification and leaves editing mode Deletes selected character Moves cursor left Moves cursor right Selects the previous element of an enumerative associated with an Editbox Selects the next elemen
25. LAEB 5 10 ANIMATION 5 10 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page XDim Width pixel YDim Height pixel Name Name of object Flat plain with use of Border pts and Appearance Flat Raised Border col Sunken Raised Sunken Border gt so Border thickness pixel This property is points sensible only if Appearance is set to Flat Border color selectable from palette This Border color property is sensible only if Appearance is set to Flat Name found in It contains the images that the object can Image list g Resources view and the value range Animation Name of the variable that is compared with var_name variable value range in Image list SINT USINT BYTE INT UINT Type of Animation var If it is a variable the weed Ee WORD DINT type is automatically defined UDINT DWORD Visible status of the object It can be constant Visible TRUE FALSE TRUE or FALSE or linked with a boolean var name variable var name if var name is TRUE the object is visible otherwise hidden 5 10 2 EVENTS Event Description BeforeUpdate Before the object is redrawn AfterUpdate Immediately after the object is redrawn 82 PageLab user manual et ee ee 5 11 BUTTON 5 11 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinat
26. Name field you can assign the bitmap name which will appear in the re sources tree the default name is the file name without extension and preceded by the Bmp prefix The Transparency color field lets you specify the transparency color that is a color which will not be really drawn but will let the elements appear through the bitmap back ground You can customize the transparency color by taking the desired one with the mouse from the Converted bitmap window RGB indicate the transparency color components If the values are n a it means that no transparency color has been selected The Reset Transp button lets to cancel the last selected transparency color At last you can confirm the operation by clicking the Import button The imported bitmap appears as a new item in the resources tree Project E Resources Italiana A Fonts Fr Bitmaps abe String table Enumeratives Image lists gt Sets sy Project T Resources 2 6 2 ASSOCIATING AN IMPORTED BITMAP WITH AN IMAGE CONTROL The control which is aimed to display the static images is called Image press the corre sponding button in the Page toolbar PageLab user manual 15 PA GE LAB 2 7 Move the mouse to the active area of the page A cross appears The object will be in serted in the grid near to the mouse cursor Confirm the insertion point by left clicking A new blank frame appears T
27. TRUE transparent square transp FALSE solid square bordCol Border color fillCol Fill color The value is not sensible if transp is TRUE Return Value Description Video Rectangle TRUE if successful FALSE otherwise unsigned char Video DrawBorder unsigned char style unsigned short xl un Signed short yl unsigned short x2 unsigned short y2 unsigned char pts unsigned char color Draw a border outside the rectangle area Parameter Description 0 flat style 1 raised 2 sunken x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page x2 Bottom down x coordinate edge relative to full page y2 Bottom down y coordinate edge relative to full page pts Border thickness It is sensible only if sty e 0 color Border color It is sensible only if style 0 Return Value Description Video DrawBorder TRUE if successful FALSE otherwise unsigned char Video DelBorder unsigned char style unsagned short xl un Signed short yl unsigned short x2 unsigned short y2 unsigned char pts Delete a border outside the rectangle area The color of fill is the page color assigned with Video SetPageColors Parameter Description 0 flat style 1 raised 2 sunken x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page x2 Bottom down x coordinate edge relative to full page PageLab user manual
28. TRUE if successful FALSE otherwise unsigned char Video AddFontUnicode unsigned long pront unsigned char char Len unsigned char charHei Publish a new unicode font in HMI run time Parameter Description pFont Address of first byte of font charLen Character width of font pixel charHei Character height of font pixel Return Value Description Video _AddFontUnicode TRUE if successful FALSE otherwise unsigned char Video LoadLanguage unsigned long pResStrings unsigned long pEnums Load strings and enumeratives of any language PageLab user manual 103 et ee LAB Parameter Description pResStrings Address of first resources string for current language pEnums Address of first resources string for current language Return Value Description Video LoadLanguage TRUE if successful FALSE otherwise unsigned char Video DrawFrames unsigned short left unsigned short top un Signed short right unsigned short bottom unsigned long colBack unsigned char fBar unsigned long pTitle unsigned char fResStr unsigned char fSysBtn unsigned char style Function for draw frame set Parameter Description left Width of left frame pixel top Height of top frame pixel right Width of right frame pixel bottom Height of bottom frame pixel colBack Background color TRUE shows title bar Bak FALSE hides title bar Text of title bar pTitle NULL No string in title TRUE pTitle is a resour
29. Text color colBackTxt Background color colForeSel Text color for selection colBackSel Background color for selection Return Value Description Video SetColors TRUE if successful FALSE otherwise unsigned char Video ResetMaps unsigned char res Delete the maps saved for every object The maps are created adding an object at once with access mode kACS INIT Parameter Description res Reserved Set 0 Return Value Description Video ResetMaps Not sensible return input parameter res 106 PageLab user manual PA GE LAEB 8 1 4 FUNCTION FOR OBJECTS unsigned char Video NextEdit unsigned char fRWOnly Enable selection for next objects identified by Sel Order attribute Parameter Description Limit for selecting the next edit box FALSE next edit box must be selectable fRWOnly TRUE the next edit box must be selectable and writable Return Value Description Video NextEdit helio of selected objects if 1 the function has an unsigned char Video PrevEdit unsigned char fRWOnly Enable selection for previous objects identified by Sel Order attribute Parameter Description Limit for selecting the next edit box FALSE the next edit box must be selectable fRWOnLy TRUE the next edit box must be selectable and writable Return Value Description Hides Breurart falls of selected objects if 1 the function has an unsigned char Video EnterEdit unsigned short wHnd Enter edit mode of an Edit Box
30. To modify local copy of the template library removing no more used templates Re export Export local copy of the template library into a new petx library file Remove All Remove all template libraries from current project Now press the Add button to add a template library to the project Once chosen one of the available libraries Template list window appears as shown here Template list EJ Add Remove Re E sport Edit Remove all Cloze HAL BRE Template library has been included to the project Press C ose button Temp ates window is shown there is a tab for each library imported in current project 58 PageLab user manual PA GE ULAB Templates x paqestemplate Each tab shows the list of templates of the corresponding library 4 7 5 3 USING A TEMPLATE Once a template library has been added it is possible to use its elements simply dragging the chosen one from the template window and dropping it on the project tree File View Project Help D des zal ae SER ola OLY A A m El OMB so meld e ts oF s e E ed ee mv lla oh Project i Properties ES DemoHMI Project T Properties FE E a Pages ET Properties Output O X a Templates fig Init Local variables th Local procedures Pag2 ER Messages Global variables Global procedures a All_aznok ft Axe_F_max allUpsBat
31. and PageLab local variable association Edit box and PageLab global variable association Linking an edit box with a target or system variable Linking an edit box with a PLC LogicLab variable Linking an edit box to a parameter Linking an edit box to a variable by dragging and dropping PageLab user manual III WO o NOD OD WwW WwW HO A A e e O e e N N e e e Uu A A e Or 0 N e e e e O O ON N NNNNN NN CN N OW OD MW UW e FE 2 10 2 101 2 10 2 2 10 3 2 10 4 2 11 44 4 2 11 2 2 12 2424 2422 2 12 3 2 12 4 3 Jed 3 2 353 3 4 BD 3 6 3 7 4 4 1 4 1 1 4 1 2 4 1 3 4 1 4 4 2 4 3 4 3 1 4 3 2 4 3 3 4 3 4 4 4 4 4 1 4 4 2 4 4 3 4 4 4 IV PA GE LAB Inserting buttons Inserting a led button Inserting a boolean variable command button Inserting a button to open a child page Inserting a button aimed at launching a procedure of the user Visibility and updating of controls The visibility property The refresh property Compiling and downloading the project on the target Connecting to the target Compiling pages for the target Downloading and executing the compiled pages on the target Simulation PageLab layout Project window Embedded editors Properties window Toolbars The output window Target variables and parameters Table of keys actions associations HMI project in PageLab Project properties General System options Language selection
32. by double clicking on a local or global variable in the project tree you can see respectively the declaration table of the local variables or the global variable table Procedures editor it allows the user in implementing procedures to be associated to the events which are defined for the various project s objects pages and controls or generated from the user himself see 4 8 PROPERTIES WINDOW Each time you select an object in the pages editor the properties window automatically refreshes and shows the selected object s properties and events This window is composed of many pages which you may select alternatively by pressing the corresponding tag above Properties it shows a table including the selected object s properties either it is a whole page or it is a page s control The user is enabled to customize this values through the right hand column of the table Events it shows a table including the typical events of the currently selected object The user may associate either a local or variable procedure with each event by typing its name on the corresponding row of the event in the right hand column Doc it displays a table which shows the Description field of the currently selected object The user may describe the object and this description will be included in the automatic documentation management see 4 10 TOOLBARS The user can give commands to PageLab through some useful toolbars A toolbar can be define
33. dialog Yes page has title No page has not title Yes page with outer border CharDimY gt 0 Font Name found in Resources Background Color Text Color Title bar Yes No Page Border Yes No Text otherwise Resource No page without outer border Text on title bar or Resource ID This property is not sensible if Title Bar field is set to No If Yes denotes that there is a button with X image on it and the behaviour is similar to System menu Yes No Windows Dialog Caption ID Yes page has close button No page has not close button Flat Appearance Flat Raised Sunken Raised Sunken PageLab user manual 7i PA GE LAEB 5 2 CHILD PAGE 5 2 1 PROPERTIES Properties Available values Description earo mY Horizontal space among grid points pixel CharDimy FN Vertical space among grid points pixel Name found in Default font used when Font i Resources inserting new objects in page Background color selectable Background from palette In addition this Color color is also set when inserting new objects in the frame Foreground color selectable from palette This color is set when inserting new objects in the frame Title bar settings can be found in System options dialog Yes page has title No page has not title Yes page with outer border Page Border Yes No No page without outer border Text on title bar or Resource ID This
34. ee ed Press sin ed ai E d BEEN G a i a g TA io mE a ig E i T j Cutout window phi arget variables and parameters utp aceociations Temolates 3 1 PROJECT WINDOW This window includes two pages which are alternatively selectable by pressing the cor responding tab Project it shows the project tree and all the objects the project is composed of hierar chically arranged The pages node contains the project properties and the single pages Each page contains the list of the local variables visible and usable only in the page where they are declared and the local procedures which can be invoked only from the page where they are implemented Moreover there is the node of the asynchronous messages the node of the global variables visible and usable from whatever page and the node of the global procedures which you can invoke from whatever page Resources it shows the project resources that is fonts bitmaps strings table enumer ated data types images lists and sets 3 2 EMBEDDED EDITORS PageLab is endowed with three types of editor Pages editor in order to open this editor double click the name of the desired page in the project tree see 3 1 This tool shows you a page preview and lets you edit it you may either add or remove controls see 4 4 customize properties manage the events and the documentation PageLab user manual 39 PA GE LAEB 3 3 3 4 3 5 3 6 Variables editor
35. handle of first or last selectable controls Parameter Description Boolean parameter It indicates if the function checks for the objects that have read write access mode TRUE last selectable object FALSE first selectable object Return Value Description Handle of the object 1 if errors or do not exist selectable objects rwReq last Video PirstLastEdit 8 1 5 DRAWING FUNCTIONS unsigned char Video Line unsigned short xl Unsigned short yl unsigned short x2 unsigned short y2 unsigned char pts unsigned long color Draw a line Parameter Description x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page x2 Bottom down x coordinate edge relative to full page y2 Bottom down y coordinate edge relative to full page pts Thickness color Line color Return Value Description Video Line TRUE if successful FALSE otherwise unsigned char Video Rectangle unsigned short xl unsigned short yil n Signed short x2 unsigned short y2 unsigned char pts unsigned char transp unsigned long bordCol unsigned long fillCol 108 PageLab user manual PA GE LAEB Draw a rectangle Parameter Description x1 Top left x coordinate edge relative to full page yi Top left y coordinate edge relative to full page x2 Bottom down x coordinate edge relative to full page y2 Bottom down y coordinate edge relative to full page pts Border thickness
36. no more active This event does not exist in main page When the previous opened child page will be closed This event OnActivate does not appear in leaf page i e in the pages which do not call child pages When the page starts drawing all the objects The page has just OnDeactivate aM drawn border background and title Asynchronous event The user can link a procedure and it will be OnTimer i executed cyclically 5 4 STATIC 5 4 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page Name Name of object Text toe Obici wise Text or Resource ID shown in the object Resource ID Font Font used for drawing the text in object Resources ay Background color selectable from palette Text Color a Text color selectable from palette Background color selectable from palette Sel when the object is chosen This property is Background not sensible if the Se ect field is constant FALSE 74 PageLab user manual a LAB Properties Description Text color selectable from palette when the Sel i i Foreground object is chosen This property is not sensible if the Select field is constant FALSE i Flat Appearance ne hase Raised Sunken Border _ Border thickness pixel This property is gt 0 points sensible only if Appearance is set to Flat Border color selectable from palette This Border color property i
37. node of resources tree This dialogue box will be shown as follows Import bitmap into project Source bitmap Converted bitmap H Oo Ww 0 Transparency Bmp Name PO A na G n a B n a Reset Transp Click on Browse button to navigate computer resources to select desired source file In Bmp Name field user can personalize bitmap name that will be shown on resource tree bitmap name is constituted by file name without extension and with Bmp prefix by de fault Transparency color field allows the user to specify transparency color so a color that is not really drawn on the screen but a transparent color zone that does not cover elements previously drawn Transparency color can be personalized by choosing it by mouse from Converted bitmap window RGB indicates transparency color Red Green Blue components n a value indicates that no transparency color has been selected Reset Transp button allows the user to undo last selected transparency color Once finished these operations it is possible to confirm bitmap importation by clicking on Import button 64 PageLab user manual PA GE LAEB 4 9 3 STRINGS TABLE In a PageLab project it is always possible to explicitly write the text to show on a text string or on a title of the page It is also possible to refer to one of the strings of the re sources specifying its ID In first case text will be always the same in second case the text that correspond to the act
38. object mem yl wordl 6 is called with accMode kACS INIT or acoMiode KACO PRINT FUNCTION BLOCK Animation Animation object Frame structure FB ANIMATION Local variables Description memBmp Address of bitmap of the previous execution Input variables Description und Tordi Handle of the object Must be unique among animation objects zi Top left x coordinate edge relative to full page y1 Top left y coordinate edge relative to full page 5 donit Bottom right x coordinate edge relative to full page 118 PageLab user manual PA GE UAE Frame structure FB ANIMATION Bottom right y coordinate edge relative to pSelVar 1 fixed kACS IDLE no effect accMode byte kACS INIT first draw on display Z wordl i OoOo full page 0 flat style byte 1 raised 2 sunken Dorabts Border thickness It is sensible only if style 0 Border color It is sensible when bordCol word32 style O bordPts gt 0 and not kACS PRINT update draw on display pBmpArr Address of first image to view pCaseArr word32 Address of first element of selection nArrEl Number of elements in image list pBmpDef orde Address of bitmap to view pSelvar not in pCaseArr pSelVar word32 Address of variable for selection Type of pSelVar Available values type byte tyBool tySInt tyUSInt tyByte eynt tTyYUInt CyWord CyDint tyUDInt tyDWord Flag of visibility Available values l FALSE image not visible pVisVar
39. otherwise execute the action for a button The object holds the task until exits from edit mode Parameter Description and Handle of object that must be edited or execute his action Return Value Description Return pressed key code for exiting edit mode If Video EnterEdit i return 1 is an error only if the object is an edit box unsigned char Video EnterEditSel unsigned short wind unsigned char onlySe lect Select object or enter edit mode of an Edit box otherwise execute the action for a button The object holds the task until exit from edit mode Parameter Description aad Handle of object that must be edited or execute his action FALSE as VideoEnterEdit OnlySelect TRUE enables only the selection without entering edit mode PageLab user manual 107 FRRCGE LAB Return Value Description Return pressed key code for exiting edit mode If return 1 is an error only if the object is an edit box Video Enterkdaretsel unsigned char Video PushButton unsigned short wHnd Enter press mode for buttons The object holds the task until exit from press mode This function is sensible only for touchscreen systems Parameter Description wHnd Handle of button Return Value Description TRUE last pressure event was in button area Video PushButton FALSE last pressure event was outside button area error short Video Farsthastbhdiu unsigned char rwRed unsigned Char last Return the
40. selection Global OnTimer m Initial page Select the initial page Page It allows to select the PageLab project s start page among the implemented pages PageLab user manual 43 PA GE LAB 4 1 2 SYSTEM OPTIONS It allows the user to customize the window s title bar features the font the text color and the background color Pages properties General System options Language selection Global OnTimer Window title bar Font E WP2_6x16 Text color z T Back color Fr 4 1 3 LANGUAGE SELECTION Pages properties General System options Language selection Global OnTimer Language selection Available languages Current language BaseLanguage Select Add Remove Export Import sisLanglD Value OK Cancel Help It allows you to add remove export import and select the resources languages see 4 9 The label sysLangID Value indicates the value which the sysLangID target vari ables must take to display the pages in the selected language In order to add a language apply the following procedure First of all export the language supported by the translator choose Italian and press the export button which opens a window requiring the destination folder for the selected language file 44 PageLab user manual PA GE ULAB Save In Freee volution mi E gt Eii My Recent Documents Desktop My Docum
41. short INT unsignedShort UINT int DINT unsignedInt UDINT boolean BOOL PageLab user manual 99 PA GE LAB digitalInput BOOL digital0utput BOOL float REAL double REAL string STRING strsize number of character if it is a string type 100 PageLab user manual PA GE LAEB 8 APPENDIX IV ELEMENTS OF HMI RUNTIME 8 1 FUNCTIONS This chapter lists all the functions that HMI run time exports to PageLab and so the user can use them into script and procedures These functions are divided into several categories which are shown in details in the fol lowing paragraphs 8 1 1 SYSTEM FUNCTIONS HARDWARE AND OPERATING SYSTEM unsigned char Video InitHMI unsigned char dmy Function of initialization for HMI runtime Parameter Description dmy Reserved Set 0 Return Value Description Video InitHMI TRUE if successful FALSE otherwise unsigned char Video Switch unsigned char on Turn on off the display Parameter Description an TRUE turns on the display FALSE turns of the display Return Value Description Video Switch Not sensible always TRUE unsigned char Video LCDContrast unsigned char more Display contrast Parameter Description meee TRUE increases display contrast FALSE decreases display contrast Return Value Description Video LCDContrast Not sensible always TRUE unsigned char Video SaveRect unsigned short xl unsigned short yl unsigned short x2 unsigned short y2
42. to associate the Edit box control with a global variable is similar to the one to associate the Edit box control with a local variable The difference consists in the variable declaration in order to get information on how to declare a global variable see 2 8 2 You can associate the Edit box with the global variable through the dialog window which was introduced in the preceding paragraph but in this case it is necessary to use a differ ent filter in the Filter field Yariable selection Filter Page globals Add variable Cancel 2 9 4 LINKING AN EDIT BOX WITH A TARGET OR SYSTEM VARIABLE The target system executing PLC and HMI often publishes some variables which allow the interaction between user interface and system In PageLab such variables are called target variables You can view them in the Target vars table of the Target Vars and Parameters window tel sysallGen us selPDO 2 us sys llNum us selPDO_ 3 us sys llPar lus selPDO_ 4 tf sysallReset Tl sysAllaux i systinalnp sys alltcnc i systinaCut You can associate an Edit box with a target variable through the dialog window which opens from the Variable field but in this case it is necessary to use a different filter in the Filter field PageLab user manual 25 PA GE LAB Yariable selection apsAllA eszet aps nalnp aps nalut apsBoot0n aps an
43. to implement local procedures 4 5 2 GLOBAL VARIABLES T Properties Diagnostica Testvideo Video ResetMemo SaveFlash ResetLang CanBus eI CanBus sy 7H CanBusSsyn Debug Debugset ResyncProgress CanBusDeb ES Orologio EH ER Messages 6 3 Global variables io El Variables Ge ee actLang i debSlotDataType fo fu debslotId ui debslotIdxDB i debslotNum LEF dehsinksetnik ra A A A Gag Fe eg ER 52 PageLab user manual PA GE LAEB Global variables are declared in PageLab and they are accessible from every page of the project Global variables are listed in the Global variables folder in the project tree The function of the global variables is similar to the local variable s one but the different visibility scope makes them unusable for the implementation of global procedures or for the parameters passing between distinct pages 4 5 3 VARIABLES IMPORTED FROM PLC s input image st output image PLE wars A compiled PageLab project consists in a PLC that once downloaded on the target board is executed by the actual PLC which is implemented with LogicLab Variables exported from the LogicLab PLC contained in the exp file enable the interaction between these two distinct components PLC variables which are not automatic thus associated to a data block are exported in the exp file In order to include a exp file in the PageLab pro
44. variable pay Selection TRUE FALSE variable var name Call OpenPage Action Close NextField PrevField Edit page_name Action par proc_name Right Center Left Alignment 5 11 2 EVENTS Event OnClick Description Selection order on which the object can be selected with the pressure of a key or with a procedure In this case the selection moves from the current object to the previous or next Sel Order object Visible status of the object It can be constant TRUE or FALSE or linked with a boolean variable var_name if var_name is TRUE the object is visible otherwise it is hidden Transparency It can be constant TRUE or FALSE or linked with a boolean variable var_name if var_name is TRUE the object is transparent When the button is pressed var_name is set to TRUE When the button is not pressed var_name is set to FALSE Selected status of the object It can be constant TRUE or FALSE or linked with a boolean variable var_name if var_name is TRUE the object is selected and so it will show the colors Select Back SelectBord If this field is FALSE SelectBord and Select Back properties are not sensible Action executed on button pressure Parameter associated with the action executed on button pressure It is sensible only if Action is OpenPage Action par name of the page to open or Call Action par name of the procedure to execute Text alignment in the object Description
45. 109 et ee LAB Parameter Description y2 Bottom down y coordinate edge relative to full page pts Border thickness It s sensible only if style 0 Return Value Description Video DelBorder TRUE if successful FALSE otherwise unsigned char Video PrintBitmap unsigned long ptrBmp unsigned short x unsigned short y Print a bitmap coded with run time HMI format Parameter Description ptrBmp Address of first byte of bitmap x Top left x coordinate edge relative to full page y Top left y coordinate edge relative to full page Return Value Description Video PrintBitmap Not sensible always TRUE unsigned char Video DelBitmap unsigned long ptrBmp unsigned short x un Signed short y Delete a bitmap where it is not transparent coded with run time HMI format Parameter Description ptrBmp Address of first byte of bitmap x Top left x coordinate edge relative to full page y Top left y coordinate edge relative to full page Return Value Description Video DelBitmap Not sensible always TRUE unsigned long Video InitBmpTreeRetresh unsigned short xl unsigned short yl unsigned short x2 unsigned short y2 Switch context of drawing area With this call all the next drawing functions uses the in visible device context Parameter Description x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page Bottom down x coordinate edge relative to full
46. 6 INSERTING STATIC IMAGES ee g ee ee ee ee ee fee Pee OR ee RO ro Ph oe a A a a a a The following paragraph shows you how to insert static images in the page Static images are different from animations images which may change dynamically even though they have fixed position and dimensions and from floating images images which move in the page 2 6 1 IMPORTING A BITMAP IN THE PROJECT Image that has to be visualized must be available on PC as a basic Windows image file bmp dib emf gif ico jpg wmf If this pre condition holds you can start the importing procedure Right click the Bitmaps item in the resources tree and select the Import bitmap com mand in the contextual menu which appears Project xi EX Resources Italiano He Fonts String Import bitmap r Ep Enumeratives 203 Image lists Sets BF Project WA Resources A dialog window opens Import bitmap into project Source bitmap Converted bitmap Bmp Name Transparency A na G n a B n a Reset Transp PageLab user manual PA GE LAB Pressing the Browse button you can navigate in the computer resources and select the source file In this case the source file is BulbOn jpg which represents a lighted bulb Import bitmap into project Source bitmap Converted bitmap Browse ink 149 W 83 Transparency FE Bmp Name BmpBulbOn R Ox1C G 05A B Ox1B In the Bitmap
47. AB 4 8 2 KEY PRESSURE EVENTS These events take place when a key is pressed the raising of the event starts the execu tion of the associated action see 4 8 5 if it is The pressure of a key can be also simu lated by software see next paragraph 4 8 3 EVENTS RAISED BY SOFTWARE E procOpenSet 7 Debug 0001 OOS Apertura finestra impostazione con slot 7 OOOs 0004 debsSlotHdum 73 0005 sysVoid i Viden SenmndEvent EWM EEY KEEY VE Fl 1 0006 007 Programmer can raise events by software using the function Video_SendEvent inside the target software or in the body of the procedure using following syntax Video SendEvent event id param Where event id is the identifier of the type of the event and param is an integer 16 bit parameter PageLabsupports software events defined in this table Event FEE Simulates the pressure of the key kWM KEY Key code specified as parameter then cause the associated action if it is Causes a system message that once KWM MSG Window ID got by the system causes the instant opening of the alarm page that has Window ID as identifier In touchscreen systems simulates the pressure on the edit box whose kWM SELECT Edit box handle handle is passed as parameter causing its selection or its transition to edit mode In touchscreen systems simulates the pressure on the button whose handle kWM PUSH Button handle is passed as parameter causing the execution of the associate
48. AB descr Tab map code detval 0 mins max 65535 um num typetarg unsignedShort gt lt protocol name Modbus commaddr 15716 commsubindex 0 gt lt protocol name CanOpen commaddr 15716 commsubindex 0 gt lt par gt lt par ipa 10001 name Gain Nto ALZ descr NIC calibration Gain AT2 de fval 32768 min 0 max 65535 um num typetarg unsignedShort gt lt protocol name Modbus commaddr 15617 commsubindex 0 gt lt protocol name CanOpen commaddr 15617 commsubindex 0 gt lt par gt lt par ipa 11308 readonly false name Modem Initstrl detval descr iInit String lst part typetarg string strsize 19 gt lt protocol name Modbus commaddr 15821 commsubindex 0 gt lt protocol name CanOpen commaddr 15821 commsubindex 0 gt lt par gt lt parameters gt Where each parameter has these fields ipa parameter index used as input value of Video_SetParam Video_GetParam If there are nodes with protocol type they have more priority than ipa so PageLab uses them Name parameter name descr complete description of parameter defval default value of parameter min minimum value of parameter max maximum value of parameter um measure unit of parameter typetarg type of parameter The available values with the translation in PLC are Char SINT unsignedChar USINT
49. ALT word32 if pTransp different as 1 fixed and not pSelVar 1 fixed Border color and text color when selected It is sensible only if style 0 and bordPts gt 0 or pString different as NULL and not pSelVar 0 fixed Color of button area when selected It is fillSelCol word32 sensible only if pTransp different as 1 fixed and not pSelVar O fixed kACS IDLE no effect accMode byte kACS_ INIT first draw on display kACS PRINT update draw on display Flag of visibility Available values FALSE image not visible TRUE image always visible bordSelCol word32 pVisVar word32 var_addr address of boolean variable Flag of transparency Available values FALSE button always solid pTtransp word32 TRUE button always transparent var addr address of boolean variable 120 PageLab user manual PA GE UAE Frame structure FB BUTTON02 Address of a boolean variable Pressed button pPressVar TRUE Released button pPressVar FALSE If the field is MULL there is no variable Selection flag for the object Suggest if the object must uses bordCol WillCol or 4 bordSelCol fillSelcCol Available values FALSE object is never selected pPressVar word32 pSelVar word32 TRUE object is always selected var addr address of boolean variable Format of numeric values encoded with 16 bit b4 1 right alignment b5 1 center alignment b6 1 left ali
50. Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page XDim Width pixel YDim Height pixel Name Name of object Control ID Identifier of custom control type Visible status of the object It can be constant TRUE FALSE TRUE or FALSE or linked with a boolean prone Aa var_name variable var_name if var_name is TRUE the object is visible otherwise it is hidden Continuous redraw of the object FALSE the body of the runtime object is Rares TRUE FALSE updated only when opening page or when a child page is closed TRUE the body of the runtime object is always updated 86 PageLab user manual PA GE LAEB 5 13 2 EVENTS Event Description BeforeUpdate Before the object is redrawn AfterUpdate Immediately after the object is redrawn 5 14 CHART 5 14 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page XDim Width pixel YDim Height pixel Name Name of object Opens a dialog with the following options the array with data of track Data Source the visibility condition of the track TRUE or boolean variable Color of the track the scale factor range among two Track 1 var_name horizontal divisions the offset displacement of the track 0 Y step of print label for Y axis three horizontal bars with name value and
51. Image encoding UNICODE on fe oS board has support for unicode Target board has a joypad that can JOYPAD 0 1 be used for moving among elements of page and can be connected to actions If set to 1 says that HMI run time has Video_InitHMI invoked on mney oid target start up Typically it is used for custom commands on start up If set to 1 generates PLC code BMPFULL 0 1 extended for bitmap instead binary bitmap PageLab user manual 93 PA GE UAE 6 2 6 3 OBJECT VERSION The graphical objects editbox textbox static bitmap etc can have a version or cannot exist The syntax is CTRL Name Version where Name name of graphical object Ex Editbox Version version of HMI run time objects If this value is set to 1 PageLab does not make available this object SYSTEM ENUMERATIVES Enumeratives of def file are maps for binding among numeric values and strings or other numeric values Each enumerative has an identifier that specifies a function in the map with this syntax ENUM id en key en val where id enumerative identifier en_key value key of record must be a number en val value of value key can be a number or string 6 3 1 DESCRIPTIONS This paragraph describes the values for system enumeratives Enumerative 100 With this key you can define new buttons the names will be shown in the Key field of actions table see 4 8 5 The number of lines is not limited
52. Not empty Name of object Thickness pts Border col Re Line color selectable from palette gt 0 Line thickness pixel 5 6 RECTANGLE 5 6 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page XDim Width pixel YDim Height pixel Name Name of object Border points Border color Te Border color selectable from palette Background color selectable from palette gt 0 Border thickness pixel ses il This property is sensible only if Transparent is set to 7RUE Transparency Transparent TRUE FALSE TRUE transparent background FALSE solid background where color is Back Color 5 7 EDIT BOX 5 7 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page Name Name of object Flat plain with use of Border pts and Flat Raised BORET GOT Appearance Sunken Raised Sunken Font Font used for drawing the text in object Resources 76 PageLab user manual ed SN el Properties Available values Description ses i Background color selectable from palette Text Color os l Text color selectable from palette Background color selectable from palette Sel when the object is chosen This property Background is not sensible if the Selectable field is constant FALSE Text color selectable from palet
53. O OOO OOOO XXX XX KK KK KK KK So 2 3 2 EDITING THE COLORS OF THE PAGE You can edit the background color of the page and the foreground default text color through the page properties double click in the Background Color field A little button appears il Pressing it the colors palette appears Then you can select the desired color Properties HEREEEE Properties a BE 7 BEE BER ER aD oe S Yes Yes No Appearance Flat Choose grey as background color and black as default text color Background color Text color PageLab user manual 7 PA GE ULAB 2 4 INSERTING A SECONDARY PAGE 2 4 1 CREATING A SECONDARY PAGE Let us assume that you want to create a secondary page right click on the Pages item of the project tree and choose the Insert page option from the contextual menu Type the name Pag2 in the dialog box which appears and select the pop up property Inzert the name of the new page Pag2 HE W Pop up Cancel Consequently a new item appears in the Pages folder of the project tree E DemoHMI Project ER Pages Properties FE Init eee fcc Messages Global variables Fd Global procedures EF Project AG Resources 2 4 2 DIMENSIONING AND SETTING THE SECONDARY PAGE Note that the icon of the Init page different from the new Pag2 one In fact the last one has been created as pop up page whereas the first
54. PIFAST Ciclo fast 2 mS IDS_TEMPIFAST Fast cycle 2ms IDS_TEMPIINOUT Ciclo infout IDS_TEMPIINOUT Infout cycle IDS_MEMODISK Spazio su disco byte IDS_MEMODISK Disk space byte Imom m ANE aa Lat Strings and enumerated data types are structured as to ease the multilingual de vice moreover PageLab provides a function to export import the above mentioned elements to from a text file in order to simplify the translation from a language to another Variables and procedures Local variables Video LIE leg o Name Twe Array Initvae Description No 0 0 E proc TestVideo TestVideo Non scrive sopra la title bar IF sysTCHPixY gt 48 THEN Croce nella posizione del touchscreen sysVoid Video_Line sysTCHPixX sysTCHPixY 1 sysTCHPixX sysTCHPixY 1 1 12 InkTnSet Ul 0 sysVoid Video_Line sysTCHPixX 1 sysTCHPixyY sysTCHPixX 1 SyYSTCHPixY PageLab enables the implementation of procedures which may be as complex as you want in the ST language Through these procedures the user can interact with the PageLab application the PLC application or the target system variables to customize the interface s behaviour or the whole CNC PageLab user manual 3 PA GE LAEB 1 2 RUN TIME FUNCTIONALITIES Asynchronous messages management Alarm PLC Application not loaded OK PageLab supports the issue of asynchronous messages whatever their complexity You can entire
55. TREND Access mode Available values kACS_IDLE no effect kACS INIT first draw on display kACS PRINT update draw on display kACS CLOSE close the chart and delete all the data Address or constant for X Axis definition accMode byte Available values XlabelCol P constant number of samples constant start with O variable array that contains pNSamples samples with X axis value Type of pXData array iDotStep wordl6 If tyXData tyUndefined is a constant iSampleBuffer word16 Color of X Axis label Space among two points of grid in pixel arXBars word32 3 The property is sensible if the grid is visible Number of samples that the run time can arXBarsType word16 3 store The older ones are deleted if the size exceeds Array of addresses of vertical bars If 0 arxXBarsCol word 52 3 the vertical bar is not defined otherwise the address of variable or constant value Type of variable that indicates the value of vertical bars If arxXBarsType n GridCol word32 tyUndefined and arXBars n is not NULL the value of arXBars n iS a numeric costant BorderGridcs lor word32 Colors of vertical bars pVisVar Color of grid arTrkData word32 8 Color of broder of grid Flag of visibility Available values FALSE object not visible arTrkType byte 8 YP TRUE object always visible var addr address of boolean variable Array of addresses of data The nth of arTrkData contains t
56. XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page XDim Width pixel YDim Height pixel Name Name of object PageLab user manual 89 ete iT Properties Available values Description Open a dialog with the following options the variable will be sampled each Sampling Time seconds the visibility condition of the track TRUE or boolean variable color of the track the scale factor range among two POOR ANAA horizontal divisions the offset displacement of the track 0 Y step of print label for Y axis three horizontal bars with name value and colors If var_name is empty the track is not defined and not drawn Track 2 var_name As Track 1 but for track 2 Track 3 var_name As Track 1 but for track 3 Track 4 var name As Track 1 but for track 4 Track 5 As Track 1 but for track 5 Track 6 var name As Track 1 but for track 6 Track 7 var name As Track 1 but for track 7 Track 8 var name As Track 1 but for track 8 Integer value that is the track for Y axis left Track left gt 0 var_name It is admitted a constant value ex 1 If empty means that the chart must not draw the label for Y axis left Track Right As Track Left for the right side Format Left String as printf Format of Y axis left as c printf function Format Right String as printf As Format Left for the right side XLabel gt 0 var_name step for X axis label
57. abe String table PgTabella SU oa x Properties allt E PgTabella Er a String table Aat Properties Events qh FT Frame set i SS 5 I El Postart Excalibur Local variables GEN RESET Reset K9649 8x16 Local procedures ID TAB DEBUG Debug cmdTabella Z initPage D TaB SETUP Set Pagallcnc AXX 0 000 AXY 0 00 ID_TAB_PARAMETRI Par Local variables ID OUTPUT Output Local procedures Pagallarmi Local variables Local procedures Refresh PgTabella PgTabellaFile PaTabellaFileNew Local variables Local procedures oninit Onok onchange Clickinch pgTabellaFileErase PgTabellaFileGest pgTabellaParam PgTabellaSelLine paTabellaSetup pgTabellaDebug pgTabellaMdi poFileManager poFileMnt paFileUmnt ID INPUT Input ID SUP GENERAL Generale ID_SUP_PUNZO Punzonatura ID SUP FORA Foratura ID_PAR_GENERALI Generali Tempi Barriere ID_TABELLA ppearance Raised se al livello ALL MSG o COLL amp oll bekCol COL_GRIGIO LSE Operazione annullata fine tabella lt i yfficaAllarmi 0 foll foreCol COL BIANCO loll bckCol COL_ARANCIONE fbFramesetEdit_Al1lMsgColl enumId 5 FlagAllMsgCustom TRUE IF ResetAllarmiMessaggi THEN elt
58. ack of right Y Axis if 0 the right label will not drawn tyTrackLeft Type of default track for left Y Axis Address of the track of left Y Axis if 0 the left label will not drawn formatwert word32 Label format of left Y Axis formatRight Label format of right Y Axis Label format of X Axis Available values bordCol byte pNSamples word32 pXOffset word32 pTrackRight word32 pTrackLeft word32 O ss format Word32 1 mm ss 2 hh mm 3 hh mm ss Number of division on horizontal bar used with scale factor and offset for iDivGridx word16 drawing the chart tracks Ex scale X 1 iDivGridX 5 value between 0 and 5 Sensible even if the grid is not visible Number of division on vertical bar used with scale factor and offset for drawing iDivGridyYy word16 the chart tracks Ex scale Y 1 iDivGridY 5 value between 0 and 5 Sensible even if the grid is not visible Draw grid fGrid byte FALSE grid not visible TRUE grid visible Step for X axis labels How many division of horizontal bar must have labels tyXScaleType byte Type of X Axis scale Address of Scale factor of x Axis Value range among two division of horizontal bars 0 value indicate that the chart is in auto scale mode Address of boolean variable If it is TRUE the chart delete all the previous data iXLabelDiv wordl6 pXScale word32 pClearVar Word32 132 PageLab user manual PA GE LAEB Frame structure FB
59. alled Frame structure FB VIDEO GETPAGEColors Local variables Description Input variables Description Output variables Description color Text color in the page back word32 Background of the page FUNCTION BLOCK Static0l Text strings with variable visibility 114 PageLab user manual PA GE LAEB Frame structure FB STATICO1 Local variables Type Description memVis byte Visibility status of the previous execution Input variables Type Description A vorai Handle of the object Must be unique among static objects Sy eee Top left x coordinate edge relative to full page y sorait Top left y coordinate edge relative to full page kACS_IDLE no effect accMode byte kACS INIT first draw on display kACS PRINT update draw on display Boolean value FALSE pString is the address of string fResStr byte to draw TRUE pString is the identifier of resource string Text to draw It is different according to fResStr Address of font for drawing text The font must be initialized with Video AddFont foreCol word32 Text color bckCol Background color Visibility Available values FALSE text not visible TRUE text always visible pstring word32 pFont word32 pVisVar word32 var addr address of boolean variable Format for numeric values encoded in 32 bit b3 1 right alignment format wordlo b4 1 center alignment b5 1 left alignment 0 flat style byte 1
60. ameters Let us consider the following example Modbus TCP IP config 10 0 2 r Communication IP address 10 0 0 101 i Port 502 Protocol Modbus Address 255 C Jbus Time out ms fir 000 Connect timeout 5000 Cancel 2 12 2 COMPILING PAGES FOR THE TARGET You can start compiling the HMI project by clicking the corresponding button in the PageLab s Project toolbar 36 PageLab user manual PA GE LAB Compilation is composed of two phases the first one consists in the PLC code generation which realizes the pages as they have been planned in PageLab The program shows in the Output window the progress level of the compilation and displays eventual errors Creating the ppj file A Creating the ple file Building the page call tree Associating programs with CPU tasks Declaring global variables k Declaring fonts Declaring bitmaps Declaring constants Generating alarm page function blocks Generating page drawing function blocks Generating page refreshing function blocks Generating main programs PLO code generation completed The second one consists in the compilation of the PLC code which has been generated during the first phase It can be started only if the first phase has been accomplished without any error This process is carried out by an external tool the PLC command line compiler 7 7c which PageLab automa
61. among grid points pixel Yes all the parent page objects will be disabled No all the parent page objects will be enabled if they are completely visible Font Name found in Default font used when inserting new objects Resources in page Background color selectable from palette In addition this color is also set when inserting Color Em new objects in the frame Modal Yes No Background Foreground color selectable from palette This color is set when inserting new objects in the frame Title bar the settings can be found in System i options dialog EENE Gar Gey NE Yes page has title No page has not title Yes page with outer border Page Border Yes No i No page without outer border Text on title bar or Resource ID This property is not sensible if the Title Bar field is set to No Text Color Text otherwise Caption Resource ID PageLab user manual 73 al Hl Properties Description If Yes denotes that there is a button with X image on it and the behaviour is similar to Windows Dialog Yes page has close button No page has not close button Flat Raised System menu Yes No Flat Raised Appearance Sunken Sunken 5 3 2 EVENTS Event Description OnLoad On loading this page i e when calling from parent page OnUnload On closing this page when the page returns and the parent page will be restored On calling a child page and the current page is
62. anual PA GE ULAB 50 50 50 51 51 51 51 52 52 52 53 53 53 53 54 54 55 55 56 56 56 57 60 60 61 61 62 62 63 63 64 65 65 66 66 67 68 68 5 1 bid nz 527 522 543 sacral 5 3 2 5 4 5 4 1 5 4 2 5 5 SSi 5 6 5 6 1 5 7 57i Sey 5 73 5 8 5 8 1 5 8 2 Dig 5 9 1 5 10 5 10 1 5 10 2 2 11 SILl 5 11 2 5 12 SIA 5122 5 13 54131 53 2 5 14 5 14 1 VI PA GE LAB Appendix I page properties and object properties Frame set Properties Child page Properties Events Pop up page Properties Events Static Properties Events Line Properties Rectangle Properties Edit box Properties Format specification printf Events Text box Properties Events Image Properties Animation Properties Events Button Properties Events Progress bar Properties Events Custom control Properties Events Chart Properties PageLab user manual 71 Z1 71 72 72 72 73 73 74 74 74 75 75 75 76 76 76 76 78 79 79 79 81 81 81 82 82 82 83 83 84 85 85 86 86 86 87 87 87 PA LAB 5 14 2 Events 89 S15 Trend 89 5 15 1 Properties 89 5 15 2 Events 92 6 APPENDIX II FILE FOR TARGET DESCRIPTION 93 6 1 Target properties 93 6 1 1 Description 93 6 2 Object version 94 6 3 System enumeratives 94 6 3 1 Descriptions 94 6 3 2 Example 96 Appendix III Descripti
63. ariable Parameter variable parameter name Format indicates how to show associated variable value specifying a syntax analogous to C language printf see paragraph 5 7 2 Text Align the alignment of the text to show Min Max minimum and maximum value for the element of the set Visible boolean variable or constant that defines the visibility of the element If dy namic feature of the set is active the variable is periodically checked to hide or show the element Selectable indicates that the element can be selected In this case a boolean variable or constant can be assigned too For a set of type STRING each element of the set is quite simple as it is shown in the next figure 3 Resources Italiano aoe strings da Fonts 1 Para TRUE i Bit mans 2 ID MISURA F abe String table mae Enumeratives ER Image lists Sets fy ParametriBlos Fy Allarmi Fy Descrizioni Fy InputGuput We have to define only two attributes the string or the ID of a string resource see 4 9 3 and the variable constant of visibility As we said an element not visible will not be shown on the screen N B this kind of set can be used with Static control only 4 10 AUTOMATIC DOCUMENTATION During project development it is usually necessary to write comments for each page in order to explain how the page works PageLab integrates into its development environment the automatic documentation fea ture that consi
64. ate Before the object is redrawn AfterUpdate Immediately after the object is redrawn OnGotFocus Whenever object is selected OnLostFocus Whenever object loses the selection Whenever the object is selected and receives the command for MEROE entering in edit mode Whenever HMI receives a pressure on the object valid only for OnClick touchscreen systems Whenever the user confirms the modifications and the value is OnChange different from start 5 8 TEXT BOX 5 8 1 PROPERTIES Properties Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page Name Name of object Flat plain with use of Border pts and Flat Raised Border col a Sunken Raised Sunken PageLab user manual 79 Aal Hal Properties Description Font Font used for drawing the text in the object Resources Background Color Text Color me Text color selectable from palette Border Border thickness pixel This property is points sensible only if Appearance is set to Flat Border color selectable from palette This property is sensible only if Appearance is set to Flat Number of Chars visible in the object Width of entire Chars object is calculated among this value and the Background color selectable from palette Border color size of Font Rows visible in the object Height of entire object is calculated among this value and the gt 0 gt 0 Numbe
65. ay specify in the Action par field In this case let us assume that you want that the pressure of the Open button opens the Pag page To obtain this select the O0penPage action in the Action field then type the name of the child page Pag2 in the Action par field ction OUpenPage chon par Page 2 10 4 INSERTING A BUTTON AIMED AT LAUNCHING A PROCEDURE OF THE USER PageLab enables the user to implement some procedures see 4 8 4 through which it is possible to customize the HMI behaviour this feature makes PageLab projects very ver Satile Let us suppose that you want to create a procedure to increment the local variable n of the Init page As this procedure applies on a local variable it will be local in the Init page too First of all create the procedure expand the Init page tree right click on the Local prcedures item and select the Insert procedure command in the contextual menu which appears PageLab user manual 31 PA LAB Project K Project a x Local variabl E Pages SE Froperties E i Init a Local variables PE a LOCA proce ra G a S Page S Messages mA Global variables oO Variables l C Constants T E Retains ot hot Oreo Ae oO Global procedures ER Project 484 Resources A little dialog window opens The user is then required to type the new procedure s name In this case it may be prcIncrem New procedure
66. button Otherwise it will be green 2 10 3 INSERTING A BUTTON TO OPEN A CHILD PAGE Paragraph 2 4 1 showed you how to create a pop up page The following paragraph explains how to invoke the Pag page from the Init page by pressing a button First of all insert a new button in Init and set it under the previously created Press but ton see 2 10 2 As it should be exactly alike the previous one except the text string and the function you can copy and paste the Press button and afterwards customize its properties Select the Press button by clicking once the selection rectangle appears inside the con trol Press successively Ctr C and Ctr V A cross appears The object will be inserted in the grid near the mouse pointer Confirm the insertion point by clicking under Press A copy of the control appears it is the same as the source button except its position and name 30 PageLab user manual PA GE ULAB You can access this new control s properties and customize them according to the relative purpose Properties x Properties F Events De gt Po earance isible TRUE Transparent FALSE Selection variable FALSE The preview looks like this The button control has got a very important attribute which has not been represented in the properties grid above the Action attribute allows the user to associate an action with the button pressure Some actions require an additional parameter which you m
67. cIncrem procedure so that when it refreshes the n value it evaluates again whether it is even or odd In order to access the prcIncrem source code select the corresponding item in the project tree by right clicking After wards choose Open from the contextual menu which appears Project a p Local variables BH 0001 E28 DemoHMI Project Pages Properties ge Init Local variables o variables Insert procedure Remove procedure Messages 0003 even n MOD 2 OU 0004 ooos In order to associate the string s visibility state with the even boolean variable select the text string and click the Visibility field a button appears El After clicking it a dialog box opens Select the radio button Variable which enables the overhead variables list change the filter Filter into Page locals and select the only local boolean variable that is even 34 PageLab user manual PA GE LAB Visible Property definition Filter Page locals Add variable f Variable f TRUE FALSE Ta Confirm your choice by clicking OK The result is the following visible even 2 11 2 THE REFRESH PROPERTY When available the Refresh property determines it the associated object has to be drawn once when opening the page or coming back from a child page or it needs to be constantly refreshed This property distinguishes for example the edit box and t
68. ce string fResStr i FALSE pTitle is an address of constant string TRUE shows system Fo Ben FALSE hides system button 0 Flat style 1 Raised 2 Sunken Return Value Description Video DrawFrames Not sensible always TRUE 8 1 3 FUNCTIONS FOR OPERATING WITH PAGES unsigned char Video InitPage unsigned short xl unsigned short yl unsigned short x2 unsigned short y2 unsigned long pTitle unsigned short wData Show a page on display Parameter Description x1 Top left x coordinate edge relative to full page val Top left y coordinate edge relative to full page x2 Bottom down x coordinate edge relative to full page 104 PageLab user manual PageColors PA GE LAEB Parameter Description y2 Bottom down y coordinate edge relative to full page oTitle Address of Text of title bar NULL no text in title bar Feature declaration bO b7 0 Flat 1 Raised 2 Sunken b8 0 no title bar 1 shows title bar wData b9 0 pTitle is an address of constant string 1 pTitle is a resource string b10 0 no system button 1 shows system button b11 0 window not modal 1 modal window sensible only for pop ups windows Return Value Description Video InitPage Not sensible always TRUE unsigned char Video SevPageColors unsigned long colFore unsigned long col Back Assign all colors for current page Parameter Description colFore Color
69. ct Inserting a secondary page Inserting static controls how to insert simple objects lines rectangles etc in a page Inserting static images how to insert an image in a page starting at a bmp file Inserting strings how to insert a text label Inserting edit boxes how to access the data of the system and the control PLC how to declare new variables how to insert text frames to view edit these data Inserting buttons learning to use an essential control for the interaction between the user and the system Compiling and downloading the project CREATING A NEW PROJECT Launch PageLab then select the New Project command from the File menu The follow ing dialog box appears New project m Project Name Directory ere Target selection Type the name you want to assign to the project in the Name field and in the Directory field specify the directory where you want to create the project folder Select the target which will execute the HMI from the Target selection menu The contents of this menu can be customized if the desired target does not appear in the list refer to your hardware provider Confirm your choice by pressing OK PageLab automatically creates the folder 7 Demo manuale Demo HMI as specified in Directory PageLab user manual 5 PA GE LAEB 2 3 INSERTING THE FIRST AGE IN THE PROJECT 2 3 1 CREATING A NEW PAGE To insert a new page in the project
70. ct Fore If this field is FALSE the Access property is not sensible Visible Selectable TRUE FALSE Var_name 5 7 2 FORMAT SPECIFICATION PRINTF If the object has not any enumerative format the format string is composed as follows flags width precision type The field has one or more characters that describe the specification The simplest format contains only percentage symbol and one char as type for example Zs Next table explains in details functions and values Field Available values Description prints always the sign even if the number is positive This char is an option for chars order print sign number of decimal digit This field may have more than one flag flags 0 prints zeros in head until width if specified or NumChar 78 PageLab user manual PA GE LAB Field Description Maximum chars can be printed Allows to eee BARER nena view values that do not fill NumChar fully Decimal digits after the point If the field is an integer and there is a precision the precision gt 0 object shows a decimal point E g the value is 102 integer and precision is 2 with 2d the number is shown as 1 02 d Integer with sign f Real x Hexadecimal with lowercase chars x Hexadecimal with type Mandatory field uppercase chars s String sdf Password od u f x Custom measure unit format 5 7 3 EVENTS Event Description BeforeUpd
71. d action if it is k Shows the page specified by the RE Pa b ter if the context i i CANCES rr blee ge number parameter if the context is a page in which sets are used PageLab user manual 61 PA GE LAEB 4 8 4 PROCEDURES THAT CAN BE ASSOCIATED TO EVENTS A procedure is a program that is executed when the event that has been associated to it takes place Events have been deeply described in previous paragraphs see 4 8 There are two classes of procedures Local procedures This kind of procedures can be called only within the scope of the page in which are declared In particular they can be associated to the events of the page itself and of all their controls The same can be said for software events raised when the page they refer to is active Procedure code can contains references to all the types of variables with local variables of the page too Global procedures This kind of procedures can be called from every page and can be also used as peri odic asynchronous routine of alarm management They cannot contain variables refer ences Here follow the description of the syntax to get the properties of a control from a proce dure similarly to C language printf it is LbsSesecS page name ctrl name prop name Where page name is the name of the page that has the control ctrl name is the name of the control prop name is the name of the property of the control So if we want to get the property F
72. d as a collection of buttons which you may enable by left clicking them and whose functions are intuitively represented by their icons The toolbars support tooltips too A tooltip is a small text frame containing a short de scription of the object which PageLab automatically displays when you hover with the mouse over a button PageLab is endowed with three essential toolbars Main toolbar it contains the commands to open and save the project to cancel restore the last changes to print to display or close other toolbars Project toolbar it allows you to add new elements to the project as variables pages events actions as well as to enable or prevent the simulation mode and to compile and download the whole project Page toolbar it allows you to choose a new type of control to be inserted in the active page to align or equally space several controls or to set the vertical order of the ele ments on the page THE OUTPUT WINDOW PageLab prints in this window some messages which indicate the progress and the output of the requested processes opening and compilation of a project resources importing exporting etc TARGET VARIABLES AND PARAMETERS This window shows the list of external variables available for PageLab coding The window is composed of several pages which you may alternatively select by pressing the corresponding tab One page contains the list of the available variables file tgt 40 PageLab user
73. d ood as j my cat Je TEED SE LUS toe Saving settings 2 Touch screen setup PageLab user manual 65 PA GE LAEB 4 9 5 IMAGES LISTS An images list is very similar to an enumerative but with the following differences intervals of constants are supported not only simple values each value has an image associated a list of images determines the content shown by an Animation control while an enu merative can be associated to an Edit box e g now we have an images list L7stBulbs that is shown on the resource tree E Image lists R ListGulbs Bue Listlevels It is possible to see all the records of the list by double clicking the node Init Value End Value Bitmap 10 0 BmpBulbs 0 5 BmpBulb6 5 10 BmpBulb If we introduce an Animation control see 4 4 6 in the page and we set its property Image list with the name of the enumerative ListBulbs the control will show the image whose specified interval includes the value of a variable associated to the control If the numeric value of the associated variable does not match any record in the list a default image with init and end value set to will be shown if it is If no default image is specified no image will be drawn 4 9 6 SETS As it is described above see 4 6 sets are ensemble of global variable even of distinct type In particular there are two types of set Variable parameter sets even of not equal type VARIANT Strings se
74. d updated only when the variable becomes 7RUE After the update the runtime sets it to FALSE Step variable This is the filling percentage of bar in relation with the range assigned by Lo limit and Hi limit It can be any string variable of the project local global imported from PLC or target or a parameter see 2 9 2 Progress variable Not empty UNDEF BOOL SINT USINT BYTE INT Type of Progress var If itis a variable the UINT WORD DINT type is automatically defined This property UDINT DWORD is sensible if Progress var is an explicit LWORD REAL parameter LREAL STRING Data type PageLab user manual 85 ete LAB Properties Available values Description Name of the variable or numeric constant This is the least value for step bar It can be any variable of the project local global imported from PLC or target See with type specified by Data type Name of the variable or numeric constant This is the maximum value for step bar It can be any variable of the project local global imported from PLC or target See with type specified by Data type Orientation Horizontal vertical Direction of step bar Constant or var name Low limit Constant or var name High limit 5 12 2 EVENTS Event Description BeforeUpdate Before the object is redrawn Immediately after the object is AfterUpdate Adan 5 13 CUSTOM CONTROL 5 13 1 PROPERTIES Properties
75. dow which you can open by double clicking on the Properties item of the project tree The General window is used for this purpose Pages properties General System options Language selection Alarms m Initial page Select the initial Page nage In order to indicate the start page select the desired one from the list Then confirm your choice by clicking OK The start page is marked in the project tree by a red triangle Project x SHES DemoHMI Project H Pages ER Properties ETS Init Page Ein Messages Global variables Global procedures Fa Resources 2 5 INSERTING STATIC CONTROLS The two pages which you have just created are blank yet Go back to the first page Init and start inserting some controls Static controls are objects which are drawn once when opening the page and they do not change until the page is active PageLab user manual 11 PA GE LAEB 2 5 1 INSERTING A LINE Insert a line by clicking the corresponding button in the Page toolbar NI Move the mouse to the active area of the page A cross appears The object will be in serted in the grid near to the mouse cursor Confirm the insertion point by left clicking A new Line control appears It has a default size and horizontal alignment You can resize it by dragging one of the two ends of the line You can edit the
76. e edge relative to page XDim Width pixel YDim Height pixel Name Name of object Text or image to view in the button Empty or explicit string Text Img text or Resource ID or Bitmap Resource ID bitmap Text or image to view in the button when it is selected Empty or explicit Selection text or Resource ID string Text Img or Bitmap Resource ID bitmap Font Name found in Font used for drawing the text in object This Resources field is not sensible if it shows a bitmap Flat plain with use of Border pts and A Flat Raised Border col ppearance Sunken Raised Sunken Border points Border thickness pixel This property is sensible only if Appearance is set to Flat Border color selectable from palette This property is sensible only if Appearance is set to Flat or Text is not empty Background color selectable from palette Background This property is sensible only if Transparent color is set to TRUE Border color Border color when the object is selected This property is not sensible if Selection var is FALSE fixed Selection border Background color when the object is selected This property is not sensible if Selection var is FALSE fixed Sel background PageLab user manual 83 PA GE LAEB Properties Available values Selection gt 0 order eee TRUE FALSE var_name TRUE FALSE Transparent var_name Press Empty or var_name
77. e edge relative to full page Address of variable for moving image on px1 word32 X Axis It is sensible only if floating TRUE Address of variable for moving image on pyl word32 Y Axis It is sensible only if floating TRUE 116 PageLab user manual PA GE ULAB Frame structure FB IMAGE Type for px1 Available values Lyoint tCyUSInt tyByte tynt tyUInt tyWord tyDInt tyUDInt IELA ae tyDWord It is sensible only if floating TRUE and px1 lt gt NULL Type for py1 Available values CYolInt TCTYyYJSINE tyByte tyInNnt Lyvine CyWord ECyDINE CYUDINT t YDE Y ag tyDWord It is sensible only if floating TRUE and pyl lt gt NULL iP oas Wieth pixel ay worais Height pixel 0 flat style byte 1 raised 2 sunken Position of object floating byte FALSE docking TRUE floating Border thickness It is sensible only if style 0 Border color It is sensible when sty e 0 bordPts gt 0 and not pSelVar 1 fixed Border color for selected object It is bordSelCol word32 sensible when style 0 and bordets gt 0 and not pSelVar O fixed kACS IDLE no effect kACS_ INIT first draw on display kACS PRINT update draw on display boraPcs byte bordcol word372 kACS QUERY request for updating accMode byte output variables kACS BCKQUERY request for updating output variables when the object is in background pages kACS DELETE delete object Addre
78. e Edit box control in paragraph 5 7 PageLab user manual 49 PA GE LAEB 4 4 4 TEXT BOX It displays the contents of an associated string variable It supports the formatting on several lines of the text which is contained in the string To insert a Text box control in the page press the corresponding button in the Page toolbar Then either click the point where you want to insert the control or drag a variable from the project tree or the library window You can get information on properties and events of the Text box control in paragraph 5 8 4 4 5 IMAGE It displays a bitmap image In order to insert an Image press the corresponding button in the Page toolbar Then click the point where you want to insert the control You can get information on properties and events of the Image control in paragraph 5 9 4 4 6 ANIMATION It displays a bitmap image which you select from a list of images depending on the value of an associated selection variable In order to insert an Animation press the corresponding button in the Page toolbar Then click the point where you want to insert the control You can get information on properties and events of the Animation control in paragraph 5 10 4 4 7 BUTTON You may use the Button control either to check a boolean variable s state or press TRUE release FALSE or to send a command to the system In order to insert a Button press the corresponding button in the Page toolbar
79. ee O A E Hi limit 65539 E Fefresh TRUE ENEDES Mable TRUE R E A reer E AE ED ERR SS EGE A e a at Selectable TRAUE We created before a set of five elements named BIOSParameters now we can associate BIOSParemeters 0 to the first edit box and BI0SParemeters 1 to the second So there are three pages first page with the first two elements of the set second page with elements 2 and 3 and third page showing the last element of the set In the last page the second edit box is not visible 4 6 2 NAVIGATION OF THE ELEMENTS OF A SET Navigation of pages that represent a set of elements is automatically done using the Nex tEdit event of the last selectable control of the page and using PrevEdit event of the first selectable control of the page It is also possible to send special events to force the change of the page in this way Video SendEvent kEV WM CHANGESETPAGE numpage Where numpage is the number of the page of the set 4 6 3 PAGES NUMBERING PageLab defines two variables related to pages numbering PagIndex current index of the page containing controls based on a set PagNumber number of pages that complete the visualization of the whole elements of the set 54 PageLab user manual PA GE ULAB These variables can be used in the page to show the numeration of the pages In fact they can be used as variables associated to edit box controls in this way Ba U ET E e EA EET ER ACES AEE x Propeta
80. elected edit i box If the system is not touchscreen Edit Do not care allows the user to simulate the pressure of the button There are two types of associations key action Local actions local associations valid only for the page currently open in the editor of the pages Global actions global associations valid in any point of the project If the system has the touchscreen feature normal interaction with user is made by the pressure of sensible area on the screen However this table does not loss its meaning because allows the user to define virtual keys and to control their pressure by software causing in this way the dynamic execution of specific actions N B if the same action is defined both at local and at global level system does not give errors nor warnings because local declaration precedes global one NextField Do not care RESOURCES A resource is an interface element User can get informations from resources or can use them to do actions PageLab supports different categories of resources that are managed by Tab Resources project window see 3 1 Categories are explained in details in the following para graphs FONTS Fonts are the different types of characters supported for the output of text strings on the screen In PageLab there are two types of fonts fonts imported fonts declared ina p b file included in the project and downloaded into the target board together with the pages code
81. ents My Computer hy Network File name ResFreee wolution_EMG tet bd Places Save as upe Text files txt Cancel The program suggests a file name Res project title first three characters of the language extension txt At the end of the exportation the file is composed of all the project s resources which have to be translated strings enumeratives Translate the file and replace the text under the Language tag with the one of the new language for example in this case change it into Chinese Inthe Language selection panel choose the Import button then select the suitable file in the PC The new language appears in the list Pages properties General System options Language selection Global OnTimer Language selection Available languages Curent language BaseLanguage Select Add Remove Francaise Italiano Portugues Esport Import sisLanglD Value eS ee Cancel Help PageLab user manual 45 PA GE LAEB 4 1 4 GLOBAL PERIODIC PROCEDURE Pages properties General System options Language selection Global OnT imer M Global OnTimer event for all pages me Global on timer allows you to specify the name of a global procedure to be periodically and independently executed on the active page Such a procedure may be effectively used to constantly test one or more PLC variables a
82. ers is composed of device variable name differently from vari ables which show just their name The parameter may be inserted in the apposite controls property in the following forms explicit form d oi os type d numerical ID of the device 07 object index os object subindex type PLC type e g 1 2010 0 UINT implicit form dev name dev symbolic identifier of the device name symbolic name of the parameter e g Frigo AILI The d ID field of the device is a numerical or symbolic identifier to be defined at project creation It refers to a specific device which may be local the device which executes the pages itself or on the fieldbus The dev field is a symbolic identifier of a device whose numerical ID can be retrieved by PageLab 2 9 7 LINKING AN EDIT BOX TO A VARIABLE BY DRAGGING AND DROPPING You may add variables and parameters to the Target vars and parameters window by dragging and dropping them in the page PageLab will request to define the type of control to insert to associate it with the variable Insert object f Edit control tf Butt C Progress control T ry Cancel PageLab user manual 27 PA GE UAE 2 10 INSERTING BUTTONS Buttons are very versatile controls which play an essential role in the interaction between user and system particularly in case of touchscreen systems without keyboard This chapter s aim is to show four kinds of use of the button contr
83. fications and the value is OnChange different from start 5 9 IMAGE 5 9 1 PROPERTIES Properties Available values Description Top left x coordinate edge relative to page const gt 0 XPos It is possible to assign a variable only if Style variable is set to Floating PPE EE Top left y coordinate edge relative to page YPos i It is possible to assign a variable only if Style variable is set to Floating XDim Width pixel YDim Height pixel Name Name of object Flat plain with use of Border pts and Appearance Flat Raised Border col Sunken Raised Sunken Border seo Border thickness pixel This property is points a ae only if Appearance is set to Flat Border color selectable from palette This Border color property is sensible only if Appearance is set to Flat Bitmap Bitmap used for drawing the image in object Resources Name of another object that is redrawn when Style is set to Floating It is sensible only if it is overlapped with this image Background Image object in the image page Visible status of the object It can be constant TRUE FALSE TRUE or FALSE or linked with a boolean eran var_name variable var_name if var_name is TRUE the object is visible otherwise it is hidden Docking fixed position Sty Le Docking Floating Floating variable position according to XPos variable and Ypos variable PageLab user manual 81 PA GE
84. fonts embedded fonts already available on target board that have not to be download ed with the project this kind of fonts should be published to PageLab in form of p f file to let the application correctly draw the preview of the text strings in the page editor File with p f extension defines one font it has to be included in paj project file with this synax FONT font name PageLab user manual 63 PA LAB At project opening time if PageLab finds this declaration it searches in project folder for a file named font name plf and loads it in memory 4 9 2 BITMAPS Bitmaps are pictures to associate to image controls see 4 4 5 Bitmaps had been man aged by PageLab old versions as text files with p b extension and structured with the same syntax of the initialization definition of an array variable in IEC Now images are saved and loaded in binary format to optimize loading time on images of big size Bitmap definition files have to be included in project paj file using this syntax BITMAP bitmap name plk At project opening time if PageLab finds this declaration it searches in project folder for a file named bitmap_name plk and loads it in memory PageLab provides a tool to convert bitmaps from Windows format to PageLab format To start this tool click on Import resource gt Bitmap from Project menu it is also pos sible to click on Import bitmap from context menu that can be shown by right click on Bitmaps
85. ft or right A positive value moves the chart values to left Grid Visibility of the grid Number of division on horizontal bar used X Div Grid value with scale factor and offset for drawing the chart tracks Number of division on vertical bar used with Y Div Grid value scale factor and offset for drawing the chart tracks FG se Background color selectable from palette Flat plain with use of Border pts and Flat Raised Border col Sunken Raised Sunken Border Border thickness pixel This property is points sensible only if Appearance is set to Flat Border color selectable from palette This Border color property is sensible only if Appearance is set to Flat or Text is not empty Font Font used for drawing the label in object Resources Continuous redraw of the object FALSE the chart is updated only when opening page or when a child page is closed TRUE the chart object is always updated synchronized with others objects var_name the chart is drawn on rising edge of boolean variable This value TRUE of this variable is the moment when the char adds the samples Len Data lt gt internal HMI index of data Visible status of the object It can be constant TRUE FALSE TRUE or FALSE or linked with a boolean var_name variable var_name if var_name is TRUE the object is visible otherwise it is hidden Format X String as printf Format of X axis as c printf function Appea
86. gnment Number for establishing a sequential selection Output variable Type Description format wordi 6 order wordl6 FUNCTION BLOCK EditBox01 Edit object Frame structure FB EDITBOX01 Local variables Description memVis Visibility status of the previous execution Input variables Description ead ere Handle of the object Must be unique among edit box objects x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page 2 x coordinate edge relative to full Bottom right y coordinate edge relative to full al page Address of font for drawing text The font must pFont word32 ae be initialized with Video AddFont O flat style byte 1 raised 2 sunken foreCol word32 Text color PageLab user manual 121 PA GE LAEB Frame structure FB EDITBOX01 7 B 7 n _ E 122 Background color Text color when selected It is sensible only if pCanSel is not 0 fixed Background color when selected It is sensible only if pCanSel is not 0 constant Border thickness It is sensible only if style 0 Border color It is sensible when style 0 bordPts gt 0 FALSE read only mode TRUE read write mode Request refresh FALSE the object is redrawn only when the page is opening or return from child page TRUE the object is always redrawn Address of variable or parameter according to format It cannot be NULL
87. he address of first elements of array of nth track If address is NULL the track is not define Array of data The nth of arTrkType contains the type of nth elements of arTrkData This value is sensible only if the element of arTrkData is not MULL Array of track colors This value is sensible arTrkScaleyY word32 8 only if the element of arTrkData is not NULL arTrkCol byte 8 arTrkVis word32 8 PageLab user manual 133 PA GE LAEB Frame structure FB TREND Array of visibility flags The nth element of arTrkMinY determines the visibility of the track FALSE track not visible AEE E A TRUE track always visible var addr address of boolean variable This value is sensible only if the element of arTrkData is not MULL E EEN word32 8 Array of Y axis scale The range of samples for every horizontal division Type of variable of Y Axis scale arlrkOfftserlype word1l6 8 If constant value arTrkScaleType n tyUndefined Array of offset of Y Axis for every track iYLabelDiv word16 8 The displacement of the track from 0 high and low Type array of offset of Y Axis for arTrkBarValue word32 8 3 every track If constant value arTrkOffsetType n tyUndefined Array that contains on every step draw arTrkBarValueType word16 8 3 the YAxis label T EEE ee word32 8 3 Array of addresses of variables for horizontal bars ser re word32 8 3 Array of types of variable for horizontal bars Output variable Type Desc
88. he text box With regard to the edit box the refresh property has to be set when compiling and it can not be edited at runtime If you assign Refresh TRUE the associated variable s value is constantly read and refreshed otherwise Refresh FALSE the value is read and refreshed only when you open the page or when you come back from a child page There is another option about text boxes you can associate a boolean variable that is used as trigger for refresh when the trigger variable becomes TRUE the control s con tents are refreshed then it is automatically reset by PageLab to FALSE 2 12 COMPILING AND DOWNLOADING THE PROJECT ON THE TARGET The following paragraph shows you how to compile and download a HMI project on the target board that runs PageLab PageLab user manual 35 PA GE LAEB 2 12 1 CONNECTING TO THE TARGET Launch the Communication settings command from the Project menu This causes the following dialog window to open Device Link Manager Config v10 0 2 Ed Curent selected protocol ModbusT CP Active Properties Activate Description Cancel The user is required to select a suitable communication protocol from the left column and to activate it by pressing the Activate button Then the Properties button becomes active by clicking it the user accesses another dialog window which is different in accordance with the specific selected control and lets set the protocol s par
89. hich requests to insert the name you intend to assign to the new page This dialog window contains a checkbox with the label Pop up If you do not select it the new page will be a child one N PageLab user manual 4 PA GE LAB A child page fits the whole screen or alternatively if there are defined frames see 4 2 it fits the free remaining area Consequently the user cannot define position and dimen sions of a child page as they are automatically set according to the screen and the frame set 4 3 3 POP UP PAGES TEER R RR R R ARR R R RRR R RR RRR R RRR R RR R R A A A CSCC CEES SC CC CESS SSS serere o AAAA AAO SSO SES SSD SE SSD SE SODS SES SE SE SES SES SE SES SES SES SE OTANTA SES SE SSD CC SES SDS SES OTOT ATAATA ATAA CCC CCE CSS 29999999 2 2 2 2 0 tt 2 2 22 2 2 0 0 2 2 2 2 2 2 2 2 2 2 22 0 2 2D 2 0 29955200 2 0 2 2 2 2 2 2 2 2 0 2 D2 2 0 2 2 0 0 2 2 2 2 0 22 2 Oo ee AAI A A E A 6 5 5 I II OO amp r Ox EEES 5 SS ore 5 z EEEE E E E E E E EES Debug Modulo I O E a o seer eacens COO SER AAA HE SEES EE ES 29 99 mM Py POD OO 5550 S505 50 RRS es ka A A EEEE R ATA AA Ani gt POY gt OOO ON REESE gt 202 99 OOO gt gt gt gt ere 65 SESE CEES EEEEEEECEEEEEEEEECEEEECEEEEECEEEECEEEECEEEECEEEECEEEEEECCCEECCECCEE CCC CCCECCCCCCC CCE EC CEC ES 2 2 2 2 0 0 0 2 2 0
90. iption outKey Key code for exiting editing mode Char index where there is the cursor Index of selected row outCursPos wordlo6 outCursRow wordl6 FUNCTION BLOCK Progress Progress bar object Frame structure FB PROGRESS Local variables Description memVis Visibility status of the previous execution memVal Progress status of the previous execution Input variables Description amma sordir Handle of the object Must be unique among progress objects x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page PageLab user manual 125 PA GE LAEB Frame structure FB PROGRESS Bottom right x coordinate edge relative to full y2 y coordinate edge relative to full O flat style 1 raised 2 sunken barCol Color of step bar bckCol Background color bordPts Border thickness It is sensible only if style 0 Border color It is sensible when style O bordPts gt 0 Step variable This is the filling percentage of bar pVar word32 in relation with the range assigned by pMin and pMax Type of pVar Assigned values tyBool tySInt tyUSInt tyByte tyInt tyUInt tyWord tyDInt tyUDInt tyDWord Min value for edit box variable pMin word32 If bit bO LSB of field format contain 0 is a constant limit if contain 1 it is a variable limit Min value for edit box variable pMax word32 If bit bl LSB of field format contain 0 is a co
91. is file assumes a pex extension Export file contains page info and local procedures Import operation is quite similar to the export operation Select Pages node click with right button and select Import page from the popup menu User can then select the file of the page to import Imported page takes the same name that it had when it was ex ported S 4 4ee ell OB Bs Import page Import page From template Import var procedures Export var procedures ES DemoHMI Project Page properties Display frame set Insert page Paste Page 4 7 2 EXPORT IMPORT PROCEDURES AND VARIABLES It is also possible to export import local or global variables and procedures using the menu commands Export var procedures or Import var procedures 4 7 3 COPY PASTE OF PAGES IN THE PROJECT It is possible to copy and to paste a page inside the project Select desired page click with right button of the mouse and select Copy Page from the menu Then to paste page copied select Pages node and select Paste Page from the menu z Lo F EF moo mr poe aS oe ee ES ale o 4me8 on eon E E DemoHMI Project F Pages 2 SEN Properties oi Open Rename Copy Page Variables Import var procedures Export page Export page as template Export var procedures Insert procedure Remove page 4 7 4 RENAME PAGES OS S 4h s Ome oe l DemoHMI Project Page properties Display frame set In
92. isibility Available values FALSE object not visible TRUE object always visible var addr address of boolean variable Available values FALSE object not selected TRUE object always selected var addr address of boolean variable order Number for establish a sequential selection pVisVar word32 pCansel word32 PageLab user manual 123 et ee ee Frame structure FB EDITBOX01 kACS IDLE no effect kACS INIT first draw on display kACS PRINT update draw on display accMode byte kACS SELECT update draw on display when selected kACS MODIFY enter in editing mode Output Variable Type Description outKey Key code for exiting editing mode FUNCTION BLOCK TextBox Text box object Frame structure FB TEXTBOX Local variables Type Description memVis Visibility status of the previous execution base Number of first line seen in object Input variables Type Description Handle of the object Must be unique among eae textbox objects A Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page ze sorait Bottom right x coordinate edge relative to full page y2 ere Bottom right y coordinate edge relative to full page Address of font for drawing text The font pFont word32 oak ps must be initialized with Video AddFont 0 flat style byte 1 raised 2 sunken foreCol byte Text color bckCol Background color B
93. ive language will be shown So English language string table contains the following record If we refer to the identifier ID_GDB_RXNAK from a page control or from a page if current active language is English Bad RX packets will be shown if current active language is Italian Pacchetti RX errati will be shown instead 4 9 4 ENUMERATIVES An enumerative is a data type defined by user it is a set of constants named by user Each element of an enumerative is treated as a constant and can be translated in all available languages of the project e g we defined ImpostazTouch enumerative that is shown on resource tree as follows See i Enumeratives P SerBaud gee gimpostazTouc Enumerative records are shown by double clicking on ImpostazTouch node Description 1 Memorizzazione in corso 2 Touch screen impostato Now we introduce an Edit box control see 4 4 3 and insert the name of the enumera tive ImpostazTouch in its Format property field Control will show the string associated to the value as it is in the table above not the numeric value of the variable associated to the control If the numeric value of the variable does not match with any record of the enumerative table an error string is Shown instead Even enumerative are supported by multi language feature In fact it is possible to per sonalize the name of the enumerative Enumeratives beg SerBaud And its record values tie
94. ject press the Link PLC variables file option from the Project menu then search for the file in the PC resources After linking a exp file to the PageLab project you can get a list update of the exported vari ables by selecting the Refresh PLC variables option from the same menu 4 5 4 SYSTEM VARIABLES 4 6 jud sysMaxFastTime tf sysPagOk lud syvsMaxInautTime tfl sysPlcOk us sve SY SOK i sysRampanaciut us sy isvsOut us syvsSDO access us sve The interaction between PageLab and target is enabled by system variables which the software publishes outside ina tgt file You may access system variables in read write or in read only mode if you try to access a read only variable in write mode an error will occur when compiling MULTIPLE PAGES MANAGEMENT These functions allow to construct pages with data of different kind that must be repre sented on distinct pages for space reasons Sets see 4 9 6 can be used with edit boxes or progress bars Sets are ensemble of vari ables even of different type Set definition can be done from the resource tree they are implemented using a table with a series of variables that are dynamically associated to the control basing on the current index assigned to the page Let us see how to use a set 4 6 1 ASSOCIATION OF ELEMENTS OF A SET Elements of a set can be associated to a control using the following syntax character first of all then the name of the set fo
95. la apgLan sylr sst ar sylr sus ar sylr sus ar sylr Cancel 2 9 5 LINKING AN EDIT BOX WITH A PLC LOGICLAB VARIABLE You can associate an Edit box with a PLC LogicLab variable through the dialog window which opens from the Assoc var field see 2 9 2 but in this case it is necessary to use a different filter in the Filter field Yariable selection Filter PLC application 2 9 6 LINKING AN EDIT BOX TO A PARAMETER You can associate an Edit box with a parameter through the dialog window which opens from the Variable field see 2 9 2 but in this case it is necessary to use a different filter in the Filter field 26 PageLab user manual Yariable Parameter selection Frigo Add 5485 OB Frigo Add R5485 PI KaFrigo AlL CF igo AOL5 Figo BACKLIGHT Frigo Baud C N OB Frigo Baud C N Pl Friga Baud R5232 Fl faFigo Baud AS465 OB Frigo Baud R5485 Pl FOF igo Calibration Al OF igo Calibration _Alz OF igo Calibration Als OF igo Calibration _Al4 OF igo Calibration _Al5 OF igo Calibration AlB CF riga Chg_Ald Friga Chg_Al2 Frigo Chg_Al3 MF rigo Chg_Al4 CF riga Chg_Al5 Frigo Cfg _AlE Frigo Cfq 201 A405 fF igo Chg AU fF igo Chg 203 CF riga Chg_A04 CF rigo DataBit_AS23 Frigo DataBit_AS 48 Frigo DataBit_AS 46 Frigo DILI Frigo DIL2 Frigo DILA Frigo DIL4 Cancel Ai RA m l len M enm hbi nm The name of paramet
96. line thickness through the Thickness points property of the control For example assign a 3 pixel thickness jr hickness points 3 In the page preview you can see how the line looks like 2 5 2 INSERTING A RECTANGLE IN THE PAGE Press the corresponding button in the Page toolbar o 12 PageLab user manual PA GE ULAB Move the mouse to the active area of the page A cross appears The object will be in serted in the grid near to the mouse cursor Confirm the insertion point by left clicking A new Rectangle control appears It has a default size You can edit both the dimensions dragging one of the rectangle vertexes or one dimen sion at a time dragging one of the rectangle s sides You can customize the border and the background color and the transparency through the control properties For example make the rectangle white and opaque with white border and thickness set to 1 Border points 1 Border color Background color Transparent TRUE In the page preview you can see how the rectangle looks like Now superimpose another rectangle to the first one Let us assume that you want the new rectangle to be transparent with black borders and thickness set to 2 Border points 2 Border color E Background color E Transparent TRAUE In the page preview you will see the following image PageLab user manual 13 PA GE LAB m n e ee ee e s a s s Ce ee men mk i a r i 5 D hail hel hel a 2
97. llowed by the index of the position of the element in the page between round brackets PageLab user manual 53 PA GE LAEB Position index is used to indicate the order in which elements are shown in case of more than one element in the same page A page contains one or more controls based on one or more set At runtime the page is replied in order to show all the elements contained in the set In the last page if any control cannot be filled with element value that control is hide ERAGE AE e es 7 NE FE SOE ER KN SE 4 TH 2 Ge a ao ged a FY f X Sets Properties ea S Properties Events Ud Dac sy a RE ERE Ve am m ERE SE RE VEN EM rena STE poe ES ER REN Lea MBs DES ESS RK ne SKYET SES DE TE SN A Pos Bel SEERE MN aesecaeesceuesceae Name Edit I eee pence Sunken percents Dee eee lll du KIGA9_ 16x32 ee ee eee MnP ack Color FEE FOSS RES pes EST Aas AN Rater NOS cca er catia cee anata as i es Text Color a Ooo SEEREN lt Back M ECR SOM no BR a a ASIN ech fet gt EGE oe aco te eee Rg A N Select Fore E P ee eC er a peer Ae a A Border pts 1 OSES bedere Ii ES ree AED SE ae ee eee en SENERE Aa eae a a Ra ee et Hum Chars amp a oe ead EEN eu oe po Format wd JOSIE agama Righ Se SEES E eae SES gee Tet ENES ee ere rae nae ERE ccess RO SEER SEEREN feder 1 IEE A E E A E a E nk aid eine EN 2500 val ParametiBIOS 0 E a N ON a Sen R ES AE DE ES SEES a O AEE SNERRE Data type UINT S init es ee ne E
98. lobal oo F Global Variables Import var procedures Export page Export page as template Export var procedures Insert procedure Remove page A library file with petx extension new or already existing should be indicated Template is appended to the existing templates and a name for the library is requested If the tem plate is already available in the library a message asks the user if he desires to rewrite the existing template or not Page is exported as template into the specified library with all its element but without any referenced variable Scripts and local variables are exported without changes References to variables con tained in the scripts are not modified Child pages popup and asynchronous messages can be treated as templates PageLab user manual 57 PA GE LAEB 4 7 5 2 USAGE OF THE TEMPLATE LIBRARY IN A PROJECT It is possible to include a template library in a project in order to use templates when desired Select Template Management menu voice from Project menu Following window will be shown Template list Remove all Close Available operations are listed here Add add a template library to the project Including a library means that a reference to the library s petx file is added to the current project and that a local copy of the library is made Remove Remove template library from current project Edit
99. ly customize the issue messages management by typing a simple ST procedure Multilingual support PageLab allows you to change strings resources and enumerations language without recompiling nor reloading the application Events management x Properties Events 4 OnLoad OnUnload Oncvctivate proclnitLang Ret4poplication proclnitLang procRetrDia PageLab applications are structured in events the user may seize the available events and manage them through ST coded procedures 1 3 COMMUNICATING WITH THE TARGET Device Link Manager Config v10 0 2 fx Curent selected protocol ModbusTCP Protocols Active S CanOpen W Modbus W ModbusT CP Active Properties Actryate m Description eal You can establish the communication with the target device through the PC communica tion drivers thus using one of the available custom protocols which can be easily imple mented thanks to the modular structure of the communication system PageLab user manual 2 1 2 2 PA GE LAB CREATING A SIMPLE PAGELAB PROJECT PURPOSE OF THIS CHAPTER This chapter aims to lead the user to realize a simple HMI project with PageLab through a sequence of easy steps Here below you can find the list of this chapter s topics Creating a new project starting at zero the realization of a HMI project Inserting the first page in the proje
100. m 7 Send an event from code Parameter Description Available values kWM NULL no event kWM KEY key pressure msgID kWM MSG open message kWM SELECT select an edit box a button kWM PUSH pressure on button Event parameter It has a different meaning according to msgID if kwWM NULL not sensible if kWM KEY pressed key For the key a constant value exists The syntax is wParam KKEY lt key gt Ex LongLert gt KKEY Longhert if kwM MSG ID of message page to open if kWM SELECT handle of selected edit box button if kWM PUSH handle of pressed button PageLab user manual 113 PA GE LAEB Return Value Description Video SendEvent TRUE if successful FALSE otherwise unsigned long Video GetEvent unsigned char dmy Pop an event from queue Parameter Description dmy Reserved Set 0 Return Value Description Double word with inside the encoding 16 low bit type of event kWM NULL no event kWM KEY key pressure kWM MSG open message kWM SELECT select an edit box a button Video GetEvent kWM PUSH pressure on button 16 high bit event parameter if kWM_NULL not sensible if kWM KEY pressed key if kwM MSG ID of message page to open if kWM SELECT handle of selected edit box button if kwM PUSH handle of pressed button 8 2 FUNCTION BLOCKS FUNCTION BLOCK Video GetPageColors Get the page colors of the page where c
101. manual 3 7 PA GE LAEB another page contains the list of the variables which have been exported from the PLC LogicLab file exp Other pages are optional as many as the number of devices with external parameters linked to the project TABLE OF KEYS ACTIONS ASSOCIATIONS This table takes primary importance in case of traditional keyboards without touchscreen where the user interact with the system by pressing the relevant keys See in paragraph 4 8 5 the list of actions which may be associated to keys PageLab user manual 41 PA GE LAB 42 PageLab user manual PA GE LAB 4 HMI PROJECT IN PAGELAB PageLab manages the creation development of pages for a specific application as pro jects The PageLab project is composed of several pages where the user may arbitrarily arrange the controls In each PageLab project you have to specify the start page which will be displayed at the start of the system Other pages will have at least a parent page from which they will be invoked and may have child page to invoke The invoking invoked relations implicitly give to the whole project a tree structure 4 1 PROJECT PROPERTIES In the project tree click the Pages item and access the Properties item By double clicking the Properties item you open a dialog window which is composed of four pages The following paragraphs show you the features of these pages 4 1 1 GENERAL Pages properties General System options Language
102. mber of defined graphic controls There are two classes of graphic controls Static controls drawing tools such as lines rectangles and figures Dynamic controls multilayered objects which enable data and images display and user interaction strings editboxes textboxes buttons progress charts and trends custom controls PageLab is an open system allowing the implementation of custom controls which may be included in the target system PageLab user manual 1 Multi pages structure r relse Broce ERE E gt PgTabella E pgFileManager e Excalibur AXX 0 000 AXY 0 000 AXA res EEES EEES 00000000 SS eataa o O File jabcdefghijklLmno 0 000 0 00 0 000 0 000 5 000 INCH a abcdef ghijklLmnoparstuyvwxyZAB abcdef ghijkLmnopqrstuvwxyZAB abcdef ghijkLmnopqrstuvwxyZAB abcdef ghijkLmnopqrstuywxyZAB abcdef ghijkLmnopqrstuvwxyZAB abcdef ghijkLmnoparstuvwxyZAB abcdef ghijkLmnopqrstuywxyZAB abcdef ghijkLmnoparstuyvwxyZAB abcdef ghijkLmnopqrstuvwxyZAB abcdef ghijkLmnopqrstuywxyZAB abcdef ghijkLmnopqrstuywxyZ2AB abcdef ghijkLmnopqrstuyvwxyZAB abcdef ghijkLmnoparstuyvwxyZAB abcdef ghijkLmnopqrstuvwxyZAB abcdef ghijkLmnopqrstuvwxyZAB abcdef ghijkLmnopqrstuvwxyZAB Siar Operazione annullata fine tabella Displad JogA JogPs z Barri E PagaltCne M ox 1 ALLARMI PageLab supports the definition of an arbitrary number of pages full screen or pop up Each page may contain links to
103. nd to emit alarm messages for example through asynchronous messages see 4 3 4 4 2 FRAME SET CeSCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCC CCT E TF OP RR NR RR RN MGS Ma Se RR SER xx es Peta res Se Kx xe eae gt Peta R gt Hee KA A Paed x oo exe MA A A S x DE S gt x nx gt KS x S rel KS oe x gt gt a x el oe SE Kx x x S re x pase a b Ss KS x Rx x Sep Vs we RS AJ S S RA x Pere xs x x we S S lt gt BR XX x S SY gt se RA x x gt Kx el ex gt nx gt x WS iS x Kx gt oe gt oe xx gt x Ss ex x5 td 5 we 3 Pere x x xS PageLab allows to define areas which are called frames and are placed on the sides of the screen and are always active The user may set these frames dimensions and insert some controls which are active whatever the currently loaded page Consequently frames are useful to host the objects which have to appear in the whole project In this way the user does not need to duplicate them in each page As regards to the above there are two exceptions the pop up pages see 4 3 3 when the Modal property is set to Yes and all the asynchronous messages When these pages are active the controls of the frame set are automatically disabled 46 PageLab user manual PA GE LAB 4 3 PAGES 4 3 1 NAVIGATING BETWEEN PAGES PageLab manages pages development for a specific application as projects PageLab projec
104. ned automatically This property WORD DINT is sensible if Assoc var is an explicit UDINT DWORD parameter REAL STRING Format Data type PageLab user manual 77 al Hl Properties Description Name of variable or numeric constant This is the least number that the object can show It can be any variable of the project local CONSTANT global imported from PLC or target see Low limit var_name 2 9 2 This object shows an error string The symbol means that there is no low limit Name of the variable or numeric constant This is the maximum number that the object can show It can be any variable of the Hioh limit CONSTANT project local global imported from PLC g var_name or target see 2 9 2 This object views an hold The symbol means that there is no high limit Enables continuous update of the value FALSE the Assoc var value is read from memory and updated only when open page Refresh TRUE FALSE or when a child page is closed TRUE the Assoc var value is read from memory and always updated Visible status of the object It can be constant TRUE FALSE TRUE or FALSE or linked with a boolean var_name variable var_name if var_name is TRUE the object is visible otherwise hidden Selected status of the object It can be constant TRUE or FALSE or linked with a boolean variable var_name if var_name is TRUE the object is selected and so it will show the colors Select Back Sele
105. nstant limit if contain 1 it is a variable limit View format encoded in bit bordCol word32 type bO 0 pMin contains a constant value of Type type 1 pMin contains the address of variable of Type type b1 format word32 i 0 pMax contains a constant value of Type type 1 pMax contains the address of variable of Type type b2 0 horizontal orientation 1 vertical orientation Flag of visibility Available values FALSE object not visible pVisVar word32 me TRUE object always visible var addr address of boolean variable Access mode Available values kACS IDLE no effect accMode byte kACS INIT first draw on display oO K ct D kACS PRINT update draw on display 126 PageLab user manual PA GE LAEB Frame structure FB PROGRESS Output variable Description FUNCTION BLOCK CustomCtrl Embedded function block which implements custom control Frame structure FB CUSTOMCTRL Local variables Description memVis Visibility status of the previous execution Address of function that implements Type ee WCCELID data0 word32 Local variable datal word32 Local variable data2 word32 Local variable data3 word32 Local variable Input variables Description vind aa x1 Top left x coordinate edge relative to full page y1 word16 Top left y coordinate edge relative to full page Bottom right x coordinate edge relative to full page Bot
106. of the text of page colBack Background color of page Return Value Description Video SetPageColors Not sensible always TRUE unsigned char Video Clrscreen 7 Delete entire display area and fill with background color defined with Video SetPage Colors Return Value Description Video ClrScreen TRUE if successful FALSE otherwise unsigned Char Video ClrRect unsigned short xl unsigned short yl unsigned short x2 unsigned short y2 Delete only a portion of display and fill with background color defined with Video Set PageLab user manual 105 et ee LAB Parameter Description x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page x2 Bottom down x coordinate edge relative to full page y2 Bottom down y coordinate edge relative to full page Return Value Description Video ClrRect TRUE if successful FALSE otherwise unsigned char Video SetFont unsigned long fontPtr Load a font as current font for drawing objects To correctly execute this function the font must be declared with Video AddFont Parameter Description fontPtr Address of first byte of font Return Value Description Video SetFont TRUE if successful FALSE otherwise unsigned Char Video SecColors unsigned long colforerxu unsigned Llong col BackTxt unsigned long colForeSel unsigned long colBackSel Assign the current colors for drawing objects Parameter Description colForeTxt
107. of these features are specifically related to a single type of control Others may be included in the properties set of different objects The following paragraphs concern two important properties which are common to some kinds of control 2 11 1 THE VISIBILITY PROPERTY Almost all of controls are endowed with the Visibility property which determines whether the object is visible or not This property can be associated either with a constant value FALSE the control is always hidden TRUE the control is always shown or a boolean variable whose value dynamically establishes the visibility state By following the instructions in paragraph 2 7 1 you have inserted the string Stringa di testo in the Init page At present this string is always visible as you can deduce from the assigned value to its Visibility property visible TRUE PageLab user manual 33 PA GE LAEB Let us assume that you want to assign this control s visibility to the local variable n which is displayed in the edit box created in paragraph 2 9 2 and managed by the prcIncrem procedure which was implemented in paragraph 2 10 4 and started up by the but ton More precisely let us suppose that you want the text string visible when n is even whereas hidden when n is odd To this purpose it is necessary to declare a new boolean local variable which indicates whether at present n is even name mwe ary itae easton Then it is necessary to edit the pr
108. ol LED button to view the state of a boolean variable command button of a boolean variable s state opening button of a secondary page activation button to start the execution of a customized procedure 2 10 1 INSERTING A LED BUTTON The following paragraph teaches you how to use a button which shows an associated boolean variable s state Insert a new button in the page by pressing the corresponding button in the Page tool bar Move the mouse in the active area of the page a cross appears The object will be in serted in the grid near to the mouse cursor Confirm the insertion point by left clicking A new Button control appears It has a default size e e EDS cag Meat aN gg h en A ee ee a ee FRESKER far You may edit both the dimensions by dragging one of the button s vertexes or one dimen sion at a time by dragging one of the button s sides The Border color andthe Background Color properties determine the border and the background color when the button is inactive whereas the Se ection Border and Se lection Background properties define the border and the background color when the button is selected Border color E Background color a a E Selection border Sel background The Selection variable property determines the state of the button and consequently the couple of colors related to the control This property may be associated either with a constant value FALSE the control is alwa
109. on gain AI3 0 Gain_Ntc_Al4 UINT Modbus 15623 0 0 65535 num NTC calibration gain AI4 Gain_PT1000_AI4 UINT Modbus 15624 0 0 65535 num PT1000 calibration gain AI4 m Gain SY AI4 UINT Modbus 15625 0 0 65535 num 0 5Y calibration gain Alt Ba Gain 10V AI4 UINT Modbus 15626 0 0 65535 num 0 10Y calibration gain AI4 8 Gain m AI4 UINT Modbus 15627 0 0 65535 num 4 20m calibration gain Al4 2 Gain Ntc AIS UINT Modbus 15628 0 0 65535 num NTC calibration gain AIS By Gain_PT1000_AI5 UINT Modbus 15629 0 0 65535 num PT1000 calibration gain AIS ER Gain_S _AIS UINT Modbus 15630 0 0 65535 num 0 5Y calibration gain 415 4 gt Target vars 1 PLC vars Frigo When you need to update the list of parameters if the parx file has not been moved to another directory it is not necessary to repeat the above mentioned procedure but it is enough to press the button 2 9 INSERTING EDIT BOX An edit box is a text frame which lets you display and eventually edit an associated vari able or parameter 2 9 1 INSERTING AN EDIT BOX IN THE PAGE Insert an Edit box control in the page by pressing the corresponding button in the Page toolbar ebi Move the mouse to the active area of the page A cross appears The object will be in serted in the grid near to the mouse cursor Confirm the insertion point by left clicking A new text frame appears It consists by de fault in a certain number of characters and its font is specified in the Font prope
110. on of parameter file 99 Appendix IV elements of HMI runtime 101 8 1 Functions 101 8 1 1 System functions hardware and operating system 101 8 1 2 Function for managing project resources and common properties 102 8 1 3 Functions for operating with pages 104 8 1 4 Function for objects 107 8 1 5 Drawing functions 108 8 1 6 Functions for text 11i 8 1 7 Functions for parameter access 112 8 1 8 Functions for events 113 8 2 Function Blocks 114 PageLab user manual VII PA GE LAB VIII PageLab user manual PA GE LAEB 1 OVERVIEW PageLab is a software application that allows the developer to create user interfaces for embedded systems based on HMI runtime PageLab is an easy to learn and use software which allows the user to implement graphi cal interfaces in a visual way The realized pages are viewed in PageLab as they will ap pear on the final target Thanks to its multi pages structure PageLab can support HMI Human Machine Interface applications with an arbitrary number of pages It is equipped with a considerable number of tools to realize even complex applications and it interfaces directly to the PLC IEC1131 LogicLab compiler for managing the variables which are defined in the target PLC application The following paragraphs show you the main features of this product File Edit View Project Page Window Help TERESE OLE IEEE PRISE ING CPE ae eee Lea el ne Project X GeneralRefres
111. one has been created as child page Pop up pages are not subjected to any restriction from the frame set see 4 2 their di mensions and positions can be chosen by the user Assign to the secondary window the dimensions 300x180 pixel and set it x y 250 150 because these are the top left hand corner s coordinates of the window Double click on the Pag2 item of the project tree In this way you open the corresponding document Assign dimensions and position Ta Properties a Events al 8 PageLab user manual PA GE LAB After editing the colors too the new window will look like the picture below The grey area in the centre is the active area of the Pag2 page whereas the clearer area which surrounds it represents the video area of the target system In this way you obtain a clear vision of the new page placement 2 4 3 VIEWING THE TITLE BAR AND THE SYSTEM BUTTON PageLab enables the automatic creation of a title bar Title bar properties Yes and of a button to close the page System menu properties Yes besides the print of a text string as title Caption properties Let us assume that you want to activate the title bar and the close button and to print the Pagina 2 string as title Title bar Yes Page border Yes Caption Pagina 2 System menu No ppearance Flat Then the secondary page looks like the following picture Pagina 2 The text and the background color and the u
112. or drawing the iDivGridx wordl 6 chart tracks Ex scale X 1 iDivGridX 5 value between 0 and 5 Sensible even if the grid is not visible Number of division on vertical bar used with scale factor and offset for drawing the iDivGridy wordl chart tracks Ex scale Y 1 iDivGridY 5 value between 0 and 5 Sensible even if the grid is not visible Draw grid fGrid byte FALSE grid not visible TRUE grid visible Step for X axis labels How many division of horizontal bar must have labels tyXScaleType Type of X Axis scale Address of Scale factor of x Axis Value range among two division of horizontal bars 0 value indicate that the chart is in auto scale mode Address of boolean variable If it is TRUE the chart delete all the previous data Access mode Available values kACS IDLE no effect iXLabelDiv wordi 6 pXScale word32 pClearVar Word32 acolade pyte kACS INIT first draw on display kACS PRINT update draw on display kACS CLOSE close the chart and delete all the data Address or constant for X Axis definition Available values x pXData orde constant number of samples constant start with 0 variable array that contains pNSamples samples with X axis value Type of pXData array If tyXData tyUndefined is a constant XlabelCol word32 Color of X Axis label Space among two points of grid in pixel The tyxData byte 1 i De be a hee aia a ees proper
113. order thickness It is sensible only if style 0 Border color It is sensible when style 0 bordPts gt 0 FALSE hide line number TRUE show line number FALSE read only mode TRUE read write mode pVar Address of string variable It cannot be NULL szpVar Size of pVar bordPts byte bordacol byte LineNr byte rw byte 124 PageLab user manual PA GE UAE Frame structure FB TEXTBOX Flag of visibility Available values pVisVar word32 accMode byte rocursPos wordlo rqCursRow wordlo dispCurs byte dispRow byte FALSE object not visible TRUE object always visible var _addr address of boolean variable order Number for establishing a sequential selection Access mode Available values kACS IDLE no effect kACS INIT first draw on display kACS PRINT update draw on display kACS SELECT update draw on display when selected kACS MODIFY enter editing mode kACS SCROLLUP scroll up one line kACS SCROLLDW scroll down one line Char Index where move the cursor Row to select TRUE the cursor is always visible even if it is not enabled editing mode FALSE the cursor is visible only if it is enabled editing mode TRUE the row selection is always visible even if it is not enabled editing mode FALSE the row selection is visible only if it is enabled editing mode bckSelCol Future developments wParam Future developments IParam Future developments Output variable Descr
114. oreground color of the Static named String_26 in Main page we have to write fbMainstring 26 forecol N B the name of the property to use in the scripts of the procedures is the name of the functional block exported by the software of the target see 8 2 not the name in the properties window see 3 3 4 8 5 ACTIONS THAT CAN BE ASSOCIATED TO KEY PRESSURE In common keyboard not touchscreen systems interaction between the user and the system is normally based on keys pressure PageLabshows the following table to the user x r Local achons Global actions YK F2 OpenPage ParaxeTipa2 VE F OpenPage ParAxeTipod This table permits to associate a code of a key defined in the file def to one of the ac tions listed in the following table In this way the pressure of that key causes the specified action Also the names of the actions can be personalized by editing def file 62 PageLab user manual 4 9 4 9 1 PA GE LAEB Action Description Causes the invocation of the local Call Procedure name or global procedure whose name is indicated in the Link field rer bade nane Causes the opening of the page whose p 9 g name is indicated in the Link field Close Causes the closure of the current page Move the selection to the next edit box If the system is not touchscreen moves selection to the buttons to allow their pressure PrevField Meg the selection to the previous edit Access edit mode for the s
115. other pages so that the whole project takes a tree structure Resources management Eele Fonts dee EWPZ Bx16 ride EWPZ 6x8 E Bitmaps Lo fe 5mp001 FirstPage ke Fr Bmpoo Pages ll abe String table Enumeratives 3 gP Enum fg Enum fg Enum 39 Image lists EF Project A5 Resources 2 PageLab user manual PA GE ULAB The controls properties in the page are not statically defined in the project code but they can be managed separately as resources Resources include fonts for characters display images string table enumerated data types and elements sets Specifically regarding the images PageLab allows to import bitmap files directly from the Windows formatted file bmp gif emf jpg ico etc Languages management at String table HER a String table Seis PT Caption G a Memoria IDS_MEMO Memory Connessione seriale IDS_SERIALE Serial connection Tempi di esecuzione ms IDS_TEMPI Execution time Lingua IDS_LINGUA Language Baud rate IDS_SERBAUD Baud rate Pacchetti RX IDS_GDBRXPCK RX packets Pacchetti TX IDS_GDBTXPCK TX packets Pacchetti RX errati IDS_GDBRXNAK Bad RX packets Pacchetti TX errati IDS_GDBTXNAK Bad TX packets Debug di sistema IDW DEBUG System debug Testtouch screen IDVY_TESTYIDEO Test touch screen Video e touch screen IDW VIDEO Video e touch screen IDS_LCDCONTRASTO Luminosita LCD IDS_LCDCONTRASTO LCD contrast IDS_STATOPLC Stato PLC IDS_STATOPLC PLC status IDS_TEM
116. page Bottom down y coordinate edge relative to full y2 page Return Value Description Video_InitBmpTreeRefresh Address of invisible device context unsigned long Video EndBmpTreeRefresh unsigned short pDC unsigned short xl unsigned short yl B unsigned short x2 unsigned short y2 110 PageLab user manual PA GE ULAB Restore original device context and copy the area from invisible context to display con text Parameter Description pDC Address of invisible device context x1 Top left x coordinate edge relative to full page yl Top left y coordinate edge relative to full page 2 Bottom down x coordinate edge relative to full page Bottom down y coordinate edge relative to full y2 page Return Value Description Video EndBmpTreeRefresh Not sensible always TRUE 8 1 6 FUNCTIONS FOR TEXT unsigned char Video Princotr Char Str unsigned short x unsigned short y Print a string using the current font set with SetFont and current colors set with Set Colors Parameter Description Str Text to print x Top left x coordinate edge relative to full page y Top left y coordinate edge relative to full page Return Value Description Video PrintStr Number of chars printed unsigned Char Video PrantResstr Unsigned short 1dRess Unsigned short x unsigned short y Print a resources string using the current font set with SetFont and current colors set with SetColors Parameter De
117. ppears Parameters management Add Device Remove Device Through the Add Device button you can add a new object linked to the target on the fieldbus The selection window appears Then you have to take from your PC a parx file see chapter 7 After inserting this file the parameters management window will look like the image below Parameters management 5 F Add Device i Modbus A device called Frigo has been inserted In order to see the relevant parameters click the Close button In the Window target vars and parameters you will see the device and its param eters 20 PageLab user manual PA GE ULAB Target vars and parameters Name Type Address mn max um Description 0 Par_TAB UINT Modbus 15716 0 0 65535 num Tab map code 0 Par_POLI UINT Modbus 15717 0 0 65535 num Polycarbonate code 0 Par_PARMOD BOOL Modbus 15719 0 0 1 flag Parameter modified 2 Gain_Mtc_AI1 UINT Modbus 15616 0 0 65535 num NTC calibration gain AI1 0 Gain_Ntc_Al2 UINT Modbus 15617 0 0 65535 num NTC calibration gain AI2 0 Gain_Ntc_AI3 UINT Modbus 15618 0 0 65535 num NTC calibration gain AI3 5 Gain_PT1000_AI3 UINT Modbus 15619 0 0 65535 num PT1000 calibration gain AI3 0 Gain_S _AI3 UINT Modbus 15620 0 0 65535 num 0 5Y calibration gain AI3 0 Gain_10 _AI3 UINT Modbus 15621 0 0 65535 num 0 10Y calibration gain 413 3 Gain_mA_AI3 UINT Modbus 15622 0 0 65535 num 4 20m calibrati
118. property is not sensible if Title Bar field is set to No If Yes denotes that there is a button with X image on it and the behaviour is similar to Windows Dialog Yes page has close button No page has not close button Text Color Title bar Yes No Caption Text otherwise Resource ID System menu Yes No Flat Appearance Flat Raised Sunken Raised Sunken 5 2 2 EVENTS Event Description OnLoad On loading this page i e when calling from parent page On closing this page when the page returns and the parent OnUnload page will be restored 72 PageLab user manual PA GE LAEB Event Description On calling a child page and the current page is no more active This event does not exist in main page When the previous opened child page will be closed This event OnActivate does not appear in leaf page i e in the pages which do not call child pages When the page starts drawing all the objects The page has just drawn border background and title Asynchronous event The user can link a procedure and it will be executed cyclically OnDeactivate OnDraw OnTimer 5 3 POP UP PAGE 5 3 1 PROPERTIES Properties Available values Description XPos Top left x coordinate edge of full page YPos Top left y coordinate edge of full page XDim Width of the page pixel YDim Height of the page pixel CharDimx Horizontal space among grid points pixel CharDimy Vertical space
119. ption umd vordig Handle of the object Must be unique among chart objects x1 Top left x coordinate edge relative to full page y1 Top left y coordinate edge relative to full page 29 eae Bottom right x coordinate edge relative to full page y2 ori Bottom right y coordinate edge relative to full page Address of font for drawing text The font pFont word32 a must be initialized with video AddFont 0 flat style byte 1 raised 2 sunken E RR a thickness It is sensible only if style Border color It is sensible when style 0 backCol Background color Address of the number of available samples pNSamples word32 to add in the chart This value is used only when refresh is TRUE tyNSamples Type of the number of samples tyxOffset Type of the offset of X axis Address of the offset of X axis move right pxOffset ee left the chart in order to 0 tyTrackRight word16 Type of default track for right Y Axis Address of the track of right Y Axis if O the right label will not drawn tyTrackLeft Type of default track for left Y Axis pitackRight word32 128 PageLab user manual PA GE LAEB Frame structure FB CHART Address of the track of left Y Axis if O the P a left label will not drawn formatLeft word32 Label format of left Y Axis formatRight Label format of right Y Axis format Word32 Label format of X Axis Number of division on horizontal bar used with scale factor and offset f
120. r of s0 size of Font gt 0 ROWS Show line TRUE FALSE Flag for viewing number of lines number Access on variable Assoc string used in object ACL OR a ie RO read only RW read write Selection order on which the object can be i selected with the pressure of a key or with a Selection i i procedure In this case the selection moves order from the current object to the previous or next Sel Order object Name of variable that can be shown and String Not emot edited with this object It can be any string variable Ply variable of the project local global imported from PLC or target see 2 9 2 Enables update of the value FALSE the Assoc string value is read from memory and updated only when opening page or when a child page is closed TRUE FALSE Refresh trg karm aie TRUE the Assoc string value is read from memory and always updated The runtime sets automatically the value to FALSE Visible status of the object It can be constant TRUE FALSE TRUE or FALSE or linked with a boolean var_name variable var_name if var_name is TRUE the object is visible otherwise hidden Visible 80 PageLab user manual PA GE LAEB 5 8 2 EVENTS Event Description BeforeUpdate Before the object is redrawn AfterUpdate Immediately after the object is redrawn Whenever HMI receives a pressure on the object valid only for OnClick touchscreen systems Whenever the user confirms the modi
121. rance TRUE FALSE Refresh var name Visible 88 PageLab user manual a LAB Properties Description X Axis array values If there is a constant value in this property each Y sample has a X X Data gt 0 var name value equal to the product among X Data and the index in array Ex Y track 3 20 X 3 X Data X Color Color of X Axis label i Space among two points of grid in pixel The ante SERP property is sensible if the grid is visible Sample Number of samples that the runtime can p Value store The older are deleted if the size has Buffer exceeded Grid Color BEES Color of grid if it is visible Bord Color fee Color of border grid Name of variable for drawing a vertical fixed Vertical DEN vor Hane bar on chart It is allowed also a constant Bar 1 E value The symbol means that there is not this vertical bar Color bar 1 l Color of vertical bar 1 if different from pel ee As Vert Bar 1 but relative to bar 2 Bar 2 Color bar 2 fk As Color bar 1 but relative to bar 2 Fer ere As Vert Bar 1 but relative to bar 3 Bar 3 Color bar 3 ee As Color bar 1 but relative to bar 3 Clear Data Pa Hane Boolean variable If itis TRUE and Refresh is TRUE the chart deletes all the previous data 5 14 2 EVENTS Event Description BeforeUpdate Before the object is redrawn AfterUpdate Immediately after the object is redrawn 5 15 TREND 5 15 1 PROPERTIES Properties Description
122. re the function is used Parameter Description msec Suspends time measured in milliseconds Return Value Description Video Unlock Not sensible always TRUE 8 1 2 FUNCTION FOR MANAGING PROJECT RESOURCES AND COMMON PROPERTIES unsigned char Video SetWndSysProps unsigned long pFont unsigned long col Fore unsigned long colBack Set common properties for all pages in the project 102 PageLab user manual PA GE LAEB Parameter Description pFont Address of font for printing text in title bar the font must be added with Video AddFont function colFore Text color of Title Bar colBack Background color of Title Bar Return Value Description Video SetWndSysProps Not sensible always TRUE unsigned Char Video cetEditkey unsigned Char id unsigned char code 7 Set key code for editing functions Parameter Description id Identifier of editing function see Enumerative table 102 6 3 1 code Key code associated with editing function Return Value Description Video SetEditKey Not sensible always TRUE unsigned char Video AddFont unsigned long pront unsigned char charben unsigned char charHeli unsigned char offs Publish a new font in HMI run time Parameter Description pFont Address of first byte of font charLen Character width of font pixel charHei Character height of font pixel aes Byte offset of a font that starts with ASCII 0x00 subset of characters Return Value Description Video AddFont
123. ription 134 PageLab user manual
124. rough the Bitmap property specify the image which this Image control must display Choose the desired bitmap from the list in this case you can see and select the only bitmap which you have imported BmpBulbOn ALM os The control changes its size to be compatible with the assigned bitmap measures The image in the page preview looks like the following picture Po oo oc 0 ht ot ro eo wn et 0 E o a a i i TEXT STRINGS Text strings are not part of static controls because they have some properties which let them change in a page through time Visibility selection and refresh may be assigned to variables which may change their value at any time 2 7 1 INSERTING A TEXT STRING Click the corresponding button in the Page toolbar An Move the mouse to the active area of the page A cross appears The object will be in serted in the grid near to the Mouse cursor Confirm the insertion point by left clicking A new Static that is string control with the default text str appears 16 PageLab user manual PA GE ULAB You can edit the contents of the string through the Text property of the control For ex ample Text string Test Text string the image below This is the basic use of the string Alternatively you can assign strings by taking them from the resources see 4 9 3 2 8 DATA MANAGEMENT IN PAGELAB This paragraph shows you the variables management in PageLab It is possible to distin
125. rty of the page Edit this control s properties as you can see below PageLab user manual 21 PA GE LAB Properties xX Properties Z Events amp D gt Background color Text color Sel background Sel foreground In the following list you can find all the changes which may be carried out Appearance you can make the edit box appearance sunken by assigning the Sunken property Font you can customize font by choosing for example a 16x32 font instead of the default 8x16 font Select background and Select Foreground respectively text and background colors when the edit box is selected Number of Chars maximum number of characters which can be displayed Access in order to set the read only mode replace RW read write with RO read only Refresh in order to constantly update the contents of the edit box select the TRUE option Otherwise the contents are refreshed just when drawing the page for the first time Format it represents the display format of the associated variable s value The format value can be inserted only if a variable is just available It opens a dialog window with these settings according to the type of variable integer real string Integer format Integers 1 31 1 Decimals 1 7 l Hexadecimal Uppercase 00H Hexadecimal Lowercase 00h Fill with zeroes View always sign Password Target custom Format Enumerative v
126. s How many divisions of horizontal bar must have labels Scale factor of x Axis Value range among two X Scale var_name divisions of horizontal bars An empty value indicates that the chart is in autoscale mode Sampling time measured in seconds Every gt 0 Sampling Time seconds the trend sample the value even if the chart is not shown Variable name for the deviation of O for X Offset var_name x Axis left or right A positive value moves the chart values to left Grid Visibility of the grid Number of division on horizontal bar used X Div Grid Value with scale factor and offset for drawing the chart tracks Number of division on vertical bar used with Y Div Grid Value scale factor and offset for drawing the chart tracks aar a Background color selectable from palette 90 PageLab user manual Sampling Time PRGE LAB Properties Description Flat plain with use of Border pts and P e Flat Raised Border col PP Sunken Raised Sunken Border nm Border thickness pixel This property is gt 0 i points sensible only if Appearance is set to Flat Border color selectable from palette This Border color property is sensible only if Appearance is set to Flat or Text is not empty Font Font used for drawing the label in object Resources Continuous redraw of the object FALSE the chart is updated only when opening page or when a child page is closed TRUE the chart object is always
127. s sensible only if Appearance is set to Flat Number of chars that this object can show Number of gt 0 If the value is 0 the object will show the Chars complete text Otherwise with another value it can be truncated or extended Alignment ae aaa Text alignment in the object Continuous redraw of the object FALSE the Text value is read from refresh TRUE FALSE memory and updated only when Opening the page or when a child page is closed TRUE the Text value is read from memory and always updated Selected status of the object It can be TRUE FALSE constant TRUE or FALSE or linked with a Select va aE boolean variable var_name if var_name is TRUE the object is selected and so it will show the colors Select Back Select Fore Visible status of the object It can be constant EET TRUE FALSE TRUE or FALSE or linked with a boolean var name variable var name if var name is TRUE the object is visible otherwise it is hidden 5 4 2 EVENTS Event Description BeforeUpdate Before the object is redrawn AfterUpdate Immediately after the object is redrawn 5 5 LINE 5 5 1 PROPERTIES Properties Available values Description XPos Top left x coordinate edge relative to page YPos Top left y coordinate edge relative to page _ FE PageLab user manual 75 Aal Hal Properties Description X 2Pos Bottom right x coordinate edge relative to page Y2Pos y coordinate edge relative to Name
128. scription idRes Identifiers of resource X Top left x coordinate edge relative to full page y Top left y coordinate edge relative to full page Return Value Description Video _PrintResStr Number of chars printed unsigned char Video PrintNChar char Str unsigned char accMode unsigned short x unsigned short y unsigned char nChar unsigned long format Print at most nChar characters of a string using the current font set with SetFont and current colors set with SetColors It uses also a format for drawing the text If nChar is less than string length it truncates the string otherwise apply the alignment PageLab user manual 111 PA GE LAEB Parameter Description str Text to print kACS PRINT print with colForeTxt and colBackTxt colors accMode i i kACS SELECT print with colForeSel and colBackSel colors x Top left x coordinate edge relative to full page y Top left y coordinate edge relative to full page nChar Maximum number of chars to print Alignment of text It is sensible only if nChar gt length of str format 0x08 right alignment 0x10 center alignment 0x20 left alignment Return Value Description Video PrintNChar Number of chars of truncated string 8 1 7 FUNCTIONS FOR PARAMETER ACCESS unsigned short Video GetParam unsigned char i1dxDevice Unsigned shart 1dx Param unsigned char subIdxParam unsigned long pVal unsigned char type Read a parameter from a device
129. sed font are the same for all the pages of the project so you will not find them in this specific page properties In order to customize these features double click on the Properties item of the project tree Project x a Page ER Messages HH Global variables be Global procedures ER Project H Resources PageLab user manual 9 PA GE LAB A multi tabs window opens In System options assign the font in this case 8x16 the text color and the background color in this case respectively white and blue Pages properties General System options Language selection Alarms Window title bar Font ax16 FE Text color Back color ET EE OK Annulla Then the secondary page looks like the following figure Pagina 2 2 4 4 ASSIGNING A STYLE TO THE WINDOW PageLab supports three styles for the windows which you can select through the Appear ance property Flat the default style when you create a window Sunken and Raised Choose the last one Appearance Raised The window looks like the picture below Pagina 2 10 PageLab user manual PA GE LAEB 2 4 5 CHOOSING THE START WINDOW The user has to indicate the start window of the whole HMI project The start window will open at the HMI application start If the project consists in one single page the system will take this one as start page You can indicate the start page in the project properties win
130. sert page Paste Page Import page Import page From template Import var procedures Export var procedures Select desired page from the project tree then click with the right mouse button and se lect Rename from the menu This allows the user to change the name of the page 56 PageLab user manual PA GE LAB Project x EHE DemoHMI Project Elf Pages fay Properties El E Open i Rename aj H Pa fl Messa Copy Page Hj Global variables g Global Import varfprocedures Export page Export page as template Export var procedures Insert procedure Remove page N B this operation changes only the name of the page project references to the re named page are not automatically updated Templates of page management 4 7 5 TEMPLATES OF PAGE MANAGEMENT Templates allow the user to save only the skeleton of the page and not the whole page Templates can be described as pages without references to external variables Templates can be grouped in libraries files petx and can be linked into the project 4 7 5 1 EXPORT PAGES INTO A TEMPLATE FILE To export a page into a library of templates follow the procedure paragraph 4 7 1 initial steps then select Export page as template from the menu FREER LEL Project x FEST DemoHMI Project F Pages off Properties EE _ El Open HH Rename eH bay fl Messag COPY Page G
131. ss of first byte of bitmap to view It is not sensible if pSelBmp 1 fixed Address of first byte of bitmap to view pSelBmp word32 when selected It is not sensible if pSelBmp 0 fixed pBmp word32 PageLab user manual 117 RRGE LAB Frame structure FB IMAGE Selection flag for the object Suggest if the object must uses bordCol pBmp or bordSelCol pSelBmp Available values FALSE object is never selected TRUE object is always selected var addr address of boolean variable Flag of visibility Available values FALSE image not visible pselVar word32 pVisVar word32 Ree TRUE image always visible var addr address of boolean variable Output variable Type Description Request refresh updated when the object reqRefr byte is called with accMode kACS QUERY or acoMode KACS _BCKOUEBRY Top left x coordinate edge relative to full page obtained with the sum among x1 and abs x1 wordl6 px1 The value is updated when the object is called with accMode kACS INIT or accMode kACS QUERY Top left y coordinate edge relative to full page obtained with the sum among y1 and abs yl word16 pyi The value is updated when the object is called with accMode kACS_ INIT or accMode kACS QUERY Value read from abs x1 when the object mem x1 wordl 6 is called with accMode kACS INIT or accMode kKACS PRINT Value read from abs y1 when the
132. sts in the generation of a graphical report with all the previously inserted comments followed by the pages they refer to PageLab user manual 67 PA GE ULAB Comments related to controls and pages should be inserted in the Doc tab of the proper ties window Popes S l Properties F Events Doc Ei All Description Description Comment on pages Documentation is generated when the apposite button is pressed e At the end of the process the following dialogue is shown By clicking on the Open docu mentation link it is possible to view the generated report using the browser Documentation Documentation correctly generated Open documentation It is also possible to manually open the htm file generated This file is created in the project folder and is named project name html N B documentation generation process requires the file Documentation xs to be in the project folder This file can be personalized by user to redefine report style 4 11 MANAGING PROJECTS 4 11 1 SELECTING THE TARGET DEVICE You may need to port a PLC application on a target device which differs from that you originally wrote the code for Follow the instructions below to adapt your PageLab project to a new target device 1 Click Select target inthe Project menu of the PageLab main window This causes the following dialog box to appear 68 PageLab user manual 2 3 4 Select target Available Targets
133. t r Axe f min allUpsLine ft laxe_F gi i Analnput r Axe f ar ui AnaRampa ft Axe_F_recu i AnaTarget ft Axe_f_sp t Axe drive ready r A xe f vr or Axe f ap r Axe p acc or Axe f com r axe p bin Axe f CurrLim r Aaxe p bip or Axe f CurrReal r axe p b n r Axe p bp 41 ph Output pagestemplate Ready NUM GDB 0 3000 TCPIP 192 168 0 111 5000 a Once the item has been dropped application asks the user for the name of the new page created based on the template 4 7 5 4 PROJECT TEMPLATE UPDATE It is possible to delete templates from the local template library using Edit command in the Template management window PageLab user manual 59 PA GE LAEB Template list pagestemplate Add Remove Re E sport E dit id Object browser Filters Hame pe Commands Import page into project Delete page 4 8 EVENTS There are different classes of events 4 8 1 PAGE OR CONTROL EVENTS x Properties F Events 4 2 OnLoad proclnitLanq OnUnload FAet4pplication On ctvate proclnitLang OnDeactvate OnDraw OnT imer procRetrDia Each characteristic behaviour of a specific object can raise a specific event Each event can be associated to a procedure see 4 8 4 that is executed each time the event takes place The list of all available events for each PageLab object page or control is reported in Chapter 5 60 PageLab user manual PA GE UL
134. t y coordinate edge relative to full page pChart Handle of the chart created after ACS __ INIT pirstoonpLingmimet doras Sampling time in seconds take on ACS __ INIT or when cleared FirstSamplingTimeMs orale Sampling time in milli seconds take on ACS INIT or when cleared LastSamplingTimes Sampling time in seconds take every acquisition LastSamplingTimeMs sampling time in millisecond take every acquisition InitDraw If TRUE the trend is just drawn Input variables Description yond vordie Handle of the object Must be unique among chart objects x1 Top left x coordinate edge relative to full page y1 Top left y coordinate edge relative to full page x oordie Bottom right x coordinate edge relative to full page y2 rocd Bottom right y coordinate edge relative to full page Address of font for drawing text The font pront word32 mene l must be initialized with video AddFont O flat I byte 1 raised 2 sunken PageLab user manual 131 et ee LAB Frame structure FB TREND bordPts bye Border thickness It is sensible only if style 0 Border color It is sensible when style ObordPts gt 0 backCol Background color Inherited from chart but contains acquisition time in seconds tyNSamples byte Not used tyxOffset Type of the offset of X axis Address of the offset of X axis move right left the chart in order to 0 tyTrackRight Type of default track for right Y Axis Address of the tr
135. t 0 26 6 8 2 2 0 2 8 2 0 t 0 0 2660 608006 tO OS 080 0 S80 6 tt 82628002 8 00 O 6880 O60 2 0 0 9 When creating a new page if the user selects the aforesaid checkbox with the Pop up label the new page will be a pop up one There are no restrictions about position and dimension In fact the user may superimpose a pop up page on the frames when activating this page if it is not modal property Modal the controls superimposed on the open page will be disabled otherwise all the controls will be inactive 4 3 4 ASYNCHRONOUS MESSAGES Asynchronous messages are similar to standard pages except the following features They have an additional property that is the identifier of the associated message Msg ID They cannot contain invocations to child pages They have no defined parent page nor a tree structure see Introduction 4 but they can be invoked from any other standard page An asynchronous message cannot be explicitly invoked the system displays it whatever the active page when it intercepts a message containing the corresponding Msg ID This message may be launched either by the firmware or by a procedure through the Video SendMessage function see 8 1 8 by using the following syntax Video SendEvent kWM MSG Msg ID 48 PageLab user manual PA LAB 4 4 CONTROLS A control is a display element which is contained in a page The following paragraphs Shows you the controls which PageLab supports 4 4
136. t is composed of pages where the user can arbitrarily arrange controls In each PageLab project it is necessary to define a start page which will be viewed at sys tem startup Other pages must have at least a parent page from which they are invoked and may have child page to invoke The invoking invoked relations of the pages give the whole project even though in an implicit way a multi node tree structure A child page may be invoked in two ways Through an action associated to a key associate an OpenPage action with a physical key if there is a keyboard or with a virtual key whose pressure is an event raised by software Through an action associated with a button insert in the parent page a Button con trol see 4 4 7 and specify in the Action property that by pressing it the child page opens 4 3 2 CHILD PAGES Cg he ei ata F eee e a LD oe he Pate eco MOO Pre at eee 3 an Pe REE SE Pate oct 5 M m e e Pat eae 5 M a a a mn a PA aad eee a a eae se E E a cotati a AA a ie os et ae ik Se Syg Ta er cone ae one ee 3 oe De ae De er ATOATOA AEA AAA OA AAEE A EAE AOA AA AEEA teeters ted TEE RE TEE RESEN PP Sat a ee eee ee DDR otra tre are te tee tre wre wre tee tee ate tre ars ee S PA atta tansy eg oe T a a Let us assume that you want to add a page to a project PageLab displays a dialog window w
137. t of an enumerative associated with an Editbox Deletes the first character on the left Inserts tab character Switching to uppercase alphanumeric characters for a single character Transition to permanent uppercase alphanumeric characters o olulal au JaAlwInielol Enumerative 103 Define a color palette the encoding is RGB id 103 en key index of the color inside palette en val RGB color encoding RGB encoding represents 24 bit of colors 0x00bbggrr where bb 1 byte intensity of blue gg 1 byte the green and rr 1 byte the red The intensity is at least 0 and at most OSTE The number of lines is not limited The user can define which colors he wants Enumerative 104 Names of object styles shown on Appearance property id 104 en_key style en_val string with the name of style This enumerative contains at most 3 records supported by PageLab PageLab user manual 95 PA LAB 6 3 2 EXAMPLE i Target properties SCREEN 128 64 SAVESCREEN 1 REFRESH 50 FONT FORMAT han a hs JOYPAD 1 INLE 1 BMPFULL 1 UNICODE dj Versions of controls CTRE Statice il CTRL EditBox 1 CTRL TextBox CTRE Button 2 CTRL Progress O CTRL Animation 0 CTRL Image O CTRL Cus comerr 1 CYRL Chart 1 CTRL Trend 1 Enumeratives ENUM 100 key codes e 7 ENUM100 L3 Enter ENUM100 8 Left ENUM100 12 Right ENUM100 ET Up ENUM100 10 Down
138. te when the Sel i i i i Foreground object is chosen This property is not sensible if the Selectable field is constant FALSE Border sm Border thickness pixel This property is points 7 sensible only if Appearance is set to Flat Border color selectable from palette This Border color property is sensible only if Appearance is set to Flat Chars visible in the object Width of entire Namba oF object is calculated among this value and hagen gt 0 the size of Font If NumChar are less than the value the object shows this error string HHH The format can be numeric to define String aS printf or as printf of C language see 5 7 2 enum name enumerative if in this field there is enum name defined in Resources see 4 9 Alignment carer M Text alignment in the object Accesses variable Assoc var used in object Access RO RW RO read only RW read write Selection order of the object It can be selected by pressing a key or by means of a Selection gt 0 procedure In this case the selection moves Order i from the current object to the previous or next Sel Order object Name of the variable that can be shown and edited with this object It can be any variable Variable Not empty of the project local global imported from PLC or target see 2 9 2 a parameter see 2 9 2 or an element of a set see 4 6 UNDEF BOOL SINT USINT Type of Assoc var If it is a variable the BYTE INT UINT type is defi
139. tically invokes with the suitable parameters 2 12 3 DOWNLOADING AND EXECUTING THE COMPILED PAGES ON THE TARGET At the end of the compilation if all the phases have been successfully accomplished you will see the downloading button become active in the Project toolbar Clicking it you activate again the PLC command line compiler 77c which this time just downloads the compiled code in the target The downloading permission management depends on the implementation of the on board firmware Consequently it changes according to the destination target of the download 2 12 4 SIMULATION Depending on the target device you are interfacing with you may be able to simulate the execution of the HMI application with PageLab s integrated simulation environment SimuLab In order to start the simulation just click on the appropriate item on the Project toolbar om Refer to SimuLab s manual to gain information on how to control the simulation PageLab user manual 37 PA GE LAB 38 PageLab user manual PA GE LAB 3 PAGELAB LAYOUT The following picture shows you the layout and the essential elements of PageLab Propect window Toolbar Pages editor Selected control s properties Ue a m i jl ja PRA oe smuk i Frama ms lee LIL E n mg on me m on P aa i JE a al a Ja om oe mpe ee ae Ba ERE oe nal a en Pj iied d mm Efir iea ah J5 det she ri CE p io a 1 m i mik F E HE i i doen en kJ n
140. to PageLab if it has been allocated ona datablock it is not an automatic variable If this pre condition holds when compiling the PLC the program automatically creates an exp file which contains a list of the exported variables with their location in the datablocks which the PageLab program can work out In order to import in PageLab the variables which have been exported from the PLC LogicLab project you have to select the Link PLC variables file from the Project menu A window opens and lets you select the file which contains the exported variables If you confirm to include the exp file in the PageLab project a new table called PLC vars appears in the libraries window It contains the list of the exported variables merc e j When you need to update the list of the exported variables if the exp file has not been moved to another directory it is not necessary to repeat the above mentioned procedure It is enough to launch the Refresh PLC variables command from the Project menu PageLab user manual 19 PA GE LAEB 2 8 4 INSERTING FIELD PARAMETERS Target system usually has internal variables and is connected on a fieldbus so it needs to show some variables of the different devices which are connected on the net For this reason PageLab lets you link a specific file which contains the variables definition on the bus Click the apposite button in the toolbar p The parameters management window a
141. tom right y coordinate edge relative to full page wCtrlID word16 Identifier of custom control Flag of visibility Available values FALSE object not visible TRUE object always visible x2 wordl6 y2 wordlo pVisVar word32 var addr address of boolean variable Request refresh FALSE the object is redrawn only when the refr byte l page is opening or return from child page TRUE the object is always redrawn Access mode Available values kACS IDLE no effect aood e kACS INIT first draw on display kACS PRINT update draw on display The value greater than 200 can be used for custom purpose wParam wordl6 16 bit data without sign used for custom purpose lParam 32 bit data with sign used for custom purpose 32 bit real data with sign used for custom purpose Output variable Type Description rParam float PageLab user manual 127 et ee LAB FUNCTION BLOCK Chart Chart object Frame structure FB CHART Local variables Type Description memVis Visibility status of the previous execution Top left x coordinate edge relative to full grxl wordlo gryl Top left y coordinate edge relative to full page grx2 Tordi Bottom right x coordinate edge relative to full page gry2 Wwordi6 Bottom right y coordinate edge relative to full page pChart Handle of the chart created after ACS INIT lastIdxSamples Actual index of inserted track data Input variables Descri
142. ts STRINGS The sets of the first type are defined indicating VARIANT as type This kind of set has the following attributes Dynamic indicates that every n execution cycles target automatically reloads the el ements of the set and hide those elements that have no visibility boolean constant FALSE or associated visibility variable set to false at that moment Array indicates that the unique element of this set is a variable of type array N B this kind of set can be assigned only to an edit box control gt hie Lr L SEN CAL Popat Oxie FREE E Resources Italiano i Ae Fonts 1 ParametriBlos VARIANT NO NO E Bitmaps 2 Allarmi VARIANT YES NO keel E Descrizioni STRINGS YES NO ER Imaqe lists Tu Sets Fy ParametriBlIos Fy Allarmi Fy Descrizioni Fy Inputouput In this example four sets with different characteristics have been defined Once defined a set each element of the set can be added via drag amp drop from Target BS vars and parameters or can be manually inserted by user 66 PageLab user manual Lets see how to manage ParametriBIOS set Aa Fonts Fra Bitmaps Frigo Par_POLl d Right 65535 TRUE TRUE 1 ee 2 0 A NAE 3 Frigo Par_PARMOD d Right 0 1 TRUE TRUE Image lists 4 Frigo Gain_PT1000_Al3 d Right 0 65535 TRUE TRUE E Sets 5 Frigo Gain_mA_Al3 d Right 0 65535 TRUE TRUE fy InputOuput Following attributes can be defined V
143. ty is sensible if the grid is visible Number of samples that the run time can iSampleBuffer wordl6 store The older ones are deleted if the size is exceeded PageLab user manual 129 PA GE LAB Frame structure FB CHART Array of addresses of vertical bars If O the A XBars word32 3 vertical bar is not defined otherwise the address of variable or constant value Type of variable that indicates the value of vertical bars If arxXBarsType n arXBarsType word16 3 tyUndefined and arXBars n is not NULL the value of arXBars n is a numeric costant arXBarsCol word32 3 Colors of vertical bars GridCcol Color of grid BorderGridColor Color of border of grid Flag of visibility Available values FALSE object not visible pVisVar w rd3z i E TRUE object always visible var addr address of boolean variable Array of addresses of data The nth of arTrkData contains the address of first elements of array of nth track If address is NULL the track is not define Array of data The nth of arTrkType contains the type of nth elements of arTrkData This value is sensible only if the element of arTrkData is not MULL Array of track colors This value is sensible only if the element of arTrkData is not NULL Array of visibility flags The nth element of arTrkMinY determines the visibility of the track FALSE track not visible TRUE track always visible arTrkData word32 8 arTrkType byte 8
144. updated synchronized with others objects var_name the chart is drawn on rising edge of boolean variable This value TRUE of this variable is the moment when the char adds the samples Len Data lt gt internal HMI index of data Visible status of the object It can be constant TRUE FALSE TRUE or FALSE or linked with a boolean var_name variable var_name if var_name is TRUE the object is visible otherwise it is hidden Format for X axis label The choices are SS seconds Format Time Default list mm ss minutes seconds hh mm hours minutes hh mm ss hours minutes seconds Y Color Color of X Axis label Space among two points of grid in pixel The OENE OEE property is sensible if the grid is visible Sample Number of samples that the runtime can p Value store The older are deleted if the size has buffer exceeded Grid Color ee Color of grid if it is visible Bord Color De a Color of border grid Name of variable for drawing a vertical fixed Vertical var Hane bar on chart It is allowed also a constant Bar 1 i value The symbol means that there is not this vertical bar Color bar 1 se l Color of vertical bar 1 if different from ASA D SE fl As Vert Bar 1 but relative to bar 2 Bar 2 Color bar 2 BENENE As Color bar 1 but relative to bar 2 TRUE FALSE Refresh var name Visible PageLab user manual 91 PA GE LAEB Properties Description Ta As Vert Bar 1
145. word32 i o TRUE image always visible var addr address of boolean variable Output variable Description FUNCTION BLOCK Button02 Button object Frame structure FB BUTTON02 Local variables Description memVis Visibility status of the previous execution Transparency status of the previous execution memSel Selection status of the previous execution Input variables Description wad ee Handle of the object Must be unique among buttons objects x1 Top left x coordinate edge relative to full page yl i y coordinate edge relative to full memTransp byte H PageLab user manual 119 PA GE LAEB Frame structure FB BUTTONO2 Bottom right x coordinate edge relative to full page Bottom right y coordinate edge relative to full page Boolean value FALSE pString is the address of string fResStr byte to draw x2 wordl6 y2 wordl6 TRUE pString is the identifier of resource string Text to draw on the button It has different pText word32 meaning according to fResStr If this field is NULL no text is drawn Address of font for drawing text The font ee UA must be initialized with video AddFont 0 flat A byte 1 raised 2 sunken bordets ae au It is sensible only if Border color and text color It is sensible only if style 0 and bordets gt 0 or 1 2 i eee POLE pString different as MULL and not pSelvar 1 fixed Color of button area It is sensible only
146. ys inactive TRUE the control is always selected or with a boolean variable whose value determines dynamically the selection State 28 PageLab user manual PA GE LAEB Declare a boolean global variable b and associate it with the control button as selection variable iT rangparent FALSE You may customize the button appearance through the Appearance property For exam ple choose the Sunken option 2 10 2 INSERTING A BOOLEAN VARIABLE COMMAND BUTTON Insert a new button in the page by following the aforesaid instructions see 2 10 1 Set it beside the LED button and let a text string show on it by means of the Text property Properties x Properties Z Events peal gt Pos 380 Pos 284 Dim 109 Dim 32 Name Button 9 Text imq Press Selection text ima Font K96AS_16 32 ppearance Raised Border points 1 Border color Background color Selection border 5 Sel background E Selection order 0 TRUE FALSE FALSE The Press variable property allows the user to associate a boolean variable with a but ton control The boolean variable s value corresponds to the pressure state of the button For example associate the button which you have just created with the global variable b which has been created paragraph 2 10 1 PageLab user manual 29 Yariable selection Filter Page globals Add variable Cancel l At runtime the LED button see 2 10 1 will be red when pressing the Press

Download Pdf Manuals

image

Related Search

Related Contents

W406 Quick Installation Guide  GoldX Offspring® Cat 6 UTP Patch Cable 25'  MIX User Guide - MDM MECATRONICS Srl  EUROPEAN CUREMASTER  L(名)08300-A  Integra ADM-2.1 User's Manual  Nero 3D-1 Nero 3D-2 Nero 3D HB Manuel d`utilisation    User Manual  Jenn-Air EXPRESSIONS WW30430S User's Manual  

Copyright © All rights reserved.
Failed to retrieve file