Machsupport Forum

Mach Discussion => Mach Screens => Machscreen Screen Designer => Topic started by: Arbo on November 03, 2009, 10:56:55 AM

Title: OEM Codes...
Post by: Arbo on November 03, 2009, 10:56:55 AM
If I make a button and use say, OEM Zero X, then go back and look at the button,  it shows up as user defined, though the code # is correct.  But the button doesn't work.  But if I use the STD zero X, with the depreciated code, it works fine.

Is this a known problem?

Title: Re: OEM Codes...
Post by: Klaus1311 on November 04, 2009, 04:32:29 AM
Hey,

if I understood the wiki right, the codes you are talking about, are for programming purpose. For designing the standard codes are for the predefined actions



Klaus
Title: Re: OEM Codes...
Post by: Arbo on November 04, 2009, 09:07:49 AM
Perhaps I am confused then...  why are the OEM codes available to pick for a button if only the STD ones are 'correct' ones to use?

Other than that, great program, it's the only screen designer that even runs for me.  Loving it so far.

Title: Re: OEM Codes...
Post by: Arbo on November 04, 2009, 11:03:05 PM
Klaus,

Perhaps I can explain a bit better.   Say you are working on a 100% new screen.   Create a background, create a page 0 screen with a global reset button.   Set the button to 'OEM Reset' and it changes in the data field to 'user defined: *********x' (don't remember the number).  Save it, the reset does not work.  Go back and change it to 'STD Reset'  and save it, the reset button works.

Same thing with OEM Load vs. STD Load.    It's all good I guess as long as there is a STD function that is the same as the OEM function, but if not.....

Odd thing is if you load the default 1024.set, the load file, edit file and other things are set up as using the OEM codes, and show up correct in the details window rather than user defined: *********x....

I have attached pictures that show this behavior....  first one is setting the reset button to OEM Reset, which changes to "user defined"...  next is using STD Reset...    last shows how default screens come up with proper OEM codes.

Title: Re: OEM Codes...
Post by: Arbo on November 04, 2009, 11:21:36 PM
I think I figured out what must be going on.   If you create a button from scratch it will assign properly.   If you create an image-button from scratch, when it saves to the SET file, it saves the OEM code (ie, 216 for load file) but it doesn't set a bit saying it's an OEM code.

Figured this out by running screen3 on the screen and clicking on the buttons that do not seem to work right, and it brought it up with the right # code, but no option (ie, OEM) bit set.

Hope that clarifies.

Title: Re: OEM Codes...
Post by: ger21 on November 05, 2009, 09:11:45 AM
Hey, you stole my reset!! ;)
Title: Re: OEM Codes...
Post by: Arbo on November 05, 2009, 09:16:18 AM
Yeah, that is it.  I might even steal your cool aqua buttons.  ;)     Your screen is awesome.

Title: Re: OEM Codes...
Post by: Arbo on November 07, 2009, 10:22:48 AM
Klaus?  Have you read any of this?
Title: Re: OEM Codes...
Post by: Klaus1311 on November 08, 2009, 04:30:02 AM
Hey Arbo,

sorry I didn't answer earlier. There is no bit specifying a OEM-code. When you "add" a control you have to assign a function. Depending want function you want, you select either OEM or standard code. When you are using an OEM code, the decimal code is shown in the OEM_code line. The naming is taken from the wiki. The OEM-codes are for programming purposes e.g. SetOEMLed. As I wrote earlier, to assign a function to a control, use the Std calls.



Klaus

Title: Re: OEM Codes...
Post by: Arbo on November 08, 2009, 10:28:46 AM
Ok, I guess I'm not being clear, and will have to give up modifying my screens as now none of the screen programs work.

Do this, open the default 1024 set, click on some of the controls, you will see they are OEM controls, in fact, there are not STD
controls for some functions (I believe edit gcode is one of them).     Now that you see that,  create a brand new screen  you don't
need a background, on that screen, add an image button and set it to an oem function like load gcode.  Watch what it does.

Now create a normal button and assign it the same function, and watch what it does.

You will see the button works, but the image button does not.

As a former programmer, I'm just trying to let you know on the image button save, something is missing, a bit is not being
set if it's an OEM code.

I hope I am being clear as I'd like to continue to use your program, but can not until this feature works correctly.

Title: Re: OEM Codes...
Post by: ger21 on November 08, 2009, 11:02:35 AM
Arbo is correct, it's not working. Using his example, and setting the function to Open G-code (OEM 115). When I open the screen in Screen4, the image button is set to system function "Run", but the regular button is set to OEM 115. They should be the same. Re-Opening in Machscreen, the image button says the function is "User Defined 115".
Title: Re: OEM Codes...
Post by: Klaus1311 on November 08, 2009, 02:21:55 PM
Hey,

I fixed that problem in version V1.30 which is downloadable from my site.


Klaus.
Title: Re: OEM Codes...
Post by: Arbo on November 08, 2009, 04:00:14 PM
Thanks for the fix.   I like how if you click on something that has more than one item where you clicked (ie image and image button) it pops up to let you select which one you want to select.  Very nice.