The instruction DIG (...) transforms the representation of analog data or analog results in a digital representation such that the digits before the decimal point are stored in mantissa 1 and the digits after the decimal point in mantissa 2. The transformed value can then be assigned, for example, to an element of type I or ID. Due to the binary representation in the 2’s complement, mantissa 1 of negative numbers contains the next smaller integer value. For example: –0.5 becomes –1, not 0.TML lines are always executed from left to right without priority rules. This sequence may be changed using parentheses. Up to 10 parentheses (open/closed) may be used. Parentheses can be used in arithmetic or logic operations. The parentheses must be matched within one line.
Result assignment
A single variable or an expression for combining variables (arithmetic or logic operation, digitizing, parentheses) is to the left of the assignment symbol. The variable to which the result is to be assigned is to the right of the assignment symbol. Binary operation results can only be assigned to binary variables, analog results only to analog variables. Binary variables are of data type Binary data Time counter states Error codes Data codes Analog variables are of data type
A result can be assigned to several variables.
The CHECK algorithm is only executed if the corresponding variable has been parameterized or interconnected and if the variable has a CHECK code. It is not executed after TML access. If TML is used to assign a value to this kind of variable (e.g. ... = :.X;) and a check is to be performed, the CHECK block function must be called up explicitly (CALL ANW.CHECK). Cf. Chapter 10.7.6 (subroutines). Peculiarities: The time counter state in TML is user–controlled. This means that if a value is to be assigned to a time counter, the time counter state must be reset explicitly if it is to be sensed in the same cycle. The system automatically resets the time counter at the first decrement.
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