Stepper active - LED Controll ?
-
Hello, everyone. I have a question that may be very unusual, but I haven't been able to find any information about it yet. I use a Duet 2 Wifi and a Duex5 and would like to be signaled with an LED when the Z stepper is activated.So whenever the stepper receives a signal, I would like to control it with an LED. Is that possible somehow?
Regards
Ralf
-
@dynalux is this just to get a general indication that the Z axis is active, or to have a precise pulse every time a Z step signal is sent? Can you let us know more about why you need to do this?
-
Currently I only want to have a visual recognition of the running Z axis. Later on, access to the machine should only be released when the Z axis is no longer working.
-
@dynalux said in Stepper active - LED Controll ?:
Currently I only want to have a visual recognition of the running Z axis. Later on, access to the machine should only be released when the Z axis is no longer working.
Do you mean when the Z axis is energised; or when it is moving; or when it has recently moved; or something else?
-
The Z axis will be addressed at some point. Either for a direct movement or to hold the stepper. Idle would be interesting for me. So the point in time when the stepper is no longer addressed, for example at the end of the order.
-
@dynalux in a typical print, the Z axis will be commanded to move just once per layer, to changes the Z height at the end of a layer ready for the next. There may be more frequency Z movement if either Z hop is configured with retraction, or if mesh bed compensation is in use.
You could use a script in the daemon.g file to watch for changes in the Z height and adjust the LED colours accordingly.
-
Thanks for the feedback. The tension-free state of the axle is enough for me. Because after a job and after the set time has elapsed, the Duet Board switches the stepper to idle mode. This condition would be just right for me. Can I call this on a pin with a script?
-
If you want the LED indication to be independent of start gcode in a file being printed then as dc42 says you can use deamon.g to look for a certain state and then light the LED or not.
One example is you can use the object model to see what the state of the print is:
https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation#statestatusIn the longer term we plan to add the driver status to the OM (in a future firmware revision). at that point you can change the OM key you query to directly check the idle status of an axis.
-
Sorry for the late reply, I was a little stressed. I think the second option would be just right for my purposes. Then I'll just wait and see. Thank you both for the feedback
Regrads Ralf