beautypg.com

Rockwell Automation 1769-SM2 Compact I/O DSI/Modbus Communication Module User Manual

Page 144

background image

8-14

ControlLogix w/1769-ADN DeviceNet Example Ladder Program

Figure 8.18 Example ControlLogix Ladder Logic Main Routine (Continued)

This rung enables the 1769-SM2 to send the Channel 3 Logix Command and Reference words to the drive.

6

CH3_Enable

Channel 3 Subroutine

7

Jump To Subroutine

Routine Name Channel_3

JSR

CH3 control logic

8

CH1_Valid_Data

CH2_Valid_Data

CH3_Valid_Data

SM2_Data_Valid

9

/

SM2_Cfg_Data_Valid

SM2_Cfg_Error

Copy the SM2 input data array (INT format) to the DNB Outputs (DINT format).

SM2_Output_Data[0] = SM2 Status word

SM2_Output_Data[1] = SM2 CH1 Logic Command

SM2_Output_Data[2] = SM2 CH1 Reference

SM2_Output_Data[3] = SM2 CH2 Logic Command

SM2_Output_Data[4] = SM2 CH2 Reference

SM2_Output_Data[5] = SM2 CH3 Logic Command

SM2_Output_Data[6] = SM2 CH3 Reference

10

Copy File

Source SM2_Output_Data[0]

Dest

Local:6:O.Data[0]

Length

4

COP

(End)