Hypersensing with THCAD - better way to do ohmic sensing

More
07 Apr 2020 23:05 #163117 by Uthayne
I cloned ohmic.comp and made an ohmic_dev.comp with a few changes.
FUNCTION(_) {
      double thcad_vel_scale = 1/((thcad_max_volt_freq - thcad_0_volt_freq)/thcad_fullscale/thcad_divide);
      double thcad_scale_offset = thcad_0_volt_freq/thcad_divide;

      thcad_volts = (velocity_in - thcad_scale_offset) * thcad_vel_scale;
      ohmic_volts = thcad_volts * volt_divider; // Calculated torch volts from THCAD
      arc_on      = (thcad_volts >= thcad_fullscale ? 1 : 0);
      if(!arc_on)
        ohmic_on    = (ohmic_volts > ohmic_threshold ? 1 : 0);
      else
        if( ohmic_volts < ohmic_low)
            ohmic_on = 0;
      
}

Mainly, moving the arc_on calculation before the ohmic_on logic, and then using the arc_on signal to tell us whether we should turn the ohmic signal on; still looking at the voltage to determine on/off.

While cutting, the arc_on signal ensures that ohmic_on is never set, so no interruptions due to nozzle shorting material while cutting. However, THC should prevent that anyway!

With my dry run (plasma cutter off) testing, it allows the ohmic_on signal to interrupt (pause) during typical cut motion. However, when the arc_on pin is true due to cutting voltages this will not matter.

The problem is that even though ohmic_on is true while jogging && arc_on is false, plasmac does not check for ohmic state outside of probing and cutting states. The torch jogs (with ohmicsense.ohmic-on TRUE), and then when it's finished its jog THEN it throws the ohmic triggered error because it has changed state to PROBE and we haven't reached the probe Z height yet. This would require plasmac to add ohmic sensing during typical jogging, preferably toggleable with a checkbox if the user wants this feature or not.

Hope this is clear. Can make a video if you need...

Please Log in or Create an account to join the conversation.

More
07 Apr 2020 23:58 #163127 by rodw
Thanks for saving me some work. I wonder if you could unlinkp motion.probe−input and connect the ohmicsense pin to it instead?
That would take plasmac out of the picture.

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 00:21 - 08 Apr 2020 00:23 #163132 by Uthayne
It still needs some more testing. I tried it with the plasma on and it would trigger during the pierce, causing an interruption. I think it's because ohmic_on goes low when moving to pierce height bc contact is no longer made and arc is off, and then when the arc initiates it ramps ohmic_volts back up to arc voltage, but goes above threshold and below full scale thcad volts before it gets there. It needs to be state aware, or just monitor torch-on signal
Last edit: 08 Apr 2020 00:23 by Uthayne.

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 00:30 #163135 by rodw
I had similar issues in the past and I anded the probe signal with a digital input (M67/M68) so I had control from Gcode

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 01:10 #163139 by phillc54
PlasmaC has an output pin named plasmac.state-out that you may be able to use.

The states begin at 0 and in order are:
IDLE, PROBE_HEIGHT, PROBE_DOWN, PROBE_UP, ZERO_HEIGHT, PIERCE_HEIGHT, TORCH_ON, ARC_OK, PIERCE_DELAY, PUDDLE_JUMP, CUT_HEIGHT, CUT, PAUSE_AT_END, SAFE_HEIGHT, MAX_HEIGHT, FINISH, TORCHPULSE, PAUSED_MOTION, OHMIC_TEST, PROBE_TEST, SCRIBING, CONSUMABLE_CHANGE_ON, CONSUMABLE_CHANGE_OFF, DEBUG

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 01:47 #163142 by Uthayne
I've been monitoring the plasmac.state-out pin. During jog moves between cuts it is at state 0 (idle). The other one I watched was plasmac:motion-type, which had a output of 1 during a jog. Either of these could be used, but how can we invoke an interrupt (pause) condition for plasmac? Is there a global pause hook we could tap?

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 01:50 #163143 by phillc54
Do you want to pause plasmac?

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 01:54 #163144 by Uthayne
Yes, I'd like it to mimic the situation where ohmic probe triggered outside of probe state. Raises Z to safe height.

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 02:16 #163146 by phillc54
That would take some code changes to plasmac.

If you want realtime you could set motion.feed-inhibit to 1 which pauses motion. You would probaly need to latch it for safety because as soon as it resets to 0 the motion will continue.

If user space is good enough you could tie into:
net plasmac:program-pause        plasmac.program-pause           =>  halui.program.pause
this exists in plasmac.tcl, you would need to break it and or it to your connection I guess.

Neither of these methods would give you an y error messages, they would just pause the machine.

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 02:33 #163148 by Uthayne
Thanks, I'll give these a shot, could work just as well. My magnetic breakaway has about 2-3 degrees of alignment error due to no locating features other than matching pairs of magnets. A collision may not be enough to break the torch away, but enough to knock it off square. An ohmic trigger would prevent it

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.204 seconds
Powered by Kunena Forum