Home

User manual

image

Contents

1. The third line highlighted in blue displays the short description of the variable The fourth line highlighted in purple displays the description of the variable We will now look at the device details the table with the list of active alarms Cod 030220766 rel 1 2 del 31 01 08 19 Software Development Kit To be able to load the list of alarms for the current device a line of code needs to be entered at the start of the JSP file lt 5 page language java import com carel supervisor presentation sdk util Sfera import com carel supervisor presentation helper ServletHelper gt lt jsp useBean id CurrUnit class com carel supervisor presentation sdk obj CurrUnit scope session gt lt 5 CurrUnit setCurrentSession ServletHelper retrieveSession request getRequestedSessionId request CurrUnit loadAlarms gt This requests the CurrUnit object to load the list of active alarms for the device into the memory To display these in a table the following code is used lt table border 0 width 100 cellpadding 1 cellspacing 1 gt lt tr gt lt td colspan 2 style background color FF0000 gt lt font color white gt lt b gt Device alarms lt b gt lt font gt lt td gt lt tr gt lt tr gt lt td width 25 style background color eff1fe Jtd gt lt td width style background color eff1fe gt Jtd gt lt tr gt lt Y gt lt table gt Once the active alarms ha
2. di EEE diy aora col I 6 lr grat bo Continuing the illustration of the SDK function the example below shows how to include refreshable variables on the page associated with Images lt table border 0 width 100 cellpadding 1 cellspacing 1 style border 1px solid black gt lt LI gt lt td colspan 3 style background color 7788EE gt lt font color white gt lt b gt Main parameters refreshable 1m0o lt b gt lt font gt e lt td gt lt j cr LCE lt td width 10 align center style background color efflfe lt td gt lt td width 10 align center style background color eff1fe gt lt CurrUnit getVariable DI1 getDescr1 gt lt td gt lt td width style background color efflfe gt lt CurrUnit getVariable DI1 getDescription S5 gt lt td gt lt tr gt lt LI gt lt td width 10 align center style background color efflfe gt lt S CurrUnit getVariable DI2 getRefreshableAssint lt img src images led L0 gif gt lt img src images led 11 gif gt gt lt td gt lt td width 10 align center style background color efflfe gt lt S CurrUnit getVariable DI2 getDescrl gt lt td gt lt td width style background color efflfe gt lt CurrUnit getVariable DI2 getDescription 3 gt lt td gt lt tr gt lt LI gt lt td width 10 align center style background color efflfe lt td gt lt td width 10
3. Software Development Kit 4 4 CurrNode The CURRNODE object represents the current site with all its devices configured METHODS int getLenght Returns the total number of devices configured on the site CurrUnit getCurrUnitAt Int 1dx Returns the reference to the unit with the input index idx 4 5 CurrUser The CURRUSER object represents the connected user This object includes the rights that the user has for writing certain parameters These parameters are divided into e Manufacturer parameters e Service parameters METHODS boolean haveServicesRight Returns TRUE if the user has the right to write the parameters marked as SERVICE otherwise FALSE boolean haveManufacturerRight Returns TRUE if the user has the right to write the parameters marked as MANUFACTURER otherwise FALSE boolean HaveRight int r The input integer is as follows e 1 gt Rights on the service parameters e 2 gt Rights on the manufacturer parameters Returns TRUE for example when the input is 1 and the user has rights on the service parameters 4 6 Sfera The Sfera object makes the following functions available to the developer String assint float value String decod String off The ASSINT function reflects the same function offered by the Enhanced scripting language The first parameter in the function represents the value of the variable integer or digital The second parameter represents the string to be displaye
4. It can be seen how the standard version of the function has already configured the variables to be refreshed every 2 seconds and has activated the display of the buttons for refreshing and setting the parameters y This function allows the user to have a callback once the page has been filled Parameters sFolder Directory of the map sResource Name of the JSP file called sDevice Name of the device directory Present only if device in detail A A FR OR OE gt function PVP_OnLoad sFolder sResource sDevice PVPK_ActiveRefresh 2 PVPK_addButtons PVP_setData The function incorporates the framework function presented previously that allows the user to further customise the behaviour and the operations carried out by the function for example with prior checks on the data entered before being sent to the server 7 This function allows the user to perform operations on the values of the parameters to be modified before and after being sent to the server entering javascript code before and or after the call to the framework function Parameters obj object that triggered the call typically a confirm button on the page A A FR E F function PVP_setData obj PVPK_setData obj 6 CSS If the user wishes to customise the pages using cascading style sheets outside of the JSP code the framework provides 2 files e customiE css e customFF css These two files are loaded indep
5. Modular Chiller HP screw compr on pCO1 2 c MSDE type 5 Modular Chiller HP screw compr on pCO1 2 c MSDE type 5 Modular Chiller HP screw compr on pCO1 2 c MSDE type 5 Modular Chiller HP screw compr on pCO1 2 c MSDE type 5 Modular Chiller HP screw compr on pCO1 2 c MSDE type 5 Modular Chiller HP screw compr on pCO1 2 c MSDE type 5 Cod 030220766 rel 1 2 del 31 01 08 27 Software Development Kit 10 RELATIONSHIP BETWEEN FILES AND MAPS The menu on the left is divided into six macro groups Each of these correspond to certain number of sections each associated with a directory accessible via the following path C swdept_prj plantvisorpro developments applications websupervisor WebRoot app NAME The directory contains the files that correspond to the pages available for each section Below is the list of the macro groups divided by section indicating the corresponding directory and the list of JSP files 10 1 GROUPS Overall view of the devices with the corresponding settings Global gt grpview Main gt subtab1 Jsp Parameters gt subtab2 jsp Alarms gt subtab3 jsp HACCP graph gt subtab4 Jsp Log graph gt subtab5 jsp Conf Graph gt subtab6 jsp 10 2 ALARMS EVENTS Macro group for managing viewing and looking up alarms and events Alarms gt alrglb e Active alarms gt subtab1 jsp e Reset alarms gt subtab2 jsp Events gt evnview e Events gt subtab1 jsp Relays management gt
6. align center style background color eff1fe gt lt CurrUnit getVariable DI5 getDescr1 gt lt td gt lt td width style background color efflfe gt lt CurrUnit getVariable DI5 getDescription gt lt td gt lt tr gt SLI lt td width 10 align center style background color efflfe lt td gt lt td width 10 align center style background color efflfe gt lt CurrUnit getVariable DI6 getDescrl gt lt td gt lt td width style background color efflfe gt lt CurrUnit getVariable DI6 getDescription gt lt td gt tro SEE lt td width 10 color efflfe gt align center style background cas lt td width 10 align center style background color fefflfe gt lt CurrUnit getVariable DI6 getDescrl 5 gt lt td gt lt td width style background color effife gt lt CurrUnit getVariable DI6 getDescription gt lt td gt lt tr gt lt table gt Based on the values available for the variable in question only digital or integer the corresponding value is obtained which in the most typical case Is an Image encapsulated in the corresponding HTML tag Cod 030220766 rel 1 2 del 31 01 08 23 Software Development Kit The example highlights different situations e Yellow classic example of using a LED to represent the on off status of a digital variable e Green example of using images as desired to represent the diff
7. lt xsl otherwise gt lt xsl choose gt lt td gt lt td gt lt xsl choose gt lt xsl when test resettime gt lt xsl value of select resettime gt lt xsl when gt lt xsl otherwise gt lt div align center gt lt div gt lt xsl otherwise gt lt xsl choose gt lt td gt lt tr gt lt xsl for each gt lt tbody gt lt table gt lt xsl template gt lt xsl stylesheet gt The customisable HTML TAGS can be easily recognised with the most suitable style and format The page is in fact completely formatted by the static HTML part and does not interface in any way with the management of the XML part The XSL tags using the cycle construction lt xsl for each gt allow all the alarm data to be read from the XML packet and then entered into the cells of the table To Improve the result a conditional choice construction has also been used lt xsl choose gt which guarantees that the cells are filled with data even if some of the values are missing Cod 030220766 rel 1 2 del 31 01 08 16 Software Development Kit 8 COMPLETE EXAMPLE A complete example can better help the developer to understand the basic steps required to customise the pages Assuming the developer wants to customise the detail for the following device Module IO First of all the following file needs to be created SubTab1 jsp The first lines of code in the file must be as follows to allow it to be integrated
8. SDK commands Is essentially the same for these types of devices The additional operations are slightly different for the custom devices created with IDE and for the virtual devices and are described below 11 1 IDE custom devices When a new device created with PlantVisorPRO IDE is added the system creates a new directory under C Carel PlantVisorPRO engine webapps PlantVisorPRO custom dtlview This new directory will have the same name as the XML file for the IDE created device and even if it Is not obligatory it Is good practice to name the file based on the code of the device The system will use this directory as the reference for the device added regardless of any other updates Example IDE device Code D01 File device01 xml Importing the device will create the new directory C Carel PlantVisorPRO engine webapps PlantVisorPRO custom dtlview device01 All the files developed in SDK corresponding to the new device will thus be saved in this path 11 2 Logical devices The pages created with the logical devices should be located in the following directory C Carel PlantVisorPRO engine webapps PlantVisorPRO custom dtlview devicelogic These must be composed using the logical codes found in the logical device configuration page as references Lista descrizioni Config storici Principale l Variabili di allarme Logic Device 2952 gt E possibile sia modificare la descrizione del dispositivo che disabilitarlo De
9. be replaced with suitable values as follows E User PlantVisorPRO user name Password PlantVisorPRO user password The following example shows a possible XML query packet lt requests gt lt login userName admin password admin gt lt request type siteStatus gt lt request gt lt requests gt 2 6 2 XML response packet The XML response packet to this query will have the following format lt responses gt lt response type siteStatus gt lt site id 1 status site_status gt lt response gt lt responses gt The XML response only provides the situation of the queried site s Site_status numeric value that represents the status of the site with 2 possible values o t site OK o 2 site with alarms The following example shows a possible XML response packet lt responses gt lt response type siteStatus gt lt site id 1 status 1 gt lt response gt lt responses gt Cod 030220766 rel 1 2 del 31 01 08 40 Software Development Kit 2 7 Query for retrieving alarms from the field This query requests the list of alarms from the PlantVisorPRO engine The XML query may indicate the device devices required the maximum length of the list retrieved and the starting point 2 7 1 XML query packet The XML query packet will have the following format lt requests gt lt login userName user password password gt lt request type alarmList language language_code
10. bold are to be replaced with suitable values as follows E User PlantVisorPRO user name Password PlantVisorPRO user password 4 Language code this is a string of characters in XX_xx format that is 2 letters in upper case and 2 in lower case separated by an underscore The groups of 2 letters represent the user language code for Italian the string will be 7_ t Similarly for the other languages the code will be made up of 2 letters in upper case the underscore and then the language code in lower case This is the standard format that also allows for special dialects if these are made available in PlantVisorPRO E d_devices this field is used to indicate which devices the data is required for The following values are possible o l allthe devices on the site will be returned o List of integers separated by commas the data corresponding to the devices whose identifier Is included in the list supplied will be returned if the identifier does not exist it will be ignored The following example shows a possible XML query packet lt requesis gt lt login userName admin password admin gt lt request type devicesList language IT_it gt lt element iddevices 212 312 gt lt request gt lt requests gt 2 3 2 XML response packet The XML response packet to this query will have the following format lt responses gt lt response type devicesList gt lt device idDevice id_device name description Statu
11. by the supervisor This function can be used to send via a packet in standard XML format a series of requests to the PlantVisorPRO server engine getting as a response a similar XML packet containing depending on the type of request sent data concerning the devices the parameters associated with a certain device and alarms The response packets can be broken down and analysed so as to be bale to present the data made available by the PlantVisorPRO engine in the most useful way outside of the supervisor web pages The following sections of the document will describe the different types of queries available and their use with details that allow the user to utilise the queries to get the data to be presented in substantially the same way as proposed for presentation by the supervisor 2 XML Queries The XML External Query function offers various types of query to retrieve different data from the field controlled by PlantVisorPRO This section will first present the query mode and then analyse the types of query in detail presenting all the elements that allow the user to exploit the functions provided 2 1 Query mode The query mode involves sending a normal http request in secure mode that is on port 443 and using https The XML query packet is normal standard XML text An XML query suitably prepared based on the required type of request must be forwarded with a https POST request to the following address https lt PlantVisorPRO PC I
12. description corresponding to the current variable int getType Returns the type of the current variable e 1 gt Digital e 2 gt Analogue e 3 gt Integer e 4 gt Alarm boolean getBAnd int mask Performs an AND between the value of the variable and a screen represented by the MASK parameter Returns TRUE if the value that is the object of the AND is equal to screen Otherwise FALSE String getCode Returns the unique name of the variable String getSetField Returns the HTML string that represents the text field to be entered on the page together with the suitable references for sending the server the correct parameter setting information String postName Returns the program code to be used for the id and name attributes of the text field used for setting the parameter if the text fields used on the page need to be customised String getRefreshableAssint String decod Starting from the decod parameter a string made up of values separated by corresponding to the current value of the variable I returns the value of the string with the index String getRefreshableAssint String decod String off Starting from the decod parameter a string made up of values separated by returns the value of the string with the index corresponding to the current value of the variable If there is no correspondence the value off Is returned I Cod 030220766 rel 1 2 del 31 01 08 9 4 2 CurrA
13. gt lt element idDevice id_ device start start_ list length length_ list gt lt request gt lt requests gt The terms in bold are to be replaced with suitable values as follows 4 FE F User PlantVisorPRO user name Password PlantVisorPRO user password Language_code this is a string of characters in XX_xx format that is 2 letters in upper case and 2 in lower case separated by an underscore The groups of 2 letters represent the user language code for Italian the string will be 7_ t Similarly for the other languages the code will be made up of 2 letters in upper case the underscore and then the language code in lower case This is the standard format that also allows for special dialects if these are made available in PlantVisorPRO Id_device unique identifier of the device in question This attribute can be ignored in the XML query packet thus retrieving all the alarms from the site Id_variables this field is used to differentiate the query selecting different categories of parameters according to the value assigned Start_list numeric value that is used to skip the first n alarms in the list Length_list used to specify the number of alarms to be retrieved The following example shows a possible XML query packet lt requests gt lt login userName admin password admin gt lt request type alarmList language IT_it gt lt element start 0 length 10 gt lt req
14. id to the value returned by the getPostName SDK function The result of the setting operation can be seen in the sequence of images shown below JAS A dot Part een joue tet ene Merate orde Eddi ee EG A Ge er pesa dI DIA Stato ingresso 6 valido solo se selezionato al posto della sonda 2 J Of DI Main parameters set Corr New Codice Descrizione 2 BUTT outp Stato del burser de versate hs ced ta 2 Soga barsa starve per la sonde 2 15 alarme dssb tate bee ed D Siren 4 G nr e o JE ss rangs e RE MR out tet gr Y a GO Errata El reve 10 EA O EG A Ge Porro rete obale D cre mi so Main parameters e Mic rosati tate ret Tapirer o DI DI A MoJa pe met ironta Con sace e DIS selezionato al posto della sonda e DIS Selezionato al posto della sonda gt rus DIG Stato ingresso 6 valido solo se selezionato al posto dell Le o 5J da 2 Main parameters set Descrizione Corr New Codice o MAZ ovlp Stato del burper ca senate EA 2 Soglia bassa alarma per la sonda I FG alarma dsab tato Gels nera 4 Agarta pagra tp ke ost Piet eel sd de np AIN POE Sa LA Ae ee 5 i Loge k Also note the button at the top right that Is used to set the values in the field after having completed the fextfie ds on the page as an alternative to pressing the send button inside of a text field The custom page Is then completed by the display of the alarms in real
15. lt request type parametersList language IT_it gt lt element idDevice 212 ids Variable 800 gt lt request gt lt requests gt 2 4 2 XML response packet The XML response packet to this query will have the following format lt responses gt lt response type parametersList gt lt device name device_name iddevice id_device gt lt variable name variable_description value value type type_variable idvar id_variable islogic islogic priority priority readwrite read write minvalue minimum_value maxvalue maximum_value shortdescr short_description longdescr long_description gt lt device gt lt response gt lt responses gt Cod 030220766 rel 1 2 del 31 01 08 37 Software Development Kit The values in bold are set on the server side of the query as follows e FE FPF FE ERE Device_name text description of the device queried Iddevice unique identifier of the device queried Variable_ description text description of the parameter Type_ variable integer value that describes the type of parameter value The following values are possible 1 digital value 0 or 1 2 analogue value number with decimal 3 Integer value number without decimal Id_variable unique identifier of the parameter Islogic TRUE or FALSE indicates whether the parameter is logical that is calculated by the supervisor as the result of combining other parameters or alternativel
16. td width valign top gt lt table border 0 width 100 cellpadding 1 cellspacing 1 gt SEES lt td colspan 3 style background color 7788EE gt lt font color white gt lt b gt Main parameters lt b gt lt font gt lt td gt lt tr gt lt tr gt lt td width 15 align center style background color efflfe gt lt td gt lt td width 10 align center style background lt tas color tefflfe gt lt td width style background color te 1 e gt gt lt tr gt LE lt td width 15 align center style background color efflfe gt lt CurrUnit getVariable L1 getValue gt lt CurrUnit getVariable L1 getMUnit gt lt td gt lt td width 10 align center style background color fefflfe gt lt CurrUnit getVariable L1 getDescrl gt lt td gt lt td width style background color fefflfe gt lt CurrUnit getVariable L1 getDescription gt lt td gt E EES lt table gt td lt EIF lt table gt lt td gt EJ EL lt table gt The first line highlighted in yellow allows the user to retrieve the complete path of the default image corresponding to the specific model of device The second line highlighted in green groups together two statements The retrieval of the value of variable H1 and its corresponding unit of measure If the unit is offline and the values are not available the framework returns 3 asterisks
17. INE gray e 1 gt ONLINE green e 2 gt ALARM red 3 gt DISABLED blue String getlmage Returns the path relating to the default image assigned to the device CurrVar getVariable String vCode Returns a reference to the CurrVar object This object represents the variable requested by the user with the input parameter vCode boolean loadAlarms Loads the alarms corresponding to the device If at least one alarm Is active returns TRUE otherwise FALSE int getAlarmNumber Returns the number of active alarms on the device including those that have been e ACK e RESET by the user CurrAlarm getAlarmAt int idx Returns the reference to the alarm with the input index idx String getRefreshableStatusAssint String decod Starting from the decod parameter a string made up of values separated by returns the value of the decod string according to the following indices corresponding to different states e 0 offline e 1 online ok e 2 online with alarm e 3 disabled String getRefreshableStatusAssint String decod String off Starting from the decod parameter a string made up of values separated by returns the value of the decod string according to the following indices corresponding to different states e 0 offline e 1 online ok e 2 online with alarm e 3 disabled If the status cannot be recovered the string off Is returned Cod 030220766 rel 1 2 del 31 01 08 1
18. P gt PlanVisorPRO servlet MasterXML The request can reach the server either by sending a form or for example as an AJAX POST request or alternatively in any other mode that involves a request of this type and that can subsequently read the response An example in Javascript of sending the XML Query and managing the subsequent response using the callback function is shown in the following code function sendrequest if window XMLHttoRequest xmlCommReg new XMLHttpRequest else if window ActiveXObject xmlCommReg new ActiveXObject Microsoft XMLHTTP if xmlCommReg null try xmlCommReg open POST https lt PlantVisorPRO PC IP gt PlantVisorPRO serviet MasterXML true xmlCommRegq onreadystatechange callbackFunction xmlCommRegq send document getElementByld input value catch e alert err function callbackFunction if xmlCommReq readyState 4 Cod 030220766 rel 1 2 del 31 01 08 33 Software Development Kit if xmlCommheg status 200 try xmlResponse xmlCommhReq responseXML txtResponse xmliCommReg response Text gestione risposta xmlResponse null catch e alert err 2 2 Format of the packets The XML query packets have the following general format Query lt requests gt 1 occurrence lt login userName user password pwa gt 7 occurrence lt request type type gt n occurrences lt element g
19. PlantVisorPRO CAREL Software Development Kit _ iene CC User manual LEGGI E CONSERVA AZ ISTRUZIONI lt READ AND SAVE THESE INSTRUCTIONS Contents SDK Software Development Kit k ee SE RI dla eat 5 LE Does 5 2 Sla A ee ceecetee crane cccoesceeccestusesoaccteceearcreccneecrt 5 Cei T T 5 DIRO A RE RR O A ERRE CORRE TORE 6 PP tot x E E EAA cones 7 APR A tS 9 A OPP OPO EE 9 O OE ONE 10 Llodra 11 E ORO NOAA O ithaca I 12 55 UT 12 LE coche ceo icles cochte cece state teeeeecoricorteeareatsiaetsecmtee tt 12 Alici 13 ES 14 ASS N E SHEES FOR ALARMS ES lisina 15 A ate attend 17 DEVICE Po PP E 26 RELATIONSHIP BETWEEN FILES AND MAPS ad 28 OE AA arteries TR 28 W ALARM EV ENS etree a A 28 Eaton 28 TOs CONFIGURATION Lele 29 A AONE AA PP ae ttre ee 30 o e ocean dha os 30 SDK external XML queries guide to the functions 1 Introduction to the TWA GHO Nes a tanane 33 A ES al uc Dan Ud 33 Dal HOGI OURS a Rin 33 DE MOI lia 34 23 Query for retrieving the list of devices ini 35 2 4 Query for retrieving the list of parameters 37 2 5 Query for setting the parameters in the fe ld 39 2 6 Query on the status of Me iaa 40 2 7 Query for retrieving alarms from the field cnnn ccconanmsmmms 4 Software Development Kit SDK Software development kit 1 Introduction The purpose of this document is to provide complete documents to the end users and thus allow them to be ab
20. SubTab1 jsp file exists the Supervisor loads the file found rather than the version in the standard path In this way the user can overwrite any function without the risk of deleting the basic functions and without having to worry about making backup copies The new JSP files created by the user must be implemented by e Standard scripting language for JSP e API Application Programming Interface provided in the PlantVisorPRO SDK These APIs feature functions to user independent and flexible when programming the pages References to objects and attributes have been based on the Enhanced version so as to ensure a certain familiarity when porting the applications Cod 030220766 rel 1 2 del 31 01 08 8 Software Development Kit 4 API 4 1 CurrVar The CURRVAR object represents the variable that is currently selected by its CODE METHODS int getld Returns the unique identifier used by the database for the current variable String getValue Returns the value from the field for that specific variable String getRefreshableValue Returns the value from the field for that specific variable and makes it refreshable String getDescription Returns the description corresponding to the current variable String getMUnit Returns the unit of measure corresponding to the current variable String getDescr1 Returns the short description corresponding to the current variable String getDescr2 Returns the long
21. The values in bold are set on the server side of the query as follows E ld_variable unique ID of the variable s Status outcome of the write operation the following values are possible o Ok parameter set correctly o Walttime numeric value of the waittime sent with the request This means that after having waited the set number of milliseconds the parameter has still not been modified This is not an error code but rather a timeout indication The parameter may still be set to the new value in the next instant o error Indicates a error in setting the parameter If an internal error occurs on the server an error packet is returned with the following format lt responses gt lt response type setParameters gt lt error gt lt response gt lt responses gt The following example shows a possible XML response packet lt responses gt lt response type setParameters gt lt variable id 643 state 0k gt lt response gt lt responses gt Cod 030220766 rel 1 2 del 31 01 08 39 Software Development Kit 2 6 Query on the status of the site This query requests the status of the site from the PlantVisorPRO engine that is whether or not there are alarms 2 6 1 XML query packet The XML query packet will have the following format lt requesis gt lt login userName user password password gt lt request type siteStatus gt lt request gt lt requests gt The terms in bold are to
22. al interest have been highlighted for easier identification and are then described afterwards lt page language java import com carel supervisor presentation sdk util Sfera import com carel supervisor presentation helper ServletHelper gt lt jsp useBean id CurrUnit class com carel supervisor presentation sdk obj CurrUnit scope session gt lt CurrUnit setCurrentSession ServletHelper retrieveSession request getReguestedSessionld request gt lt table border 0 width 100 height 100 cellpadding 1 cellspacing 1 gt lt tr height Ss gt lt td vallgn top gt lt table border 0 width 100 height 100 cellpadding 1 cellspacing 1 gt SL lt td valign top width 5 align center gt lt Sfera assint CurrUnit getStatus lt img src images led L0 gif gt lt img src images led Ll gif gt gt lt td gt lt td valign top width align left gt lt font size 4 gt lt b gt lt CurrUnit getDescription gt lt b gt lt font gt lt td gt lt td valign top width 20 align right gt lt b gt lt CurrUnit getLine gt lt b gt lt td gt lt tr gt lt table gt lt td gt ICE lt tr helgqhit gt lt td valign top gt lt table border 0 width 100 height 100 cellpadding 1 cellspacing 1 gt tr height gt lt td width 203 valign top gt lt img src border 1 style width 150px height 160px gt lt td gt lt
23. ardianPRO gt subtab5 jsp Notifications gt subtab6 jsp Plugins gt subtab7 jsp PLUGINS 3 plugin e Plugins gt subtab1 jsp Cod 030220766 rel 1 2 del 31 01 08 29 Software Development Kit 10 5 SCHEDULER Macro group for creating and managing alarms and events and the consequent actions with any I O operations Alarms and event management gt alrsched e Rules gt subtab1 jsp Alarm conditions gt subtab2 jsp Event conditions gt subtab3 jsp Time bands gt subtab4 jsp Actions gt subtab5 jsp Scheduled activities management gt actsched e Rules gt subtab1 jsp e Time bands gt subtab2 jsp e Actions gt subtab3 jsp I O configuration gt setio e Fax gt subtabl jsp SMS gt subtab2 jsp E mail gt subtab3 jsp RAS gt subtab4 jsp Window gt subtab5 Jsp Relay gt subtab6 jsp I O test page gt testio e Testl O gt subtabl jsp Data transfer gt datatransfer e Data transfer gt subtab2 sp 10 6 MAPS Macro group for displaying the devices and the maps created by IDE LayoutEditor Devices gt deviceview e Devices gt subtab1 jsp Map list gt mstrmaps e Link maps gt subtab2 jsp Cod 030220766 rel 1 2 del 31 01 08 30 Software Development Kit 11 Custom and logical devices The SDK functions are used to make custom pages even for custom devices created with PlantVisorPRO IDE and for logical devices created in the PlantVisorPRO environment The creation of the custom pages using the
24. ates the unique identifier of the parameter to be set and the corresponding value The response to this type of query involves information on the outcome of the operation 2 5 1 XML query packet The XML query packet will have the following format lt requesis gt lt login userName user password password gt lt request type setParameters waittime wait_time lt element idVariable id_ variable value value gt lt request gt lt requests gt The terms in bold are to be replaced with suitable values as follows s User PlantVisorPRO user name 4 Password PlantVisorPRO user password 2 Waittime waiting time for setting the parameters in milliseconds After this maximum time the parameter is signalled as not having been set however the parameter may still be set correctly in the next instant e d_variable unique identifier of the parameter to be set Value value to be set for the parameter The following example shows a possible XML query packet lt requests gt lt login userName admin password admin gt lt request type setParameters waittime 5000 gt lt element idVariable 643 value 1 gt lt request gt lt requests gt 2 5 2 XML response packet The XML response packet to this query will have the following format lt responses gt lt response type setParameters gt lt variable id id_variable state status gt lt response gt lt responses gt
25. by an underscore The groups of 2 letters represent the user language code for Italian the string will be 7_ t Similarly for the other languages the code will be made up of 2 letters in upper case the underscore and then the language code in lower case This is the standard format that also allows for special dialects if these are made available in PlantVisorPRO Id_device unique identifier of the device in question Id_variables this field is used to differentiate the query by selecting different categories of parameters according to the value assigned o List of unique numeric variable identifiers separated by commas the query will be performed so as to only return the information relating to the requested parameters and ignoring any inexistent variable identifiers o Value 1 returns the list of all the parameters for the device in question Value 2 returns the list of t parameters set in the probes area on the device detail page o Value 3 returns the list of parameters set as the main parameter for the device that is those visible in the 2 tables on the device detail page for the read only and read write variables respectively o Value 4 returns the list of parameters set in the status area of the device detail Obviously these variables will all be digital as a status Is on or off by definition O The following example shows a possible XML query packet lt requests gt lt login userName admin password admin gt
26. d based on the value of the first parameter The third parameter represents the string to be displayed to the user if offline Example Sfera assint CurrUnit getVariable DI1 getValue lt img src Images led LO gif gt lt img src images led L1 gif gt M1 Based on the value of the variable DI1 the function returns the first image if equal to 0 the second image if equal to 1 If on the other hand the value of the variable is not available because the device is OFFLINE the function returns the third parameter String format float value String pattern Returns the input value of the first parameter formatted based on the input pattern of the second parameter String assint String value String decod String off The function performs the same operation and provides the same results as the previous one however the input variable is a string rather than a float value The value is previously converted to check that it is numeric and then processed String format String value String pattern In this case too the function Is identical to the previous one however receives a string input rather than a numeric value Cod 030220766 rel 1 2 del 31 01 08 12 Software Development Kit 5 JAVASCRIPT The PlantVisorPRO pages once processed and executed are converted from JSP files to HTML documents The Javascript language is fundamental for the management of the events on the client The framework provides the user
27. endently also based on the type of browser being used The first for Internet Explorer the second for Firefox Cod 030220766 rel 1 2 del 31 01 08 14 Software Development Kit 7 XSL STYLE SHEETS FOR ALARMS To allow the user to customise the alarms while at the same time maintaining all the refresh functions the concept of style sheet has been introduced These files contain the logic for formatting the data contained in the XML packets sent by the server and at the same time are extremely easy to customise The XSL style sheet must be located in the same directory as the custom page and named as follows stylesheet xsl The skeleton of the sheet Is as shown below and already contains a sufficiently explicative example with various options lt xml version 1 0 encoding ISO 8859 1 gt lt xsl stylesheet version 1 0 xmIns xsl http www w3 0rg 1999 XSL Transform gt lt xsl template match gt lt table width 100 align center border 1 gt lt thead style font size x small gt lt tr gt lt th width 12 gt Data ora lt th gt lt th width gt Descrizione lt th gt lt th width 5 gt Priorita lt th gt lt th width 10 gt Ack user lt th gt lt th width 12 gt Ack time lt th gt lt th width 10 gt Reset user lt th gt lt th width 12 gt Reset time lt th gt lt tr gt lt thead gt lt tbody style font size xx small background red gt lt tr gt lt td gt
28. erent states For integer variables a different image can be used for each possible value of the variable e Blue the values can be duplicated different displays can be used in different areas and if necessary with different presentations for the same variable all transparently to the framework The result on the custom page is shown in the following figure 5 7 ayo Module 2 fears tote 4 r a COTA m n e LJ E cer Fi dj mms ee russe Further options are provided by the possibility to set the parameters in the fields in 2 different ways e Complete field the framework generates all the code required to achieve a text field related to the parameter in question for setting the value e Name only with this option the user can customise the text field as desired modifying the layout and or adding checks on the data entered The SDK function will set the correct ID and name of the text field to link it to the variable lt table border 0 width 100 cellpadding 1 cellspacing 1 style border 1px solid black lt tr gt lt td width 10 align center style background color efflfe font x small gt lt CurrUnit getVariable BUZZ OUTPUT getRefreshableAssint lt img src images led L0 gif gt lt img src images led Ll gif gt gt lt td gt lt td width 10 align center style background color efflfe font x small gt lt td gt lt td width 10 align center style backg
29. functions that have already been implemented so as to simplify navigation on the page Currently the following functions are implemented PVPK_goToDetail idDevice The user can access the device detail page identified by the input parameter idDevice PVPK_goToMoreVars sDescription The user can access the page with the complete list of all the read only variables of the device This can only be used on the device detal page as elsewhere it would not have any sense The sDescription parameter represents the string that the user wants to display in the top navigation menu PVPK_ActiveRefresh iTimeSecond The user refreshes the variables based on the input period in seconds PVPK_addButtons The user displays the buttons for refreshing and setting the parameters PVPK_setData obj The user can use this function to send a request to the server for setting parameters The obj parameter contains the reference to the object that has originated the request which must be in a form Using the object the framework retrieves the form containing the data and sends the correct request to the server As well as these functions to the user is provided with a file in the following path C Carel PlantVisorPRO engine webapps PlantVisorPRO scripts custom custom s Users can enter their management functions inside this file As well as any new functions a number of callback functions have been implemented PVP_OnLoad 7 This funct
30. into the framework lt page language java import com carel supervisor presentation sdk util Sfera import com carel supervisor presentation helper ServletHelper gt lt jsp useBean id CurrUnit class com carel supervisor presentation sdk obj CurrUnit scope session gt a CurrUnit setCurrentSession ServletHelper retrieveSession request getRegquestedSessionld request gt Using these statements the JSP page can access the objects made available by the framework in particular the reference to the current unit Le the device Is loaded into the memory as well as the Sfera object for accessing the functions Then a table is created in HTML that contains the following information e The status of the device e The name of the device e The serial line it is connected to lt table border 0 width 100 height 100 cellpadding 1 cellspacing 1 gt LTS lt td valign top width 5 align center gt lt td gt lt td valign top width align left gt lt font size 4 gt lt b gt lt b gt lt font gt Ed lt td valign top width 20 align right lt O b gt lt td gt lt tr gt lt table gt The first line highlighted in yellow uses the CurrUnit object to request the status The range of values is between 0 and 3 e 0 gt OFFLINE gray e gt ONLINE green e 2 gt ALARM red e 3 gt DISABLED blue This value is the used as the input for the assint funct
31. ion In this way If the status value is equal to 0 the function returns the following string If the status value Is equal to 1 the function returns the following string If the status value does not corresponds to one of these two values then the function returns the default string The second line highlighted in green is used to retrieve the description of the device The third line highlighted in blue returns the references for the line that the device is connected to Cod 030220766 rel 1 2 del 31 01 08 17 Software Development Kit The resulting page will be as follows J unten e Explorer Alarms H CCP graph Log graph Graph conf Bl 1 0 Module LU Operadora completata al intranet locale The above page can then be added with the default Image of the device and a table with the three high and low probe temperature thresholds The end result is as follows S Pantisorrreo Microsoft internet Fepineor Fie Modica visualiza Pr fet Strumenti 7 tal D m ig fe y E turpe iiocalhost Plantisoreroisertetilogit gt ES Parameters HACCEF graph Log graph Graph conf ae AOF H1 High threshold of alarm for the probe 1 we er Li Low threshold of alarm bor the probe 1 Operazione completata LE Intranet locales Cod 030220766 rel 1 2 del 31 01 08 18 Software Development Kit The code for programming the page illustrated above Is as shown below The lines of code of speci
32. ion allows the user to have a callback once the page has been loaded Parameters sFolder Directory of the map sResource Name of the JSP file called sDevice Name of the device directory gt Present only if device in detail function PVP_OnLoad sFolder sResource sDevice PVP_goToDetall The function incorporates the framework function presented previously that allows the user to further customise the behaviour and the operations carried out by the function f This function allows the user to access to the device detail page Parameters lidDevice Id of the device Retrieved by CurrUnit getId ali function PVP_goToDetail idDevice PVPK_goToDetall 1dDevice J Cod 030220766 rel 1 2 del 31 01 08 13 Software Development Kit PVP_goToVariables The function incorporates the framework function presented previously that allows the user to further customise the behaviour and the operations carried out by the function j4 This function allows the user read only access to the variables page Parameters sDescription Description provided to the user in the NAVMENU a function PVP_goToVariables sDescription 1f sDescription sDescription Ti PVPK_goToMoreVars sDescription PVP_OnLoad The function incorporates the framework function presented previously that allows the user to further customise the behaviour and the operations carried out by the function
33. larm Software Development Kit The CURRALARM object represents the active alarm on the current device METHODS int getldalr Returns the unique ID in the database relating to the active alarm String getDesc Returns the description corresponding to the active alarm String getDate Returns the date and time the alarm was activated String getAckuser Returns the username of the user who acknowledged the alarm ack otherwise returns an empty string String getAcktime Returns the date the alarm was acknowledged ack otherwise returns an empty string String getResetuser Returns the username of the user who reset the alarm otherwise returns an empty string String getResettime Returns the date the alarm was reset otherwise returns an empty string String getPriority Returns the priority of the alarm The following values are possible e Highest e High e Medium e Low Cod 030220766 rel 1 2 del 31 01 08 10 Software Development Kit 4 3 CurrUnit The CURRUNIT object represents the current device On the device detail page it is the framework that points to the unit selected by the user METHODS int getld Returns the unique ID in the database relating to the current unit String getDescription Returns the description of the device String getLine Returns the line the device belongs to int getStatus Returns an Integer representing the status of the device e 0 gt OFFL
34. le to work independently during the customisation of PlantVisorPRO PlantVisorPRO Is an application based on 3 level framework These 3 levels are divided into e the Data component which resides in the Database e the Business component which resides on the Server e the Presentation component which resides on the PC that accesses the application I I I I I lt __ ___ gt Client l I I Server I I I I I I Database Client 1 1 Database The database which contains all the configuration historical and log data is implemented using the PostegreSQL 8 1 system Standard SQL language Is used to retrieve the information 1 2 Server The server where all the business logic is implemented is fully developed in JAVA and runs on Apache Tomcat 5 0 The server Is the bridge between the graphic representation of the data client and the data itself database To make the exchange of the data with the client more secure HTTPS communication is used to create an encrypted channel with authentication by certificate 13 Client The client is the application that allows the end user to log in configure and manage the site Currently the PlantVisorPRO graphic interface is compatible with Internet Explorer version gt 6 1 Cod 030220766 rel 1 2 del 31 01 08 5 Software Development Kit 2 Approach SDK for PlantVisorPRO has been concelved following the same philosophy by which Enhanced users created
35. lt xsl when test datetime gt lt xsl value of select datetime gt lt xsl when gt lt xsl otherwise gt lt div align center gt lt div gt lt xsl otherwise gt lt td gt lt td gt lt xsl choose gt lt xsl when test description gt lt xsl value of select description gt lt xsl when gt lt xsl otherwise gt lt div align center gt lt div gt lt xsl otherwise gt lt xsl choose gt lt td gt lt td gt lt xsl choose gt lt xsl when test priority gt lt xsl value of select priority gt lt xsl when gt lt xsl otherwise gt lt div align center gt lt div gt lt xsl otherwise gt lt xsl choose gt lt td gt lt td gt lt xsl choose gt lt xsl when test ackuser gt lt xsl value of select ackuser gt lt xsl when gt lt xsl otherwise gt lt div align center gt lt div gt lt xsl otherwise gt lt xsl choose gt lt td gt lt td gt lt xsl choose gt lt xsl when test acktime gt lt xsl value of select acktime gt Cod 030220766 rel 1 2 del 31 01 08 15 Software Development Kit lt xsl when gt lt xsl otherwise gt lt div align center gt lt div gt lt xsl otherwise gt lt xsl choose gt lt td gt lt td gt lt xsl choose gt lt xsl when test resetuser gt lt xsl value of select resetuser gt lt xsl when gt lt xsl otherwise gt lt div align center gt lt div gt
36. mage that represents the button shortDescr tooltip that is shown when running the mouse over the button The next lines of code on the other hand are used to build a button for synchronising the clock on the device with the current time In the page header together with sessionUser described above we will create the syncronow object lt String syncronow sessionUser getPropertyAndRemove syncronow gt lt input type hidden id dosyncro value lt syncronows gt gt A button can be added anywhere on the page for setting a parameter public String getsyncTimeButton int id_hh int id_mm int id_ack Esempio lt S CurrUnit getSyncTimeButton CurrUnit getVariable LHOUR getId CurrUnit getVariable LMINUTE getId CurrUnit getVariable SET_CLOCK getId gt The function uses the following parameters e id_hh id of the hours variable e id_mm id of the minutes variable e id_ack idofthe confirm time variable The use of the synchronisation function is now strictly linked to devices where the time Is set by sending the confirmation parameter Cod 030220766 rel 1 2 del 31 01 08 22 Software Development Kit The result is shown in the following figure PTT EE SET Epi n SE Es Halles pas fret fase a Js E Eh a ly Ed Bla ha ed Tal eee Er dra erica A TRI PA ARO Ae O ia gdi a va 1 ur PlantVisor Jihad dig depres
37. me IR 33 DIN C 1 status 2 idline 112 address 1 code 2 001 isenabled TRUE comport COM4 baudrate 19200 tyoeprotocol CAREL lt device gt idDevice 312 name Anticondensate controller GAV status 3 idline 212 address 1 code 3 001 isenabled FALSE comport COM20 baudrate 19200 typeprotocol MODBUS lt response gt lt responses gt Cod 030220766 rel 1 2 del 31 01 08 36 Software Development Kit 2 4 Query for retrieving the list of parameters This query requires the list of parameters corresponding to a certain device from the PlantVisorPRO engine The XML query packet indicates the list of the devices in question and if necessary the category of parameters to be retrieved and in return receives in the XML response packet the list of parameters representing the result of the query 2 4 1 XML query packet The XML query packet will have the following format lt requests gt lt login userName user password password gt lt request type parametersList language language code gt lt element idDevice id device ids Variable id_ variables gt lt request gt lt requests gt The terms in bold are to be replaced with suitable values as follows E User PlantVisorPRO user name E Password PlantVisorPRO user password E Language_code this is a string of characters in XX_xx format that is 2 letters in upper case and 2 in lower case separated
38. relaymer e Reset relay gt subtab1 jsp Search gt alrevnsearch e Alarms search gt subtab1 jsp e Events search gt subtab2 jsp 10 3 REPORTS Macro group for managing the print outs and saving the alarms and reports Periodic print configuration gt reportcont e HACCP gt subtab1 jsp e Log gt subtab2 jsp Print online gt report e HACCP gt subtabl jsp e Log gt subtab2 jsp Reports archive gt hsreport e Archive gt subtab1 jsp Alarms archive gt hsprint e Archive gt subtab1 jsp Cod 030220766 rel 1 2 del 31 01 08 28 10 4 CONFIGURATION Software Development Kit Macro group for managing the site and the logical configuration of the variables devices groups and areas Site configuration gt siteview Site gt subtab1 jsp New line gt subtab2 jsp Alarms safety gt subtab3 jsp Copy config gt subtab4 jsp Logical configuration gt devloglist e Logical devices gt subtab1 jsp Logical device creation gt logicdevice e Logical devices gt subtab1 Jsp e Logical variables gt subtab2 jsp Logical groups gt groupview e Groups list gt subtab1 Jsp e New group gt subtab2 jsp Logical areas gt areaview e Areas list gt subtab1 jsp e New area gt subtab2 sp User configuration gt setldap e Users gt subtab1 jsp e Profiles gt subtab2 jsp System pages gt mer e Information gt subtab1 jsp System gt subtab2 Jsp IDE gt subtab3 jsp Support gt subtab4 Jsp gu
39. round color efflfe font x small gt lt S CurrUnit getVariable BUZZ_OUTPUT getDescrl gt lt td gt lt td width style background color efflfe font x small gt lt S CurrUnit getVariable BUZZ OUTPUT getDescription gt lt SPAN style border 1px solid black font size xx small gt tutto input lt SPAN gt lt td gt sero LTS lt td width 10 align center style background color efflfe font x small gt lt S CurrUnit getVariable L2 getRefreshableValue s gt lt td gt lt td width 10 align center style background color efflfe font x small gt lt td gt lt td width 10 align center style background color efflfe font x small gt lt CurrUnit getVariable L2 getDescr1 S gt lt td gt lt td width style background color efflfe font x small gt lt S CurrUnit getVariable L2 getDescription gt lt SPAN style border 1px solid black font size xx small gt solo name lt SPAN gt lt td gt lt tr gt lt table gt Cod 030220766 rel 1 2 del 31 01 08 24 Software Development Kit The 2 different methods presented are highlighted in the example the statement used to create the default all in one text field Is highlighted in yellow The lines highlighted in blue show how to use the more customisable version of the statement the user independently creates the input text field with the only link being setting the name and the
40. s according to the language used which in English are o Highest o High o Medium o LOW Logic string value TRUE or FALSE that indicates whether or not the alarm is logical If some of the fields are not available for example the alarm end time or the users and times of the various operations this will be given null values The following example shows a possible XML response packet lt responses gt lt response type alarmList gt lt alarm gt lt response gt lt responses gt name No connection starttime 2007 06 15 16 17 44 234 endtime ackuser acktime deluser deltime resetuser resettime iddevice 212 devicedescription IR 33 DIN C 1 idalarm 3017 idvariable 739 priority Hlghest islogic FALSE AL oe we oe AL Cod 030220766 rel 1 2 del 31 01 08 42 CAREL CAREL S p A Via dell Industria 11 35020 Brugine Padova Italy Tel 39 049 9716611 Fax 39 049 9716600 http www carel com e mail carel carel com SDK 030220766 rel 1 2 31 01 08
41. s status idline id_line address address code code isenabled enabled comport com_port baudrate speed typeprotocol protocol gt lt response gt lt responses gt Cod 030220766 rel 1 2 del 31 01 08 35 Software Development Kit The values in bold are set on the server side of the query as follows 4 4 a PEF PERE Id_device unique identifier of the device Description description of the device in the set language Status Integer value that indicates the status of the device The following values are possible o 0 device not connected o 1 device online o 2 device with alarm o 3 device disabled by the supervisor Id_line unique identifier of the line used by the device Address serial address that the device is connected to Code code of the device also indicated on the supervisor as the ID numeric code made up of the progressive number of the line configured in PlantVisorPRO followed by the decimal point and 3 digits that indicate the device serial line number Enabled TRUE or FALSE indicates whether the device is enabled Com_port code of the COM port that the device is connected to Baud rate device communication speed in baud Protocol type of protocol the following values are currently available in PlantVisorPRO o CAREL o MODBUS The following example shows a possible XML response packet lt responses gt lt response type devicesList gt lt device gt idDevice 212 na
42. s as follows ET iai TT sl Bla Su Sula Ara rana 3 Shoes oe Now the refreshable status has been added to the standard non refreshable status and provides an instant picture save for the refresh time of the status of the device Obviously the 2 states are completely independent and therefore on a real custom page only one of the 2 will be used according to requirements In addition on the top right is the refresh button used to manually refresh the page The display of the button is activated by the special PVPK_addButtons function Similarly the variables can be added with refresh and are always updated automatically by the framework An example of adding variables with refresh is shown below lt table border 0 width 100 cellpadding 1 cellspacing 1 style border 1px solid black gt LE lt td colspan 3 style background color 7788E E gt lt font color white gt lt b gt Main parameters refreshable lt b gt lt font gt lt td gt SLICES lt Er lt td width 10 align center style background color efflfe font size x small gt lt NOBR gt lt CurrUnit getVariable S3 getMUnit 5 gt lt NOBR gt lt td gt lt td width 10 align center style background color efflfe font size xX small gt lt CurrUnit getVariable H3 getDescrl gt lt td gt lt td width style background color efflfe font size x small gt lt CurrUnit getVariable H3 getDescrip
43. s developed in the standard version 5 webapps o C Plant isorPRO actsched D alrevnsearch QD alralb 5 alrsched G alrview a areaview datatransfer C2 devdetail deviceview devloglist O dtlview C2 evndtl O evnview O groupview B grpview Each directory contains JSP files that represent the TABS on the Supervisor interface and the corresponding functions Eventi gt dettaglio evento Dettaglio Login dell utente admin 10 0 0 13 Dettaglio evento ID 5130 Utente admin If a user wants to totally rewrite a certain function the framework of the PlantVisorPRO has been designed to check a specific physical path in the PC filesystem to see whether that function has a page rewritten by the user or the standard Is sued The following Is a practical example of this Assuming that a user needs to customise as in most cases the device detail page for the IO MODULE instrument In the standard version this function is implemented by the following JSP resource C Carel PlantVisorPRO engine webapps PlantVisorPRO app dtlview SubTab1 jsp Cod 030220766 rel 1 2 del 31 01 08 7 Software Development Kit The framework before starting a transaction checks the filesystem to see whether there is a custom version for the resource it is about to load In the example this must be located in CA Carell PlantVisorPRO engine webapps PlantVisorPRO custom dtlview 1o_module SubTab1 jsp If the
44. scrizione m Descrizione Descrizione di default Logic Device 1 il multilingua Italiana stato C Disabilitare il dispositivo gli allarmi eventualmente configurati nella sezione SCHEDULER non verranno gestiti In the figure the ID code of the instrument identifies the custom page inside the file name as follows lt Device code gt _Subtab1 jsp Example 2952_Subtab1 jsp Cod 030220766 rel 1 2 del 31 01 08 3 Software Development Kit On the other hand to get the codes of the variables and access the corresponding values the page with the list of descriptions is used Principale Variabili di allarme Config storici Lista descrizioni Variabili principali Logic Device 1 E possibile modificare le descrizioni di tutte le variabili del dispositivo nonch la relativa unit di misura Inoltre facendo riferimento all area a pi di pagina possibile inserire rimuovere unit di misura Codice Descrizioni variabili Stato del buzzek 191568 Stato del buzzer da seriale Gases Stato del rel l da serial Example CurrUnit getVariable 191568 getDescrl Cod 030220766 rel 1 2 del 31 01 08 32 Software Development Kit SDK Software development kit 1 Introduction to the function The XML query function Is used to access useful information deriving from the field controlled by PlantVisorPRO so as to manage an alternative or complementary external presentation to the one offered
45. t n occurrences lt request gt lt requests gt The packet must be contained within the lt requests gt tags which in turn should contain the access credentials between lt login gt tags A single XML Query can be used to send multiple requests each enclosed in the lt request gt tags and with one or more lt element gt tags according to the type of request being sent E Response from the server lt responses gt lt 1 occurrence lt response type type gt n occurrences lt results gt n occurrences lt response gt lt responses gt The lt responses gt tags contain one lt response gt occurrence for each lt request gt sent to the server These in turn contain the results corresponding to the request forwarded Cod 030220766 rel 1 2 del 31 01 08 34 Software Development Kit 2 3 Query for retrieving the list of devices This query requests the list of devices configured on the PlantVisorPRO site from the PlantVisorPRO engine The XML query packet indicates the list of the devices that needs to be retrieved while the response packet contains all the information defining a device 2 3 1 XML query packet The XML query packet will have the following format lt requesis gt lt login userName user password password gt lt request type devicesList language language code gt lt element iddevices id_devices gt lt request gt lt requests gt The terms in
46. the custom pages on the Supervisor The Enhanced scripting language has been replaced by the JAVA programming language and the pages on the graphic display are not simple HTML templates but rather JSP documents Java Server Pages The two main advantages of this new technology are 1 For the creation of new pages as the JAVA language Is very widely used by developers it is much easier to find people who know it and know how to use most of its functions 2 The introduction of JSP brings greater flexibility and development potential The syntax of the statements Is similar to the CAREL proprietary script All the statements must start and end with the following characters i D TT STE A gt The following is a simple example of the declaration of an integer variable lt int i 0 gt For complete details on the language and the creation of JSP files the official SUN documents are available at the following address http java sun com j2ee tutorial 1_3 fcs doc JSPIntro html Cod 030220766 rel 1 2 del 31 01 08 6 Software Development Kit 3 Installation All the various html files describing the Enhanced version are contained in the following directory C PlantVisor ServerComponents html Similarly the PlantVisorPRO project files are all contained in the following directory C Carel PlantVisorPRO engine webapps PlantVisorPRO The APP subdirectory then contains a directory containing all the groups of function
47. time refreshable mode save for the set refresh time As regards the jsp page the only statement required is the inclusion of a lt DIV gt as a marker for where the refresh framework will fill the table of alarms generated by the XSL style sheet lt TR gt lt TD colspan 2 align center valign top style font weight bold gt lt table width 100 gt lt tr gt lt th gt Refreshable alarms lt th gt LIET lt TR gt lt TD colspan 2 valign top gt lt TD gt lt TR gt lt table gt lt TD gt lt TR gt Cod 030220766 rel 1 2 del 31 01 08 25 Software Development Kit Highlighted in yellow is the line containing the div where framework will enter the result of the XSLT conversion according to the example provided previously The result of this operation can be seen in the following figure bte i renali later met Lepini Us i aia paria De Refreshable alarms tacere ogee A ta bn le 9 DEVICE DETAIL FOLDER As regards the device detail the association between DEVICE and FOLDER where the corresponding JSP files are located Is described in the following table pCO air handling unit FLSTDMAHUA amp gt version 1 8 pCO Rack controller 1 3 compr EPSTD FC2A Cod 030220766 rel 1 2 del 31 01 08 26 Software Development Kit R33 Y LS A meella_vi Modular chiller HP 1 4 comp MCOE type 0 master mod_ch_14_0m mod_ch_14_0s mod_ch_14_1m Power compact M v 2
48. tion gt lt td gt CELS lt table gt Cod 030220766 rel 1 2 del 31 01 08 21 Software Development Kit In this example the point of greatest significance Is the statement highlighted in yellow this statement requests the value of the variable from the SDK framework and in the meantime records the variable for refreshing The result can be seen in the following figure where the device that returns online has been detected in the areas recorded as refreshable Periferica non collegata Qi Ove eee pie i D io ae SDK also includes other types of buttons For the correct operation of these the command to import the UserSession object needs to be added to the page header therefore we will create an object called sessionUser lt page import com carel supervisor presentation session UserSession gt lt UserSession sessionUser ServletHelper retrievesession request getRequestedSessionld request gt Following this we will add a button anywhere on the page for setting a parameter public String getSimpleButton int pageld String value String srcImage String shortDesc Esempio lt CurrUnit getVariable OK_RST_AL getSimpleButton 100 1 images button reset png Alarm reset gt The function uses the following parameters e pageld number that uniquely identifies the button on the page value value to be set for the variable srcimage string containing the path of the I
49. uest gt lt requests gt 2 7 2 XML response packet The XML response packet to this query will have the following format lt responses gt lt response type alarmList gt lt alarm gt name alarm_description starttime time_start endtime time_end ackuser user_acknowledge acktime time_acknowledge deluser user_cancel deltime time_cancel resetuser user_reset resettime time_reset iddevice id_device devicedescription device_description idalarm id_alarm idvariable id_variable priority priority islogic logic lt response gt lt responses gt Cod 030220766 rel 1 2 del 31 01 08 4 Software Development Kit The values in bold are set on the server side of the query as follows EEPFEFEEFERERER 4 Alarm_description text description of the alarm Time_start instant the alarm started Time_end instant the alarm ended null if still active User_acknowledge user who acknowledged the alarm Time_acknowledge instant the alarm was acknowledged User_cancel user who cancelled the alarm Time_cancel instant the alarm was cancelled User_reset user who reset the alarm Time_reset instant the alarm was reset Id_device identifier of the device with the alarm Device_description text description of the device with the alarm Id_alarm identifier of the alarm Id_variable identifier of the alarm variable Priority indicates the priority of the alarm and have 4 different value
50. ustom js file already described previously function PVP_OnLoad sFolder sResource sDevice Cod 030220766 rel 1 2 del 31 01 08 20 Software Development Kit Highlighted in yellow is the statement that activated the refresh every 2 seconds that is the minimum time to ensure the server Is not overloaded with refresh requests The first step is to add the status LED with refresh to the page lt table border 0 width 100 height 100 cellpadding 1 cellspacing 1 gt LES lt td valign middle width 5 align center gt lt Sfera assint CurrUnit getStatus lt img src images led L0 gif gt lt img src images led Ll gif gt lt img src images led L2 gif gt lt img src images led L3 gif gt 5 gt lt td gt lt td valign middle width 5 align center style border lpx solid black gt S gt lt br gt lt span style font size xx small gt Refreshable lt span gt lt td gt lt td valign middle width align left gt lt font size 4 gt lt b gt lt CurrUnit getDescription gt lt b gt lt font gt lt td gt lt td valign middle width 5 align right gt lt b gt lt S CurrUnit getLine gt lt b gt lt td gt lt tr gt lt table gt As described previously with this call the device status LED is added mapping the different colours of the object with the values returned for the status The result which is refreshed by the framework i
51. ve been loaded into the memory a FOR cycle can be used to loop the following procedure For each alarm currently pointed to the information can be retrieved In the example described above the following are retrieved e Date of the alarm e Description of the alarm The block of code integrated with the rest of the example creates a page shown in the following example 3 Pal YiorPR0 Micresedl biernet Explorer 5o0gha alta di allarme per la sonda 1 FS allarme disabilitato Soglia bassa di allarme per la sonda 1 FS allarme disabAtato Sogha alta di allarme per la sonda 2 FS allarme disabilitato Soglia bassa di allarme per la sonda 2 FS allarme disabAtato Soglia alta di allarme per la sonda 3 FS allarme disabilitato Soglia bassa di allarme per la sonda 3 FS allarme disab itato Operazione com MA briranat locale x che The functions presented until now have a corresponding version with refresh associated with the function of the framework that manages the automatic update of the page without reloading it in the browser In order to use the following function the data refresh ability must be activated with PVPK_ActiveRefresh Continuing then with the creation of the page the variables already entered in static mode will be joined by the corresponding refreshable versions so as to highlight the differences and in particular the effective refreshing of the values The activation of the refresh function is added to the c
52. y physical that is belonging to the device and read in the field Priority progressive integer that indicates the order of presentation in the device detail in PlantVisorPRO Read write numeric value that indicates whether the parameter Is read only or read write o Value 1 the parameter is read only not modifiable by the user o Value 1 the parameter is read write Minimum_value minimum value possible for the parameter Maximum_value maximum value possible for the parameter Short_description short text description of the parameter This Is essentially the parameter code as shown on the instrument Long_description long text description of the parameter This may contain details on the meaning of the parameter as well as information on the meaning of the values that can be set The following example shows a possible XML response packet lt responses gt lt response type parametersList gt lt device name IR 33 DIN C 1 iddevice 212 gt lt variable gt lt device gt lt response gt lt responses gt name Status of compressor relay value 1 0 type 1 idvar 800 islogic FALSE priority 5 readwrite 1 minvalue 0 maxvalue 1 shortdescr rl cmp longdescr Cod 030220766 rel 1 2 del 31 01 08 38 Software Development Kit 2 5 Query for setting the parameters in the field This query requests the PlantVisorPRO engine to set the value of the parameters in the field The XML query indic

Download Pdf Manuals

image

Related Search

Related Contents

  les transparents  タブレットスタンド取扱説明書 TBS-SK    Benutzerhandbuch  METCAL SP200 SYSTEM USER GUIDE  ZN-DNT352XE-MIRQuick User Guide  Toastmaster GRB72P Kitchen Grill User Manual  ICC19x User Manual 001 E    

Copyright © All rights reserved.
Failed to retrieve file