Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming
4-15
Appendix B. You can find M file information relating to Block Transfer
operations in Chapter 5, Block Transfer.
Rung 2:0
To decrease program scan time, copy the first four words of the M1 File
to a binary file and use these addresses throughout the program to access
block transfer done, error, data, etc. information without interrupting
the program scan many times.
| +COP±±±±±±±±±±±±±±±±+
|±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+COPY FILE +±|
| |Source #M1:1.100|
| |Dest #B3:0|
| |Length 4|
| +±±±±±±±±±±±±±±±±±±±+
Rung 2:1
Examine B3/13 (B3:0/13), an internal storage bit, to determine when a
block transfer is done. Note that examining multiple individual M±file
bits directly (every scan) can measurably increase processor scan time.
| ºBT DONEº
| B3 +COP±±±±±±±±±±±±±±±±+
|±±±±] [±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+COPY FILE +±|
| 13 |Source #B3:10|
| |Dest #N10:0|
| |Length 64|
| +±±±±±±±±±±±±±±±±±±±+
|
Rung 2:2
Examine B3/12 (an internal storage bit) to determine if a BT error
occurred. Buffer the BT status from B3:3 if an error does occur.
| ºBT ERRORº
|
| B3 +MOV±±±±±±±±±±±±±±±±+
|±±±±] [±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+MOVE +±
| 12 |Source B3:3|
| | 0000000000000000|
| |Dest N10:64|
| | 0|
| +±±±±±±±±±±±±±±±±±±±+
Rung 2:3
|
|±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+END+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
IMPORTANT
If you are using an SLC 5/02 processor, M file data
cannot be directly monitored. To monitor M files,
you must move the M file words into an SLC file that
can be monitored, e.g., an integer “N” file. SLC 5/03
or later processors allow you to monitor M files
directly. However, do not address M file bits more
than necessary throughout your application program.
The processor accesses M files like immediate I/O.
Therefore, excessive addressing of M files can greatly
increase SLC processor scan time. For more
information on M files, refer to Appendix B.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com