ALLEN-BRADLEY BULLETIN 1203-FM1 & 1203-FB1 Use with DeviceNet (PLC-5 and 1771-SDN) APPLICATION NOTE # DNET - 1 May 27, 1997 PURPOSE The purpose of this document is to provide guidelines for wiring and control schemes for SCANport devices including Bulletin 1305 and 1336 PLUS AC Drives. This document is a suggestion only. Users must ensure that installations meet applicable codes and are suitable for the existing conditions. WHAT THIS NOTE CONTAINS This document contains information and an example ladder program that demonstrate how to control two 1305 drives using a PLC-5/40, 1771-SDN, 1794ADN and a 1203-FM1/FB1 module/base combination. INTENDED AUDIENCE This application note should be used by personnel familiar with the hardware components and programming procedures necessary to operate SCANport devices. It is also assumed that the user has some familiarity with DeviceNet, the PLC-5 and ladder programming. WHERE IT IS USED The diagrams, parameter settings and auxiliary hardware used in this application note are designed to address specific issues in many different applications. Some changes by the user may be necessary to apply the concepts of this document to a specific application. APPLICATION CONSIDERATIONS These example ladder programs were written to be simple and clear examples and contain no fault handling abilities. Consult the PLC-5, 1771-SDN, 1794-ADN and 1203-FM1/FB1 manuals for more information. SCANport devices may assign different meanings to bits in the Logic Command and Status words. The usage of the Reference and Feedback words may also vary. Consult the manual for your SCANport device for more information. For this example, the local rack was set up to use two slot addressing, the 1771SDN was in slot 0 of module group 0 and a 1771-SIM module was in slot 0 of module group 1. Faxback Document # 3307 Web location Http://WWW.AB.COM Page 1 of 10 ALLEN-BRADLEY DeviceNet Configuration The screen prints in Figures 1 through 10 show the configuration of the DeviceNet and Flex I/O system for the example program. Figure 1 -- Network Interface Figure 2 -- Network Who Faxback Document # 3307 Web location Http://WWW.AB.COM Page 2 of 10 ALLEN-BRADLEY Figure 3 -- Flex I/O Configuration Figure 4 -- 1203-FM1 Configuration Faxback Document # 3307 Web location Http://WWW.AB.COM Page 3 of 10 ALLEN-BRADLEY Figure 5 -- 1771-SDN Scanner Configuration Figure 6 -- Scan List Faxback Document # 3307 Web location Http://WWW.AB.COM Page 4 of 10 ALLEN-BRADLEY Figure 7 -- Auto Mapping Figure 8 -- Scan List Faxback Document # 3307 Web location Http://WWW.AB.COM Page 5 of 10 ALLEN-BRADLEY Figure 9 -- Download Scan List Ladder Program Section 1 Figure 10 -- Download Complete The section of program shown in Figure 11 enables the 1771-SDN DeviceNet Scanner and both SCANport channels on the 1203-FM1 module. ¦ Enable ¦ DeviceNet ¦ Channel A ¦ N11:0 ¦---------------------------------------------------------------------( )----¦ ¦ 0 ¦ ¦ ¦Enable ¦ ¦ ¦SCANport ¦ ¦ ¦Channel 1 ¦ ¦ ¦ N11:1 ¦ ¦ +---( )----¦ ¦ ¦ 0 ¦ ¦ ¦Enable ¦ ¦ ¦SCANport ¦ ¦ ¦Channel 2 ¦ ¦ ¦ N11:1 ¦ ¦ +---( )----+ ¦ 8 ¦ Figure 11 -- Enabling the SCANport Channels Ladder Program Section 2 The section of program shown in Figure 12 provides START/STOP control and a frequency reference to the 1305 drive connected to SCANport channel 1. The User Start is a normally open pushbutton while the User Stop is a normally closed pushbutton. ¦ ¦ Drive 1 User ¦Drive 1 ¦User Drive 1 START Faxback Document # 3307 Web location Http://WWW.AB.COM Page 6 of 10 ALLEN-BRADLEY ¦ Momentary ¦Maintained Command ¦ START ¦NOT STOP ¦ Input ¦Input ¦ I:001 I:001 N11:2 ¦-----] [--------] [---------------------------------------------------( )---¦ ¦ 00 ¦ 01 1 ¦ ¦Drive 1 ¦ ¦ ¦START ¦ ¦ ¦Command ¦ ¦ ¦ N11:2 ¦ ¦ +---] [----+ ¦ 1 ¦ Drive 1 Drive 1 ¦ User STOP ¦ Maintained Command ¦ NOT STOP ¦ Input ¦ I:001 N11:2 ¦----]/[---------------------------------------------------------------( )---¦ 01 0 ¦ Drive 1 ¦ Frequency ¦ Reference ¦ +MOV---------------+ ¦---------------------------------------------------------¦MOVE ¦ ¦Source N20:0¦ ¦ ¦ 16383¦ ¦ ¦Destination N11:3¦ ¦ ¦ 16383¦ ¦ +------------------+ Figure 12 -- Drive 1 Control and Reference Faxback Document # 3307 Web location Http://WWW.AB.COM Page 7 of 10 ¦ ¦ ¦ ¦ ALLEN-BRADLEY Ladder Program Section 3 The section of program shown in Figure 13 provides START/STOP control and a frequency reference to the 1305 drive connected to SCANport channel 2. This section functions identically to that shown in Figure 12 except for the changes in addresses. ¦ Drive 2 ¦Drive 2 Drive 2 ¦ User ¦User START ¦ Momentary ¦Maintained Command ¦ START ¦NOT STOP ¦ Input ¦Input ¦ I:001 I:001 N11:4 ¦-----] [--------] [---------------------------------------------------( )---¦ ¦ 02 ¦ 03 1 ¦ ¦Drive 2 ¦ ¦ ¦START ¦ ¦ ¦Command ¦ ¦ ¦ N11:4 ¦ ¦ +---] [----+ ¦ 1 ¦ Drive 2 Drive 2 ¦ User STOP ¦ Maintained Command ¦ NOT STOP ¦ Input ¦ I:001 N11:4 ¦----]/[---------------------------------------------------------------( )---¦ 03 0 ¦ Drive 2 ¦ Frequency ¦ Reference ¦ +MOV---------------+ ¦---------------------------------------------------------¦MOVE ¦ ¦Source N20:1¦ ¦ ¦ 32767¦ ¦ ¦Destination N11:5¦ ¦ ¦ 32767¦ ¦ +------------------+ Figure 13 -- Drive 2 Control and Reference Faxback Document # 3307 Web location Http://WWW.AB.COM Page 8 of 10 ¦ ¦ ¦ ¦ ¦ ALLEN-BRADLEY Block Transfer Program Section The program section shown in Figure 14 performs the actual transfer of data via block transfer from the PLC-5 to the 1771-SDN and back again. ¦ BTW to BTW to ¦ 1771-SDN 1771-SDN ¦ Enabled ¦ BT9:0 +BTW--------------------+ ¦----]/[----------------------------------------¦BLOCK TRANSFER WRITE +(EN)¦ EN ¦Rack 00¦ ¦ ¦Group 0+-(DN) ¦ ¦Module 0¦ ¦ ¦Control block BT9:0+-(ER) ¦ ¦Data file N11:0¦ ¦ ¦Length 62¦ ¦ ¦Continuous N¦ ¦ +-----------------------+ ¦ ¦ BTR From BTR From ¦ 1771-SDN 1771-SDN ¦ Enabled ¦ BT9:1 +BTR--------------------+ ¦----]/[----------------------------------------¦BLOCK TRANSFER READ +(EN)¦ EN ¦Rack 00¦ ¦ ¦Group 0+-(DN) ¦ ¦Module 0¦ ¦ ¦Control block BT9:1+-(ER) ¦ ¦Data file N10:0¦ ¦ ¦Length 62¦ ¦ ¦Continuous N¦ ¦ +-----------------------+ ¦ Figure 14 -- BTW/BTR Ladder Program Faxback Document # 3307 Web location Http://WWW.AB.COM Page 9 of 10 ALLEN-BRADLEY Input Data Table File The data table file shown in Figure 15 is the input data read from the 1203-FM1 via DeviceNet (for clarity only the first line of the file is shown). Address N10:0 0 1 2 3 4 5 6 7 8 9 2049 512 0 2570 3855 16383 3855 32767 0 0 ----- ----- ----- ----- ----- ----- ----- ----| | | | | | | | | | | | | | | |-Drive 2 Feedback | | | | | | | | | | | | | |-Drive 2 Logic Status | | | | | | | | | | | |-Drive 1 Feedback | | | | | | | | | |-Drive 1 Logic Status | | | | | | | |-SCANport Channel Status | | | | | |-Reserved (always zero) | | | |-DeviceNet Adapter Status Word (1794-ADN) | |-DeviceNet Scanner Status Word (1771-SDN) Figure 15 -- Input Data Table File Output Data Table File The data table file shown in Figure 16 is the data to be sent to the 1203-FM1 via DeviceNet (for clarity only the first line of the file is shown). Address N11:0 0 1 2 3 4 5 6 7 1 257 2 16383 2 32767 0 0 ----- ----- ----- ----- ----- ----| | | | | | | | | | | |-Drive 2 Reference | | | | | | | | | |-Drive 2 Logic Command | | | | | | | |-Drive 1 Reference | | | | | |-Drive 1 Logic Command | | | |-SCANport Channel Enables | |-DeviceNet Scanner Command Word (1771-SDN) Figure 16 -- Output Data Table File Faxback Document # 3307 Web location Http://WWW.AB.COM Page 10 of 10 8 0 9 0