Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Donpi
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 29
    • Posts 120
    • Best 2
    • Controversial 0
    • Groups 0

    Posts made by Donpi

    • Switch to unstable and back to stable

      Hi,

      I use a Duet3 + SBC and I'am realy not good with linux things.

      But at one moment in the past I switched to the unstable branch.
      Now I whant to come back to the stable one but can't find how to do this.

      I didn't even remember how I did this the first time.

      I'am crawling the wiki without success.

      Can anyone help.

      Thank you 🙂

      posted in Firmware installation
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      Good to hear that 😄
      Thank you for the support

      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      @chrishamm said in Duet 3 +SBC : Print randomely freeze when runin my script on RPI:

      await Task.Delay(1000);

      The workaround seems to work but it gives me many "Error parsing response" in the PanelDuet console

      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      @chrishamm Great, I'll test that today.

      I thought I was abandoned alone with my problem 👍

      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      Are there come log that I can check to see what is appening in the Duet ?
      Or what gcode is effetively executed .

      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      The duet stop printing but the script continue

      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      It crash the print even with the 3.2.0-b4.1

      here is my M122

      M122
      === Diagnostics ===
      RepRapFirmware for Duet 3 MB6HC version 3.2-beta4.1 running on Duet 3 MB6HC v1.01 or later (SBC mode)
      Board ID: 08DJM-956BA-NA3TN-6JTDG-3SD6J-TABLT
      Used output buffers: 4 of 40 (15 max)
      === RTOS ===
      Static ram: 123292
      Dynamic ram: 137988 of which 36 recycled
      Never used RAM 130876, free system stack 188 words
      Tasks: Linux(ready,77) HEAT(blocked,297) CanReceiv(blocked,947) CanSender(blocked,371) CanClock(blocked,352) TMC(blocked,49) MAIN(running,1161) IDLE(ready,19)
      Owned mutexes: HTTP(MAIN)
      === Platform ===
      Last reset 00:25:28 ago, cause: software
      Last software reset at 2020-12-09 15:50, reason: HeatTaskStuck, GCodes spinning, available RAM 130188, slot 0
      Software reset code 0x4143 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0040080f BFAR 0x00000000 SP 0x20410144 Task MAIN
      Stack: 2042328c 00429512 81000000 00000000 3e958000 00000000 4079a000 401fc5e4 3f9ca0f0 4530c6d9 4530c6d9 44b0c6d9 49371b00 37533333 43d697a0 00000000 42117d81 3f800000 00000000 60000011 20426c58 2040e0b4 20426c58 00000000 20423af8 00000080 a5a5a5a5
      Error status: 0x00
      MCU temperature: min 35.1, current 37.4, max 37.6
      Supply voltage: min 24.8, current 25.0, max 25.0, under voltage events: 0, over voltage events: 0, power good: yes
      12V rail voltage: min 12.0, current 12.0, max 12.1, under voltage events: 0
      Driver 0: position 0, standstill, reads 12980, writes 14 timeouts 0, SG min/max 0/0
      Driver 1: position 0, standstill, reads 12981, writes 14 timeouts 0, SG min/max 0/0
      Driver 2: position 0, standstill, reads 12980, writes 15 timeouts 0, SG min/max 0/0
      Driver 3: position 0, standstill, reads 12981, writes 15 timeouts 0, SG min/max 0/0
      Driver 4: position 0, standstill, reads 12983, writes 14 timeouts 0, SG min/max 0/0
      Driver 5: position 0, standstill, reads 12987, writes 11 timeouts 0, SG min/max 0/0
      Date/time: 2020-12-09 16:16:44
      Slowest loop: 4.12ms; fastest: 0.12ms
      === Storage ===
      Free file entries: 10
      SD card 0 not detected, interface speed: 37.5MBytes/sec
      SD card longest read time 0.0ms, write time 0.0ms, max retries 0
      === Move ===
      FreeDm 375 (min 375), maxWait 0ms, bed compensation in use: none, comp offset 0.000
      === MainDDARing ===
      Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
      === AuxDDARing ===
      Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
      === Heat ===
      Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
      === GCodes ===
      Segments left: 0
      Movement lock held by null
      HTTP* is doing "M122" in state(s) 0
      Telnet is idle in state(s) 0
      File* is idle in state(s) 0
      USB is idle in state(s) 0
      Aux is idle in state(s) 0
      Trigger* is idle in state(s) 0
      Queue is idle in state(s) 0
      LCD is idle in state(s) 0
      SBC is idle in state(s) 0
      Daemon is idle in state(s) 0
      Aux2 is idle in state(s) 0
      Autopause is idle in state(s) 0
      Code queue is empty.
      === CAN ===
      Messages queued 6111, send timeouts 13750, received 0, lost 0, longest wait 0ms for reply type 0, free buffers 47
      === SBC interface ===
      State: 0, failed transfers: 0
      Last transfer: 19ms ago
      RX/TX seq numbers: 15632/53872
      SPI underruns 0, overruns 0
      Number of disconnects: 0, IAP RAM available 0x209d8
      Buffer RX/TX: 0/0-0
      === Duet Control Server ===
      Duet Control Server v3.2.0-beta4
      Code buffer space: 4096
      Configured SPI speed: 8000000 Hz
      Full transfers per second: 1.96
      
      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      @chrishamm it crash the same with your rewrite.
      It stoped printing after about 30 minutes.

      How can I switch to 3.2.0-b4.1 ?

      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      @bearer of course. Or I can set my fan at 20% all the time.

      How to do it, is not my question.
      I think that no matter how I do it, le DWS schould'nt crash my print.

      And that's precisely why I'm asking.

      posted in Beta Firmware
      Donpiundefined
      Donpi
    • RE: Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      @chrishamm thanks for the rewrite, I'll check that later.

      I think It will crash the same as the probleme occurs even with juste as bash script.

      here is my M122 results :

      m122
      === Diagnostics ===
      RepRapFirmware for Duet 3 MB6HC version 3.1.1 running on Duet 3 MB6HC v1.01 or later (SBC mode)
      Board ID: 08DJM-956BA-NA3TN-6JTDG-3SD6J-TABLT
      Used output buffers: 1 of 40 (13 max)
      === RTOS ===
      Static ram: 154604
      Dynamic ram: 163424 of which 44 recycled
      Exception stack ram used: 544
      Never used ram: 74600
      Tasks: NETWORK(ready,1968) HEAT(blocked,1188) CanReceiv(suspended,3820) CanSender(suspended,1384) CanClock(blocked,1436) TMC(blocked,204) MAIN(running,2672) IDLE(ready,76)
      Owned mutexes:
      === Platform ===
      Last reset 00:03:57 ago, cause: software
      Last software reset at 2020-12-07 11:16, reason: User, spinning module LinuxInterface, available RAM 74600 bytes (slot 0)
      Software reset code 0x0010 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0444a000 BFAR 0x00000000 SP 0xffffffff Task MAIN
      Error status: 0
      MCU temperature: min 31.4, current 37.0, max 37.2
      Supply voltage: min 24.8, current 24.8, max 25.0, under voltage events: 0, over voltage events: 0, power good: yes
      12V rail voltage: min 12.0, current 12.1, max 12.1, under voltage events: 0
      Driver 0: standstill, reads 41519, writes 14 timeouts 0, SG min/max 0/0
      Driver 1: ok, reads 41517, writes 17 timeouts 0, SG min/max 0/99
      Driver 2: standstill, reads 41512, writes 22 timeouts 0, SG min/max 0/969
      Driver 3: standstill, reads 41512, writes 22 timeouts 0, SG min/max 0/1023
      Driver 4: ok, reads 41518, writes 17 timeouts 0, SG min/max 0/142
      Driver 5: standstill, reads 41525, writes 11 timeouts 0, SG min/max 0/0
      Date/time: 2020-12-07 11:20:27
      Slowest loop: 4.70ms; fastest: 0.14ms
      === Storage ===
      Free file entries: 10
      SD card 0 not detected, interface speed: 37.5MBytes/sec
      SD card longest read time 0.0ms, write time 0.0ms, max retries 0
      === Move ===
      Hiccups: 0(0), FreeDm: 374, MinFreeDm: 373, MaxWait: 23941ms
      Bed compensation in use: none, comp offset 0.000
      === MainDDARing ===
      Scheduled moves: 65, completed moves: 64, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: 3
      === AuxDDARing ===
      Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: -1
      === Heat ===
      Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
      === GCodes ===
      Segments left: 0
      Movement lock held by Aux
      HTTP* is ready with "M122" in state(s) 0
      Telnet is idle in state(s) 0
      File is idle in state(s) 0
      USB is idle in state(s) 0
      Aux* is idle in state(s) 35 0, running macro
      Trigger* is idle in state(s) 0
      Queue* is idle in state(s) 0
      LCD is idle in state(s) 0
      SBC is idle in state(s) 0
      Daemon* is idle in state(s) 0
      Aux2 is idle in state(s) 0
      Autopause is idle in state(s) 0
      Code queue is empty.
      === Network ===
      Slowest loop: 1.03ms; fastest: 0.01ms
      Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions
      HTTP sessions: 0 of 8
      - Ethernet -
      State: disabled
      Error counts: 0 0 0 0 0
      Socket states: 0 0 0 0 0 0 0 0
      === CAN ===
      Messages sent 940, longest wait 0ms for type 0
      === Linux interface ===
      State: 0, failed transfers: 0
      Last transfer: 18ms ago
      RX/TX seq numbers: 7547/7549
      SPI underruns 0, overruns 0
      Number of disconnects: 0
      Buffer RX/TX: 0/0-0
      === Duet Control Server ===
      Duet Control Server v3.1.1
      Aux:
      Finishing macro deployprobe.g, started by G29
      > Next stack level
      Executing macro bed.g, started by system
      Number of flush requests: 1
      > Next stack level
      Code buffer space: 4096
      Configured SPI speed: 8000000 Hz
      Full transfers per second: 32.60
      
      posted in Beta Firmware
      Donpiundefined
      Donpi
    • Duet 3 +SBC : Print randomely freeze when runin my script on RPI

      Hi,

      In other threads some of you have helped me with my fan control from the PI.

      I tried with a bash script using "sudo /opt/dsf/bin/CodeConsole" and a .Net Core program using the C# api.

      Both works well but when I start a print, at one random moment It stop the print. It's like a restart.

      I tried to start them by hand or using systemd, but in both case the problem remains.

      It's like it saturates the Duet Control Server, and he decides to reboot.

      (edit : when none of the scripts nor the program are running, the print are great, even for long prints.)

      Here are some explanation of my installation and what I'am tring to do :
      03b70a11-44f1-456d-b918-e3e69dec8842-image.png

      I use the two black fan to cool down both Duet and RPI.
      That prevent me fron using a thermostatic fan for the duet MCU.

      So the program ask for the Duet MCU temp and for the RPI temp and calculate a decent pwm for both at time.

      And here a both codes starting with bash version :

      #!/bin/bash
      DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
      
      PI_MIN_TH=60
      PI_MAX_TH=80
      
      PI_CURRENT=0
      PI_PWM=0
      
      DUET_SENSOR_ID=3
      DUET_MIN_TH=40
      DUET_MAX_TH=70
      
      DUET_CURRENT=0
      DUET_PWM=0
      
      
      WAIT=1
      FAN=3
      
      while(true); do
              PWM=0
              FAN_STATUS=0
              #Lecture
              PI_CURRENT=$(cat /sys/class/thermal/thermal_zone0/temp)
              let PI_CURRENT=PI_CURRENT/1000
              DUET_CURRENT=$(sudo /opt/dsf/bin/CodeConsole -c "M308 S$DUET_SENSOR_ID" | cut -d ',' -f 2 | cut -d ' ' -f 3 | cut -d '.' -f 1)
              let DUET_CURRENT=DUET_CURRENT
              #Calcule des pwm
              if [ $PI_CURRENT -gt $PI_MIN_TH ]; then
                      FAN_STATUS=1
                      (( PI_PWM = ( PI_CURRENT-PI_MIN_TH )*100 / ( PI_MAX_TH-PI_MIN_TH )))
              fi;
              if [ $DUET_CURRENT -gt $DUET_MIN_TH ]; then
                      FAN_STATUS=1
                      (( DUET_PWM = ( DUET_CURRENT-DUET_MIN_TH )*100 / ( DUET_MAX_TH-DUET_MIN_TH )))
              fi;
              #Selection du pwm final
              if [ $FAN_STATUS == 0 ]; then
                      PWM=0
              else
                      if [ $PI_PWM -gt $DUET_PWM ]; then
                              ((PWM = PI_PWM))
                      else
                              ((PWM = DUET_PWM))
                      fi;
              fi;
      
              CHARLENGTH=${#PWM}
              if [ $CHARLENGTH -gt 2 ]; then
                      echo "M106 P$FAN S1" | sudo /opt/dsf/bin/CodeConsole > /dev/null;
              else
                      echo "M106 P$FAN S0.$PWM" | sudo /opt/dsf/bin/CodeConsole > /dev/null;
              fi;
      
              #echo "Pi temp : $PI_CURRENT cC° | Duet temp : $DUET_CURRENT | Fan status : $FAN_STATUS | Pi pwm : $PI_PWM | Duet pwm : $DUET_PWM | pwm : $PWM"
      
              sleep $WAIT
      done
      

      And here is the embryonic version in C # ( the one I want to use )

      using DuetAPI.Commands;
      using DuetAPI.Connection;
      using DuetAPI.Machine;
      using DuetAPIClient;
      using System;
      using System.IO;
      using System.Text.Json;
      using System.Threading;
      using System.Threading.Tasks;
      
      namespace dws_tst1
      {
          class Program
          {
              static Fan oDuetPiFan;
              static AnalogSensor oDuetSensor;
      
              static SubscribeConnection oSubscription;
              static CommandConnection oCommand;
      
              static MachineModel oModel;
      
              static double fFanLastValue;
      
              static async Task Main(string[] args)
              {
                  Console.WriteLine("Start");
                  fFanLastValue = 0;
      
                  Console.WriteLine("Connections");
                  oSubscription = new SubscribeConnection();
                  oCommand = new CommandConnection();
      
                  Console.Write("Connecting");
                  await oSubscription.Connect(SubscriptionMode.Patch);
                  await oCommand.Connect();
      
                  while (!oSubscription.IsConnected || !oCommand.IsConnected)
                  {
                      Console.Write(".");
                      Thread.Sleep(250);
                  }
                  Console.WriteLine("");
                  Console.WriteLine("Connection OK");
      
                  Console.WriteLine("Reading model");
                  oModel = await oCommand.GetMachineModel();
      
                  Console.WriteLine("Selectcting MCU/CPU Fan");
                  oDuetPiFan = oModel.Fans[3];
                  await oCommand.PerformSimpleCode("M106 P3 S0");
      
                  Console.WriteLine("Selectcting Duet sensor");
                  oDuetSensor = oModel.Sensors.Analog[3];
      
                  Console.WriteLine("Checking");
                  while (true)
                  {
                      Thread.Sleep(1000);
                      try
                      {
                          double fDuetPwm = await checkDuetTemp();
                          double fPiPwm = await checkPiTemp();
      
                          setFan(Math.Max(fDuetPwm, fPiPwm));
                      }
                      catch
                      {
                          Console.WriteLine("Error");
                          try
                          {
                              await oSubscription.Connect(SubscriptionMode.Patch);
                              await oCommand.Connect();
                          }
                          catch
                          {
                              Console.WriteLine(" -- Connection error");
                          }
                      }
                  }
              }
      
              public static async Task<double> checkDuetTemp()
              {
                  int iLeft = Console.CursorLeft;
                  int iTop = Console.CursorTop;
                  Console.SetCursorPosition(60, 10);
      
                  JsonDocument oPatch = await oSubscription.GetMachineModelPatch();
                  oModel.UpdateFromJson(oPatch.RootElement);
                  if (oDuetSensor.LastReading == null) return 0;
      
      
                  double fMin = 40;
                  double fMax = 70;
      
                  double currentOverrun = oDuetSensor.LastReading.Value - fMin;
                  if (currentOverrun <= 0)
                  {
                      Console.WriteLine("Duet   " + Math.Round((decimal)oDuetSensor.LastReading, 1).ToString() + " C°                     ");
                      Console.SetCursorPosition(iLeft, iTop);
                      return 0;
                  }
      
                  double fPwm = Math.Round(currentOverrun / fMax,2);
                  Console.WriteLine("Duet " + Math.Round((double)oDuetSensor.LastReading, 1).ToString() + " C° : Fan at "+ (fPwm*100).ToString()+" %");
                  Console.SetCursorPosition(iLeft, iTop);
                  return fPwm;
              }
              public static async Task<double> checkPiTemp()
              {
                  int iLeft = Console.CursorLeft;
                  int iTop = Console.CursorTop;
                  Console.SetCursorPosition(60, 11);
      
                  string sTemp = await File.ReadAllTextAsync("/sys/class/thermal/thermal_zone0/temp");
                  double fTemp = double.Parse(sTemp) / 1000;
      
                  double fMin = 55;
                  double fMax = 70;
      
                  double currentOverrun = fTemp - fMin;
                  if (currentOverrun <= 0)
                  {
                      Console.WriteLine("Pi   " + Math.Round(fTemp, 1).ToString() + " C°                       ");
                      Console.SetCursorPosition(iLeft, iTop);
                      return 0;
                  }
      
                  double fPwm = Math.Round(currentOverrun / fMax,2);
                  Console.WriteLine("Pi   " + Math.Round((decimal)fTemp, 1).ToString() + " C° : Fan " + (fPwm*100).ToString()+" %");
                  Console.SetCursorPosition(iLeft, iTop);
                  return fPwm;
      
              }
              private static void setFan(double _fValue)
              {
                  int iLeft = Console.CursorLeft;
                  int iTop = Console.CursorTop;
                  Console.SetCursorPosition(60, 12);
      
                  if (fFanLastValue == 0 && _fValue == 0)
                  {
                      fFanLastValue = _fValue;
                      Console.SetCursorPosition(iLeft, iTop);
                      return;
                  }
      
                  if (fFanLastValue < 1 && _fValue >= 1)
                  {
                      Console.WriteLine("Fan On Max");
                  }
                  else if (fFanLastValue > 0 && _fValue == 0)
                  {
                      Console.WriteLine("Fan Off          ");
                  }
                  else
                  {
                      Console.WriteLine("Fan On          ");
                  }
                  Task<string> oTask;
                  oTask = oCommand.PerformSimpleCode("M106 P3 S" + _fValue.ToString());
                  oTask.Wait();
      
      
                  fFanLastValue = _fValue;
                  Console.SetCursorPosition(iLeft, iTop);
              }
          }
      }
      
      posted in Beta Firmware
      Donpiundefined
      Donpi
    • G29 Error over Internet or VPN

      Hi G29 returns me errors in some cases.
      When I call it from

      • panel Due : No error
      • Web Control in local network : No error
      • Web Control throug my professional VPN : d29dd4e3-579d-43d2-a59c-ef25d8f40cd4-image.png
      • Web Control throug Internet without VPN : Gateway Time-out

      In my rooter I only forward the port 80.
      Maybe I need to forward other ports ?

      This is not a big problem as the probing is done anyway.

      Bye
      Juan

      posted in General Discussion
      Donpiundefined
      Donpi
    • RE: DUET 3 + SBC : Powering external device with 12V from DUET 3

      @dc42 It's beacause I allready have one 12V.

      But yeah, I'am looking that way too.

      posted in General Discussion
      Donpiundefined
      Donpi
    • RE: DUET 3 + SBC : Powering external device with 12V from DUET 3

      @Veti Yeah I'have 50 LED it's like 3A or so.
      I have plenty of LM317T, I'll try something directely from the 24V power supply.

      Thanks.

      posted in General Discussion
      Donpiundefined
      Donpi
    • RE: Spoted a little bug on Z prob I think

      @CaLviNx Thanks I didn't see this.
      By the way it explain some weird behaviour I had in the past 😛

      posted in General Discussion
      Donpiundefined
      Donpi
    • DUET 3 + SBC : Powering external device with 12V from DUET 3

      Hi,

      Can I use the 12V socket that is between OUT 8 and TEMP 2 to power a LED strip ?

      Actualy I use OUT 4,5 and 6 as pwm pin to power my RGB LED strip but I need them to other things.
      So my plane is to use an arduino to drive the LED strip and le RPI to intercept some custom GCODE to send the values to the Arduino.

      I know it'a bit wreid. But I'm open to suggestions 😛

      Bye
      Juan

      posted in General Discussion
      Donpiundefined
      Donpi
    • RE: Spoted a little bug on Z prob I think

      @dc42 haha great I did as you said and by the way removed all those unnecessay M401 and M402.
      Now it remains not homed.

      Thank you.

      posted in General Discussion
      Donpiundefined
      Donpi
    • RE: SSR bed heater + Duet2 config

      I didn't even know that SSR had polarities.

      I was lucky 2 times in a row 😰

      posted in Duet Hardware and wiring
      Donpiundefined
      Donpi
    • Spoted a little bug on Z prob I think

      Hi,

      when I home Z and the blTouch senor is allready triggered.
      I get the message that the sensor is allready triggered and no z movement.
      This is the expected behaviour, I hope.

      What I think is a bug is that the Z change state to homed.
      I think It should remain unhomed.

      I use RFF 3.1.1, a Duet 3 and a blTouch.
      And here is my homez.g

      ;Clear bed transformation
      N561
      
      ;Goto prob position
      G91
      G1 H2 Z5 F6000
      G90
      G1 X150 Y70 F6000
      G91
      
      ;Reset sensor
      M280 P0 S160
      
      ;Rough prob
      M402 ; Retract prob
      M401 ; Deploy prob
      G1 H1 Z-305 F6000
      M402 ; Retract prob
      
      ;Down 5mm
      G1 H2 Z5 F6000
      
      ;Fine prob
      M402 	; Retract prob
      M401 	; Deploy prob
      G30 	; Prob
      M402 	; Retract prob
      
      posted in General Discussion
      Donpiundefined
      Donpi