by listrik » 22 May 2012, 16:23
SGP 251, 0, 1 is correct, I have checked the encoder position display. A right rotation of the motor increases the counter.
I can' test the motor with hall sensors because my motor doesn't have any. However, I have connected the hall sensor part of another motor, leaving the power wires connected to my motor. When I turn the hall sensored motor manually, the sensorless motor will follow that rotation.
After raising the encoder voltage to 5.5V, I finally got initialization mode 4 running.
With SGP 249, 0, 4 and SAP 160, 0, 0; the motor now turns one turn at maximum, oscillates slightly two or three times and then stops under high current. I can hardly turn the shaft by hand.
There is now noticeable difference between modes SGP 249, 0, 3 and SGP 249, 0, 4
The ROR command doesn't have the expected effect.....
My current parameter list is:
//Initialization
SGP 253, 0, 12 //Motor poles 3 phases * 4 poles
SGP 250, 0, 1024 //Encoder Steps
SGP 251, 0, 1 //Direction 0=CW 1=CCW. "1" because encoder is mounted on drive side of motor turning in opposite direction
SGP 252, 0, 7 //N-Channel Polarity
SGP 249, 0, 4 //4=Encoder with Index-Chan with first init
SAP 160, 0, 0 //Do init run
LOOP:
GAP 160, 0 //if done, result will be = 1
JC NZ, Done //Jump Conditional if Not Zero
Ja Loop
Done:
SAP 6, 0, 20 //Current [mA]= Alimit * Div = 0..24A * 5,1 (Sinus Mode) 4A * 5,1 = 20
SAP 128, 0, 0 //Standalone Mode 0=Normal 1=Use AI
SAP 11, 0, 0 //Acceleration 0=no ramp else RPM/Sec/Sec
SAP 147, 0, 0 //PID 0=Enable 1=Disable
SAP 159, 0, 1 //Commutation 0=Block 1=Sine
ROR 0, 300 //Target speed 300 RPM
MainLoop:
GAP 0, 0 //Dummy read
JA MainLoop //Jump to MainLoop