Magnavox W-10CR Installationsanleitung Seite 77

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 322
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 76
Programming Commands 61
7.1.6 Program Limits
When writing an MX program please observe the follow-
ing maximum values; otherwise the project will not com-
pile.
Item Maximum Allowed
Line labels 100 total per task
Local Variables 100 total per task
Common Variables 100 total per project
Literal’ s 100 total per project
DATA Elements 100 total per task
Nested FOR loops 100 total per task
Nester DO loops 100 total per task
7.1.7 Numeric Formats and Range
Numeric data may be represented in standard format or in
scientific notion format. The following are illustration of
each type of format.
Standard format:
1234567
-1.234567
0.1234567
1234.567
etc
Scientific notation format
2e6 (2,000,000)
2.0456e4 (20,456)
-3.14159e0 (-3.14159)
6.78e-2 (0.0678)
etc
The largest number that can be used is 3.4e38. The small-
est number that can be used is 2.9e-39. The numeric reso-
lution is 1 part in 8,388,608 or 1.2e-7.
7.1.8 Program Comments
An apostrophe (‘) in a program line prevents a line from
executing and allows program comments /documentation.
All text to the right of the ‘ to the end of line is not consid-
ered part of the command during execution.
Examples:
‘MOVE=10 The program will not execute this line
MOVE=100 ‘The program will execute this line
7.1.9 Axis Related Command Syntax
The syntax for programming commands has numerous
choices. Some are I/O related and some are axis related.
The I/O related syntax’s are covered in detail for that spe-
cific command. However, the axis related commands are so
numerous that they will be covered in this section of the
manual.
7.1.9.1 Definitions Used in Syntax
Descriptions
COMMAND represents an arbitrary axis command.
Expression
One or more constants, variables or commands that return
data operated on by mathematical operators or mathemati-
cal functions. Expressions can be very simple (as in the
case of a single constant or variable) or quite complex (as
shown in the last example below). The compiler will indi-
cate an error if an expression is too complex. For all practi-
cal purposes it is not possible to write an expression that
is too complex.
The following are all valid expressions:
5.2 (single constant)
X (single variable)
SPEED(2) (command)
X+3 (addition of variable and constant)
SIN(X-3) (sine function of the difference of a
variable and constant)
(X+3)*SIN(Y)/(Z+SQRT(X)) (complicated
expression)
axis
Specifies the axis on which the command is performed.
Axis is specified as an expression that evaluates to the
desired axis number. If the expression evaluates to a non-
whole number, then the nearest whole number less than
the expression value is used. Axis is most commonly
specified as a constant.
Example: COMMAND(x+2)
with x = 1.5 is equivalent to COMMAND(3)
[text]
Denotes 0 or more occurrences of what is enclosed by the
brackets. The brackets are not part of the syntax.
7.1.9.2 Syntax Descriptions
COMMAND(axis) = expression
Execute the command, on the specified axis, using the data
supplied by the expression.
Syntax example: MOVE(2) = 10
performs an index motion of 10 units on axis 2
COMMAND = expression list
Execute the command, on the 1 or more specified axes,
using the data supplied by the expression list.
expression list
1 to N expressions. Commas follow each expression in the
list except for the last one. (N = number of axes in the con-
troller: 2,4,6 or 8) The first expression in the list is for axis
1, the next for axis 2, etc. To skip an axis, simply enter a
comma for that axis. Although these examples use con-
Seitenansicht 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 321 322

Kommentare zu diesen Handbüchern

Keine Kommentare