The TIAX Lib template for Apax - Manual - AX2TIA - This package contains the documentation for ax2tia - Converting SIMATIC AX libraries to TIA Portal libraries,

AX2TIA CLI Tool (ax2tia)

Portfolio
SIMATIC AX
Product
AX2TIA
Software version
9.1.8
Edition
11/2024
Language
English (original)
Package Name
@ax/ax2tia-docs

The TIAX Lib template contains a configuration and some default folders so that the development of a library for the TIA Portal can be started directly. It is used by the create command in step 3 of chapter Create a SIMATIC AX library.

You can also start creating an AX library in the standard way and add ax2tia manually:

apax create lib my-library
apax add --dev @ax/ax2tia
Then copy the parts you require from the TIAX Lib template to your apax.yml and adjust them to your needs.

The TIAX Lib template shows some scripts to execute exports and imports more conveniently. Running apax create-tialib in a terminal will conveniently build, export and import the library in one step. The default storage location for the TIA Portal global library generated is the ./tiap-library folder.

# General information
name: "my-sample-tia-lib"
version: 0.0.1
type: lib
keywords:
  - library
  - tiax
author: <Name>
# Description will be displayed in the apax extension
description: <Description for your tiax-library>
# Targets which will be compiled with 'apax build'
targets:
  - "1500"
  - "llvm"
# Install settings
installStrategy: strict
apaxVersion: 3.2.1
# Dependencies
devDependencies:
  "@ax/sdk": ^2405.0.0
  "@ax/ax2tia": ^9.0.0

# Environment variables
variables:
  # an arbitrary directory that can be chosen freely
  PATH_NAME: "./bin/handover-folder"
  # you can change the predefined output path where the TIA Portal library will be generated
  TIA_GLOBAL_LIB_PATH: "./tiap-library"
  # set the path to your local TIA Portal installation
  TIA_INSTALL_PATH: "C:\\Program Files\\Siemens\\Automation\\Portal V19"
  # remove, if you do not want to allow debugging of your code
  APAX_BUILD_ARGS:
    - "--debug"

# Apax scripts
scripts:
  # transfer an AX Library to handover library documents for a TIA Library
  export-tia-handover-documents: ax2tia -i ./bin/1500/*.lib -o "$PATH_NAME"
  # convert library handover documents into a global library for the TIA Portal.
  import-handover-documents-to-tia: '"$TIA_INSTALL_PATH\\bin\\Siemens.Simatic.Lang.Library.Importer.exe"
    -i "$PATH_NAME" -o "$TIA_GLOBAL_LIB_PATH" -u'
  create-tialib:
    - apax build
    - apax export-tia-handover-documents
    - apax import-handover-documents-to-tia

# Files, which will be shipped with the library
files:
  - bin
  - tiap-library

NOTICE

It is recommended to surround variable names and paths with a quote, as otherwise errors could occur due to whitespaces inside names and paths.

Update the TIA_INSTALL_PATH with the actual installation path and version of TIA Portal used. The path and version shown above is just for illustration.