How to send orders to an servo-driver from Duet?
-
Hi @dc42, I've done what you suggest. I have diconnect the PV and rewire all my pin.
So now, I have:- driver PP+ to 1XD Step+
- driver PP- to 1XD Step-
- driver PD+ to 1XD Dir +
- driver PD- to 1XD Dir -
I have try to run the motor with DuetWebControl but nothing.
Do you know how can I see if the correct signal is send by the 1XD to the driver when I send orders from DWC ?
I want to know if it's an issue due to the wire, the config of the Duet or my parameters of the driver.
Thank you for your help.
-
@Julien30 said in How to send orders to an servo-driver from Duet?:
Do you know how can I see if the correct signal is send by the 1XD to the driver when I send orders from DWC ?
For the DIR signal it's easy enough: use a multimeter to measure the voltage between DIR+ and DIR-. The polarity should reverse when you reverse the commanded direction.
-
@dc42 Thank you, I have just check it with my multimeter and when I send a command from DWC for run the motor, there is no voltage change between DIR+ and DIR-. I have 4,4V DC every time. So, I think there is a little prob with my config.g, no?
-
@Julien30 said in How to send orders to an servo-driver from Duet?:
@dc42 Thank you, I have just check it with my multimeter and when I send a command from DWC for run the motor, there is no voltage change between DIR+ and DIR-. I have 4,4V DC every time. So, I think there is a little prob with my config.g, no?
Perhaps. I suggest you do the following:
- Check that the red Status LEDs on the 1XD boards are flashing in sync with the Status LED on the main board
- Send command M584 and check that the XYZ axes are mapped to the 1XD boards
- To send a movement command, first send G91 to select relative mode. Then send G1 H2 commands, for example G1 H2 X10 to command 10mm of X movement, and G1 H2 X-10 to command 10mm of reverse X movement.
-
- The red status LEDs on the 1XD boards are flashing in sync with the main board
- After sending M584:
"
M584
Driver assignments: X40.0 Y41.0 Z42.0 E0.1:0.2, 3 axes visible
" - I send G91 and after that I've send G1 H2 X10.
After a while, I've send G1 H2 X50 for testing and G1 H2 X-10.
But every time nothing happen.
When I send all of this command, I also test the DIR PIN with multimeter but as before the voltage stay at 4,4V.
No change with the voltage and no move with the motor.
-
@Julien30 said in How to send orders to an servo-driver from Duet?:
When I send all of this command, I also test the DIR PIN with multimeter but as before the voltage stay at 4,4V.
Are you quite certain that it isn't changing between +4.4V and -4.4V?
-
@dc42
Yes I am, it does not change positiv to negativ or inverse -
@Julien30 you can send e.g. M122 B40 to get a diagnostic report for the board with CAN address 40. Included in this report will be "Driver 0: position ...". Does the reported position change after you send a movement command?
Which firmware versions are you using, on the main board and on the EXP1XD boards?
-
@dc42 when I send M122 B40 it say:
"
M122 B40
Warning: Discarded std reply src=40 RID=4094 exp=18 ""
Warning: Discarded std reply src=41 RID=4094 exp=18 ""
Error: M122: Board 40 received unknown msg type 51"
The firmware version for the Main board:
Duet 3 MB6HC v1.01
Version: 3.4.5The firmware version for 1XD:
- Version 3.2beta3
-
@Julien30 the problem is that the firmware on the 1XD boards (3.2beta) is too old to work with firmware 3.4.5 on the main board. So you need to upgrade the firmware on the 1XD boards, which you can do by uploading the Duet3Firmware_EXP1XD.bin file from the 3.4.4 or 3.4.5 release through DWC.
-
@dc42 Thank you.
I upgrade the firware as you suggest. So now, when I send the M122 B40 to get a diagnostic report, then send a movement command and send an other M122 B40, I can see the report position change as it was expected earlier .
I also see the voltage with multimeter at pin DIR+ and DIR- change from +4,4 to -4,4 and inverse.
But saddly my motor don't move a flinch. -
@Julien30 that's progress. I suggest you send M569 P40.0 and check that the response shows similar timings to the ones you specified in config.g.
The voltage between STEP+ and STEP- should normally be about -4.4V. It will change to +4.4V when a step pulse is sent, but you probably won't be able to see any change on your multimeter because the step pulse is short (you have configured 5us pulse length, which should be more than enough).
Do your drivers require any other input to enable them?
-
@dc42
The parameters in config.g is:- M569 P40.0 S1 R1 T5:5:10:10
When I send M569 P40.0, I received: - Driver 40.0 runs forwards, active high enable, step timing 5.0:5.7:10.7:11.0us
It look pretty close.
@dc42 said in How to send orders to an servo-driver from Duet?:
Do your drivers require any other input to enable them?
I don't really know. At first I began with only the stock wire send with the driver. It was managed to include the pin PV, the pin PD- and the pin PP-.
Maybe if I reconnect as it was at first, It will run. No? - M569 P40.0 S1 R1 T5:5:10:10
-
@Julien30 Do you have a signal going in to the SRV-ON input?
The document you provided shows a 24 Volt DC power supply and a switch connected to the SRV-ON input.
Page 47 says that using the default configuration that the servo will not operate without that signal. You can update that parameter to set it to a "1" so that the servo is always enabled.
-
Hi @alankilian
I don't see some 24V DC or switch connected to SRV-ON input (maybe I don't look at the proper place...)
But I have made the configuration of the Pn003 to 1 for set it as "always enabled".