Flashing prealigner firmware #
1. Download #
Download installer for STM32CubeProgrammer from here.
2. Run installer #
Step 1 of 8 #
- Click Next

Step 2 of 8 #
- Click Next

Step 3 of 8 #
- Click I accept the terms of the ….
- Click Next

Step 4 of 8 #
- Click Next

- Click OK

Step 5 of 8 #
- Click Next

Step 6 of 8 #
- Click Next

- If this Windows Security warning appears: Click Install this driver software anyway ..

- Check off on Always trust software … & Click Install

- Repeat this for all drivers from STMICROELECTRONICS

- Click Finish

- Click Next

Step 7 of 8 #
- Click Next

Step 8 of 8 #
- Click Done

3. Connect programmer #
Connect ST-Link programmer USB PC

4. Flash device #
Flash with STM32CubeProgrammer
-
Run STM32CubeProgrammer*
-
Select STLINK
Click reload button

-
If device is found serial number will be displayed

-
Click Connect

If error “No debug probe detected.” pops up,
click Ok and check Connect ST-Link programmer USB PC
-
Successful connection will display Connected and Target information

-
Switch to Erasing & Programming panel

-
Click on Browse and select firmware file

-
Put a mark on Skip flash erase before programming
Put a mark on Verify programming
Click on Start Programming and wait

-
Successful verification will display this message click OK

-
Download complete click OK

-
Disconnect from ST-LINK click Disconnect

-
Close STM32CubeProgrammer
-
Power cycle (restart) Prealigner controller
5. Prepare PuTTY connection #
-
Power cycle (restart) Prealigner controller
-
Connect Prealigner controller to PC
-
Expand Ports (COM & LPT)

-
Disconnect Prealigner controller from PC and memorize which port disappear

-
Connect Prealigner controller to PC and verify that (COM ) port will be listed again*
-
Run PuTTY
-
Select Connection type Serial

-
Enter memorized Serial line COMx and Speed 115200

-
Select Terminal panel

-
Put check as shown on the picture

-
Select Session panel

-
Type prealigner in Saved Sessions and click Save

-
Click Open to establish Connection with Prealigner

-
Verify connection type
VERin terminal

6. Initial Setup #
Setup Prealigner for the first time or Reset all saved Prealigner settings
7. Connect MCDN #
- Type
ARM 2to activate human readable mode>arm 2 > - Type
MCDN 9to establish communication with MCDN>mcdn 9 Connected with 1250000 > - Type
POWto enable servo power>pow > - Type
SONto enable servo>son >
Troubleshooting: MCDN communication check
mcdn 9
pow
son
8. Verify I/O #
Verify Inputs and Output functionality
Output command out #
-
Type
OUT, which will print Output states>out 0. ValChuck : 1 1. ValPins : 1 2. MotPinsUp : 1 >Format:
number. name : state ( 1-enable / 0-disable )
number name description state 1 (enable) state 0 (disable) 0 ValChuck Chuck vacuum valve Valve open Valve closed 1 ValPins Pins vacuum valve Valve open Valve closed 2 MotPinsUp Pins up/down Pins Up Pins down -
Enable/disable output type
OUT [Output Number] [ 1 = enable / 0 = disable ]- Example: enable ValChuck (Chuck vacuum):
>out 0 1 > - Example: disable (lower) MotPinsUp (Pins up/down) if they are enable (pins up):
>out 2 0 >
- Example: enable ValChuck (Chuck vacuum):
-
Check that we have vacuum line to prealigner and make sure that we have vacuum.
-
Check MCDN communication is enable and working without errors. MCDN communication check
-
Enable/Disable ValChuck, ValPins and manually check correct vacuum present/not present
-
Enable/Disable MotPinsUp and visually check correct pins up/pins down
Input command inp #
-
Type
INP, which will print Input states>inp 0. SenChuck : 0 1. SenPins : 0 2. FlgPins : 0 3. FlgHomeR : 0 >Format:
number. name : state ( 1-active / 0-inactive )
number name description state 1 (active) state 0 (inactive) 0 SenChuck Chuck vacuum sensor active inactive 1 SenPins Pins vacuum sensor active inactive 2 FlgPins Pins Moving Pins Flag between up/down sensors ( Pins in motion ) Pins Flag cover up or down sensor ( Pins not moving) 3 FlgHomeR Home R flag Home R Flag covers the sensor Home R Flag doesn’t cover the sensor -
Adjust Chuck and Pins vacuum sensor using the trimers
Note: Make sure that vacuum line is connected to and we have vacuum. 
The leds on the boards should correspond the actual state -
Type
INPand check that we have matching state in the firmware too -
Cover Home R sensor manually

-
Type
INPand check that we have matching state in the firmware too>inp 1. SenChuck : 2. SenPins : 3. FlgPins : 4. FlgHomeR : 1 > -
Uncover Home R sensor

-
Type
INPand check that we have matching state in the firmware too>inp 0. SenChuck : 1. SenPins : 2. FlgPins : 3. FlgHomeR : 0 > -
FlgPins is not possible to be detected using the console because it will be active only during Pins UP/DOWN movement In case they are not properly connected it will display after completing the movement
>inp 0. SenChuck : 1. SenPins : 2. FlgPins : 1 3. FlgHomeR : >
9. Home Prealigner #
- Connect MCDN if is not already connected Connect MCDN
- Type
HOMand check that we have matching state in the firmware too>hom >Axis T : 0002 0x0002 : Stopped Axis R : 0002 0x0002 : Stopped >
10. Set R limits #
- Connect MCDN
- Home Prealigner
- After homing the pins will be roughly at that position

See: Restore From Max Position Error Exceeded
Set Reverse software limit #
-
Move the pins with negative steps until you hit the hard stop
-
Type
mvr r [negative distance in microns]>mvr r -4000 >Axis T : 0002 0x0002 : Stopped Axis R : 0002 0x0002 : Stopped >mvr r -500 >Axis T : 0002 0x0002 : Stopped Axis R : 0002 0x0002 : Stopped > -
Pins at hard stop

-
Move the pins slightly (50 microns) in opposite direction to move away form hard stop.
>mvr r 50 >Axis T : 0002 0x0002 : Stopped Axis R : 0002 0x0002 : Stopped > -
Type
RCPto read current position>rcp 0, -4493 > -
Use this round position to set reverse limit
-
Type
_rl r [position]>_rl r -4490 > -
Type
savepto store this position>savep >
Set Forward software limit #
-
Move the pins with negative steps until you hit the hard stop
-
Type
mvr r [positive distance in microns]>mvr r 8000 >Axis T : 0002 0x0002 : Stopped Axis R : 0002 0x0002 : Stopped >mvr r 2000 >Axis T : 0002 0x0002 : Stopped Axis R : 0002 0x0002 : Stopped > -
Pins at hard stop

-
Move the pins slightly (50 microns) in opposite direction to move away form hard stop.
>mvr r -50 >Axis T : 0002 0x0002 : Stopped Axis R : 0002 0x0002 : Stopped > -
Type
RCPto read current position>rcp 0, 9306 > -
Use this round position to set reverse limit
-
Type
_fl r [position]>_fl r 9300 > -
Type
savepto store this position>savep >
Set Home offset #
10. Disconnect MCDN #
Troubleshooting #
Restore from Max Position Error Exceeded #
>Axis T : 0002
0x0002 : Stopped
Axis R : 00A2
0x0002 : Stopped
0x0020 : Max Position Error Exceeded
0x0080 : No Servo
- Check for mechanical obstacle which prevent motor to reach that position
- Type son to enable again servo power
MCDN communication check #
Type -state to check the state of communication
>-state
MCDN: Connected 1250000 baud, Poll 2000 Hz, Polling, NoError
>
Type -error to check how many packet fail
>-error
MCDN: Checksum PASS: 2777821, FAIL: 1
>