1 / 32

Unity Application Generator

Learn how to generate CiCode functions for control modules in the physical layer using XML. Customize the format of the exported XML file and transform it into a text file with required format using nxslt.exe utility and a stylesheet.

ccarlton
Download Presentation

Unity Application Generator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unity Application Generator How Can I… Generate CiCode for a control module using XML

  2. Issue • I want to generate a the CiCode function for each control module in the physical layer • I should be able to select different variables from my Control module.

  3. How to do..Basic explanation • UAG supports exporting of project using XML and text format. • The format of the exported file with XML can be customized using style sheet. • Generation of the a text file can be done by: • Exporting the project in XML format. • By using standard tool for transforming the XML file into text file with pre defined format can be done by using standard software utilities like nxslt.exe. • Using this utility and style sheet, the exported file from UAG can be transformed into text file with required format.

  4. How to do..In Windows • Create a file named “conv” on the “C:” root • Copy “nxslt.exe” and “Extract_CiCode_CiExp.xsl” from powerpoint into the folder “conv”. • Create an “transformPAL.cmd shortcut” on the desktop. This command file is available in the powerpoint. • Using an UAG export File with CiExp variable • Modify the stylesheet

  5. In Windows, on “c” drive, please create a folder “conv” How to do..In Windows

  6. How to do..In Windows • Copy these files : • “nxslt.exe”, • “Extract_CiCode_CiExp.xsl” • “transformPAL.cmd” Into the folder “conv” Note: In this style sheet, we are extracting variables “Stat1, Stat2”. Please open the style sheet with any editor to have more details

  7. How to do..In Windows • Create a shortcut of a “tranformPAL.cmd” in desktop of your computer

  8. How to do..On the style sheet • This stylesheet is used to transform an UAG xml file in CiCode txt file • The usedCiCode is “CheckAccumFunc” • The format written to the txt file is : • To simplify this things You can write : • CheckAccumFunc(ParentPath\FullvariableNames_1, ParentPath\FullvariableNames_2)

  9. How to do..On the style sheet Here, the header of the Style, This part can be modified :

  10. How to do..On the style sheet Change the name of highlighted variable below in blue. This ones will be search on the XML export files. We have to make sure that variables is available on the XML files Now the Style sheet is ready to work, we can do the manipulation to transform your XML files in CiCode txt file…

  11. How to do..In UAG There are two possibilities : • First possibility We already have the CiExp SCODE on your UAG Process, in this case you can go to the slide 24 • Second possibility you don’t have it, go to the next slide and follow the procedure.

  12. Open the Scod Editor, open “UAGProcessLibVCV2.0.osl”: Usually the path is : C:\Program Files\Schneider Electric\Unity Application Generator\Db How to do..In SCOD Editor

  13. We have this windows We can see all SCoDs in the library We are going to create a new SCoDe with CiExp How to do..In SCOD Editor

  14. We Copy/past the SCoDe “MOT1D1S_P20” How to do..In SCOD Editor

  15. We have a new SCoDe It name is SCoD1, so we have to remane it. (For example : MOT1D1S.RiT) How to do..In SCOD Editor

  16. To rename this variable, the procedure is : Rigth click on SCoD1 => Properties Modify the name How to do..In SCOD Editor

  17. The result is… How to do..In SCOD Editor

  18. Now we creat a new variable It name is “CiExp How to do..In SCOD Editor • To create a new variable the procedure is : • Right click on variable • Chose new variable

  19. Fill the case like below And Click “OK” How to do..In SCOD Editor • Now we have a new variable. • You have to add a property

  20. Goes to the properties tab How to do..In SCOD Editor • To create a new property the procedure is : • Right click on property • Chose new SCoD property • In general tab • Follow the animation • In position tab • Follow the animation

  21. Goes to the properties tab How to do..In SCOD Editor • To create a new property the procedure is : • Right click on property • Chose new SCoD property Click • In general tab • Follow the animation • In position tab • Follow the animation

  22. How to do..In UAG • We created a new SCoD on the process Library, but it can not be used on UAG. To make the SCoD available we are going to validate the new scod. • Open the project in UAG. There will be a message to update the customization. • Use the new SCoD • Check the variables created, • Properties etc.

  23. How to do..In UAG • We create a new project on UAG with our updated Process Library as Below

  24. How to do..In UAG • Export the project ..

  25. How to do..In UAG • …on the “conv” document • Chose an export file name for example PALexport

  26. How to do..In UAG • After a success export…

  27. How to do..In UAG • …file was created in a “conv” document here

  28. How to do..In UAG • In the CONV folder, drag the exported file and..

  29. How to do..In UAG • … and drop on the shortcut “transformPAL”

  30. How to do..In UAG • A windows appear, the conversion work • When its done press a key

  31. How to do..In UAG • A new file is created on the conv file here • When its done press a key

  32. How to do..In UAG • The file should look like this: • NOTE: The path and the name of exported file can be modified by: • Right Click on the cmd file (transformPAL.cmd) • Change words in BOLD on the command line : “nxslt.exe %1 PALInitialvalues.xsl -o c:\conv\PALUAG.txt”

More Related