You are here: Foswiki>IC Web>AcoindToolGsiTgt (22 Mar 2019, ChristianMueller)Edit Attach

GSI_TGT


Date: 19-03-22

Status: under development

Inhalt


Aufgabe des Tools

Der CERN UAB ist in der Verson 1.10 nicht in der Lage fehlerfrei TIA-Portal-Projekte zu erzeugen. GSI_TGT dient dazu, aus generierten Sourcen und Skeleton-Projekt ein lauffähiges TIA-Portal-Projekt zu erzeugen. Aktuell verwendetete Version: GSI_TGT V1.10

Installation

Den Inhalt des Ordners \\winfilesvm\BEL$Root\belgroup\Projekte\IC\otherTools\GSI_TGT\development\GSI_TGT_v1_2_0\Inst in ein lokales Verzeichnis kopieren.

Manuell Generieren

  1. GSI_TGT im lokalen Installationsverzeichnis aufrufen
  2. Mittels UAB die Instanzen und Logik durchgenerieren
  3. Mittels UAB das Projekt aus Skeleton erstellen:


  4. Baseline Baustein aus Baseline ucpc-plc-tia-0.4.zip unzippen:


  5. Projekt öffnen mittels Tools TGT
  6. DB-Struktur renummerieren bzw. erstellen
    • IO/DB create xlsx



    • DB-Nummer aus DB.txt (unter \Output\TIAInstanceGenerator) auskopieren

    • Trennen nach „:“

    • „;“ „_“ löschen


    • DB erstellen aus korrigierter Excel-Liste (Tia Projekt sollte offen sein)
  7. PLC-Tags (CERN-Standard Variable) importieren




    Das Ergebnis sollte folgendermaßen aussehen: (evtl. Warnung ignorieren):

  8. SCL-Dateien importieren und übersetzen (Baseline)
    • Dateien importieren




    • INP importieren (1_Compilation_Baseline.INP.):




    • Übersetzen



      Yes to all anklicken
  9. Schritte 8a..c für 2_Compilation_Instance.INP. durchführen:


  10. Schritte 7a..c für 3_Compilation_LOGIC.INP. Generated by the logic generator
  11. Schritte 7a..c für 4_Compilation_OB.SCL. Generated by the instance generator

  12. Sind User defined *.scl files vorhanden , ist in der 2_GSI_Compilation_Gen.INP die Aufrufliste zu ergänzen. (Alle zusätzlichen Funktionsnamen sind einzutragen)

Scriptgesteuertes Generieren

Die Möglichkeit, den oben beschriebenen Vorgang automatisch ablaufen zu lassen, ist ab der Version 1.20 implementiert. Die Automatisierung erfolgt durch eine Batch-Datei. Das TGT_GSI kann Kommandos empfangen, die von einer weiteren EXE namens GsiTgtCmd gesendet werden können. Eine Liste aller verfügbaren Kommandos kann auf der Kommandozeile mit TGT_GSI.EXE -h erzeugt werden. Das Ergebnis wird in der Datei log.txt im selben Verzeichnis abgelegt.

Die unten beispielhaft dargestellte Batch-Datei muss für das jeweilige Projekt angepasst werden, insbesondere sämtliche Pfade im oberen Bereich der Datei.

Beispiel einer Batch-Datei

@rem This batch imports all UAB generated SCLs and according DBs and symbols to a skeleton project
@rem pathes to tools
@set GSI_APP_PATH=D:\cm\exe\GSI_TGT
@set GSI_APP_EXE=%GSI_APP_PATH%\GSI_TGT.exe

@rem paths to project
@set PRJ_PATH=D:\csoic\Cryo\Projects\SIS100\RQS1
@set PLC_NAME=BELDEV0815

rem pathes to sub dirs of project
@set INST_PATH=%PRJ_PATH%\Output\TIAInstanceGenerator
@set LOGIC_PATH=%PRJ_PATH%\Output\TIALogicGenerator
@set TIA_PRJ_PATH=%PRJ_PATH%\Output\TiaProjectGenerator

@rem build process
%GSI_APP_PATH%\GsiTiaCmd -serve %GSI_APP_EXE%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -log %PRJ_PATH%\Log\create_tiaprj.log
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -openPrj %TIA_PRJ_PATH%\RQS1\RQS1.ap13 1
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -convertDb %INST_PATH%\DBs.txt %INST_PATH%\DBs.xlsx
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -importDb %GSI_APP_PATH% %INST_PATH%\DBs.xlsx %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -importTags %GSI_APP_PATH% %INST_PATH%\PLCtags.xlsx %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -importSCLs %PRJ_PATH%\Baseline\ucpc-plc-tia-0.4\1500 *.scl %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -compileINP %INST_PATH%\1_Compilation_Baseline.INP %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -importSCLs %INST_PATH% *.scl %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -compileINP %INST_PATH%\2_Compilation_instance.INP %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -importSCLs %LOGIC_PATH% *.scl %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -compileINP %LOGIC_PATH%\3_Compilation_LOGIC.INP %PLC_NAME%
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -compileFile 4_Compilation_OB.scl %PLC_NAME%
@if errorlevel 1 goto error
@rem %GSI_APP_PATH%\GsiTiaCmd -compileHw %PLC_NAME% 1
@rem @if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -savePrj
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -closePrj
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -closeLog
@if errorlevel 1 goto error
%GSI_APP_PATH%\GsiTiaCmd -stop

@echo "+--------------------------------------------------+"
@echo "|  Generation of PLC project finished successfully |"
@echo "+--------------------------------------------------+"
@goto end

:error
%GSI_APP_PATH%\GsiTiaCmd -closePrj
%GSI_APP_PATH%\GsiTiaCmd -closeLog
%GSI_APP_PATH%\GsiTiaCmd -stop
@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@echo "!!!!             Error during execution         !!!!"
@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
:end

Liste aller verfügbaren Kommandos

GSI TIA-Portal Application V1.2.0.0

available options:
-serve         start server instance to communicate with TIA portal <commPath>
-stop          stop running server instance 
-openPrj       open project, param <prj> <quiet>
-closePrj      close project
-savePrj       save current project
-log           set log file <logfile>
-closeLog      close log file
-iscl          include SCL file to project,params <scl> <scl> ...
-convertDb     convert DB file (*.txt to *xslx) <dbfile> <excelFile>
-importDb      import DB file to project (*xslx) <appPath> <excelFile> <PlcName>
-importTags    import tags to project (*xslx) <appPath> <excelFile> <PlcName>
-importSCLs    import SCL files from directory to project <directory> <filterMask> <PlcName>
-compileINP    read INP file and compile <INPfile> <PlcName>
-compileFile   compile one file <fileName> >PlcName>
-compHw        compile Hardware <PlcName> <rebuild>
-compSw        compile Software
-h             print help on console
I Attachment ActionSorted descending Size Date Who Comment
1592a583395df202caad021b074b4ad5.pngpng 1592a583395df202caad021b074b4ad5.png manage 193 K 22 Mar 2019 - 08:00 ChristianMueller Auto-attached by ImagePlugin
297e14c507ff8d07a25521fa26819913.pngpng 297e14c507ff8d07a25521fa26819913.png manage 71 K 22 Mar 2019 - 08:03 ChristianMueller Auto-attached by ImagePlugin
44fd8368d6153826c045df62870f42a8.pngpng 44fd8368d6153826c045df62870f42a8.png manage 121 K 22 Mar 2019 - 08:03 ChristianMueller Auto-attached by ImagePlugin
4aaed994bc9b99d0f07b192ef2fc00dd.pngpng 4aaed994bc9b99d0f07b192ef2fc00dd.png manage 234 K 22 Mar 2019 - 07:56 ChristianMueller Auto-attached by ImagePlugin
51235fdf854af06d17c672fc8eda1877.pngpng 51235fdf854af06d17c672fc8eda1877.png manage 134 K 22 Mar 2019 - 08:00 ChristianMueller Auto-attached by ImagePlugin
630d275847fd7c7ffa02932dfbbcd924.pngpng 630d275847fd7c7ffa02932dfbbcd924.png manage 57 K 22 Mar 2019 - 08:03 ChristianMueller Auto-attached by ImagePlugin
6f43540a8db1e98ee91febb59a6d777b.pngpng 6f43540a8db1e98ee91febb59a6d777b.png manage 61 K 22 Mar 2019 - 08:03 ChristianMueller Auto-attached by ImagePlugin
88ea7593f551c3bc9fc8ba39eabda17b.pngpng 88ea7593f551c3bc9fc8ba39eabda17b.png manage 77 K 22 Mar 2019 - 07:56 ChristianMueller Auto-attached by ImagePlugin
bf7cb2b74eb356aba56b07d1ae0d25c9.pngpng bf7cb2b74eb356aba56b07d1ae0d25c9.png manage 386 K 22 Mar 2019 - 08:00 ChristianMueller Auto-attached by ImagePlugin
dab1f2cc285e66cd8da0254ac8a1136e.pngpng dab1f2cc285e66cd8da0254ac8a1136e.png manage 250 K 22 Mar 2019 - 07:56 ChristianMueller Auto-attached by ImagePlugin
dab37e776aedf0d6686332c2109c3a0f.pngpng dab37e776aedf0d6686332c2109c3a0f.png manage 106 K 22 Mar 2019 - 08:00 ChristianMueller Auto-attached by ImagePlugin
dfe1a81ef8c8673f2c8a55e33cb52fff.pngpng dfe1a81ef8c8673f2c8a55e33cb52fff.png manage 132 K 22 Mar 2019 - 08:00 ChristianMueller Auto-attached by ImagePlugin
ee3479992681e3202c3fd8fbc7f7bed6.pngpng ee3479992681e3202c3fd8fbc7f7bed6.png manage 213 K 22 Mar 2019 - 08:03 ChristianMueller Auto-attached by ImagePlugin
ef9c27f04c78cffff457be6b9279df0b.pngpng ef9c27f04c78cffff457be6b9279df0b.png manage 87 K 22 Mar 2019 - 08:00 ChristianMueller Auto-attached by ImagePlugin
f61331fe9177bb20399f28fe1ba019ff.pngpng f61331fe9177bb20399f28fe1ba019ff.png manage 111 K 22 Mar 2019 - 08:03 ChristianMueller Auto-attached by ImagePlugin
f944b85155106bfe99d8c991d17fa1a9.pngpng f944b85155106bfe99d8c991d17fa1a9.png manage 19 K 22 Mar 2019 - 08:03 ChristianMueller Auto-attached by ImagePlugin
Topic revision: r2 - 22 Mar 2019, ChristianMueller
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback