Hiwin D1-N Series Assembly And Commissioning Instructions page 165

Servo drive amplifier
Hide thumbs Also See for D1-N Series:
Table of Contents

Advertisement

Example 3: Simple relative positioning between 2 positions with zero point
correction
#task/1;
call _sequence program;
ret;
_sequence program:
till(X_en=1);
till(X_I_flag=2);
X_trg = 107888;
sleep 500;
X_locate_pos=0;
seton O3;
sleep 500;
setoff O3;
_Loop:
till(I5);
X_trg += 720896;
till(~X_run);
till(I5);
X_trg -= 1441792;
till(~X_run);
goto _Loop;
ret;
Example 4: Use of customer-specific variables, motion profile parameters, IF-
ELSE DO conditions and stop command.
//######### Custom variable = Cycle counter and automatic stop once the Stop conditions are reached #########
#long ciclo;
#long numero;
#task/1;
X_vel_max = 1000000;
X_acc = 20000000;
X_dcc = 20000000;
X_new_sm_fac=50;
X_max_err = 32000;
ciclo = 0;
numero = 0;
till(X_en=1 & X_dcbl);
till(~X_run);
sleep 1000;
X_locate_pos = 0;
_Test1:
sleep 300;
X_max_err = 700;
X_trg = 58000;
till(~X_run & X_en=1 );
sleep 300;
X_max_err = 700;
X_trg = 1000;
till(~X_run & X_en=1 );
Assembly and Commissioning Instructions Servo amplifier D1-N  15.10.2015
// First task; this task runs immediately after controller initialisation
// Program called "_sequence program" is called up
// Wait for controller enable and/or until motor is energised
// Wait for index mark of motor once reference travel has been started
// Reference travel is permanently assigned in "Lightening" and is started via a dig. input
// Zero point correction, motor positioned absolutely
// Pause 500 ms
// Machine zero point
// Message that reference travel is complete; set output O3
// Pause 500 ms
// Reset output O3
// Label name for jumping to end of program
// Wait until input I5 is activated
// Relative position in positive direction in increments
// Wait until motor is no longer moving
// Relative position in negative direction in increments
// Program jump
// Cycle variable
// Number variable
// Max. speed in incr./s
// Max. acceleration in incr./s²
// Max. deceleration in incr./s²
// Jerk limitation
// Max. position error before motor commutation in incr.
// Set cycle variable to zero
// Set number variable to zero
// Wait until motor commutation takes place
// Wait until motor is not moving
// Wait 1000 ms
// Position = set 0
// Jump mark
// Wait 300 ms
// Max. position error in motion in incr.
// Position absolute 25,000 inc. = 25 mm
// Wait until motor is not moving but is still energised
// Wait 1000 ms
// Max. position error in motion in incr.
// Position absolute 5,000 inc. = 5 mm
// Wait until motor is not moving but is still energised
165 / 183

Advertisement

Table of Contents
loading

This manual is also suitable for:

D1-n-09D1-n-18D1-n-36D1-n-90D1-n-09 seriesD1-n-18 series ... Show all

Table of Contents