1.2030 precompile macros / user texfield input saving

If you think you've found a bug post it here.

1.2030 precompile macros / user texfield input saving

Postby TadasM » Mon Nov 28, 2016 5:33 pm

Hi,

I just installed 1.2030 version of UCCNC and having some issues.

1. The Precompile macros checkbox is not available on custom profile (it is available if I load "Default" profile). I know I can add checkbox myself, but maybe such issue is not only for me ?

Precompile macros.JPG


2. The user field input save is not working neither on Default profile or custom profile. As it does not work on my custom screenset, I thought it might be some error due to that, but I have created new textfield on default UCCNC and it does not save the values once app is closed. Em I doing something wrong ? :)
Textfield input.JPG


3. My PC antivirus gives notification that installation file may be corrupted. This wasn't an issue with previous versions of UCCNC.
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: 1.2030 precompile macros / user texfield input saving

Postby cncdrive » Mon Nov 28, 2016 7:28 pm

I don't think that you have version 1.2030 installed, maybe your antivirus did not allow you to install it.
I1ve checked and saving the user rextfields works here, it saves ID>=20000 here without problems.
What version number does it say on the Help/About page?

What screenset a custom profile loads is defined in the profile file in this key:
[Screensetsettings]
mainscreenfilename=Defaultscreenset

When you create a new profile the key value is Defaultscreenset.
So, the same screenset it loaded which installed with the UCCNC, therefor it is not possible that the Precompile macro checkbox is available in the Default profile which just installed and that it is not available in the created profile, except if the created profile loading a different screenset, if that key was changed in the profile.

Viruses: We always run virus checks on the new UCCNC deployments and now I verified the 1.2030 and it does not seems to have any viruses.
Also we don't install anything new on the deployment PC and it does not have internet connection to be sure it does not get a virus.
Antivirus softwares on the other hand looking for patterns and can give false alerts.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: 1.2030 precompile macros / user texfield input saving

Postby TadasM » Mon Nov 28, 2016 8:51 pm

cncdrive wrote:I don't think that you have version 1.2030 installed, maybe your antivirus did not allow you to install it.
I1ve checked and saving the user rextfields works here, it saves ID>=20000 here without problems.
What version number does it say on the Help/About page?

What screenset a custom profile loads is defined in the profile file in this key:
[Screensetsettings]
mainscreenfilename=Defaultscreenset

When you create a new profile the key value is Defaultscreenset.
So, the same screenset it loaded which installed with the UCCNC, therefor it is not possible that the Precompile macro checkbox is available in the Default profile which just installed and that it is not available in the created profile, except if the created profile loading a different screenset, if that key was changed in the profile.

Viruses: We always run virus checks on the new UCCNC deployments and now I verified the 1.2030 and it does not seems to have any viruses.
Also we don't install anything new on the deployment PC and it does not have internet connection to be sure it does not get a virus.
Antivirus softwares on the other hand looking for patterns and can give false alerts.



Hi Balazs,

thank You for your message.

Once I received message from my antivirus software, I have re-downloaded and reinstalled UCCNC (but I did needed to force install it as antivirus thinks its something wrong with exe file). But I have the same issue as described in my first post. When installing UCCNC I double checked that "overwrite default profile and macros" is marked.

The UCCNC version:
uccnc version.JPG
uccnc version.JPG (15.6 KiB) Viewed 15731 times


My screensettings are as follows:
[Screensetsettings]
mainscreenfilename=MMC

Shortcut link: C:\UCCNC\UCCNC.exe /p MMC

and if I load default profile, the screensettings is:
[Screensetsettings]
mainscreenfilename=Defaultscreenset

Shortcut link: C:\UCCNC\UCCNC.exe


Reinstalled one more time (4th time) - No changes...

One more: Once I open UCCNC with created pofile (MMC), I always get to "Configure" tab (not to RUN, as it was with earlier versions)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: 1.2030 precompile macros / user texfield input saving

Postby ger21 » Mon Nov 28, 2016 10:42 pm

Be aware that while it saves the values to the profile, it doesn't restore them when you restart. That's up to you to do, by using the M99998 macro.

Go to UCCNC\Profiles\, and open MMC.pro in NotePAD, and look at the bottom.

You should see a section like this, but the numbers will be different:

[UserTextfields]
20333=15
20334=1
20335=3
20336=1
20337=0.25
20338=0.25
20339=3
20340=0.1
20341=0
20342=0.125

It's working fine for me here.

I use code like this to restore the values when UCCNC starts:

Code: Select all
readfield = exec.Readkey("UserTextfields", "20333", "10.000");
AS3jog.Setfieldtext(readfield, 20333); // Set Initial Feedrate


I think the reason that you don't have the new button is because your not the default screenset. It looks like you're using the default images, but it's a modified screen, so it has the text from the image, but no checkbox.
Just use the screen editor to copy the checkbox above it, and change the number to 241.

One more: Once I open UCCNC with created pofile (MMC), I always get to "Configure" tab (not to RUN, as it was with earlier versions)


When you edit and save the screen, UCCNC will start on whatever tab you were on when you saved the screen. When you are in the screen editor, always go back to the Run tab before saving.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: 1.2030 precompile macros / user texfield input saving

Postby cncdrive » Mon Nov 28, 2016 10:53 pm

Yes, Gerry is right, we only made the values to save, but they do not readback on startup,
to save was what Gerry asked about, the loading of the values may be written manually on software startup in the M99998 constructor macro.

So, if the values save you can only check with opening the profile file and look for those keys.

And yes, Gerry is right, if you have an already made custom screenset, the UCCNC can't install things into that screenset file,
it can't determinate what is missing from a custom screenset file, what it can do is it overwrites the Default and the Plasma screensets with the new screenset files, so those will be upto date to the installed version, but it does nothing with custom screensets.

New things you need to add manually to your custom screenset. Just add the checkbox 241 (macro precompile checkbox) with the screen editor to have that feature available in your screenset.

And again Gerry is right, that when you save the screenset the UCCNC checks through all of your tab pages and checks which tab pages are opened and save those as the "to be selected on startup", this information is saved into the screenset file.
Since a screenset can have any tab pages numbers in any combinations selecting the tab pages before saving is how you can define the to be opened on startup pages.
If you want the run page to open on startup then select that tab page before you save the screenset and on the next startup it will be selected.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: 1.2030 precompile macros / user texfield input saving

Postby TadasM » Tue Nov 29, 2016 5:34 pm

Gerry, Balazs,

thank you for your support. I think it would be great to move this thread to other place than "bug reporting". It looks like it is me who causing this "bug" :) I didn't realized that saving values will not restore them on UCCNC boot and you have to do it manually :)

The usertextfield is working - and saving values on profile file. I'm trying to restore values as per Gerry advise, but with lacking of programming knowledge - I cant make it work and UCCNC says that there is error once loading M99998 macro.

Code: Select all
readfield = exec.Readkey("UserTextfields", "20021", "60");
AS3.Setfieldtext(readfield, 20021); // Set field 20021 to 60


New checkbox for precompile macros added and working fine :)

Saving the screenset on current page "RUN" worked too - now opening correct page on startup :)


So it is all me that caused these issues... (except antivirus - I don't know about that - but I have added exception and all is good now)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: 1.2030 precompile macros / user texfield input saving

Postby cncdrive » Tue Nov 29, 2016 5:56 pm

I'm trying to restore values as per Gerry advise, but with lacking of programming knowledge - I cant make it work and UCCNC says that there is error once loading M99998 macro.


The 'readfield' is your own variable, but you did not define the variable type. It should be string type,
so, it the code should look like:

Code: Select all
string readfield = exec.Readkey("UserTextfields", "20021", "60");
AS3.Setfieldtext(readfield, 20021); // Set field 20021 to 60


You can get an idea about what the error is in your macro if you run the macro and if the UCCNC gives you an error message about the macro then open the Errorlog.txt file in the same folder where your macros are.
The Error log file is always created if a macro had an error.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: 1.2030 precompile macros / user texfield input saving

Postby TadasM » Tue Nov 29, 2016 6:55 pm

cncdrive wrote:
I'm trying to restore values as per Gerry advise, but with lacking of programming knowledge - I cant make it work and UCCNC says that there is error once loading M99998 macro.


The 'readfield' is your own variable, but you did not define the variable type. It should be string type,
so, it the code should look like:

Code: Select all
string readfield = exec.Readkey("UserTextfields", "20021", "60");
AS3.Setfieldtext(readfield, 20021); // Set field 20021 to 60


You can get an idea about what the error is in your macro if you run the macro and if the UCCNC gives you an error message about the macro then open the Errorlog.txt file in the same folder where your macros are.
The Error log file is always created if a macro had an error.


Hurray - its alive - its working :) Thank You Balazs :)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 10 guests