Bosch 6000 User's Guide Page 21

  • Download
  • Add to my manuals
  • Print
  • Page
    / 268
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 20
6
6000 Series Programmer's Guide
Command Value Substitutions
Many commands can substitute one or more of its command field values with one of these
substitution items (demonstrated in the programming example below):
VARB...... Uses the value of the binary variable to establish all the command fields.
VAR ....... Places current value of the numeric variable in the corresponding command field.
READ...... Information is requested at the time the command is executed.
DREAD .... Reads the RP240's numeric keypad into the corresponding command field.
DREADF .. Reads the RP240's function keypad into the corresponding command field.
TW ......... Places the current value set on the thumbwheels in the corresponding command field.
DAT ....... Places the current value of the data program (DATP) in the corresponding command field.
Programming Example: (NOTE: The substitution item must be enclosed in parentheses.)
VAR1=15 ; Set variable 1 to 15
A5,(VAR1),4,4 ; Set acceleration to 5,15,4,4 for axes 1-4, respectively
VARB1=b1101XX1 ; Set binary variable 1 to 1101XX1 (bits 5 & 6 not affected)
GO(VARB1) ; Initiate motion on axes 1, 2 & 4 (value of binary
; variable 1 makes it equivalent to the GO1101 command)
OUT(VARB1) ; Turn on outputs 1, 2, 4, and 7
VARS1="Enter Velocity" ; Set string variable 1 to the message "Enter Velocity"
V2,(READ1) ; Set the velocity to 2 on axis 1. Read in the velocity for
; axis 2, output variable string 1 as the prompting message
; 1. Operator sees "ENTER VELOCITY" displayed on the screen.
; 2. Operator enters velocity prefixed by !' (e.g., !'20).
HOMV2,1,(TW1) ; Set homing velocity to 2 and 1 on axes 1 and 2, respectively.
; Read in the home velocity for axis 3 from thumbwheel set 1
HOMV2,1,(DAT1) ; Set homing velocity to 2 and 1 on axes 1 and 2, respectively.
; Read home velocity for axis 3 from data program 1.
RULE OF THUMB
Not all of the commands allow command field substitutions. In general, commands with a
binary command field (<b> in the command syntax) will accept the VARB substitution.
Commands with a real or integer command field (<r> or <i> in the command syntax) will
accept VAR, READ, DREAD, DREADF, TW or DAT.
Assignment and Comparison Operators
Comparison and assignment operators are used in command arguments for various functions
such as variable assignments, conditional branches, wait statements, conditional GOs, etc.
Some examples are listed below:
Assign to numeric variable #6 the value of the encoder position on axis #3 (uses the PE
operator): VAR6=3PE
Wait until inputs #3 & #6 become active (uses the IN operator): WAIT(IN=bxx1xx1)
Continue until the value of numeric variable #2 is less than 36: UNTIL(VAR2<36)
IF condition based on if a target zone timeout occurs on axis 2 (uses the AS axis status
operator, where status bit #25 is set if a target zone timeout occurs): IF(2AS.25=b1)
The available comparison and assignment operators are listed below. For full descriptions,
refer to their respective descriptions in the 6000 Series Software Reference
(be sure to refer only to the commands in brackets—e.g., A is the acceleration setup command,
but [ A ] is the acceleration assignment/comparison operator).
Page view 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 267 268

Comments to this Manuals

No comments