How to sense 24VIN is powered when using optional external 5V supply
I am using an external 5V power supply and I am not sure how to sense that the main power on the 24V input is present or not. There must be some M-code I can use to insure I have 24V power before trying to move any servos, but I cannot figure out how, nor find it with a search. Any ideas?
deckingman last edited by
The machine control page (first page) of the web interface shows Vin - top right panel labelled "Machine Status" then on the line labelled "Sensors". Is that what you are looking for? Also, if you enter M122 form the console, the diagnostics will give you the supply voltage minimum, current(as in now) and maximum.
Hmmm… My web interface , version 1.15a, only shows CPU temp and Z-Probe under Machine Status / Sensors. Maybe it is time to update.
I can find current supply voltage in M122, but not sure how I can use that in the logic to enable a macro or do a "wait until supply voltage is above 23VDC before proceeding".
As it is now, I can switch off the 24VDC supply before beginning a print and, due to the external 5VDC supply still active, the Duet doesn't seem to care until I get a heater fault. No telling what the result of losing 24VDC power mid print wouldbe, but I would rather run a macro or something to shut down gracefully.
If you are running a DWC version as old as 1.15a then I guess you are running old firmware too. I suggest you upgrade to firmware 1.20RC2 which includes loss-of-power handling. You may need to read a lot of upgrade notes at https://github.com/dc42/RepRapFirmware/blob/dev/WHATS_NEW.md first to be aware of the changes from your present firmware version.
Figures; if it isn't broken, update the firmware until it is. Now that I am at 1.20RC3, my M42 commands that worked in 1.18.1 without having to wait for macros to complete, are now not working as coded. Somewhere along the way, this feature must have been "fixed".
M42 command are now deferred until all movement commands that preceded them in the gcode file have been completed. Previously, they were being executed too early.