Giter VIP home page Giter VIP logo

ae-tiax's Introduction

Collection of application examples for TIAX use cases

TIAX use case

The TIAX use case is a workflow, which converts a library written in ST and SIMATIC AX to TIA Portal global library for TIA Portal > V18

Which examples can you find in ths application example

This application example shows two different use cases. To read the description of the use cases, just follow the link below.

  1. Traffic light : A traffic light which is realized with the statemachine library.
  2. Parking Counter : A simple parking counter simulation
  3. JSON serializer (in work) : A JSON structure created with the usage of the JSON library can be filled with parameters and serialized to an ARRAY OF CHAR.
  4. Further ideas? Just create an issue or even better a pull request.

How to install the application example on your local PC?

Run the following commands in a CLI

apax create @simatic-ax/ae-tiax --registry https://npm.pkg.github.com ae-tiax
axcode ae-tiax

Before you can use the application example, you've to install all the dpendencies with:

apax install

AX Code starts with the content of the application example

How to generate a TIA Portal global library

Setup:

Before we can create the TIA Portal global library, please check, if the TIA_PORTAL_INSTALL_PATH in the .env file points to your TIA Portal installation.

Default value of TIA_PORTAL_INSTALL_PATH:

TIA_PORTAL_INSTALL_PATH="C:\Program Files\Siemens\Automation\Portal V18\Bin"

Steps to create a TIA Portal global library

  1. Compile the ST code with apax build
  2. Export the compiled library into HandoverFiles with ax2tia...
  3. Import the HandoverFiles with the TIA Portal Importer.exe

That can be done manually step by step. Or you can use the predefined scripts in the apax.yml

  1. The scripts in the apax.yml

    To make the creation of the library easier, in the apax yml are some scripts predefined:

    scripts:
      export-tialib: ax2tia -i bin/1500/*.lib -o "bin/$LIBRARY_DOCUMENTS_FOLDER"
      import-tialib: '"$TIA_PORTAL_INSTALL_PATH/Siemens.Simatic.Lang.Library.Importer.exe"
        -i "./bin/HandoverLibraryDocuments" -o "./$GLOBAL_LIBRARY_PATH" -u'
      create-tialib:
        - apax build
        - apax export-tialib
        - apax import-tialib
    • export-tialib : generates the HandoverFiles
    • import-tialib : Import the HandoverFiles and creates the TIA Portal global library
    • create-tialib : Executes the steps: build, export, import
  2. Set the library version

    Adapt the version of the TIA Portal global library in the file apax.yml

    name: "@simatic-ax/ae-tiax"
    version: 0.0.1
    type: lib

    for the first run, it can be kept at 0.0.1. If you create it a second time, please mind, that the same version must not exist in the gloabal library.

    • via user interface
  3. Create the TIA Portal global library

    Via command line
    1. just call the apax script create-tialib via command line

      apax create-tialib
    2. wait until the import process is finished

      finished

    Via user interface
    1. click on

      run script

    2. select

      select

    3. wait until the import process is finished

  4. Find the imported TIA Portal Global Library

    The generated global library you'll find in the following folder:

    output

    If you want to adapt the name of the library (and output directory), you can modify the apax.yml

    variables:
     GLOBAL_LIBRARY_PATH: "TIAPortalGlobalLibrary"

    This library can now opened in TIA Portal >= V18

Generated Wrapper

The following Wrapper Function Blocks will be generated into the library. They can be used in TIA Portal.

  • TrafficlightWrapper
  • JsonStructure
  • ParkingCounterWrapper

Contribution

Thanks for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section or, even better, is free to propose any changes to this repository using Merge Requests.

Markdownlint-cli

This workspace will be checked by the markdownlint-cli (there is also documented ho to install the tool) tool in the CI workflow automatically.
To avoid, that the CI workflow fails because of the markdown linter, you can check all markdown files locally by running the markdownlint with:

markdownlint **/*.md --fix

License and Legal information

Please read the Legal information

ae-tiax's People

Contributors

beckersts avatar huskyre avatar kruegerfelix avatar simatic-ax-bot avatar sjuergen avatar web-flow avatar

Stargazers

 avatar  avatar  avatar

Forkers

sjuergen75

ae-tiax's Issues

TIAX Export not possible with newest ax2tia package

Describe the bug
The TIAX Export gives an error message when a newer version of ax2tia is used. It works fine with sdk 3.0.10 and ax2tia 4.2.10, but not after apax update to 3.0.12 and 4.4.16

To Reproduce
Steps to reproduce the behavior:

  1. Open the project
  2. Run apax update (all)
  3. Run apax create-tialib

Screenshots
image

update pack content

Currently after apax create the project is build out of its pack-content, which unfortunatly do not ship the current files :

  • .env
  • .gitignore
    These would be helpful for the user to get a better head-start working with the application example with less complications.
    I'am fine with the other files being removed for initiating a project.

In addition there are files being shipped with the package which feel strange like :

  • bin/HandoverLibraryDocuments
  • changelog.md
  • CODEOWNERS
    Whereof I believe that we do have not control of CODEOWNERS being shipped ?!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.