What is the opposite value command for plc?
For example, after a real operation, I want to take the opposite value (for example, 2.0e+01 becomes -2.0e+01). What command should I use? Of course, you can multiply by -1, I just want to know if there is a direct command: 1. The real number is the conversion signal state (the sign bit of the mantissa). That is multiplied by -1.
2. For example, after a real operation, I want to take the opposite value (for example, 2.0e+01 becomes -2.0e+01). What command should I use?
Apply NEGR to negate the floating-point number (32-bit, IEEE-FP):
The floating point number (32 bits, IEEE-FP) in the accumulator 1 can be negated using the NEGR (inverted to 32-bit IEEE floating point number) instruction. This instruction converts the signal state of the bit 31 in accumulator 1 (the sign bit of the mantissa). The result is stored in the accumulator 1.
3. Example:
LID8// loads the value into accumulator 1 (for example: ID8=1.5E+02).
NEGR// inverts the floating point number (32 bits, IEEEFP); the result is saved to accumulator 1.
TMD10// transfers the result to the storage double word MD10 (for example: result = -1.5E+02).
UV Screen Protector,UV Curing Machine,UV Curing Screen Protector
Shenzhen Jianjiantong Technology Co., Ltd. , https://www.tpuprotector.com