IDEC SmartAXIS FT9Z-1A01 User Manual page 341

Table of Contents

Advertisement

Example 7.25 Bit-unit data copy
Script
MEMCPY([D0200.00], [D0100.02], 10);
Operation Description
Copies the third bit of 10 words from D0100 (up to D0109) to the bit state for 10 bits of devices from D0200 (up to D0209).
1st bit of D0200
1st bit of D0201
1st bit of D0202
1st bit of D0207
1st bit of D0208
1st bit of D0209
Note: Even if the data type is set to D (double word), L (long), or F (float), the bits are copied from the starting device in bit units.
Example 7.26 Copy 1 word from bit devices to bit devices
Script
BITS2BITS(I004, M0000);
Operation Description
A value of 1 word length from I004 (I004 to I023) is copied to the bit states of a 1 word region from M0000 (M0000 to M0017).
Copy each
M0000
M0001
M0017
Example 7.27 Copy 1 word from bit devices to a word device
Script
BITS2WORD(I004, D0000);
Operation Description
A value of 1 word length from I004 (to I023) is copied to the value of device D0000.
This is the same as BITS2BITS (I004, D0000.0);.
Example 7.28 Copy 1 word from a word device to bit devices
Script
WORD2BITS(D0100, M0000);
Operation Description
The value of device D0100 is copied to the bit states of a value of 1 word length from M0000 (M0000 to M0017).
This is the same as BITS2BITS (D1000.0, M0000);.
Copy each
3rd bit of D0100
3rd bit of D0101
3rd bit of D0102
3rd bit of D0107
3rd bit of D0108
3rd bit of D0109
I004
I005
I023
S
A XI S P
M AR T
R O
/ L
U
'
M
FT9Y-B 1378
I TE
SER
S
ANUAL
13: S
CR I P TS
13-33

Advertisement

Table of Contents
loading

Table of Contents