Command Descriptions
335
Numeric-to-Binary Conversion:
VAR1=-5
; Set numeric variable value = -5
VARB1=VCVT(VAR1)
; Convert the numeric value to a binary value and
; store in VARB1
VARB1
; Display value of VARB1. The response should be:
; *VARB1=1101_1111_1111_1111_1111_1111_1111_1111
VAR1=25
; Set numeric variable value = 25
VARB1=VCVT(VAR1)
; Convert the numeric value to a binary value and
; store in VARB1
VARB1
; Display value of VARB1. The response should be:
; *VARB1=1001_1000_0000_0000_0000_0000_0000_0000
Binary-to-Numeric Conversion:
VARB1=b0010_0110_0000_0000_0000_0000_0000_0000 ; Set binary variable = +100.0
VAR1=VCVT(VARB1)
; Convert the binary value to a numeric value
VAR1 ;
*VAR1=+100.0
[ VEL ]
Velocity (Commanded) Assignment
Type
Assignment or Comparison
Syntax
See below
Units
n/a
Range
n/a
Default
n/a
Response
n/a
See Also
SCALE, SCLV, SFB, TVEL, TVELA, V, [ V ], VELA
Product Rev
GT6K 6.0
GV6K 6.0
Use the
VEL
operator to compare the current
commanded
velocity to another value or variable, or to assign
the current commanded velocity to a variable. The velocity value used in any comparison, or in any
assignment statement, is the current commanded velocity value, not the
programmed
velocity (
V
) or the
actual velocity as measured from the feedback device (
VELA
).
Syntax:
VARn=VEL
where “
n
” is the variable number, or
VEL
can be used in an expression such as
IF(VEL>4)
.
The
VEL
value represents the current commanded velocity. It is not the programmed velocity (
V
). If scaling
is enabled (
SCALE1
), the
VEL
value is scaled by the velocity scaling factor (
SCLV
).
GT6K Steppers:
If scaling is disabled (
SCALEØ
), the value is measured in revolutions/sec (actual velocity
in commanded counts/sec divided by the drive resolution
DRES
value).
GV6K Servos:
If scaling is disabled (
SCALEØ
), the value is measured in encoder revs/sec or resolver
revs/sec.
Example:
IF(VEL<25)
; If the current velocity is less than 25 units/sec,
; then do the statements between the IF and NIF
VAR1=V*2
; Variable 1 = programmed velocity times 2
NIF
; End the IF statement
www.comoso.com
Summary of Contents for Gemini GT6K
Page 24: ...www comoso com ...
Page 40: ...www comoso com ...
Page 344: ...www comoso com ...
Page 350: ...www comoso com ...