Unsigned 32-Bit Integer Value Conversion: Ulong - Mitsubishi Electric R16MTCPU Programming Manual

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Unsigned 32-bit integer value conversion: ULONG

Format
ULONG(S)
Setting data
■Usable Data
: Usable
Setting
Usable Data
data
Bit
Word device
device
16-bit
integer
type
(S)
■Description, data type of result
Setting data
Description
(S)
Data which will be converted into unsigned 32-bit integer value
Processing details
• The data specified with (S) is converted into an unsigned 32-bit integer value.
• The data range of (S) is 0 to 4294967295.
• When (S) is a 64-bit floating-point type, its fractional portion is rounded down before conversion is made.
• If (S) is a 32-bit integer type, its value is returned unchanged, with no conversion processing performed.
Operation error
An operation error will occur if:
• The (S) data is outside the range 0 to 4294967295.
• (S) is an indirectly specified device and its device No. is outside the range.
Program example
■Program which converts the data of D0 into an unsigned 32-bit integer value and substitutes
the result to #0L
#0L = ULONG(D0)
#1
#0
#0L
K65535L
(H0000FFFF)
Number of basic steps
4
Constant
32-bit
64-bit
16-bit
integer
floating
integer
type (L)
point
type
type (F)
(K/H)
D0
K-1
(HFFFF)
Unsigned value is K65535
Usable steps
F/FS
Calculation
expression
32-bit
64-bit
integer
floating
type
point
(K/H, L)
type (K)
4 OPERATION CONTROL PROGRAMS
G
Bit
Comparison
conditional
conditional
expression
expression
Data type of result
32-bit integer type
171
4.9 Type Conversions
4

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents