FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726 10-19
10: D
ATA
C
ONVERSION
I
NSTRUCTIONS
CVDT (Convert Data Type)
Valid Devices
For valid device address ranges, see "Device Addresses" on page 2-1.
*1 Cannot be used with data type F (float).
*2 When T/C is used as S1, this is the current value area.
*3 Special internal relays cannot be designated as D1.
*4 When T (timer) or C (counter) is used as S1, the timer/counter current value (TC or CC) is displayed. When T (timer) or C (counter) is used as
D1, the data is written in as a preset value (TP or CP) which can be 0 through 65,535.
When a user program execution error occurs, the execution of the instruction is canceled. The value of D1 is left unchanged and the next instruction
is executed. For user program execution errors, see "User Program Execution Errors" on page 3-10.
Valid Data Types
S1 → D1
When input is on, the data type of the 16- or 32-bit data assigned by S1 is converted and
stored to the destination assigned by device D1.
Data types can be assigned for the source and destination, separately
Data Type W, I D, L, F
Source S1 S1·S1+1
Destination D1 D1·D1+1
When the same data type is assigned for both source and destination, the CVDT
instruction has the same function as the MOV instruction.
Unless F (float) data is selected for both source and destination, only the integral number
is moved, omitting the fraction.
When the source data exceeds the range of destination data, the destination stores a
value closest to the source data within the destination data.
S1(R)
*****
REP
**
D1(R)
*****
CVDT
*
TO
*
Device Function I Q M R T C D P
Constant Repeat
S1 (Source 1) First device address to convert data type X
*1
X
*1
X
*1
X
*1
X
*1*2
X
*2
X— X 1-99
D1 (Destination 1) First device address to store converted data — X
*1
X
*1*3
X
*1
X
*1*4
X
*1*4
X— — 1-99
W (word) X When a bit device such as I (input), Q (output), M (internal relay), or R (shift register) is assigned as the source
or destination, 16 points (word or integer data) or 32 points (double-word, long, or float data) are used. When
repeat is assigned for a bit device, the quantity of device bits increases in 16- or 32-point increments.
When a word device such as T (timer), C (counter), or D (data register) is assigned as the source or destination,
1 point (word or integer data) or 2 points (double-word, long, or float data) are used. When repeat is assigned for
a word device, the quantity of device words increases in 1- or 2-point increments.
I (integer) X
D (double word) X
L (long) X
F (float) X