Using libraries

Topics:

  1. Use of libraries [++]
  2. Version check [++]
  3. Fix library versions [+]

Use of libraries

PLC libraries are referenced as placeholders.

Details can be found in chapter Library placeholders of the TwinCAT 3 PLC documentation.

Version check

PLC libraries contain a global constant of the type ST_LibVersion, where you can find information about the library version. This constant can be read during runtime and compared with a required library version, using the function F_CmpLibVersion (see Tc2_System library).

Fix library versions

When attaching a reference as a library placeholder, the library is attached with the version '* / newest version'.

As soon as an archive (e.g. PLC archive or TwinCAT archive) is created or the TwinCAT configuration is activated on the target system, however, the library versions should be fixed. The easiest way to do this is to use the 'Set to Effective Version' command in the context menu of the reference node.

Please also note the further information on the topic Project delivery.

 

See also: