Internal subroutines In contrast to the subroutine technique discussed in the previous section, ROUTINEs (internal subroutines) must be directly embedded in the main program. ROUTINE can be called repeatedly from the main program.ROUTINE definition need not be in ascending order or contiguously. The instruction CALL ROUTINE(no); is used for calling a ROUTINE from the main program. Advantages of internal subroutines compared with PROBLEM subroutines: – reduced number of SET and MUX settings – the same local variables as in the main program can be used (no parameter transfer / acceptance required) – clearer programming – saves computing times
Operands, Addressing, Instructions and Operators Operands
The data available in TML (see Chap. 6) are distinguished by their respective data type. The following data types are distinguished: – Analog data (= signed decimal numbers) with different precision (10–4, 4 bytes or 10–9, 6 bytes), exponential representation – Digital data (= integers with or without sign) – Binary data – Time counter data; combined data type consisting of an integer part (value of the time counter) and binary part (status of the time counter): “0” ^ = running, “1“ ^ = elapsed) – Strings (= character strings, integer number of characters)
Four types of string can be distinguished
The data can be available as – Constant Like auxiliary cells, constants can be defined at any time in a TML line. Analog constants can be, for example: 123.45 or 0.00012345 or 1000.5 –3.141 or 0 or 1 Auxiliary cells, which are subdivided into (local) analog (LA) and (local) binary (LB) auxiliary cells, are used for storing intermediate results either a few lines later or for data transfer to/from a subroutine (cf. subroutine call instruction CALL ...) 256 auxiliary cells (LB0 ... LB255 and LA0 ... LA255) are available. An auxiliary cell is defined as soon as it is addressed for the first time. As many LB/LA auxiliary cells are created automatically as are specified by the highest number.
Professional service
In industrial automation, if you're looking for a new product or production of remaining parts, our knowledgeable and friendly colleagues can help you gain the required things, with our competitive prices, we will be proud to provide you with the necessary spare parts inventory
Superior products
Main products include DCS control system spare parts, PLC system spare parts and robot system spare parts,
Advantage brands: Allen Bradley, BentlyNevada, ABB, Emerson Ovation, Honeywell DCS, Rockwell ICS Triplex, B&R, FOXBORO, Schneider PLC, GE Fanuc, Motorola, HIMA, TRICONEX, Prosoft and other imported industrial parts