Omron CP1E CPU UNIT SOFTWARE User Manual page 62

Cp1e cpu unit software
Table of Contents

Advertisement

4 Understanding Programming
Using Operands to Specify Numbers
Data type
Notation
Application
example
Precautions for
correct use
Using Floating-point (Real Number) Notation for Operands
Data type
Notation
Application
example
Precautions for
correct use
Additional Information
• Zero suppression can be used when inputting any data type.
For example, "&2" and "&02", "#000F" and "#F" are treated as the same.
• "BIN" indicates binary data.
• BCD data is binary coded decimal.
4-18
Decimal values
No symbol (value only)
10
Number only
SBS 0
Jumps to subroutine 0.
An error will occur and the left bus bar
will be displayed in red if a decimal
value is input with & from the CX-Pro-
grammer.
Decimal values
With + or -
+
0.10
Decimal value
(real number)
+ or - sign
FIX +0.10 D0
Converts floating point +0.10 into 16-
bit signed binary data and stores the
integer portion in D0.
The input will be treated as an address
in the CIO Area, an error will occur,
and the left bus bar will be displayed in
red if a decimal value with a decimal
point is input without + from the CX-
Programmer.
Hexadecimal values or BCD values
Not possible.
Hexadecimal values
With # symbol
(for single-precision data)
#
3DCCCCCD
Hexadecimal value
using 0 to F
Hexadecimal symbol
FIX #3DCCCCCD D0
Converts floating point #3DCCCCCD (+0.10 deci-
mal) into 16-bit signed binary data and stores the
integer portion in D0.
The input will be treated as an address in the CIO
Area, an error will occur, and the left bus bar will be
displayed in red if a hexadecimal value including A
to F is input without # from the CX-Programmer.
CP1E CPU Unit Software User's Manual(W480)

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CP1E CPU UNIT SOFTWARE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF