Rockwell Automation 1769-SM1 Compact I/O to DPI/SCANport Module User Manual

Page 60

Advertising
background image

5-6

MicroLogix 1500 Ladder Example Program

Figure 5.3 MicroLogix 1500 Ladder Logic Channel 1 Subroutine (Continued)

Datalink B Control Area

The first COPy instruction outputs data to Datalink B1 & B2 In, where:

PF70 Parameter 302 [Data In B1] is set to "100", which points to Parameter 100 [Jog Speed]
N7:8 contains the Jog Speed value in hertz, where a "50" equates to 5.0 Hz.

PF70 Parameter 303 [Data In B2] is set to "155", which points to Parameter 155 [Stop Mode A]
N7:10 contains the Stop Mode A value, where a "1" equates to a "Ramp" deceleration, "0" = coast, etc.

The second COPy instruction inputs data from Datalink B1 & B2 Out, where:

PF70 Parameter 302 [Data Out B1] is set to "100", which points to Parameter 100 [Jog Speed]
N7:28 contains the Jog Speed value in hertz, where a "50" equates to 5.0 Hz.

PF70 Parameter 303 [Data Out B2] is set to "155", which points to Parameter 155 [Stop Mode A]
N7:30 contains the Stop Mode A value, where a "1" equates to a "Ramp" deceleration, "0" = coats, etc.

Note: Datalink B1/B2 Out does not have to equal Datalink B1/B2 In.
This is done in the example program for demo purpose only (so changes can be viewed).

The format is:

N7:x = Datalink B1 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
N7:x+1 = Datalink B1 (high) high word for 32-bit Datalinks
N7:x+2 = Datalink B2 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
N7:x+3 = Datalink B2 (high) high word for 32-bit Datalinks

0010

COP

Copy File
Source

#N7:8

Dest

#O:1.24

Length

4

COP

Channel 1
Datalink B1 In
(Low)

COP

Copy File
Source

#I:1.24

Dest

#N7:28

Length

4

COP

Channel 1
Datalink B1 Out
(Low)

Datalink C Control Area

The first COPy instruction outputs data to Datalink C1 & C2 In, where:

PF70 Parameter 304 [Data In C1] is set to "101", which points to Parameter 101 [Preset Speed 1]
N7:12 contains the Preset Speed 1 value in hertz, where a "100" equates to 10.0 Hz.

PF70 Parameter 305 [Data In C2] is set to "102", which points to Parameter 102 [Preset Speed 2]
N7:14 contains the Preset Speed 2 value in hertz, where a "200" equates to 20.0 Hz.

The second COPy instruction inputs data from Datalink C1 & C2 Out, where:

PF70 Parameter 314 [Data Out C1] is set to "101", which points to Parameter 101 [Preset Speed 1]
N7:32 contains the Preset Speed 1 value in hertz, where a "100" equates to 10.0 Hz.

PF70 Parameter 315 [Data Out C2] is set to "102", which points to Parameter 102 [Preset Speed 2]
N7:34 contains the Preset Speed 2 value in hertz, where a "200" equates to 20.0 Hz.

Note: Datalink C1/C2 Out does not have to equal Datalink C1/C2 In.
This is done in the example program for demo purpose only (so changes can be viewed).

The format is:

N7:x = Datalink C1 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
N7:x+1 = Datalink C1 (high) high word for 32-bit Datalinks
N7:x+2 = Datalink C2 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
N7:x+3 = Datalink C2 (high) high word for 32-bit Datalinks

0011

COP

Copy File
Source

#N7:12

Dest

#O:1.36

Length

4

COP

Channel 1
Datalink C1 In
(Low)

COP

Copy File
Source

#I:1.36

Dest

#N7:32

Length

4

COP

Channel 1
Datalink C1 Out
(Low)

Advertising