Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure Following Simulated Arc On (Spindle on) #4

Open
sntlewis opened this issue Sep 13, 2023 · 14 comments
Open

Failure Following Simulated Arc On (Spindle on) #4

sntlewis opened this issue Sep 13, 2023 · 14 comments

Comments

@sntlewis
Copy link

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
Copy link
Contributor

terjeio commented Sep 15, 2023

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
Copy link
Author

sntlewis commented Sep 15, 2023 via email

@terjeio
Copy link
Contributor

terjeio commented Sep 15, 2023

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
Copy link
Author

sntlewis commented Sep 15, 2023 via email

@terjeio
Copy link
Contributor

terjeio commented Sep 15, 2023

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
Copy link
Author

sntlewis commented Sep 15, 2023 via email

@terjeio
Copy link
Contributor

terjeio commented Sep 15, 2023

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
Copy link
Author

sntlewis commented Sep 15, 2023 via email

@sntlewis
Copy link
Author

sntlewis commented Sep 15, 2023 via email

@terjeio
Copy link
Contributor

terjeio commented Sep 15, 2023

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
Copy link
Author

sntlewis commented Sep 15, 2023 via email

@terjeio
Copy link
Contributor

terjeio commented Sep 15, 2023

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
Copy link
Author

sntlewis commented Sep 15, 2023 via email

@terjeio
Copy link
Contributor

terjeio commented Oct 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants