Rockwell-automation 8520-GUM 9/Series CNC Grinder Operation and Progra Uživatelský manuál Strana 686

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 820
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 685
Paramacros
Chapter 20
20-42
Direct Assignment Through Programming
This assignment method applies to l ocal, common, system, and PAL
parameters. You can perform direct assignment in main, macro, or MDI
program s. Direct assignment is done by setting the parameter equal to
some value in an equation using the = operator. For example, to assign
a value of 2 to parameter number 100, simply enter the following program
block:
#100=2;
The value to the left of the equals sign must contain the # sign followed by
a legal parameter number. This parameter number can also take on the
form of:
#parameter expression = parameter expression
Example 20.14
Legal Parameter Numbers
#6=1;
#144=1;
#[14/2]=1;
#[#6]=1;
In Example 20.14, all of the parameter numbers are legal. Any time you
use a different parameter between the [] symbols, the current
value of that
parameter is evaluated. For example:
#1=4;
#1=#1+2;
The net result of the above two blocks would be the assignment of a value
of 6 to parameter #1.
Example 20.15 illustrates the assignment of values to t he parameters.
Example 20.15
Assigning Values to Parameters
#100=1+1;
#100=5-3;
#100=#3;
#100=#7+1;
#100=#100+1;
You can also assign multiple paramacro parameters in a single block. In a
multiple assignment block, each assignment is separated by a comma. For
example:
#1=10,#100=ROUND[#2+#3],#500=10.0*5;
Zobrazit stránku 685
1 2 ... 681 682 683 684 685 686 687 688 689 690 691 ... 819 820

Komentáře k této Příručce

Žádné komentáře