Understanding m files, Understanding m files -14, M files overview -14 – Rockwell Automation 1747-BSN Backup Scanner Module User Manual
Page 76
Publication 1747-UM010B-EN-P - September 2003
5-14 Configuration and Programming
Understanding M Files
M Files Overview
The scanner provides RIO device control and status information
through the M0 and M1 files. The M0 file is a control file. The M1 file
is a status file.
There is no image for M file data in SLC processors as there is for I/O
data. The M files are buffers in the 1747-BSN module, accessible only
via ladder logic instructions that address them. Each occurrence of a
ladder instruction addressed with an M-file address is an interrupt to
the ladder program scan. This is similar to the way Immediate I/O
Instructions operate.
Instructions with the M0 file addressed write data to the M0 file in the
1747-BSN. Instructions with the M1 file addressed read data from the
M1 file in the 1747-BSN.
M-file bits/words in the ladder program, therefore, impact the ladder
scan time. If scan time is critical, use COP instructions to copy blocks
of M1 file data to processor data file addresses throughout the
program. It is more efficient to do one large M-file transfer than to do
many small transfers.
It is also more efficient to address instructions in the ladder program
using internal data files (binary, integer, etc.). Then use COP
instructions to copy this data file to the M0 file in one large block at
the end of the program. Refer to the ladder example that follows. For
more information on M files, refer to Appendix B. You can find M file
information relating to Block Transfer operations in Chapter 7, RIO
Block Transfer.