beautypg.com

6 compactlogix ladder example program – Rockwell Automation 1769-SM1 Compact I/O to DPI/SCANport Module User Manual

Page 78

background image

6-6

CompactLogix Ladder Example Program

Figure 6.3 CompactLogix Ladder Logic Channel 1 Subroutine (Continued)

Datalink A

PowerFlex 70 Parameter 300 [Data In A1] = "140", which points to Parameter 140 [Accel Time 1]
Ch1_Datalink_A_In[0] contains the Accel Time 1 value in seconds, where a "100" equates to 10.0 seconds.

PowerFlex 70 Parameter 301 [Data In A2] = "142", which points to Parameter 140 [Decel Time 1]
Ch1_Datalink_A_In[2] contains the Decel Time 1 value in seconds, where a "100" equates to 10.0 seconds.

The respective Ch1_Datalink_A_Out's point to the same parameters so the values can also be read. Note
these do not have to be equal and are done in the example program for demonstration purposes only
(so changes can be viewed).

The format is:

word [0] = Datalink A1 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (1] = Datalink A1 (high) high word for 32-bit Datalinks
word [2] = Datalink A2 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (3] = Datalink A2 (high) high word for 32-bit Datalinks

11

Copy File
Source Ch1_Datalink_A_In[0]
Dest

Local:1:O.Data[12]

Length

4

COP

Copy File
Source

Local:1:I.Data[12]

Dest Ch1_Datalink_A_Out[0]
Length

4

COP

Channel 1

Datalink A1 Out

(Low)

Datalink A

PowerFlex 70 Parameter 300 [Data In A1] = "140", which points to Parameter 140 [Accel Time 1]
Ch1_Datalink_A_In[0] contains the Accel Time 1 value in seconds, where a "100" equates to 10.0 seconds.

PowerFlex 70 Parameter 301 [Data In A2] = "142", which points to Parameter 140 [Decel Time 1]
Ch1_Datalink_A_In[2] contains the Decel Time 1 value in seconds, where a "100" equates to 10.0 seconds.

The respective Ch1_Datalink_A_Out's point to the same parameters so the values can also be read. Note
these do not have to be equal and are done in the example program for demonstration purposes only
(so changes can be viewed).

The format is:

word [0] = Datalink A1 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (1] = Datalink A1 (high) high word for 32-bit Datalinks
word [2] = Datalink A2 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (3] = Datalink A2 (high) high word for 32-bit Datalinks

Datalink B

PowerFlex 70 Parameter 302 [Data In B1] = "100", which points to Parameter 100 [Jog Speed]
Ch1_Datalink_B_In[0] contains the Jog Speed value in hertz, where a "50" equate to 5.0 Hz.

PowerFlex 70 Parameter 303 [Data In B2] = "155", which points to Parameter 155 [Stop Mode A]
Ch1_Datalink_B_In[2] contains the Stop Mode A value, where a "1" equates to a "Ramp" deceleration, etc.

The respective Ch1_Datalink_B_Out's point to the same parameters so the values can also be read. Note
these do not have to be equal and are done in the example program for demonstration purposes only
(so changes can be viewed).

The format is:

word [0] = Datalink B1 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (1] = Datalink B1 (high) high word for 32-bit Datalinks
word [2] = Datalink B2 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (3] = Datalink B2 (high) high word for 32-bit Datalinks

12

Copy File
Source Ch1_Datalink_B_In[0]
Dest

Local:1:O.Data[24]

Length

4

COP

Copy File
Source

Local:1:I.Data[24]

Dest Ch1_Datalink_B_Out[0]
Length

4

COP

Channel 1

Datalink B1 Out

(Low)

Datalink B

PowerFlex 70 Parameter 302 [Data In B1] = "100", which points to Parameter 100 [Jog Speed]
Ch1_Datalink_B_In[0] contains the Jog Speed value in hertz, where a "50" equate to 5.0 Hz.

PowerFlex 70 Parameter 303 [Data In B2] = "155", which points to Parameter 155 [Stop Mode A]
Ch1_Datalink_B_In[2] contains the Stop Mode A value, where a "1" equates to a "Ramp" deceleration, etc.

The respective Ch1_Datalink_B_Out's point to the same parameters so the values can also be read. Note
these do not have to be equal and are done in the example program for demonstration purposes only
(so changes can be viewed).

The format is:

word [0] = Datalink B1 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (1] = Datalink B1 (high) high word for 32-bit Datalinks
word [2] = Datalink B2 (low) value for 16-bit Datalinks, low word for 32-bit Datalinks
word (3] = Datalink B2 (high) high word for 32-bit Datalinks