Galil Design Kit (GDK)

First steps for motion controllers

Simple relative move command

'***************************************************************************
'Description:
'Simple relative move command
'***************************************************************************
AC 1000000 ;'Acceleration
DC 1000000 ;'Deceleration
SP 20000 ;'Speed
PR 40000 ;'Define relative move command
BG ;'Start move command
EN ;'Program end

Template for BLDC servo motor with trapezoidal commutation on axis A

'*************************************
' Description:
' Configuration of the A-axis for BLDC. Feedback is a digital encoder with TTL.
' Various values must be adapted for the respective drive/controller constellation!
' DMC
' BLDC DC servo motor

'*************************************
' General configuration
'*************************************
#AUTO ;' With this jump label the program already starts when switching on

MG "General configuration"
ST ;' Stop all axes if something is still running
WT 1000 ;' Wait 1 second
MO ;' Switch off the control for all axes, they are now free to move

IA 192,168,9,111 ;' Define IP address
TM 250 ;' Here we define the sample rate to 250 ms

'*************************************
' Axis configuration
'*************************************
MG "Initialization start"
MT 1 ;' Motor type is a servo, with -1 you can change the direction
'CE 0 ;' or also with the CE command
TL 1 ;' Set the current/torque limitation for the continuous value
TK 9.99 ;' Set the current/torque limitation for the peak value
AG 0 ;' Set the current amplification in the controller, different depending on the drive
AU 0 ;' AG and AU are also dependent on the inductance of the drive
                 ;' For calculation see manual in the appendix.

'Define PID values for axis A
KD 60 ;' Differential component (influence on damping)
KP 6 ;' Proportional component (influence on dynamics)
KI 0.1 ;' Integral component (influence on positioning accuracy)

IT 1 ;' If this filter was active, first return to default

AC 1073740800 ;'Acceleration, maximum
DC 1073740800 ;'Deceleration, maximum
SP 10000 ;'Initial speed

DP 0 ;'Sets the motor position counter to 0
WT 1000 ;'Wait 1s
MG "Configuration ready"

'*************************************
' Main program
'*************************************

'Move to starting position
SHA ;' Axis A switch on the control loop/servo controller
PAA=1000 ;' Move to position 1,000 inc absolute move command
BGA ;' Start move command
AMA ;' Wait until move command is finished
MG "Pos. is: ",TP, " ink"

EN ;'Program end

Template for BLDC servo motor with sine commutation without Halls

'*************************************
' Description:
' Configuration of the A-axis for BLDC. Feedback is a digital encoder with TTL.
' Various values must be adapted for the respective drive/controller constellation!
' DMC
' Brushless DC servo motor without Halls

'*************************************
' General configuration
'*************************************
#AUTO ;' With this jump label the program already starts when switching on

MG "General configuration"
ST ;' Stop all axes if something is still running
WT 1000 ;' Wait 1 second
MO ;' Switch off the control for all axes, they are now free to move

IA 192,168,9,111 ;' Define IP address
TM 250 ;' Here we define the sample rate to 250 ms

'*************************************
' Axis configuration
'*************************************
MG "Initialization start"
MT 1 ;' Motor type is a servo, with -1 you can change the direction
'CE 0 ;' or also with the CE command
TL 1 ;' Set the current/torque limitation for the continuous value
TK 9.99 ;' Set the current/torque limitation for the peak value
AG 0 ;' Set the current amplification in the controller, different depending on the drive
AU 0 ;' AG and AU are also dependent on the inductance of the drive
                 ;' For calculation see manual in the appendix.

'Initialization of sine commutation with BX with limited travel,
'so that the motor ideally moves max. 15 degrees. A current peak is applied to the motor
'to fix the position of the rotor or to adjust the commutation.
BAA;' Configure axis A for sine commutation
BMA=1333.3333;' Encoder pulses per revolution / number of pool pairs
' Important: Always specify all 4 decimal places!
BX<1000;' Hold time in milliseconds (duration of the current peak)
BXA=3;' Activate motor briefly with 3 V control signal
' (motor current [A] = motor control signal [V]* amplification [A/V])

'Define PID values for axis A
KD 60;' Differential component (influence on damping)
KP 6;' Proportional component (influence on dynamics)
KI 0.1;' Integral component (influence on positioning accuracy)

IT 1;' If this filter was active, first reset to default

AC 1073740800 ;'Acceleration, maximum
DC 1073740800 ;'Deceleration, maximum
SP 10000 ;'Initial speed

DP 0 ;'Sets the motor position counter to 0
WT 1000 ;'Wait 1s
MG "Configuration ready"

'*************************************
' Main program
'*************************************

'Move to starting position
SHA ;' Axis A switch on the control loop/servo controller
PAA=1000 ;' Move to position 1,000 inc absolute move command
BGA ;' Start move command
AMA ;' Wait until move command is finished
MG "Pos. is: ",TP, " ink"

EN ;' End of program


To top