![Trinamic PD4-170-57-E Скачать руководство пользователя страница 18](http://html1.mh-extra.com/html/trinamic/pd4-170-57-e/pd4-170-57-e_hardware-manual_1163081018.webp)
PDx-170-57-E / TMCM-170 Hardware Manual (V1.10 / 2011-NOV-24)
18
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
9
Appendix
// Initialization PANdrive PD4/PD5-170
// --> Start this initialization procedure, when the initialization
// parameters have been lost, e.g. due to Firmware upgrade <--
// please see manual, if values have to be modified, e.g. due to power supply
// current limitation
// Set Parameter
MST 0
SGP 247, 0, 40 //Initialization Sinus Current A
SGP 248, 0, 35 //Initialization Sinus Current B
SGP 253, 0, 4 //Motor Pole = 4
SGP 254, 0, 0 //Hall Sensor Invert
PD4
// SGP 254, 0, 1 //Hall Sensor Invert
PD5
SGP 250, 0, 2000 //Encoder Steps per Rotation
SGP 252, 0, 1 //Reverse Encoder Null Polarity
SGP 251, 0, 1 //Reverse Encoder Direction
PD4
// SGP 251, 0, 0 //Reverse Encoder Direction
PD5
SGP 249, 0, 4 //Init Mode 4
SAP 159, 0, 1 //Commutation Mode 1 = Sinus / 0 = Block
SAP 160, 0, 1 //Start Initialization
SAP 4, 0, 3000 //max. Pos. Velocity
ROR 0, 0
A: GAP 160, 0 //Ready
COMP 1
JC NE, A
SAP 6, 0, 100 //Max. Current
SAP 11, 0, 2000 //Acceleration
SAP 146, 0, 1 //Use Velocity PID
// Store Parameter
STAP 6, 0 //Store Max Current
STAP 4, 0 //Store Max Pos. Velocity
STAP 165, 0 //Store Commutation Offset !
SGP 249, 0, 3 //Init Mode 3 ( N-Kanal )
STOP