Reference programming Valid characters The identifiers should only contain the following letters, digits and special characters: 0...9, A...Z, a...z, Remarks All identifiers should be specified in English. Version check Each library must contain a function in which the following information is stored: Version number TwinCAT version under which the library was generated Date (American format) Programmer Comments The version number must be readable during program run-time. The version number consists of three numeric values. Each value can be read individually (see example). In order to make the function name unambiguous, it will contain the name of the library.
Example from the library TcBABasic.lib: FUNCTION F_GetVersionTcBABasic : UINT VAR_INPUT nVersionElement : INT; END_VAR VAR END_VAR (* Version history: Date | Version | created under | Author | Remark ---------------------------------------------------------------------------------------- 10/01/2001 | 1.0.0 | V2.7.0 (Build 402) | S. Mustermann | first release *) CASE nVersionElement OF 1: (* major number *) F_GetVersionTcBABasic := 1; 2: (* minor number *) F_GetVersionTcBABasic := 0; 3: (* revision number *) F_GetVersionTcBABasic := 0; ELSE F_GetVersionTcBABasic := 16#FFFF; END_CASE TX1200 251 Version: 1.3