Aligna
®
4D User Manual
70 / 84
Because of that, normally it is not necessary to define all of the parameters, but just set the
main flags, like number of beams, PSD version, etc.)
As an example, the following "UserScript" is seen in the editor:
' ------------------------------------------------------
' Script File for Aligna Standard Demo Setup
' ------------------------------------------------------
' Use of Compiler-Directives, Flags and If statements:
' ******************************************************************************************
' Procedure Intro is called when uC has booted (every time, not only at "default settings")
' ******************************************************************************************
Intro:
SerialNumber= 2167
' --- front panel LCD ------
LCD_Line1$= " Aligna 5.2 "
LCD_Line2$= "TEM Messtechnik GmbH"
SN_Customer$= "SN 2167 Demo TEM III"
Release$= "Release 02.03.2013 "
' --- some Flags for controlling actual configuration (without need to change the complete script) ---
.Beams= 1 ' actual Configuration for OneBeam (1) or TwoBeam (2) system
.RefDetectors= 0 ' 0: no Reference detectors, 1: 1x 4D or 2x 2D, 2: 2x 4D or 4x 2D
.AimPDs= 0 ' AimPDs available? (special photo detectors for auto-alignment systems)
.ADDA= 0 ' with ADDA module (Analog/Digital-Digital/Analog module available
.PSDversion= 7.5 ' PSD-Type
' --- definition of available hardware components ----
BL_BeamOn[0]= 1 ' Beam 0 is on
ModuleAvailable[0]= 1 ' Module #0 is SPM (0= not available, 1= SPM, 2= ADDA)
PiezoAvailable[0]= 1 ' Piezo Servo Board 0: not available, 1: available
SnH_available[0]= 1 ' Sample&Hold Board 0: not available, 1: available
BL_AvailableAB[0]= 3 ' 1: A only, 2: B only, 3: A+B available
' ******************************************************************************************
' Procedure Defaults is called when uC has booted,
' AND the "DefaultParameters" are initiated by pressing a key while booting
' or when the "DefaultParameters" command was chosen
' ******************************************************************************************
Defaults:
Tadaa ' make some noise: I take default parameters
BL_EnableMotor= 1 ' Motors are active
BL_EnablePiezo= 0 ' Piezos are NOT active
' --- Laser properties ---
LaserCwPulsed= 0 ' 1: pulsed 0: cw
LaserRepRate= 4000 ' 4 kHz Reprate low Reprate
AutoPulseDetection= 0 ' no auto-pulse detection
' --- individual Piezo OCLP ---
Ax1x= 1322 : Ax1y= 122 : Ax2x= -2717 : Ax2y= -313
Ay1x= 0 : Ay1y= -2050 : Ay2x= -131 : Ay2y= -4170
Bx1x= 3543 : Bx1y= 463 : Bx2x= -3618 : Bx2y= -270
By1x= 58 : By1y= 4604 : By2x= 188 : By2y= 5420
…etc…
When you save the changed script to the hard disk, Kangoo observes this file, and asks you, if
you want to "flash" the changed script file to µC's EEPROM now. If you confirm, the script with
the actual parameters is pre-compiled and is written to the Flash ROM (EEPROM). From now
on the new parameters are "burned" into the µC, so it is autarky from the PC and can do its
stabilization work.