Hello Guest it is April 19, 2024, 05:46:09 AM

Author Topic: Screen Set Ideas  (Read 184753 times)

0 Members and 1 Guest are viewing this topic.

Re: Screen Set Ideas
« Reply #310 on: February 14, 2015, 11:19:15 AM »
Adding more features and options, working on being able to import a Drawing file and then scribble around in it.
Setting the size of the working area then fit image to limits.
Not sure if I can set a home position, but think it might be possible to click on a spot and make it 0,0
I can click on a spot and get its location just haven't figured out how to shift the coordinates.
Good thing to work on while its snowing and blowing outside.
Re: Screen Set Ideas
« Reply #311 on: June 09, 2015, 03:52:41 PM »
Crayola Cam is what I am going to call that..

I was going to do this so my kids could make the machine cut :)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com

Offline Pedio

*
  •  200 200
    • View Profile
Re: Screen Set Ideas
« Reply #312 on: June 16, 2015, 06:57:32 PM »
This is a wierd request - Is it possible to make the screen behind the tool path transparent? I would like to put a camera window behind the tool path window so I can position my work piece where the tool path will be. I know this is probably a lot more complex than I think.
Re: Screen Set Ideas
« Reply #313 on: July 09, 2015, 02:16:11 PM »
Raining again here so had some time to catch up a little and added this to a screen set this morning, been busy building things this year so Lua is on hold for the most part.

noticed a cool tool by chris and a request he had, so threw this together along with a request for a goto location button someone wanted.
http://www.machsupport.com/forum/index.php/topic,30461.msg211520.html#msg211520

the goto button uses the position in the dro boxes, then next to the box's are buttons that are used from a reference home to a location you drove the axis too. (so yes the axis's have to be referenced/homed)

And then If you update the values in the dro boxes after the move with the know distance traveled, when you press the button they pop up the new corrected count value for that axis.

the last image is the test code I used to create the script under the buttons for the count calculations.

Easy peasy... Have fun  ;) I have more to build
Re: Screen Set Ideas
« Reply #314 on: July 10, 2015, 06:13:06 AM »
I noticed that recently the API had changed again and screwed up my fixture offset routine.

Took me a while to figure out what changed and how to fix it

But this is the basic script in the PLC and just some basic screen additions, just takes time and not giving up.

Code: [Select]
local var4014 = mc.mcCntlGetPoundVar(inst, 4014);
fixtureNum = (var4014*10)

scr.SetProperty('droFixture', 'Value', tostring(fixtureNum));
if (fixtureNum > 6 and fixtureNum < 127) then
    scr.SetProperty('txtFixture', 'Label', 'G54.1 P' .. tostring(fixtureNum-6));
else
    scr.SetProperty('txtFixture', 'Label', 'G' .. tostring(fixtureNum+53));
end
« Last Edit: July 10, 2015, 06:15:34 AM by Ya-Nvr-No »
Re: Screen Set Ideas
« Reply #315 on: July 10, 2015, 12:11:29 PM »
I get it!  ;D

...the 'newCounts' formula...

thanx!

--josh
Re: Screen Set Ideas
« Reply #316 on: July 10, 2015, 12:34:19 PM »
Two questions for anyone who may know the answer...

1) Motor Counts are set from Mach4 Config menu. Is their a recall and set axis motor counts function at the user programmable level?

    i.e., The function call mc.mcMotorGetInfoStruct & mc.mcMotorSetInfoStruct is unavailable to me. Are motor counts assigned to pound variables by chance?
           --Another example are the jog increments that are set in the Config Menu. Where does Mach4 store these values and how can we retrieve and reset those values at a user programmable level?)
           --I hope I explained this well enough for you to visualize what I am asking....

2) mc.mcScrewMapping     --Isn't this the formal axis calibration function for mach4?


--josh
« Last Edit: July 10, 2015, 12:35:55 PM by Screwie Louie »

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #317 on: July 10, 2015, 02:53:54 PM »
>>>
1) Motor Counts are set from Mach4 Config menu. Is their a recall and set axis motor counts function at the user programmable level?

    i.e., The function call mc.mcMotorGetInfoStruct & mc.mcMotorSetInfoStruct is unavailable to me. Are motor counts assigned to pound variables by chance?

>>>Not from mcLua, but they are accessible via a plugin, motor counts are not accessable by pound variables,
>>>at least that I am aware of as of latest version

           --Another example are the jog increments that are set in the Config Menu. Where does Mach4 store these values and how can we retrieve and reset those values at a user programmable level?)

>>>See the "Diagnostic Register", and you can read/write to those registers with register Get/Set calls

2) mc.mcScrewMapping     --Isn't this the formal axis calibration function for mach4?

>>>This if for compensating for screw pitch errors, at set increments along a screw in encoder counts.
>>>Note: there is not a mc.mcScrewMapping call in mcLua, but there are "Screw Mapping" lua functions, of various
>>>flavors and types.

Scott
fun times
Re: Screen Set Ideas
« Reply #318 on: July 10, 2015, 03:26:58 PM »
Thanx Scott.

Could I read/write from/to the profile's Machine.ini file's sections - keys - values (i.e.,  [Motor0] CountsPerUnit = some value) as an alternate way using mc.Profile* to get/set values of an info struct?
I'm gonna spend a few and experiment a little....


« Last Edit: July 10, 2015, 03:37:24 PM by Screwie Louie »

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #319 on: July 10, 2015, 03:38:06 PM »
Yes, you could do that as a work around

Good, idea!

perhaps try:

local CountsPerUnit = 0;
CountsPerUnit, rc = mc.mcProfileGetDouble(inst,"Motor0", "CountsPerUnit", 2000.0);   
rc = mc.mcProfileWriteDouble(inst,"Motor0", "CountsPerUnit", 2000.0);--12700.0

Scott
« Last Edit: July 10, 2015, 05:06:05 PM by poppabear »
fun times