Simple Arithmetic Operation - Omron CS1W-MCH71 Operation Manual

Sysmac cs/cj-series
Hide thumbs Also See for CS1W-MCH71:
Table of Contents

Advertisement

Command Details
6-3-6

Simple Arithmetic Operation

ASSIGN ( = )
Command type
Format
Operand
Operand
Setting range
First term
Variable
Second term
Operation
numerical value
range (See
note.)
Note
Description
Precaution for Handling the Data Types
1,2,3...
Values are assigned for the specified variable.
Multiple execution command
<First term> = <Second term>;
Ex: #MF1000 = 123.45;
Decimal
Bit
No
Yes
Yes
Yes
Both immediate values and variables can use the values within the ranges
defined for each type.
• Integer immediate value: − 2147483648 to 2147483647
• Decimal immediate value: − 2147483648. to 2147483647.
• Bit type: 0, 1
• Word type: − 32768 to 32767
• Long word type: − 2147483648 to 2147483647
• Real number type: ± (1.175E-38 to 3.402E+38), 0
• Indirect specification type: 0 to 10239
• The value in the second term is assigned to the first term.
• If the types are different on both sides, the type on the right is converted
to that of the left.
• If the value on the right side cannot be stored in the left side, the alarm
[2005h: Operation overflow] will occur.
1. Bit type
• When the bit type is used, all the operands must be the bit type.
• The integer immediate values 0 and 1 are treated as the bit type.
2. Types other than the bit type
• Types other than the bit type are prioritized in the following order
Real number type > Long word type > Word type
• Operation is performed in the type of the highest priority, and the op-
eration result will be stored after being converted to the type on the left.
• The integer immediate value is treated as long word type, and the dec-
imal immediate value is treated as real number type.
Variable specification
Word
Long
Real
word
number
Yes
Yes
Yes
Yes
Yes
Yes
Section 6-3
INC/ ABL
influ-
Indirect
ence
specifi-
cation
No
No
Yes
No
361

Advertisement

Table of Contents

Troubleshooting

loading

This manual is also suitable for:

Cj1w-mch71

Table of Contents