echo output in console
-
I updated the FW from 3.4 to 3.5 in the last days. Now, i'm playing a bit with the new functionalities of M291.
I wrote a macro which should be the beginning of my bed.g in the future. It will asking for preheating the bed and nozzle.
Additionally, it calculates the average of 4 z-sensor analog readings.
During testin gof my code, i could see some strange (for me) echo outputs.This is my macro:
var bedTemp = 0 var nozzleTemp = 0 if heat.heaters[0].current < 35 M291 P"Bed cold. Preheat?" R"bed.g" S4 J1 K{"No","40°","50°","60°"} ;M291 P"Bed cold. Preheat?" R"bed.g" S5 L0 H110 F50 if input = 0 set var.bedTemp = 0 elif input = 1 set var.bedTemp = 40 elif input = 3 set var.bedTemp = 50 elif input = 4 set var.bedTemp = 60 if heat.heaters[1].current < 50 M291 P"Nozzle cold. Preheat?" R"bed.g" S4 J1 K{"No","60°","100°","135°","160°"} if input = 0 set var.nozzleTemp = 0 if input = 1 set var.nozzleTemp = 60 if input = 2 set var.nozzleTemp = 100 if input = 3 set var.nozzleTemp = 135 if input = 4 set var.nozzleTemp = 160 M140 S{var.bedTemp} M116 ; M116 will not wait below 40°C M568 P0 S{var.nozzleTemp} M116 if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; If the printer hasn't been homed, home it G28 else ; if homed M17 ; enable steppers for accurate z-probe readings G4 P250 ; short delay var zProbeTriggerValue = sensors.probes[0].value[0] ; reading of analog value of z-Probe, write variable echo {var.zProbeTriggerValue} if var.zProbeTriggerValue > 880 ; abort if the value is > 880 M291 P"zProbeTriggerValue too high!" R"bed.g" S2 ; message abort ; make 3 additional zprobe measurements to compute average value for threshold while iterations < 3 G4 P200 ; short delay set var.zProbeTriggerValue = var.zProbeTriggerValue + sensors.probes[0].value[0] ; add up the ZProbeTriggerValues set var.zProbeTriggerValue = floor(var.zProbeTriggerValue/4) ; create integer echo {var.zProbeTriggerValue} G31 P{var.zProbeTriggerValue + 40} ; set zProbeTriggerValue (+ 40) ;; G31 P610
This is the console output.
My question: Why is the first echo of the value reading (red) also visible on the M292 echos (yellow)? The green one is my calculated average an is clear for me.
These "additional" outputs of the value in the M292 aren't a problem for me. But i'd like to know if there is a reason for that?EDIT: Why is the coloring in the code window of this message not like in the browser (DWC) with clearly visible, green comments?
-
-
@cosmowave are you running in standalone or SBC mode?
-
@dc42 Standalone