EasyManuals Logo

Haas VF-1 User Manual

Haas VF-1
564 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #375 background imageLoading...
Page #375 background image
37596-8000
MACROS
June 1999
Logical Operators
Logical operators are operators that work on binary bit values. Macro variables are floating point numbers.
When logical operators are used on macro variables, only the integer portion of the floating point number is
used. The logical operators are:
OR - logically OR two values together
XOR - Exclusively OR two values together
AND - Logically AND two values together
Examples:
#1=1.0; 0000 0001
#2=2.0; 0000 0010
#3=#1 OR #2 0000 0011 Here the variable #3 will contain 3.0 after the OR operation.
#1=5.0;
#2=3.0;
IF [[#1 GT 3.0] AND [#2 LT 10]] GOTO1 Here control will transfer to block 1 because #1 GT 3.0 evaluates
to 1.0 and #2 LT 10 evaluates to 1.0, thus 1.0 AND 1.0 is 1.0
(TRUE) and the GOTO occurs.
As can be seen from the previous examples, CARE must be taken when using logical operators so that the
desired result is achieved.
Boolean Operators
Boolean operators always evaluate to 1.0 (TRUE) or 0.0 (FALSE). There are six Boolean operators. These
operators are not restricted to conditional expressions, but they most often are used in conditional expres-
sions. They are:
EQ - Equal to
NE - Not Equal to
GT - Greater Than
LT - Less Than
GE - Greater than or Equal to
LE - Less Than or Equal to
The following are four examples of how Boolean and Logical operators can be used:
Example Explanation
îš—îš—îš—îš—îš—îš—îš— îš—îš—îš—îš—îš—îš—îš—îš—
IF [#1 EQ 0.0] GOTO100; Jump to block 100 if value in variable #1 equals 0.0.
WHILE [#101 LT 10] DO1; While variable #101 is less than 10 repeat loop DO1..END1.
#1=[1.0 LT 5.0]; Variable #1 is set to 1.0 (TRUE).
IF [#1 AND #2 EQ #3] GOTO1 If variable #1 logically ANDed with variable #2 is equal to the
value in #3 then control jumps to block 1.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Haas VF-1 and is the answer not in the manual?

Haas VF-1 Specifications

General IconGeneral
BrandHaas
ModelVF-1
CategoryPower Tool
LanguageEnglish

Related product manuals