Page 1 of 1

Re: Adjusting cut parameters in Plasma

PostPosted: Mon Jul 30, 2018 2:16 pm
by cncdrive
That is incorrect. You can adjust the FRO and SRO in 1% units.
Only the + and - buttons adjusting it in 10% units when the value is above 10% and 1% when it is below 10% otherwise the users would go crazy if they have to press the buttons hundreds of times.

Re: Adjusting cut parameters in Plasma

PostPosted: Mon Jul 30, 2018 2:56 pm
by ger21
Just create your own buttons and macros to do it?

Re: Adjusting cut parameters in Plasma

PostPosted: Tue Jul 31, 2018 11:35 am
by stirling
I absolutely agree with Terry here. A step size of 10% is not practical. If I program 100V for example, a minimum step up to 110V translates to 1mm increase in cut height. That's way too coarse.

ger21 wrote:Just create your own buttons and macros to do it?


This is exactly what I've done to make UCCNC work with my THC but it's not as straightforward as you might think.

AFAIK, you can't alter the actual spindle speed via macro at (gcode) run-time. (You CAN set the SS DRO via macro but that doesn't alter the actual underlying SS value). This will be an issue for any THC that uses the ACTUAL spindle speed as setvolts (say via the PWM output for example).

Fortunately mine gets its set volts via modbus so I just monitor the DRO directly and don't care that the actual SS remains at whatever it was set at with the S word.

Re: Adjusting cut parameters in Plasma

PostPosted: Tue Jul 31, 2018 1:13 pm
by cncdrive
You CAN set the SS DRO via macro but that doesn't alter the actual underlying SS value


Why is that?
Maybe you did not call the AS3.Validatefield function on the DRO for the new value?
I mean after writting the value of a DRO and if you want to validate that new value then you have to call the Validatefield function after writting and then it works the same as if the user entered a new value into the DRO.

Re: Adjusting cut parameters in Plasma

PostPosted: Tue Jul 31, 2018 2:36 pm
by stirling
cncdrive wrote:
You CAN set the SS DRO via macro but that doesn't alter the actual underlying SS value


Why is that?
Maybe you did not call the AS3.Validatefield function on the DRO for the new value?
I mean after writting the value of a DRO and if you want to validate that new value then you have to call the Validatefield function after writting and then it works the same as if the user entered a new value into the DRO.


Here's my code:

Code: Select all
//called by macroloop 1 this macro
//monitors button 10000 (Sample and Hold) and copies user field 20000 (Actual Volts) into
//field 869 (Spindle speed AKA Set Volts for THC)
//we use a state machine so that one press is needed for each copy i.e. no unintended repeats.
//i.e. holding down the button does not do multiple copies

switch (sampleAndHoldButtonState)
{
  case BUTTON_STATES.DOWN:
  if (AS3.Getbutton(sampleAndHoldButton))
  {
    double vAct = AS3.Getfielddouble(actSpindleSpeedDRO);
    AS3.Setfield(vAct, setSpindleSpeedDRO);
    AS3.Validatefield(setSpindleSpeedDRO);
    sampleAndHoldButtonState = BUTTON_STATES.UP;
    exec.AddStatusmessage("S&H down"); //remove after debug
  }
  break;

  case BUTTON_STATES.UP:
  if (!AS3.Getbutton(sampleAndHoldButton))
  {
    sampleAndHoldButtonState = BUTTON_STATES.DOWN;
    exec.AddStatusmessage("S&H up"); //remove after debug
  }
  break;
}

#Events

//Globals
enum BUTTON_STATES : byte {UP, DOWN};

BUTTON_STATES sampleAndHoldButtonState = BUTTON_STATES.UP;

const ushort sampleAndHoldButton = 10000;
const ushort setSpindleSpeedDRO = 869;
const ushort actSpindleSpeedDRO = 20000;

Re: Adjusting cut parameters in Plasma

PostPosted: Tue Jul 31, 2018 2:40 pm
by cncdrive
Ahh, OK, I thought you talking about the SRO and FRO, only those are setable on the run.
The spindle speed and feedrate is programmed in code and so those are not setable this way, those DROs are read only and only the FRO and SRO% can override them in the 0-300% range.

Re: Adjusting cut parameters in Plasma

PostPosted: Tue Jul 31, 2018 2:49 pm
by stirling
cncdrive wrote:Ahh, OK, I thought you talking about the SRO and FRO, only those are setable on the run.
The spindle speed and feedrate is programmed in code and so those are not setable this way, those DROs are read only and only the FRO and SRO% can override them in the 0-300% range.


Exactly, and that's the problem we're discussing. i.e. There is NO way to alter the spindle speed (AKA set volts) whilst running gcode OTHER than via the override buttons. The problem there is as I've said above, a 10% adjustment is no use at all in plasma. It's just too coarse.

Re: Adjusting cut parameters in Plasma

PostPosted: Tue Jul 31, 2018 3:13 pm
by cncdrive
It would be dangerous to allow setting the spindle speed on the fly like that.
But you can set the S to a known value e.g. to give 100% PWM at that value and then vary the SRO to vary the spindle PWM.

Re: Adjusting cut parameters in Plasma

PostPosted: Tue Jul 31, 2018 5:20 pm
by cncdrive
Because the spindle stops and breaks the tool.
It is also kind of dangerous how it is done in e.g. Mach3 that you can click on the SRO bar and make it 0% with a single click.