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

The text of a spec sheet · part 20 of 23

SLC Servo Control Module (Catalog No. 1746-HSRV) User Manual, pages 191 to 200

Pages 191 to 200 of 224

The original document is the PDF (1.8 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.

Filed in the catalog under the Allen-Bradley 1746-HS

Page 191

C-2

Programming Examples

The following table for a typical I/O configuration used in the previous diagram shows the possible slot occupants with their catalog and card numbers. (Rack 1=1746 A4 4 slot backplane) Slot 0 1 2 3

Ladder Rung Examples

Catalog # 1747-L542 1746-HSRV OTHER OTHER

Card Description 5/04 CPU -20K USER MEMORY SLC Servo Module I/O Module - ID code = 10114 I/O Module - ID code = 10114

The following ladder rung examples may be modified to suit your particular application. They accurately show how a ladder rung may be constructed to perform a specific function.

Rung 0 – Manual Triggering Configuration The example in Rung 0 shows how to manually trigger a configuration. Figure C.2 Rung 0

Rung 1 – Download Configuration Rung 1 shows how to set up a rung instruction to download the configuration to the SLC Servo Module in slot 1 of the backplane. The Floating-point configuration parameters are in file F8 and the discrete parameters are in file N7. For more specific information on configuring an SLC Servo Module see Chapter 7, Setting Up Your SLC Servo Module.

Publication 1746-6.1.2 - July 2000

Page 192

Programming Examples

C-3

Figure C.3 Rung 1

This table contains floating-point configuration data for rung 1 as it appears when accessed by the program. Figure C.4 File F8 Data Table

This table shows a breakdown of the integer values for each address. Address F8:0 F8:5 F8:10 F8:15 F8:20

Data 2000

8000

0

0

0

0

0

45

-45

0

10

–10

4500

1

0

0

0.5

10

0.01

1

0

Publication 1746-6.1.2 - July 2000

Page 193

C-4

Programming Examples

This table shows the integer configuration data for rung 1 as it would appear when accessed from the program. Figure C.5 Data Table for File N7

The following table more readily displays the same binary data information. Address

Binary Data

N7:0 N7:1 N7:2 N7:3

15 1 0 0 0

14 0 0 0 0

13 0 0 0 0

12 0 0 0 0

11 1 0 0 0

10 1 0 0 0

9 0 0 0 0

8 0 0 0 0

7 0 0 0 0

6 1 0 0 0

5 0 0 0 0

4 1 0 0 0

3 0 0 0 0

2 0 0 0 0

1 0 0 1 0

0 1 1 1 0

Rung 2 – Timer Delay The following rung example shows how to place a timer delay in your program. Rung 2 initiates a one second timer to delay configuration to check for any configuration download errors. Figure C.6 Rung 2

Publication 1746-6.1.2 - July 2000

Page 194

Programming Examples

C-5

Rung 3 – Checking For Successful Configuration Rung 3 is an example of checking for a successful configuration. After the one second delay, this rung checks for successful configuration. IMPORTANT

Error processing is not part of this example and application programmers must handle errors as appropriate to their application.

Figure C.7 Rung 3

Rung 4 – Downloading Blend Profiles This rung example shows how to download your blend profiles. Rung 4 downloads the blend profiles located in file F51. For more detailed information about Blend Profiles see the Blend Profiles section of Chapter 8, Programming the SLC Processor to Run the SLC Servo Module. Figure C.8 Rung 4

Publication 1746-6.1.2 - July 2000

Page 195

C-6

Programming Examples

Data for the blend move in rung 4 appear in the following tables. The figure below shows the data table for file F51 as it appears in the program. The following data table displays the F51 file data as it would appear when accessed directly in the program. Figure C.9 Data Table for File F51

The following table breaks the data down by the address and function. It is the same data that appears in the previous diagram. Address F51:0 F51:3 F51:6 F51:9 F51:12

Accel 1 1 1 1 1

Speed 4500 500 100 10 4500

Position -100 -150 -200 -205 0

The diagram below shows the values for file N50 as it appears in the program.

Publication 1746-6.1.2 - July 2000

Page 196

C-7

Programming Examples

Figure C.10 File N50 Data Table

The following table shows the binary data for the values in data file N50. Address N50:0 N50:1

Binary Data 15 14 13 1 1 0 0 0 0

12 0 0

11 0 0

10 0 0

9 0 0

8 0 0

7 0 0

6 0 0

5 0 0

4 0 0

3 0 0

2 0 1

1 0 0

0 0 1

Rung 5 – Setting the Timer Delay Rung 5 is an example of setting the timer to delay for one second. This rung starts the timer for a one second delay to check for any configuration download errors. Figure C.11 Rung 5

Publication 1746-6.1.2 - July 2000

Page 197

C-8

Programming Examples

Rung 6 – Error Checking For Successful Download Rung 6 is an example of error checking to see if the download was successful. Following the one second delay, it checks for the successful configuration download or errors. IMPORTANT

Error processing is not part of this example and application programmers must handle errors as appropriate to their application.

Figure C.12 Rung 6

Rung 7 – Clear Fault Bits Command The following sample rung shows how to set up a Clear Faults bit command. Rung 7 clears one fault error at a time (FIFO) on the SLC Servo Module. The fault error is on word 4 of the status area of the SLC Servo Module. For more detailed information on clearing faults using discrete bit commands, see the Word 1 Discrete Bit Commands table in Chapter 8, Programming the SLC Processor to Run the SLC Servo Module. Figure C.13 Rung 7

Publication 1746-6.1.2 - July 2000

Page 198

Programming Examples

C-9

Rung 8 – Clear All Faults Bit This rung is an example of a Clear all Faults bit command. Rung 8 clears all errors in the FAULT (FIFO) on the SLC Servo Module when the bit is toggled. For more detailed information on clearing all faults using discrete bit commands, see the Word 1 Discrete Bit Commands table in Chapter 8, Programming the SLC Processor to Run the SLC Servo Module. Figure C.14 Rung 8

Rung 9 – Cancel Move This rung is an example of how to use the Cancel Move bit command. When the bit (B3:0/8) is toggled, a move executing on the SLC Servo Module is cancelled. For more detailed information on cancelling a move using discrete bit commands, see the Word 0 Discrete Bit Commands table in Chapter 8, Programming the SLC Processor to Run the SLC Servo Module. Figure C.15 Rung 9

Rung 10 – Hold/Unhold This rung shows how to use the Hold/Unhold bit command. When the bit (B3:1/2) is toggled, a move executing on the SLC Servo Module is in a hold state.

Publication 1746-6.1.2 - July 2000

Page 199

C-10

Programming Examples

For more detailed information on putting a move on Hold/Unhold using discrete bit commands, see the Word 0 Discrete Bit Commands table in Chapter 8, Programming the SLC Processor to Run the SLC Servo Module. Figure C.16 Rung 10

Rung 11 – Program an Estop Request The following example in Rung 11 shows how to program an Estop Request. When the bit (B3:0/9) is toggled, the SLC Servo Module is commanded to switch to the Estop state. For more detailed information on entering an Estop Request using discrete bit commands, see the Word 0 Discrete Bit Commands table in Chapter 8, Programming the SLC Processor to Run the SLC Servo Module. Figure C.17 Rung 11

Rung 12 – ABSOLUTE Move This rung shows how to enter an ABSOLUTE move command. This rung initiates an ABSOLUTE move. The move parameters are in file F42. The bits to set for initiating the move are in file N31. For more information on adding an ABSOLUTE Move, see the appropriate sections on Using Simple Move Commands in Chapter 8, Programming the SLC Processor to Run the SLC Servo Module.

Publication 1746-6.1.2 - July 2000

Page 200

Programming Examples

C-11

Figure C.18 Rung 12

Data for the absolute move in rung 12 appear in the following tables. The following diagram is of the data table for file F42 as it would appear when accessed from the program. Figure C.19 Data Table for File F42

The following table shows the values for file F42 with the appropriate addresses. Address

Acceleration

F42:0

1

Velocity Units/ Minute 1000

Position 1000

The next diagram shows the Data Table for File N31 when accessed from the program.

Publication 1746-6.1.2 - July 2000