Mitsubishi Electric FX2N Beginners Manual page 97

Hide thumbs Also See for FX2N:
Table of Contents

Advertisement

More Advanced Programming
The value you can enter for the number of data units depends on the PLC model you are using
and whether you are using the 16-bit or 32-bit version of the FROM instruction:
PLC Model
FX
2N
FX
2NC
FX
, FX
3G
Data destination or source in the base unit
In most cases you will read data from registers and write it to a special function module, or copy
data from the module's buffer to data registers in the base unit. However, you can also use out-
puts, relays and the current values of timers and counters as data sources and destinations.
Pulse-triggered execution of the instructions
If you add a P suffix to the instructions the data transfer is initiated by pulse trigger (for details
see the description of the MOV instruction in section 5.2.1).
How to use the FROM instruction
The FROM instruction is used to transfer data from the buffer of a special function module to
the controller base unit. Note that this is a copy operation – the contents of the data in the mod-
ule buffer are not changed.
Ladder Diagram
0
³ Special function module address (0 to 7)
· Starting address in buffer (FX
to 32,766). You can use a constant or a data register containing the value.
» Data destination in the controller base unit
¿ Number of data units to be transferred
The example above uses FROM to transfer data from an FX
module with the address 0. The instruction reads the current value of channel 1 from buffer
address 9 and writes it to data register D0.
The next example shows how the 32-bit version of the instruction is used to read data from
address 2 in the special function module. The instruction reads 4 double words starting at
buffer address 8 and writes them to data registers D8 to D15.
0
The next example illustrates the use of the pulse triggered version, FROMP. Here the contents
of the four buffer addresses 0 – 3 are only transferred to data registers D10 – D13 when the sig-
nal state of the input condition changes from "0" to "1".
0
FX Beginners Manual
, FX
, FX
, FX
3GC
3GE
3U
3UC
FROM K0 K9 D0 K1
DFROM K2 K8 D8 K4
FROMP K0 K0 D10 K4
Valid range for no. of data units to be transferred
16-Bit Instruction (FROM, TO)
1 to 32
1 to 32
1 to 32767
Instruction List
0 FROM
: 0 to 31, FX
, FX
1N
2NC
3G
Instructions for Moving Data
32-Bit Instruction (DFROM, DTO)
1 to 16
1 to 16
1 to 16383
K0
K9
, FX
, FX
, FX
und FX
3GC
3GE
3U
-4AD analog/digital converter
2N
D0
K1
: 0
3UC
5 – 15

Advertisement

Table of Contents
loading

Table of Contents