some questions about configuration
-
Hello everybody.
i have some questions about my configuration. I'm using a Duet2 Ethernet with RRF 3.2.2- I d'like to have a temp controlled MCU-Fan, my config is looking like this:
M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency (MCU fan) M106 P1 T25:60 L0.4 X1.0 H100:101:102 ; set fan 1 value. Thermostatic control is turned on (MCUtemp start @25°with40%, full @60°)
Why is this not working? The Fan itself and the cabeling is ok, but it turns not on with MCU temp > 25°. Is there a wrong programming?
- My printer has a watercooled hotend with flow detection. I have defined a pin1 for triggering "trigger2" like this:
M950 J1 C"!^E0STOP" ; Input 1 uses e1Stop pin, inverted, pullup enabled (FlowSensor) M581 P1 T2 S0 R0 ; invoke trigger 2 when an active-to-inactive edge is detected on input 1, anytime
The trigger is working, but on falling and rising edge of the signal. This is not a big problem, but i d'like to know why! With this code, it should only trigger at falling edge!?
- In the "trigger2.g" itself, i d'like to call two different macros according to machine state.
The "trigger2.g" looks like this:
if state.status="idle" M98 P"0:/macros/NoFlowIdle" else M98 P"0:/macros/NoFlowNotIdle"
With this code, allways the "NoFlowNotIdle" macro is called, although the Duet is idle! Why? And what are the possible states of the duet? Is there a list?
Thank you very much for your help. And sorry for my english...
-
@cosmowave For (1), you're using the RepRapFirmware 2 notation for MCU temperature. See https://duet3d.dozuki.com/Wiki/Mounting_and_cooling_the_board#Section_Notes
For (2), I'm not sure why it triggers on rising and falling edge, when you've set S0. @dc42 ?
for (3), it's because the status changes to 'busy' when you run a macro, even if the printer is idle (at least it does when I just tried it out). I think the following document lists the main runtime states as idle, busy, printing, paused, halted, resuming and changingTool (though may be slightly out of date): https://duet3d.dozuki.com/Wiki/Status_Responses
Again, @dc42 may be able to elaborate on all the different states and exact wording reported for each state.Ian
-
@droftarts thanks for your explanation.
For (1), you're right! I will try it like this and check it today evening:
M308 S3 P"mcu-temp" Y"mcu-temp" A"MCU" ; configure sensor 3 as mcu-temp on pin mcu-temp, show temp in graph as MCU M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency (MCU fan) M106 P1 T25:60 L0.4 X1.0 H3 ; set fan 1 value. Thermostatic control is turned on (MCUtemp start @25°with40%, full @60°)
for (3)
i think, my coding (with status.state) is not the best for option for switching between "no print is running" and "a print is running"!
Do you know which variable i can take to make a switch if a print is running or not? -
@cosmowave said in some questions about configuration:
The trigger is working, but on falling and rising edge of the signal. This is not a big problem, but i d'like to know why! With this code, it should only trigger at falling edge!?
Contact bounce, perhaps? I can look at adding a debounce option to M950 with J parameter.
-
@dc42 hmmm, that can be. Its an old relais switching this input.
I try to measure it with my scope...Do you have an idea about my other problem described above?
i think, my coding (with status.state) is not the best for option for switching between "no print is running" and "a print is running"!
Do you know which variable i can take to make a switch if a print is running or not? -
@cosmowave, I think there are several values in 'job' that you could test, such as job.duration and job.fileName.
-
@dc42 i can't see job.duration in the object model! Does it exist?
i think, job.layer can be a good candidate? -
@cosmowave Or you could flip the macro around so that it checks if it's not printing:
if state.status!="printing" M98 P"0:/macros/NoFlowNotIdle" else M98 P"0:/macros/NoFlowIdle"
Ian
-
@droftarts yes, that's an option.
But i'm not sure, if the state is changing to something other than "printing" during a print!? -
@cosmowave said in some questions about configuration:
@dc42 i can't see job.duration in the object model! Does it exist?
i think, job.layer can be a good candidate?I can see job.duration in the OM browser, it's null because no print is running. I am running firmware 3.3beta3.
job.layer is not reliable in firmware 3.3 because we've given up trying to second-guess which layer is printing, unless there are layer comments in the GCode file.
-
@dc42 said in some questions about configuration:
I can look at adding a debounce option to M950 with J parameter.
Is it possible to add a debounce option?