Rockwell-automation 2098-IPD-xxx Ultra5000 C Programming using the Mot Instrukcja Użytkownika Strona 3

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 114
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 2
i Publication 2098-PM001E-EN-P — July 2002
Table of Contents
Preface
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-1
Who Should Use this Manual. . . . . . . . . . . . . . . . . . . . . . . P-1
Where to Find Help . . . . . . . . . . . . . . . . . . . . . . . . . . . P-1
Contents of this Manual. . . . . . . . . . . . . . . . . . . . . . . . . . . P-2
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . P-2
Conventions Used in this Manual. . . . . . . . . . . . . . . . . . . . P-2
Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-3
Allen-Bradley Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-3
Local Product Support . . . . . . . . . . . . . . . . . . . . . . . . . P-3
Technical Product Assistance . . . . . . . . . . . . . . . . . . . . P-3
Chapter 1
Programming Motion Control
in C
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Creating A Basic Motion Program . . . . . . . . . . . . . . . . . . . 1-1
Creating and Running a Program . . . . . . . . . . . . . . . . . 1-2
Example 1 - A Basic Motion Program . . . . . . . . . . . . . . . . . . . . 1-2
Example 1 Explained. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Variables, Loops, and Constants . . . . . . . . . . . . . . . . . . 1-5
Example 2.1 - A Motion Program Using Variables . . . . . . . . . . . 1-5
Example 2.1 Explained . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Example 2.2 - Varying the Program using Variables . . . . . . . . . 1-8
Example 2.2 Explained . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Example 2.3 - Another Variance of the Program using Variables . .
1-10
Example 2.3 Explained . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
User Defined Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
Example 3 - Nested Functions in a Motion Program . . . 1-11
Example 3 Explained . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Program Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Example 4 - A Jog Program . . . . . . . . . . . . . . . . . . . . . 1-14
Example 5 - A Gear Program . . . . . . . . . . . . . . . . . . . . 1-15
Homing with Latch Functions . . . . . . . . . . . . . . . . . . . . . . 1-16
Example 6 - A Homing Program . . . . . . . . . . . . . . . . . . 1-16
Non-Volatile Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Example 7 - A Non-Volatile Array Program . . . . . . . . . . 1-17
Types, Operators, and Expressions . . . . . . . . . . . . . . . . . . 1-18
Variable Names and Data Types/Sizes . . . . . . . . . . . . . 1-18
Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Relational and Logical Operators . . . . . . . . . . . . . . . . . . . . 1-21
Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Operator Precedence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Control Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Przeglądanie stron 2
1 2 3 4 5 6 7 8 ... 113 114

Komentarze do niniejszej Instrukcji

Brak uwag