Two probe inputs for plasma touch off

This is the place to talk about and share things related to CNC plasma machines using UCCNC

Two probe inputs for plasma touch off

Postby Greolt » Wed Dec 30, 2020 6:00 am

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?
Greolt
 
Posts: 239
Joined: Sun Sep 04, 2016 6:22 am

Re: Two probe inputs for plasma touch off

Postby Greolt » Wed Dec 30, 2020 7:49 am

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
Greolt
 
Posts: 239
Joined: Sun Sep 04, 2016 6:22 am

Re: Two probe inputs for plasma touch off

Postby Robertspark » Wed Dec 30, 2020 7:54 am

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 ";"
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Two probe inputs for plasma touch off

Postby Greolt » Wed Dec 30, 2020 7:57 am

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);}
Greolt
 
Posts: 239
Joined: Sun Sep 04, 2016 6:22 am

Re: Two probe inputs for plasma touch off

Postby Robertspark » Wed Dec 30, 2020 8:48 am

oh yeah.... missed the exec + AS3 ....

I'm no programmer either, just a trying hack
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Two probe inputs for plasma touch off

Postby Greolt » Wed Dec 30, 2020 8:55 am

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.
Last edited by Greolt on Wed Dec 30, 2020 9:05 am, edited 1 time in total.
Greolt
 
Posts: 239
Joined: Sun Sep 04, 2016 6:22 am

Re: Two probe inputs for plasma touch off

Postby dezsoe » Wed Dec 30, 2020 9:03 am

Use exec.Setoutpin(port, pin) and exec.Clroutpin(port, pin).
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Two probe inputs for plasma touch off

Postby Greolt » Wed Dec 30, 2020 9:07 am

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?
Greolt
 
Posts: 239
Joined: Sun Sep 04, 2016 6:22 am

Re: Two probe inputs for plasma touch off

Postby Robertspark » Wed Dec 30, 2020 1:24 pm

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).
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm


Return to CNC Plasma

Who is online

Users browsing this forum: No registered users and 7 guests