The below example sets typical motion profile commands a system would configure1, enabling the motor power2 and the four different move types3supported in Profile Position Mode using SDOs with Node ID 41h.
1Typical motion profile commands could be set each time on power up from host or set using a configuration file and stored to NVM once.
2Enabling the motor power only has to be done once on power up.
3The Control Word data selects the move type.
CANopen Profile Position Mode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | Typical motion profile commands and enabling motor power - '***** Typical Motion Parameters ***** >> Id=0641, Rtr=00, Data= 2F 04 22 00 50 00 00 00 'Set run current to 80% >> Id=0641, Rtr=00, Data= 23 84 60 00 40 42 0F 00 'Set deceleration to 1M steps/sec^2 >> Id=0641, Rtr=00, Data= 23 83 60 00 40 42 0F 00 'Set acceleration to 1M steps/sec^2 >> Id=0641, Rtr=00, Data= 23 81 60 00 00 D0 07 00 'Set max velocity to 512K steps/sec '***** Enable motor power - DSP402 state machine ***** >> Id=0641, Rtr=00, Data= 2B 40 60 00 06 00 00 00 'Ready to Switch on >> Id=0641, Rtr=00, Data= 2B 40 60 00 07 00 00 00 'Switched on >> Id=0641, Rtr=00, Data= 2B 40 60 00 0F 00 00 00 'Operation Enable '***** Set to Profile Position Mode ***** >> Id=0641, Rtr=00, Data= 2F 60 60 00 01 00 00 00 'Set to Profile Position Mode Move Absolute (finish first) - >> Id=0641, Rtr=00, Data= 23 7A 60 00 30 75 00 00 'Set Target Position to 30K steps >> Id=0641, Rtr=00, Data= 2B 40 60 00 1F 00 00 00 'Set Control Word bit 4 to 1 >> Id=0641, Rtr=00, Data= 2B 40 60 00 0F 00 00 00 'Set Control Word bit 4 to 0 Move Absolute (immediate) - >> Id=0641, Rtr=00, Data= 23 7A 60 00 B8 0B 00 00 'Set Target Pos to 3K steps >> Id=0641, Rtr=00, Data= 2B 40 60 00 3F 00 00 00 'Set Control Word bit 4 to 1 >> Id=0641, Rtr=00, Data= 2B 40 60 00 2F 00 00 00 'Set Control Word bit 4 to 0 Move Relative (finish first) - >> Id=0641, Rtr=00, Data= 23 7A 60 00 A0 86 01 00 'Set Target Position to 100K steps >> Id=0641, Rtr=00, Data= 2B 40 60 00 5F 00 00 00 'Set Control Word bit 4 to 1 >> Id=0641, Rtr=00, Data= 2B 40 60 00 4F 00 00 00 'Set Control Word bit 4 to 0 Move Relative (immediate) - >> Id=0641, Rtr=00, Data= 23 7A 60 00 B8 0B 00 00 'Set Target Position to 3K steps >> Id=0641, Rtr=00, Data= 2B 40 60 00 7F 00 00 00 'Set Control Word bit 4 to 1 >> Id=0641, Rtr=00, Data= 2B 40 60 00 6F 00 00 00 'Set Control Word bit 4 to 0 |