Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 17 of 22

1747-SDN DeviceNet Scanner Module User Manual: B - Configuring the M0/M1 Files by Using RSLogix 500 Software

Pages 121 to 128 of 160, from 1747-SDN DeviceNet Scanner Module User Manual

The original document is the PDF (3.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1747-SDN

Page 121

Appendix

B

Configuring the M0/M1 Files by Using RSLogix 500 Software

RSLogix 500 I/O Configuration

To enable pass-through access by using a SLC 500 processor, you must configure the M0 and M1 files associated with the 1747-SDN module at a minimum length of 361 words. Follow these steps to configure the 1747-SDN module’s M0 and M1 files by using RSLogix 500 software. 1. Run RSLogix 500 software and go offline to the SLC 500 processor. 2. Double-click IO Configuration under the Controller folder in the Project dialog.

The I/O Configuration dialog opens.

121

Publication 1747-UM655B-EN-P - June 2007

Page 122

122

Configuring the M0/M1 Files by Using RSLogix 500 Software

3. Click Read I/O Config to upload the I/O configuration from the processor. 4. Double-click the 1747-SDN module. The Advanced I/O Configuration dialog opens.

5. Set the MO Length and the M1 Length to 361 (or greater) as shown above. 6. Click OK. 7. Download the changes to the processor. IMPORTANT

Publication 1747-UM655B-EN-P - June 2007

The SLC 500 processor must be placed in Run mode at least one time after downloading the M0/M1configuration to enable 1747-SDN pass-through transactions.

Page 123

Configuring the M0/M1 Files by Using RSLogix 500 Software

Programming the Module by Using the SLC M0 and M1 Files

123

The M0 and M1 files are data files that reside in the module. There is no image for these files in the processor memory. The M0 file is a module output file and the M1 file is a module input file. Both M0 and M1 files are read/write files. M0 and M1 files can be addressed in your ladder program and they can also be acted upon by the module, independent of the processor scan. IMPORTANT

During the processor scan, M0 and M1 data can be changed by the processor according to ladder diagram instructions addressing the M0 and M1 files. During the same scan, the module can change M0 and M1 data, independent of the rung logic applied during the scan.

Address the M0-M1 Files The addressing format for M0 and M1 files is as follows: Mf:S.w/b Where M = module f = file (0 or 1) S = slot (1…30) w = word (0-maximum supplied by the module) b = bit (0…15)

Publication 1747-UM655B-EN-P - June 2007

Page 124

124

Configuring the M0/M1 Files by Using RSLogix 500 Software

When You Cannot Use M0-M1 Data File Addresses You can use M0 and M1 data file addresses in all instructions except the OSR instruction and the instruction parameters below.

Instruction

Parameter (characterized by file indicator #)

BSL BSR

File (bit array)

SQO SQC SQL

File (sequencer file)

LFL LFU

LIFO (stack)

FFL FFU

FIFO (stack)

Monitor Bit Instructions with M0 or M1 Addresses When you monitor a ladder program in the Run or Test mode, the following bit instructions, addressed to an M0 or M1 file, are indicated as false regardless of their actual true/false logical state. Mf:S.w ] [ b XIC

Publication 1747-UM655B-EN-P - June 2007

Mf:S.w ]/[ b XIO

Mf:S.w ( ) b

Mf:S.w (L) b

Mf:S.w (U) b

OTE

OTL

OTU

Page 125

Configuring the M0/M1 Files by Using RSLogix 500 Software

125

To show the state of the M0 or M1 addressed bit, transfer the state to an internal processor bit. This is illustrated below, where an internal processor bit is used to indicate the true/false state of a rung. B3 ] [ 0

B3 ] [ 1

EQU EQUAL Source A

M0:3.0 ( ) 1

N

Source B

This rung does not show its true rung state because the EQU instruction is always shown as true and the M0 instruction is always shown as false.

B3 ] [ 0

B3 ] [ 1

EQU EQUAL Source A

B3 ( ) 2

Source B

M0:3.0 ( ) 1

N

OTE instruction B3/2 has been added to the rung. This instruction shows the true or false state of the rung.

Transfer Data Between Processor Files and M0 or M1 Files The processor does not contain an image of the M0 or M1 file so you must edit and monitor M0 and M1 file data via instructions in your ladder program. For example, you can copy a block of data from a processor data file to an M0 or M1 data file or vice versa by using the COP (copy) instruction in your ladder program. The COP instructions below copy data from a processor bit file and integer file to an M0 file. S:1 ] [ 15

First scan bit. It makes this rung true only for the first scan after entering Run mode.

COP COPY FILE Source Dest Length

COP COPY FILE Source Dest Length

Publication 1747-UM655B-EN-P - June 2007

Page 126

126

Configuring the M0/M1 Files by Using RSLogix 500 Software

The COP instruction below copies six words of data from an M1 data file in a module positioned in slot four to an integer file (N1:0). This technique is used to monitor the contents of an M0 or M1 data file indirectly, in a processor data file. An update of these six words is made for each SLC program scan. COP COPY FILE Source Dest Length

#M1:4.3 #N10:0 6

Reduce Scan Time TIP

To reduce processor scan time, use discretion when you use instructions addressing the M0 or M1 files. For example, XIC instruction M1:2.1/1 is used in rungs 1 and 2 below, adding approximately 2 ms to the scan time if you are using an 5/02, series B processor. 1

M1:2.1 ] [ 1

2

B3 ] [ 12

B3 ( ) 10 M1:2.1 ] [ 1

B3 ( ) 14

XIC instructions in rungs 1 and 2 are addressed to the M1 data file. Each of these instructions adds approximately 1 ms to the scan time (SLC 5/02, series B processor).

In the equivalent rungs below, XIC instruction M1:2.1/1 is used only in rung 1, reducing the scan time by approximately 1 ms. 1

M1:2.1 ] [ 1

2

B3 ] [ 12

B3 ( ) 10 B3 ] [ 10

B3 ( ) 14

These rungs provide equivalent operation to those of the previous diagram by substituting XIC instruction B3/10 for XIC instruction M1:2.1/1 in rung 2. Scan time is reduced by approximately 1 ms (SLC 5/02 series B processor).

Publication 1747-UM655B-EN-P - June 2007

Page 127

Configuring the M0/M1 Files by Using RSLogix 500 Software

127

The first two ladder diagrams in the last section illustrate a technique you use to capture and use M0 or M1 data as it exists at a specific time. In the first diagram, bit M1:2.1/1 could change state between rungs 1 and 2. This could interfere with the logic applied in rung 2. The second diagram avoids the problem. If rung 1 is true, bit B3/10 captures this information and places it in rung 2. The following diagram illustrates another economizing technique. The COP instruction addresses an M1 file, adding approximately 4.29 ms to the scan time if you are using an SLC 5/02, series B processor. You can save scan time by making this rung true periodically only. For example, you can use a clock bit S:4/8 (clock bits are discussed in the programming manual). A rung such as this might be used when you want to monitor the contents of the M1 file, but monitoring need not be continuous.

S:4/8 causes the M1:4.3 file to update the N10:0 file every 2.56 seconds.

S:4 ] [ 8

B11 [OSR] 0

COP COPY FILE Source Dest Length

#M1:4.3 #N10:0 6

In this example, a COP instruction can be used to monitor the contents of an M1 file. When the instruction goes true, the six words of data in file #M1:4.3 is captured as it exists at that time and placed in file #N10:0. All subsequent logic should address the data in #N10:0. The data will be consistent and it shortens scan time by eliminating reads to the module each time an M0 or M1 address is encountered in the program.

Publication 1747-UM655B-EN-P - June 2007

Page 128

128

Configuring the M0/M1 Files by Using RSLogix 500 Software

Publication 1747-UM655B-EN-P - June 2007