Problem gathering toolboard accelerometer data in SBC mode.
-
So to start with I have not running into any issues while printing.
But when my 1.0 toolboard died a few months back I got a 1.2 and wanted to take advantage of the onboard Accelerometer and was having an issue.If I run something like
G1 X-50 G4 S2 M956 P121.0 S1000 A0 G4 P10 G1 X50 F20000
to do some test for Input shaping it will move the hot end 1-3 times then
Ill get a message of "Connection lost, attempting to reconnect..."
And the system will reboot. -
Can you share some additional information? Which duet mainboard are you using? What firmware version? Are you using the input shaping plugin?
Can you send M122 and M122 B# where # is the canbus address of the expansion boards and post the results?
-
@phaedrux said in Toolboard issue?:
M122
Duet 3 Mainboard 6HC
SBC mode /w Raspberry Pi 4 4GBJust Updated from 3.4.1 to 3.4.2
Was having the same issue on 3.4.1Do not have any plugins installed as far as I know.
M122
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.4.2 (2022-09-13 15:17:43) running on Duet 3 MB6HC v1.01 (SBC mode)
Board ID: 08DJM-9P63L-DJMSS-6J1DA-3S86R-1BDR9
Used output buffers: 1 of 40 (13 max)
=== RTOS ===
Static ram: 152664
Dynamic ram: 66356 of which 108 recycled
Never used RAM 128016, free system stack 114 words
Tasks: SBC(ready,10.7%,466) HEAT(notifyWait,0.2%,322) Move(notifyWait,20.7%,245) CanReceiv(notifyWait,0.4%,772) CanSender(notifyWait,0.3%,326) CanClock(delaying,0.1%,339) TMC(notifyWait,134.1%,57) MAIN(running,374.0%,923) IDLE(ready,0.3%,30), total 540.8%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 05:07:58 ago, cause: software
Last software reset at 2022-09-21 19:53, reason: User, GCodes spinning, available RAM 128800, slot 2
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
Aux0 errors 0,0,0
Step timer max interval 147
MCU temperature: min 51.4, current 53.4, max 54.3
Supply voltage: min 23.9, current 24.0, max 24.1, 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
Heap OK, handles allocated/used 99/1, heap memory allocated/used/recyclable 2048/164/130, gc cycles 1
Events: 0 queued, 0 completed
Driver 0: standstill, SG min 0, mspos 808, reads 60684, writes 42 timeouts 0
Driver 1: standstill, SG min 0, mspos 712, reads 60684, writes 42 timeouts 0
Driver 2: standstill, SG min 0, mspos 232, reads 60680, writes 46 timeouts 0
Driver 3: standstill, SG min 0, mspos 904, reads 60680, writes 46 timeouts 0
Driver 4: standstill, SG min 0, mspos 584, reads 60680, writes 46 timeouts 0
Driver 5: standstill, SG min 0, mspos 8, reads 60715, writes 11 timeouts 0
Date/time: 2022-09-22 01:01:39
Slowest loop: 444.86ms; fastest: 0.03ms
=== 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 ===
DMs created 125, segments created 28, maxWait 392072ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 10885, completed 10885, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 10], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed 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, chamber heaters -1 -1 -1 -1, ordering errs 0
Heater 0 is on, I-accum = 0.0
Heater 1 is on, I-accum = 0.0
=== 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
=== Filament sensors ===
Extruder 0 sensor: ok
=== CAN ===
Messages queued 458353, received 380182, lost 0, boc 0
Longest wait 2ms for reply type 6031, peak Tx sync delay 319, free buffers 50 (min 38), ts 92395/92394/0
Tx timeouts 0,0,0,0,0,0
=== SBC interface ===
Transfer state: 5, failed transfers: 0, checksum errors: 0
RX/TX seq numbers: 10962/10962
SPI underruns 0, overruns 0
State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x2b1c8
Buffer RX/TX: 0/0-0, open files: 0
=== Duet Control Server ===
Duet Control Server v3.4.2
File /opt/dsf/sd/gcodes/Prints_0.6/Z19_DeckStand_Anker_0.2mm_PETG_.gcode is selected, paused
Code buffer space: 4096
Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0
Full transfers per second: 39.61, max time between full transfers: 94.9ms, max pin wait times: 69.8ms/8.6ms
Codes per second: 17.50
Maximum length of RX/TX data transfers: 3460/1664M122 B121
Diagnostics for board 121:
Duet TOOL1LC rev 1.1 or later firmware version 3.4.2 (2022-09-13 15:06:56)
Bootloader ID: SAMC21 bootloader version 2.3 (2021-01-26b1)
All averaging filters OK
Never used RAM 2556, free system stack 45 words
Tasks: Move(notifyWait,9.5%,95) HEAT(notifyWait,3.8%,75) CanAsync(notifyWait,0.0%,57) CanRecv(notifyWait,1.6%,74) CanClock(notifyWait,0.3%,65) ACCEL(notifyWait,0.0%,61) TMC(notifyWait,42.4%,57) MAIN(running,401.4%,351) IDLE(ready,0.0%,26) AIN(delaying,69.7%,142), total 528.7%
Last reset 05:08:35 ago, cause: software
Last software reset data not available
Driver 0: pos 20524713, 402.0 steps/mm,standstill, SG min 0, read errors 4, write errors 1, ifcnt 138, reads 28525, writes 18, timeouts 2, DMA errors 0, CC errors 0, failedOp 0x6f, steps req 31430699 done 31430699
Moves scheduled 291358, completed 291358, in progress 0, hiccups 1, step errors 0, maxPrep 711, maxOverdue 51, maxInc 50, mcErrs 0, gcmErrs 0
Peak sync jitter -1/5, peak Rx sync delay 229, resyncs 0/0, no step interrupt scheduled
VIN voltage: min 24.4, current 24.7, max 24.7
MCU temperature: min 39.7C, current 71.0C, max 77.7C
Last sensors broadcast 0x00000002 found 1 54 ticks ago, 0 ordering errs, loop time 0
CAN messages queued 380954, send timeouts 0, received 458690, lost 0, free buffers 37, min 35, error reg 0
dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 756, adv 35580/106549
Accelerometer: LIS3DH, status: 00
I2C bus errors 0, naks 3, other errors 0
=== Filament sensors ===
Interrupt 5726621 to 0us, poll 2 to 3718us
Driver 0: ok -
You should probably check out the Input shaping plugin then.
-
@morairtym please run command M122 P104 to test the speed of writing to the SD card. The accelerometer produces a lot of data, and a slow SD card can cause the data to back up and slow everything down.
-
@dc42 It might have something to to do with that as when i run that command it reboots as well.
Running a Samsung Evo Plus 32gb in the Pi 4 -
@morairtym I'm sorry, didn't register that you are running in SBC mode. M122 P104 applies to standalone mode only. SD card speed is less relevant to data collection in SBC mode because the Pi can cache the data.
I'll ask @chrishamm if he has any ideas about this. Meanwhile, here are some suggestions:
- Try the input shaping plugin as @Phaedrux suggested.
- Reduce the number of samples you are requesting.
- Try increasing the SBC SPI speed above the default 8MHz.
- Try collecting accelerometer data in standalone mode.
-
@dc42
Thanks,
So I loaded up the plugin
Had to install plugin in support as I started on an older duet build of v3
Not sure if there is something else I might be missing could always start with a fresh install of pi os and reload my configs.Still getting the dropped connection when just using the plug in to do motion testing.
This after 1movment so i would hope that it has nothing to do with the sample size.Here is what my spi info looks like
"SpiDevice": "/dev/spidev0.0",
"SpiBufferSize": 8192,
"SpiTransferMode": 0,
"SpiFrequency": 8000000,
"SpiConnectTimeout": 500,
"SpiTransferTimeout": 500,
"SpiConnectionTimeout": 4000,SpiFrequency is set to 8Mhz how high is it safe to go?
I would like to avoid having to hop back between the Pi and Standalone mode if possible.
-
undefined Phaedrux marked this topic as a question
-
@morairtym if the ribbon cable between the SBC and the Duet is the one we supply, or no longer (150mm), then you should be OK doubling the SPI speed to 16MHz. Data sent over the link is CRC checked.