150
Command, function and parameter description Section 6-3
Description: The HLS_NODE parameter defines the Slave unit number for the Host Link
Slave protocol. The MC Unit will only respond to Host Link Master command
strings with the unit number as specified in this parameter. The valid range for
this parameter is [0, 31]. The default value is 0.
See also: HLS_MODEL
6-3-97 I_GAIN
Type: Axis Parameter
Description: The I_GAIN parameter contains the integral gain for the axis. The integral out-
put contribution is calculated by multiplying the sums of the following errors
with the value of the I_GAIN parameter. The default value is zero.
Adding integral gain to a servo system reduces positioning error when at rest
or moving steadily. It can produce or increase overshooting and oscillation
and is therefore only suitable for systems working on constant speed and with
slow accelerations.
See section 1-4-1 Servo System Principles for more details.
Precautions: In order to avoid any instability the servo gains should be changed only when
the SERVO is OFF.
See also: D_GAIN, OV_GAIN, P_GAIN, VFF_GAIN
6-3-98 IF THEN ELSE ENDIF
Type: Structural Command
Syntax: IF
condition
THEN
<commands>
[ ELSE
<commands>
]
ENDIF
IF
condition
THEN
<commands>
Description: The IF..THEN..ELSE..ENDIF structure controls the flow of the program based
on the results of the condition. If the condition is TRUE the commands follow-
ing THEN up to ELSE (or ENDIF if not included) will be executed. If the condi-
tion is FALSE the commands following ELSE will be executed or the program
will resume at the line after ENDIF in case no ELSE is included. The ENDIF is
used to mark the end of the conditional block.
Precautions: IF...THEN [ELSE] ENDIF sequences can be nested without limit. For a multi-
line IF...THEN construction, there must not be any statement after THEN. A
single-line construction must not use ENDIF.
Arguments:
condition
Any logical expression.
commands
Any valid BASIC commands.
Examples: Example 1
IF MPOS > (0.22 * VR(0)) THEN GOTO exceeds_length
Example 2
IF IN(0) = ON THEN
count = count + 1
PRINT "COUNTS = ";count
fail = 0
ELSE
fail = fail + 1
ENDIF