Page 1 of 1

Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 6:00 am
by Greolt
Finally setting up an ohmic sensor. Tired of seeing the weight of the torch deflecting light material during touch off.

There are two possible probe inputs so I have one set for floating head switch and the other for the ohmic signal.

I notice there is only one LED (37) for probe triggered. So I can not use this to check which or both probe inputs is active.

Can you see any issue with using the relevant input pin LEDs on the diagnostic page to ascertain if one or both probe inputs are active after G31?

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 7:49 am
by Greolt
Related question,

The following macro lines are obviously wrong.
Can someone help me with the correct syntax?

if (exec.AS3.GetLED (74)== true)
{
AS3.Setfield(-1.5, 228);

AS3.Validatefield(228);}

end if

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 7:54 am
by Robertspark
loose the "end if" at the end

not needed as you completed the conditional statement with "}"

you are mixing VB with.c#

VB does not use ";"

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 7:57 am
by Greolt
OK thanks Rob. I am no programmer. Just an old carpenter.

I think this may look better. Dropped the "exec"


if (AS3.GetLED (74)== true)
{
AS3.Setfield(-1.5, 228);

AS3.Validatefield(228);}

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 8:48 am
by Robertspark
oh yeah.... missed the exec + AS3 ....

I'm no programmer either, just a trying hack

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 8:55 am
by Greolt
Several steps above me that's for sure.

Can you call a M3, M8 or M9 from within a macro?

Or must it be,

exec.DospinCW();

exec.Floodon();

exec.Stopcoolant();

I don't really want coolant, just using that to turn a relay on and off. For ohmic isolation

Can't find anything like "setpin"

EDIT:
It's OK I figured it out.

exec.Code(“M3”);

I will repeat my appreciation for your efforts with the macro manual.

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 9:03 am
by dezsoe
Use exec.Setoutpin(port, pin) and exec.Clroutpin(port, pin).

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 9:07 am
by Greolt
Dezsoe, You posted while I was editing my last post.

Thanks, I will try those commands

EDIT:
Yes I now see those functions in Rob's list.
Don't know how I missed them.
Thanks again.

Any one have an opinion on my first question above?

Re: Two probe inputs for plasma touch off

PostPosted: Wed Dec 30, 2020 1:24 pm
by Robertspark
Greolt, no problem on the manual, glad you are using it. It's just the same stuff from the HTMLs in the documentation folder largely .... but it makes it easier to search (CTL+F) + I normally just copy the example codes into whatever I'm doing and then edit them.

I started a Tips section at the back, but haven't had either much time / idea of what to put into it as I didn't want it to become another c# book but something which copy and paste + edit are helpful to someone (using UCCNC + not from a programming background). (like the ConvertTo ..... as I forget it [as I don't do c# (or any programming) often ] but when you write a macro you need to change datatypes regularly if you are moving data from screen inputs / vars / Mcode variables out to math or something else).