“Control THC even if the THC On signal is not active”

If you have a question about the software please ask it here.

“Control THC even if the THC On signal is not active”

Postby beefy » Sat Jul 22, 2017 5:47 am

Hi Balazs,

is there any way to turn this on/off from a macro/plugin.

At present it's controlled by a checkbox and they are read only.

Cheers,

Keith.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: “Control THC even if the THC On signal is not active”

Postby Robertspark » Sat Jul 22, 2017 7:36 am

For Macros..... [varified]

AS3.Setcheckboxstate(true,85); // turns it on

AS3.Setcheckboxstate(false,85); // turns it off

for plugins.... [not varified .... but 98% certain it will work... :lol: ]

UC.Setcheckboxstate(true, true, 85); // turns it on

UC.Setcheckboxstate(true, false, 85); // turns it off

________________________________________________________________________

checkbox # 85 - checkbox name >> IOsetup_ControlTHCevenifTHConisnotactive

_______________________________________________________________________

Note:

Setcheckboxstate()
Function: void Setcheckboxstate( bool ison, int checknumber )
Description: This function sets the logic state of a checkbox screen object.
If the checkbox does not exist on the screen then this function will do
nothing.

Parameters:
 LEDnumber is the unique identifier of the object.

Example: AS3.Setcheckboxstate( true, 27);

One of the "glitches" is your screenset needs to keep up with the currently defined checkboxes, and other controls..... i.e. if you are running an older screenset that does not have some of the checkboxes (and other controls) defined, then you cannot control the various items because they are screenset items (they have to be on the screenset). Now I'm aware that this checkbox has probably been there ages (because it's a relatively low number....) but if you look at the other end of the AS3 objects ( buttons, LEDs and checkboxes) then you may not be able to toggle / control them if they are not on your screenset [hence I keep mentioning is there a way to run a function within the *SSF files which will you allow you to change say the run screen to your own custom setup so that way you can keep track of UCCNC development and the added buttons, LED's checkboxes etc as things become available more easily than painstakingly editing the newest SSF file]
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: “Control THC even if the THC On signal is not active”

Postby Robertspark » Sat Jul 22, 2017 8:38 pm

Now varified for the plugin (I added the following code to a button for a plugin I'm working on to test that it would toggle the checkbox, and it does).

Code: Select all
     bool checkboxstate = UC.Getcheckboxstate(true, 85);
     UC.Setcheckboxstate(true, !checkboxstate, 85);
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: “Control THC even if the THC On signal is not active”

Postby beefy » Sat Jul 22, 2017 8:59 pm

Much appreciated Rob, thanks.

I've had very little to do with my beloved plasma table and UCCNC for the last 7 months due to a new job and various stuff taking up my spare time. Forgotten quite a bit but I was sure checkboxes could be manipulated in code.

So I looked at the latest documentation and the statement for checkboxes is:

Checkboxes are READ ONLY and their logic state can be read in macro code.

I also looked at the macro documentation and the functions you showed me are nowhere to be seen.

After seeing you post I went into Visual Studio and opened the sample plugin. There in the list of available methods was the one for setting the checkbox.

I'll check in VS from now on to see what methods are available. It seems the documentation is a little behind.

I'll be using the latest screenset. What I'm going to try is finding all the code lines from the screenset I made last year (several version back) and saving them in a dedicated file. Then when a new screenset comes out with some changes, I may be able to just paste the bulk of my screenset code into the new screenset, and just modify the bits the "don't fit" any more.

Wherever possible I'll create a new tab layer(s) to put my goodies on, in an effort to minimise intermingling with the normal screenset. At some point I may even toy with the idea of a completely independant (i.e. a 2nd one) run tab layer so any future updates to the standard run tab layer won't hurt me.

Cheers,

Keith.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: “Control THC even if the THC On signal is not active”

Postby Robertspark » Sat Jul 22, 2017 9:23 pm

Keith, you probably want to download the current copy of my macro manual listed in my signature below

It's correct as of the current UCCNC release (few versions behind, but they were just bug fixes)

The only item that is not correct that I'm aware of is:
void Addled(double x, double y, double w, double h, bool blinktype, int picturenumber, int LEDnumber, int layernumber)
but that will only affect you if you are building a screenset (by directly editing the SSF file).... it's the blinktype variable that is new.

Err.... I have offered to help UCCNC with updating their documenation :roll: but did not get a response back (... the offer is still on the table...)

Basically I've pulled all the functions from the plugin and listed them out as what is available within the manual.

The two things to watch are:
exec is not used in the plugin.... just UC._____
AS3 is not used in the plugin .... just UC._____ (true,....) where the function is an AS3 function
(gets me every time when I switch from macro to plugin).
_____________________________________________________________

I'm a convert to a Neuron THC which has a custom run screenset, hence I was looking at what Andrew had done, and then began to understand that the screenset was a few versions back. I started to update it but then stopped as I realised that I'd need to copy it across to all the other BoB's [to help andrew out].... also knowing that Andrew is working in parrallel and obviously developing the screenset along with the plugin..... hence I thought that there must be an easier way to update say the RUN and the TOOLPATH screens (all the rest should never need changing). so that way in the future if you had a lathe, plasma, mill, 3, axis, 4 axis, 5 axis, pick & place (the Neuron only uses X, Y and A for example, Z is direct control without feedback to UCCNC), therefore you just update those two (or allow for a link to a seperate screenset file??) so that when the other tabs are added to you always keep pace with all the additional buttons, checkboxes, fields etc.... And your custom RUN & maybe TOOLPATH screenset can hold all your custom additional buttons, checkboxes and fields etc.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: “Control THC even if the THC On signal is not active”

Postby beefy » Sun Jul 23, 2017 1:49 am

Hi Rob,

downloaded your manual, thanks very much. Looks like you put a bit of time into that.

I was getting really heavy into the design of my own system until I decided to dump my business and take a job. Still hope to get it made but if I just can't get the time, the Neuron is also on my list. I like the way Andrew thinks, he tries to incorporate everything except the kitchen sink into his gear.

Maybe in time Balazs and the crew may create the modifications you are suggesting. I made a suggestion for a new feature (reverse a user specified distance back along the toolpath) on 2 separate occasions but never got a response, so I'm guessing their plate is full with whatever else is going on at the moment.

Keith.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: “Control THC even if the THC On signal is not active”

Postby Robertspark » Sun Jul 23, 2017 10:14 am

Keith, Lost arc backup (first thoughts [brainstorming] + bit of code)
viewtopic.php?f=16&t=674
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: “Control THC even if the THC On signal is not active”

Postby Battwell » Mon Jul 24, 2017 10:45 am

just downloaded your macro manual- thanks.

was looking for information of what can be done with auxhiliary encoders
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 827
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: “Control THC even if the THC On signal is not active”

Postby Robertspark » Mon Jul 24, 2017 11:06 am

What do you want to do with them (aux encoders)?
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 10 guests