Hi everyone,
Is it possible to increase the ObjectModel update frequency? If so, how?
I realized the updates occur every 400ms, would be possible to reduce it to 100-200ms?
Thanks.
Hi everyone,
Is it possible to increase the ObjectModel update frequency? If so, how?
I realized the updates occur every 400ms, would be possible to reduce it to 100-200ms?
Thanks.
Hi,
I need some help with setting up the MQTT server from the configuration.
I would like to subscribe to a topic from a third party app and generate messages from the gcode files using the M118 commands.
Could you please help me with setting up the network config and MQTT server?
Kind regards.
@chrishamm Thank you so much!
It didn't work indeed in standalone nodejs. However, that was easy to fix (in case anyone is interested).
npm install @duet3d/connectors
npm install @duet3d/objectmodel
npm install xhr2
const XMLHttpRequest = require("xhr2");
const WebSocket = require('ws');
Then everything work as normal.
Hi,
I'm trying to subscribe via websocket to the object model using a node.js client.
let objectModel = null;
wsClientDuet.on("connectFailed", function (error) {
console.log("Connect Error");
});
wsClientDuet.on("connect", (conn) => {
connectionDuet = conn;
console.log("Connected to Duet WebSocket Server");
connectionDuet.on("error", function (error) {
console.log("Connection Error");
});
connectionDuet.on("close", function () {
console.log("Connection to Duet is closed");
});
connectionDuet.on("message", function (message) {
console.log(message.utf8Data);
if (message.utf8Data === "PONG\n") {
return;
}
if (objectModel === null) {
objectModel = message.utf8Data;
console.log("Object model received");
return;
}
let ack = "OK\n";
connectionDuet.sendUTF(ack);
});
});
setInterval(async () => {
if (connectionDuet.connected) {
let message = "PING\n";
connectionDuet.sendUTF(message);
}
}, 5000);
await wsClientDuet.connect(`url`, "");
The server is replying with PONG after the PINGS.
Also, the first object model is sent. But it seems the OK is not working since the server is not sending any patch.
Is there anything wrong in the code?
Thank you.
@Phaedrux sorry fot the late answer, I just solved the problem.
The printheads boards weren't updated to 3.4.3 but the main board was.
Hi all,
I'm trying to print an object with 2 tools. This is not relevant since it is the same if I remove the T1 part...
The problem is that the first few movements are very slow and also the tool makes weird movements, like stepping instead of doing "fluid movements".
Looking at the gcode, everything looks correct, I don't know why the speed is reduced...
After the starting movements, everything goes ok. But the printing is completly ruined due to the first movements.
Hi all,
Is it possible to mantain two versions of DWC coexisting?
The idea is to use the original DWC as an advanced GUI (for expert users), and also create a modified version that is simpler and prettier (for final users).
The plan is to serve each version in a different port, but my fear is if the data model will be shared correctly, if it will produce delays somehow, or if it will be incompatibilities.
DWC is very complex, and it is easier to remove GUI elements and change appearence from the original than adapt the original to what we want.
Thank you.
Just the same probe system.
But if we alternate G30 and G30 S-1 in RepRap, we get a good repeatability. G30 S-1 values between -0.010 and 0.010.
The problem is when running G30, and then multiple G30 S-1 which just report the stopped height without overwritting the z datum.
Hi all,
We noticed a weird behaviour related to the G30 command.
If we run a G30 to stablish the Z datum, and then multiple G30 S-1, each time the reported stop height value increases (0.010 -> 0.030 -> 0.040 -> 0.050-> 0.080 -> ... -> 0.120 ...). Sometimes the value decreases a bit (0.040 -> 0.030), but the tendency is to increase. If we run again G30, the values seem to be reset and they start again increasing from 0.010 when multiple G30 S-1 sent.
Furthermore, if we loop multiple G30 S-1, and induce a huge error in one of them (introducing an object to make it fail and stop at 0.3 height value), then the following G30 S-1 report similar values to 0.3mm instead of values similar to 0.010 which is the error deviation of the probe.
We think this issue is producing wrong values when creating the heightmap. We tested the probe into another environment (Marlin) and the repeatability was almost perfect (~0.01 deviation).
Anyone else noticed something similar?
Thanks in advance.
; Z probe config
M558 P8 C"!io3.in" A1 H12 R0.5 F800 T4000 ; set Z probe type and the dive height + speeds
G31 X0 Y0 Z0 ; set Z probe trigger value, offset and trigger height
All G30 and G30 S-1 are sent at X0 Y0 position.
FW version: 3.4.beta5
M208 reports the machine limits regardless the actual position. These limits that are -8.5:88.2 (Z axis).
If I move the nozzle down to Z0 at X0, Y0:
M114 reports user position as Z=0, machine position as Z-8.5 (which is the limit), and the bed comp value is 0.000. The nozzle is well positioned (almost touching the bed)
If I don't lift the nozzle and move to a position where the bed comp is -0.2 (that means the bed is lower in that point)
M114 still reports user position as Z=0 (because i didn't lift it), machine position still Z-8.5, and bed comp. is -0.200. However, the nozzle is not touching the bed as it should, it is 0.1mm above (it compensates -0.1 instead of -0.2).
I can't run more tests until Thursday, but I will try to provide more info about the behaviour when possible.
Thanks.
We set the machine limits after measuring the tool lenght (z datum and bed comp already applied).
We move down the nozzle until trigger a switch, and when triggered we stablish the machine limit with
M208 Z{move.axes[2].machinePosition} S1
During the process, we disable the axis limits, and the machine position is usually a negative value, so the limits are -8.5:88.2 or something similar for the tool 0.
The machine -8.5 position always will be the virtual 0 when the tool is enabled. And the max limit will always be the same one measured the Z datum and applied the Bed comp.
Hi,
We have managed to have the bed compensation working in our environment (we had some problems as it is a complex printing system with 3 different nozzles with independant motors, and tool lenght calibration).
Now it seems to be working fine (as it moves de Z axis regarding the heightmap).
However, we noticed that the applied compensation is not enough.
Example:
It seems that the algorithm doesn't apply the correct steps to the motor. Is that possible? And how can we fix it.
Our fw version is 3.4.0beta4
Thank you,
Carlos.
@o_lampe That would be amazing, it is what are we looking for.
Thank you,
And is there a way to calculate the bed compensation value for a given X,Y position?
Hello,
Just a quick question:
Is it possible to query the actual bed compensation value from the Object model?
Thanks in advance.
Hi all,
We are trying to perform the bed compensation in our machine.
After running the Z home routine, we stablish the Z datum = 0, and we lift the nozzle until trigger de endstop. We update the axis limits with the machine position value when it reaches the endstop (the axis range is from 0 to 89 aprox).
Then we load the heightmap at X0 Y0 (the position where we perform the Z probing on homing).
The problem is that the bed is higher in other positions.
If the nozzle isn't in the axis limit, the bed compensation works properly as the nozzle is lifted automatically by the compensation values (keeping the same machine position values).
But if the nozzle is in the Z axis limit, the Z machine position is still 89 (+ bed comp: 0.5), but the real range is 88.5 so the nozzle touches the bed.
We don't know if we are understanding the behaviour correctly...
Our fw version is 3.4.beta2
Do you mean by overwritting the M208?
If I understand correctly, the new minimum should be the previous minimum (in relation with the HRP) + tool offset.
I'mma try it out.
Thank you for your comment.
@phaedrux
Sorry for the delay, I've been preparing a simplified version of the config, that results in the same problem.
The problem comes when stablishing the Z offset of the tool. We have 3 diffent vertical axis (Z,U,V), but we always map the current tool to Z (see free1.g and post0.g).
The are other things that we need to work on when changing a tool, but the problem we need to solve is that when stablishing a tool Z offset. the system allow negative coordinates...
The firmware version is 3.4.beta2, each tool is driven by a 1LC, base board is a 6HD and 1XD for each servo axis.
config.g
; customPrinter firmware config file
; executed on start-up
;
;
;################################ GENERAL SETTINGS ################################
M586 P0 S1 ; enable HTTP
M586 P1 S1 ; enable FTP
M586 P2 S1 ; enable Telnet
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"M3dimaker2" ; set printer name
G4 S3 ; wait for expansion boards to start
M669 K0 S100 ; cartesian kinematics and segments per second
;######################### AXIS BOARD DRIVERS DECLARATIONS #########################
M569 P40.0 S1 ; physical drive 40 goes forwards X
M569 P41.0 S0 ; physical drive 41 goes forwards Y1
M569 P42.0 S0 ; physical drive 42 goes forwards Y2
M569 P43.0 S0 ; physical drive 43 goes backwards Z1 (Z)
M569 P44.0 S0 ; physical drive 44 goes backwards Z2 (U)
M569 P45.0 S0 ; physical drive 45 goes backwards Z3 (V)
M569 P20.0 S1 ; physical drive 20 goes forwards E0
M569 P21.0 S1 ; physical drive 21 goes forwards E1
M569 P22.0 S1 ; physical drive 22 goes forwards E2
; ############################## DRIVER PARAMETERS SETTINGS ##############################
; Axis configuration
M584 X40.0 Y41.0:42.0 Z43.0 U44.0 V45.0 ; axis drive mapping
M350 X1 Y1 V1 Z1 U1 V1 I1 ; configure axis microstepping with interpolation
M92 X150.53 Y150.53 Z100.12 U100.12 V100.12 ; axis steps per mm
M566 X900.00 Y900.00 Z500.00 U500.0 V500.0 ; set maximum instantaneous speed changes (mm/min)
M203 X18000.00 Y18000.00 Z12000.00 U12000.00 V12000.00 ; set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z500.00 U500.00 V500.00 ; set accelerations (mm/s^2)
; Extruders configuration
M584 E20.0:21.0:22.0 ; extruders drive mapping
M350 E16:16:16 I1 ; configure extruders microstepping with interpolation
M92 E409.00:42.00:420.00; extruders steps per mm
M566 E120.00:120.00:120.00 ; set maximum instantaneous speed changes (mm/min)
M203 E1200.00:1200.00:1200.00 ; set maximum speeds (mm/min)
M201 E250.00:250.00:250.00 ; set accelerations (mm/s^2)
M906 E1000:1000:1000 I30 ; set motor currents (mA) and timeout time
;################################# Z PROBE 0 CONFIG #################################
M950 S0 C"out4" ; create servo pin 0 for solenoid on Out4
M558 P8 C"io3.in" H1 R6.5 F1200 T3000 ; set Z probe type and the dive height + speeds
G31 X0 Y0 Z5 ; set Z probe trigger value, offset and trigger height
;################################ TOOL Z PROBE CONFIG ################################
; Tool offset pin declaration here
; This probe will measure each tool offset
M558 K1 P8 C"io1.in" H1 R6.5 F1000 T2000; declare probe 1 as type 8
G31 K1 P1000 X0 Y-120 Z-1.3 ; When probe 1 value = 1000, actual position as X0, Y-120, Z-1.3
; #################################### MESH GRID ####################################
M557 X-100:100 Y-125:125 S20 ; define mesh grid
M84 S30 ; Disable motor idle current reduction
;################################## AXIS LIMITS ##################################
M208 X-200:200 Y-125:125 Z0:100 U0:100 V0:100 ; set axis minima and maxima
;M208 X-200:200 Y-125:125
;M208 Z0 U0 V0 S1
;################################# AXIS ENDSTOPS #################################
M574 X1 S1 P"!40.io0.in" ; configure active-high endstop for low end on X via pin 40.io0.in
M574 Y1 S1 P"!41.io0.in" ; configure active-high endstop for low end on Y via pin 41.io0.in
M574 Z1 S2 ; configure Z-probe endstop for low end on Z
M574 U2 S1 P"!44.io0.in" ; configure active-high endstop for high end on U via pin 44.io0.in
M574 V2 S1 P"!45.io0.in" ; configure active-high endstop for high end on V via pin 45.io0.in
;######################### PRINTER HEATERS DECLARATIONS #########################
; FDM heater
M308 S2 P"20.temp0" Y"thermistor" T100000 B4725 C7.06e-8
M950 H2 C"20.out0" T2
M307 H2 B0 R2.131 C224.9 D4.61 S1.00 V23.6
M143 H2 S280
; GEL heater
M308 S3 P"21.temp0" Y"thermistor" T100000 B4725 C7.06e-8
M950 H3 C"21.out0" T3
M307 H3 B0 R0.511 C181.9 D6.18 S1.00 V23.8
M143 H3 S140
; POWDER heater
M308 S4 P"22.temp0" Y"thermistor" T100000 B4725 C7.06e-8
M950 H4 C"22.out0" T4
M307 H4 B0 R1.622 C246.4 D5.15 S1.00 V23.9
M143 H4 S175
; Bed heater
M308 S0 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8
M950 H0 C"out1" T0
M307 H0 B0 R0.419 C401.2 D2.65 S1.00 V0
M140 H0
M143 H0 S100
; Syringe preheater
M308 S1 P"temp0" Y"thermistor" T100000 B4725 C7.06e-8
M950 H1 C"out0" T1
M307 H1 B0 R0.302 C822.1 D3.84 S1.00 V24.0
M141 H1
M143 H1 S130
;########################## PRINTER FANS DECLARATIONS ##########################
; No fans yet
;######################### PRINTER TOOL DECLARATIONS ##########################
; FDM TOOL
M563 P0 S"FDM" D0 H2 F0
G10 P0 X-52 Y-58 ; set x,y offsets
G10 P0 R0 S0 ; set standby temperatures
; GEL TOOL
M563 P1 S"GEL" D1 H3 F0
G10 P1 X0 Y0 ; set x,y offsets
G10 P1 R0 S0 ; set standby temperatures
M591 D1 P1 C"21.io0.in" S1 ; filament monitor for GEL printhead, enable to call filament-error.g when pin detected
; POWDER TOOL
M563 P2 S"POWDER" D2 H4 F0
G10 P2 X0 Y0 ; set x,y offsets
G10 P2 R0 S0 ; set standby temperatures
T-1 ; Unselect tool
toolZOffset.g
;
; param.A -> tool N
T{param.A} ; select the tool
G90; absolute positioning
G1 X0 Y-120 F1000 ; go to swith position
M400 ; wait
; move Z until switch triggered
; https://duet3d.dozuki.com/Wiki/Gcode#Section_G30_Single_Z_Probe
G30 K1 S-2 ; Probe 1. When triggered, set Z offset of the current tool.
echo "Actual position - ", {move.axes[2].machinePosition}
G92 Z-0.3
G1 H4 Z100 F800; lift after probing
G1 X0 Y0 F2000; go to X0 Y0
free1.g
G91 ; relative positioning
G1 Z105 F2000 ; lift U
G90 ; absolute positioning
M400 ; wait movement
G60 S2 ; store coordinate in restore point 2
M584 Z43.0; remap Z to original axis
post1.g
M584 Z44.0 ; remap U drive to Z axis
We have Z axis limited to Z min = 0; Z max = 100.
M208 X-200:200 Y-125:125 Z0:100
But when we select a tool, and probe it using a switch (see command below)
G30 K1 S-2; select the switch probe, probe, and stablish current tool offset
The position is stablished correctly, but the machine allows to move to negative Z positions with the tool selected.
How can we make it work?