grblHAL / Plugin_plasma

grblHAL plugin for plasma cutters (THC)
Other
13 stars 1 forks source link

Failure Following Simulated Arc On (Spindle on) #4

Open sntlewis opened 1 year ago

sntlewis commented 1 year ago

OK, my hardware is not fully operational, so that may be the source of the issue. Much of what I'm doing at this point amounts to simulation with relays and wires.

I have a 5v relay connected to the spindle enable on the Teensy 4.1 T41U5XBB. When I toggle spindle on ioSender, the relay closes (which is expected) and then opens a few seconds later. This part of the behavior is similar whether the connection is USB or ethernet.

Now for a bit more. 1) if connected via USB, ioSender (2.0.43) shows "arc on" in the status bar. It doesn't change to "arc ok," "arc failed," or "arc delay." I have the "arc ok" port set to [PIN:30,Aux input 1,Arc ok] per $pins which is correct. I was thinking of simply hardwire AUX1 to 3v3 to simulate "high" (or setting to gnd for "low"). The plasma cutter "arc ok" is not much more than a NO circuit that is closed by Cutter. Hence the idea of either jumper to 3v3 or GND. This doesn't change the behavior. Then ioSender will popup a message with "Unhandled exception occured: Object reference not set to an instance of an object" then ioSender closes.

2) if connected via ethernet (which will be my preferred connection), no "arc on" in status bar with similar msg from ioSender.

Am I "simulating" the "arc ok" incorrectly? Is there a way to query the current status of the AUX digital pins from console?

I apologize in advance if this is not truly an issue.

terjeio commented 1 year ago

Then ioSender will popup a message with "Unhandled exception occured: Object reference not set to an instance of an object" then ioSender closes.

Is this with the latest edge version (2.0.44p2)?

If I compile with ethernet enabled the Teensy constantly reboots due to a memory leak. Arc ok check also fails when the arc ok input is inverted. Here is a corrected thc.c for you to try with:

thc.zip

And here is what it looks like in ioSender when I simulate arc ok (via telnet connection):

image

I apologize in advance if this is not truly an issue.

I need feedback to get this plugin ready so please report back all misbehaviours!

sntlewis commented 1 year ago
  1. This was with the GitHub version ioSender XL version 2.0.43, so I tried the 2.0.44p2 version. It did not make a difference either USB or Telnet. I tried recompiling without ethernet support and connect USB. No difference there, as I expected.
  2. Replaced the thc.c module and recompiled. Noted that “console” output now shows “[PLUGIN:PLASMA v0.06]” indicating that the new thc.c module was used in the compile. Using the 2.0.44p2 ioSender made no difference. I did notice that now arc ok port moved to ST3 (I had my config at ST1), so rechecked with jumper of ST3 to 3v3 (right beside on the t41u5x5bb). Again no difference.

Now what I did notice is:

What is different is I do not see a THC Monitor tab/window on ioSender(under either version). Is there something I need to do/config setting in ioSender to activate/unhide the THC Monitor?

Stan

From: Terje Io @.> Sent: Friday, September 15, 2023 2:46 AM To: grblHAL/Plugin_plasma @.> Cc: sntlewis @.>; Author @.> Subject: Re: [grblHAL/Plugin_plasma] Failure Following Simulated Arc On (Spindle on) (Issue #4)

Then ioSender will popup a message with "Unhandled exception occured: Object reference not set to an instance of an object" then ioSender closes.

Is this with the latest edge version http://www.io-engineering.com/downloads (2.0.44p2)?

If I compile with ethernet enabled the Teensy constantly reboots due to a memory leak. Arc ok check also fails when the arc ok input is inverted. Here is a corrected thc.c for you to try with:

thc.zip https://github.com/grblHAL/Plugin_plasma/files/12616392/thc.zip

And here is what it looks like in ioSender when I simulate arc ok (via telnet connection):

https://user-images.githubusercontent.com/20260062/268197189-c3bebb6d-7da6-4999-9363-60da5a133a58.png

I apologize in advance if this is not truly an issue.

I need feedback to get this plugin ready so please report back all misbehaviours!

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/Plugin_plasma/issues/4#issuecomment-1720762235 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHDGPE2ZLVO66RPIQNPJ3LX2P2TPANCNFSM6AAAAAA4VT2MUU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AQHDGPDUE6EJKNTQTXQ2IQ3X2P2TPA5CNFSM6AAAAAA4VT2MUWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGSC7XW.gif Message ID: @. @.> >

terjeio commented 1 year ago

You are using the XL version? Seems like the edge build somehow failed for that, I have just uploaded new edge versions that should work.

When the plugin has been successfully initialized THC should be in the new options string, this is what tells the sender to add the THC monitor flyout tab.

image

If this is not there the what are your Aux ports settings?

sntlewis commented 1 year ago

Rather than include “instream” I have attached both a cut/paste of About info from ioSender 2.0.44p2 and my_machine.h

It doesn’t look like the “THC” option is appearing in the “newopts” line yet the line below appears with plasma v0.06. Other than edit “my_machine” is there anything else to do to enable plasma?

On an off-hand, when I compile with options for telnet (both ethernet and telnet) in the my_machine.h, I still had to go into the grbl options via ioSender to enable telnet.

Maybe something is getting hung up in NVS?

Stan

From: Terje Io @.> Sent: Friday, September 15, 2023 9:01 AM To: grblHAL/Plugin_plasma @.> Cc: sntlewis @.>; Author @.> Subject: Re: [grblHAL/Plugin_plasma] Failure Following Simulated Arc On (Spindle on) (Issue #4)

You are using the XL version? Seems like the edge build somehow failed for that, I have just uploaded new edge versions that should work.

When the plugin has been successfully initialized THC should be in the new options string, this is what tells the sender to add the THC monitor flyout tab.

https://user-images.githubusercontent.com/20260062/268286702-0349560b-7413-44cc-9448-9b0a5b54be08.png

If this is not there the what are your Aux ports settings?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/Plugin_plasma/issues/4#issuecomment-1721244748 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHDGPF6XNEMBVUPE52UTM3X2RGPNANCNFSM6AAAAAA4VT2MUU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AQHDGPEBL3RVMQOGDZXWILDX2RGPNA5CNFSM6AAAAAA4VT2MUWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGTAOEY.gif Message ID: @. @.> >

% ; grblHAL ; 1.1f.20230907 ; [OPT:NMSL,35,1024,3,0] ; [NEWOPT:ENUMS,RT+,ES,REBOOT,SED,RTC,ETH] ; [FIRMWARE:grblHAL] ; [NVS STORAGE:*FLASH] ; [FREE MEMORY:492K] ; [DRIVER:iMXRT1062] ; [DRIVER VERSION:230903] ; [DRIVER OPTIONS:USB.2] ; [BOARD:T41U5XBB] ; [AUX IO:1,3,0,0] ; [IP:] ; [PLUGIN:PLASMA v0.06] ; $N0= $N1= ; 0 - Step pulse time $0=10.0 ; 1 - Step idle delay $1=25 ; 2 - Step pulse invert $2=0 ; 3 - Step direction invert $3=0 ; 4 - Invert stepper enable pin(s) $4=7 ; 5 - Invert limit pins $5=7 ; 6 - Invert probe pin $6=1 ; 10 - Status report options $10=511 ; 11 - Junction deviation $11=0.010 ; 12 - Arc tolerance $12=0.002 ; 13 - Report in inches $13=0 ; 14 - Invert control pins $14=70 ; 15 - Invert coolant pins $15=0 ; 16 - Invert spindle signals $16=0 ; 17 - Pullup disable control pins $17=0 ; 18 - Pullup disable limit pins $18=0 ; 19 - Pullup disable probe pin $19=0 ; 20 - Soft limits enable $20=0 ; 21 - Hard limits enable $21=0 ; 22 - Homing cycle $22=0 ; 23 - Homing direction invert $23=0 ; 24 - Homing locate feed rate $24=25.0 ; 25 - Homing search seek rate $25=500.0 ; 26 - Homing switch debounce delay $26=250 ; 27 - Homing switch pull-off distance $27=1.000 ; 28 - G73 Retract distance $28=0.100 ; 29 - Pulse delay $29=0.0 ; 32 - Mode of operation $32=0 ; 37 - Steppers deenergize $37=0 ; 39 - Enable legacy RT commands $39=1 ; 40 - Limit jog commands $40=0 ; 43 - Homing passes $43=1 ; 44 - Axes homing, first pass $44=4 ; 45 - Axes homing, second pass $45=3 ; 46 - Axes homing, third pass $46=0 ; 62 - Sleep enable $62=0 ; 63 - Feed hold actions $63=3 ; 64 - Force init alarm $64=0 ; 65 - Probing feed override $65=0 ; 70 - Network Services $70=3 ; 100 - X-axis travel resolution $100=250.000 ; 101 - Y-axis travel resolution $101=250.000 ; 102 - Z-axis travel resolution $102=250.000 ; 110 - X-axis maximum rate $110=500.000 ; 111 - Y-axis maximum rate $111=500.000 ; 112 - Z-axis maximum rate $112=500.000 ; 120 - X-axis acceleration $120=10.000 ; 121 - Y-axis acceleration $121=10.000 ; 122 - Z-axis acceleration $122=10.000 ; 130 - X-axis maximum travel $130=200.000 ; 131 - Y-axis maximum travel $131=200.000 ; 132 - Z-axis maximum travel $132=200.000 ; 300 - Hostname $300=grblHAL-Plasma ; 301 - IP Mode $301=1 ; 302 - IP Address $302=192.168.5.1 ; 303 - Gateway $303=192.168.5.1 ; 304 - Netmask $304=255.255.255.0 ; 305 - Telnet port $305=23 ; 307 - Websocket port $307=80 ; 341 - Tool change mode $341=0 ; 342 - Tool change probing distance $342=30.0 ; 343 - Tool change locate feed rate $343=25.0 ; 344 - Tool change search seek rate $344=200.0 ; 345 - Tool change probe pull-off rate $345=200.0 ; 346 - Restore position after M6 $346=1 ; 350 - Plasma mode $350=1 ; 351 - Plasma THC delay $351=3.0 ; 352 - Plasma THC threshold $352=1.00 ; 353 - Plasma THC P-gain $353=25.000 ; 354 - Plasma THC I-gain $354=0.000 ; 355 - Plasma THC D-gain $355=0.000 ; 356 - Plasma THC VAD threshold $356=90 ; 357 - Plasma THC Void override $357=100 ; 358 - Plasma Arc fail timeout $358=3.0 ; 359 - Plasma Arc retry delay $359=3.0 ; 360 - Plasma Arc max retries $360=3 ; 361 - Plasma Arc voltage scale $361=1.000 ; 362 - Plasma Arc voltage offset $362=0.000 ; 363 - Plasma Arc height per volt $363=0.100 ; 364 - Plasma Arc ok high volts $364=150.000 ; 365 - Plasma Arc ok low volts $365=100.000 ; 366 - Arc voltage port $366=0 ; 367 - Arc ok port $367=3 ; 368 - Cutter down port $368=2 ; 369 - Cutter up port $369=1 ; 370 - Invert I/O Port inputs $370=0 ; 372 - Invert I/O Port outputs $372=7 ; 384 - Disable G92 persistence $384=0 ; 398 - Planner buffer blocks $398=35 ; 481 - Autoreport interval $481=0 ; 484 - Unlock required after E-Stop $484=1 %

terjeio commented 1 year ago

Do you have the ADC board mounted? Or are you compiling with it enabled and not present? Asking since $350=1, this could be a reason for init failure. If you set it to 2 does THC appears as it should?

Maybe something is getting hung up in NVS?

Could be, enabling/disabling plugins/options may lead to NVS allocation beeing changed and the single byte checksum does not always trap such changes. It is best to to reset driver/plugin settings on such changes by sending $RST=&

sntlewis commented 1 year ago

Correct, I do not have the ADC board mounted. I dug through Phil Barrett’s github to find the board/schematic. I have ordered a few from Osh Park and parts from Mouser. I hope that was the right board/parts. I was going to continue to familiarize/simulate until those parts came in.

So, I am compiling with enabled (MCP3221) but not present. $PINS returns expected msgs.

I tried $350=2 directly and through the Settings:GRBL panel via mode Up/Down. No change in "newopts"

I tried $RST=&, console returned message “[MSG:Restoring defaults]” as expected. Retried $350=2. No change in "newopts"

terjeio commented 1 year ago

Try this binary:

grblHAL_Teensy4_Upload.ino.zip

$PINS returns expected msgs.

Like this?

[PIN:36,Aux input 0,P0]
[PIN:30,Aux input 1,Cutter up]
[PIN:34,Aux input 2,Cutter down]
[PIN:35,Aux input 3,Arc ok]
sntlewis commented 1 year ago

Yes.

Your binary shows this on the console (along with $pins output). I did a $RST=& and powered the T41U5XBB down/up.

[VER:1.1f.20230913:]

[OPT:NMSL,35,1024,3,0]

[AXS:3:XYZ]

[NEWOPT:ENUMS,RT+,ES,REBOOT,SED,RTC,THC]

[FIRMWARE:grblHAL]

[NVS STORAGE:*FLASH]

[FREE MEMORY:492K]

[DRIVER:iMXRT1062]

[DRIVER VERSION:230903]

[DRIVER OPTIONS:USB.2]

[BOARD:T41U5XBB]

[AUX IO:1,3,0,3]

[PLUGIN:PLASMA v0.06]

[PLUGIN:Servo v0.01]

[G54:0.000,0.000,0.000]

[G55:0.000,0.000,0.000]

[G56:0.000,0.000,0.000]

[G57:0.000,0.000,0.000]

[G58:0.000,0.000,0.000]

[G59:0.000,0.000,0.000]

[G59.1:0.000,0.000,0.000]

[G59.2:0.000,0.000,0.000]

[G59.3:0.000,0.000,0.000]

[G28:0.000,0.000,0.000]

[G30:0.000,0.000,0.000]

[G92:0.000,0.000,0.000]

[TLO:0.000,0.000,0.000]

[PRB:0.000,0.000,0.000:0]

$pins

[PIN:14,Emergency stop]

[PIN:16,Feed hold]

[PIN:17,Cycle start]

[PIN:15,Probe]

[PIN:20,X limit min]

[PIN:21,Y limit min]

[PIN:22,Z limit min]

[PIN:36,Aux input 0,P0]

[PIN:30,Aux input 1,Cutter up]

[PIN:34,Aux input 2,Cutter down]

[PIN:35,Aux input 3,Arc ok]

[PIN:31,Aux out 0,P0]

[PIN:32,Aux out 1,P1]

[PIN:33,Aux out 2,P2]

This shows on the “newopts” line that THC is enabled but still not showing the THC Monitor window. It appears that what you did was “disable MCP3221” as well as “disable ethernet.” I did the same thing on my end and recompiled (using PlatformIO but can switch to Arduino IDE 2). Same results meaning no “THC Monitor” window/panel/Tab.

We’ll get this ironed out!

Stan

From: Terje Io @.> Sent: Friday, September 15, 2023 2:00 PM To: grblHAL/Plugin_plasma @.> Cc: sntlewis @.>; Author @.> Subject: Re: [grblHAL/Plugin_plasma] Failure Following Simulated Arc On (Spindle on) (Issue #4)

Try this binary:

grblHAL_Teensy4_Upload.ino.zip https://github.com/grblHAL/Plugin_plasma/files/12622364/grblHAL_Teensy4_Upload.ino.zip

$PINS returns expected msgs.

Like this?

[PIN:36,Aux input 0,P0] [PIN:30,Aux input 1,Cutter up] [PIN:34,Aux input 2,Cutter down] [PIN:35,Aux input 3,Arc ok]

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/Plugin_plasma/issues/4#issuecomment-1721650300 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHDGPFMMREVLHR4MN42B6DX2SJQLANCNFSM6AAAAAA4VT2MUU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AQHDGPD3XAUPL3ZLQR6BOBTX2SJQLA5CNFSM6AAAAAA4VT2MUWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGTZGHY.gif Message ID: @. @.> >

sntlewis commented 1 year ago

Do I need to strap/jumper AUX(in) ports 1,2,3 high before starting ioSender? Currently they are “floating” until I get the ioSender window open.

From: Terje Io @.> Sent: Friday, September 15, 2023 2:00 PM To: grblHAL/Plugin_plasma @.> Cc: sntlewis @.>; Author @.> Subject: Re: [grblHAL/Plugin_plasma] Failure Following Simulated Arc On (Spindle on) (Issue #4)

Try this binary:

grblHAL_Teensy4_Upload.ino.zip https://github.com/grblHAL/Plugin_plasma/files/12622364/grblHAL_Teensy4_Upload.ino.zip

$PINS returns expected msgs.

Like this?

[PIN:36,Aux input 0,P0] [PIN:30,Aux input 1,Cutter up] [PIN:34,Aux input 2,Cutter down] [PIN:35,Aux input 3,Arc ok]

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/Plugin_plasma/issues/4#issuecomment-1721650300 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHDGPFMMREVLHR4MN42B6DX2SJQLANCNFSM6AAAAAA4VT2MUU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AQHDGPD3XAUPL3ZLQR6BOBTX2SJQLA5CNFSM6AAAAAA4VT2MUWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGTZGHY.gif Message ID: @. @.> >

terjeio commented 1 year ago

Do I need to strap/jumper AUX(in) ports 1,2,3 high before starting ioSender?

No, there are on-board 47K pullups on those pins.

I did the same thing on my end and recompiled (using PlatformIO but can switch to Arduino IDE 2).

And you got THC in newopts? I believe the Arduino IDE cannot be used to build grblHAL, at least not without modifications to the code.

Same results meaning no “THC Monitor” window/panel/Tab.

Only the "tab" should be visible on startup, if it is not and you have THC in newopts and you are running 2.0.44p3 then there are more gremlins lurking.

sntlewis commented 1 year ago

Ok, no jumpers. I was able to use Arduino 2.2(iirc) to compile but much prefer PlatformIO as that is what I use for my 3D printer mainboards (BTT SKR 1.4).

Here is a partial of the $I console output..

[VER:1.1f.20230907:]

[OPT:NMSL,35,1024,3,0]

[AXS:3:XYZ]

[NEWOPT:ENUMS,RT+,ES,REBOOT,SED,RTC,THC]

And confirmed that I am running ioSender 2.0.44p2 NOT 2.0.44p3! I get five tabs across the top and four tabs down the right side. There is no tab anywhere that says “THC Monitor.”

Stan

From: Terje Io @.> Sent: Friday, September 15, 2023 4:06 PM To: grblHAL/Plugin_plasma @.> Cc: sntlewis @.>; Author @.> Subject: Re: [grblHAL/Plugin_plasma] Failure Following Simulated Arc On (Spindle on) (Issue #4)

Do I need to strap/jumper AUX(in) ports 1,2,3 high before starting ioSender?

No, there are on-board 47K pullups on those pins.

I did the same thing on my end and recompiled (using PlatformIO but can switch to Arduino IDE 2).

And you got THC in newopts? I believe the Arduino IDE cannot be used to build grblHAL, at least not without modifications to the code.

Same results meaning no “THC Monitor” window/panel/Tab.

Only the "tab" should be visible on startup, if it is not and you have THC in newopts and you are running 2.0.44p3 then there are more gremlins lurking.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/Plugin_plasma/issues/4#issuecomment-1721784125 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHDGPGBSCHEXGKLS5W3CN3X2SYKVANCNFSM6AAAAAA4VT2MUU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AQHDGPGSPTVZSV6JQXHKEQ3X2SYKVA5CNFSM6AAAAAA4VT2MUWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGUBLT2.gif Message ID: @. @.> >

terjeio commented 1 year ago

And confirmed that I am running ioSender 2.0.44p2 NOT 2.0.44p3! I get five tabs across the top and four tabs down the right side. There is no tab anywhere that says “THC Monitor.”

Update to 2.0.44p3 then. Working?

sntlewis commented 1 year ago

Just went to your IO Engineering Website and saw the 2.0.44p3 version before I got your reply. The short answer is THC Monitor is showing up both with USB and Ethernet connection.

It is working…

So I did a bit more simulation/testing…

  1. Arc ok port is ST3 (AUX3). Invert the port. Leave jumper off. Enable spindle. Console shows the proper number of retries then fail. This is normal/expected behavior as I would expect. Plasma cutter will have to close AUX3 to ground to activate “Arc OK.”
  2. Enabling MCP3221 and recompile breaks the THC Monitor! This is true even if $350=2 is set afterwards! This leads me to ask “If the MCP3221 dies, the only way to limp along in another mode is to recompile (without MCP3221 enabled)”? I will circle back to this when I get the parts/board in.
  3. Should the console show a msg if/when the MCP3221 is found? I presume that the Arc Voltage on the THC will show the output of the MCP3221?
  4. Is there a way to separate “breakaway” from “arc ok”? $350=0 or $350=1, Aux0?

All in all, I’d say it is working.

Stan

From: Terje Io @.> Sent: Friday, September 15, 2023 4:29 PM To: grblHAL/Plugin_plasma @.> Cc: sntlewis @.>; Author @.> Subject: Re: [grblHAL/Plugin_plasma] Failure Following Simulated Arc On (Spindle on) (Issue #4)

And confirmed that I am running ioSender 2.0.44p2 NOT 2.0.44p3! I get five tabs across the top and four tabs down the right side. There is no tab anywhere that says “THC Monitor.”

Update to 2.0.44p3 http://www.io-engineering.com/downloads then. Working?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/Plugin_plasma/issues/4#issuecomment-1721830105 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHDGPBXNXVYGGB4JDBPUN3X2S273ANCNFSM6AAAAAA4VT2MUU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AQHDGPAL2SYH4E2JDL6Y7JTX2S273A5CNFSM6AAAAAA4VT2MUWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGUEFNS.gif Message ID: @. @.> >

terjeio commented 1 year ago

New version up with an attempt to enable PID feedback for positioning. $353 (P-gain) default value has been reduced to 1.0 (from 25.0) , as the previous default likely would lead to excessive ringing (violent moves).

Enabling MCP3221 and recompile breaks the THC Monitor! This is true even if $350=2 is set afterwards!

Do not enable the MCP3221 when it is not mounted.

Should the console show a msg if/when the MCP3221 is found?

The $pins command will show the MPC3221 as not powered if it does not respond to an I2C probe.

Is there a way to separate “breakaway” from “arc ok”? $350=0 or $350=1, Aux0?

I'll have to go back to the LinuxCNC documentation to find the definition of "breakaway" before I can answer, I am not used to the plasma cutter terminology.