Hello Guest it is April 26, 2024, 05:34:43 PM

Author Topic: Screen Set Ideas  (Read 185162 times)

0 Members and 1 Guest are viewing this topic.

Re: Screen Set Ideas
« Reply #240 on: December 21, 2014, 05:17:08 AM »
There's a "Tap Drill" Chart  ;)

Updated: Added a Drill Chart
« Last Edit: December 21, 2014, 06:21:30 AM by Ya-Nvr-No »
Re: Screen Set Ideas
« Reply #241 on: December 21, 2014, 12:31:10 PM »
A question about your posting of JPG'S. Would it not be proper to post the code for your 'input excel' wizard ? I read this forum to learn, not to be teased  and impressed by your fine work. . . and I would love to see how you did it that so I could shamelessly 'COPY' it. Are you planning to go commercial later ?  please don't be offended by this question, just trying to learn the 'ropes', I spend much time over in the Arduino world where code is always posted.

one of your 'followers' . . .
Re: Screen Set Ideas
« Reply #242 on: December 21, 2014, 07:45:55 PM »
As I thank you for the kind words, Both Scott(PoppaBear) and I have provided countless examples and code snippits.
Where is the homework you have done using what you have learned?

The Thread heading states, this is for 'Screen Set Ideas' I am trying to motivate, inspire and share IDEAS.

Scott has filled the Toolbox with all kinds of his examples.
He is running a service/business to provide you what you desire

I'm just showing you the kind of things I want Mach4 to do for me.  ;D
That last project took me 20+ hours to figure out, but It took well more than a thousand hours to get to that point. This (Lua) is not an easy task to pick up. And I'm using probably less than 10% of Lua capabilities.

Don't give up.
Re: Screen Set Ideas
« Reply #243 on: December 21, 2014, 08:15:14 PM »
Added this message popup function at the start of calling the drill chart wizard.

Code: [Select]
function DisplayMessage()
 wx.wxMessageBox("Hole Dia. Tolerance \n\nStandard drilled hole tolerances for holes drilled with a drilling machine using suitable jigs & fixtures, the hole tolerances depends upon the diameter of the hole and increases as the hole diameter increases. \n\nThe following are standard tolerances for general machine work and apply in all cases except where greater or lesser accuracy is required by the design.\n\n .0135 THRU .125   +.004/ -.001 \n .1260 THRU .250   +.005/ -.001\n .2510 THRU .500   +.006/ -.001\n .5010 THRU .750   +.008/ -.001\n .7510 THRU 1.000  +.010/ -.001\n 1.001 THRU 2.000  +.012/ -.001\n", "Notice")
end
Re: Screen Set Ideas
« Reply #244 on: December 22, 2014, 09:42:10 AM »
Taking the same concept a little further, you can use the grid tools to calculate the data in the cells

Here is a Surface Speed to RPM calculator
Changing either of the two input values and then by clicking on any other cell, outputs the results.
Quick, Dirty and Functional

Note: The csv file has to be accessible, as it is reading from that file on load.

Update: Formatting and highlighting cells is shown in the added image.
Here's a snippet that formats the code (in two separate functions)
But it shows how to get cell data, compute it, set the new values and then create the alignment, colors, and font sizing

Code: [Select]
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(0,2,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(1,2,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(0,0,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(1,0,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(3,0,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(4,0,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(6,0,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(6,1,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
        for i = 7, 17 do --Loop through the last 10 rows column 0
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(i,0,wx.wxALIGN_RIGHT,wx.wxALIGN_RIGHT)
            i=i+1
        end
            SS_g_SurfaceSpeedsGrid:SetCellBackgroundColour(0, 2, wx.wxColour(wx.wxGREEN))--This code changes the new cell to green
            SS_g_SurfaceSpeedsGrid:SetCellBackgroundColour(6, 0, wx.wxColour(wx.wxGREEN))--This code changes the new cell to green
            SS_g_SurfaceSpeedsGrid:SetCellBackgroundColour(6, 1, wx.wxColour(wx.wxGREEN))--This code changes the new cell to green

            local SFM=SS_g_SurfaceSpeedsGrid:GetCellValue(0, 2)
            local DIA=SS_g_SurfaceSpeedsGrid:GetCellValue(1, 2)
            local PI=3.141592654

            RPM = (SFM * 12)/(DIA * PI)
            SFM = (DIA * PI * RPM)/12
            RPM = string.format("%0.0f",tostring(RPM))
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(3,3,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellAlignment(4,3,wx.wxALIGN_CENTER, wx.wxALIGN_CENTER)
            SS_g_SurfaceSpeedsGrid:SetCellValue(3, 3, tostring(RPM))
            SS_g_SurfaceSpeedsGrid:SetCellValue(4, 3, tostring(SFM))
            SS_g_SurfaceSpeedsGrid:SetCellBackgroundColour(3, 3, wx.wxColour(230,230,230))--This code changes the new cell to gray
            SS_g_SurfaceSpeedsGrid:SetCellTextColour(3, 3, wx.wxColour(wx.wxRED))--This code changes the new cell to Red
            SS_g_SurfaceSpeedsGrid:SetCellFont(3, 3, wx.wxFont(14,0,0,0))--This code changes the font size
            SS_g_SurfaceSpeedsGrid:SetCellBackgroundColour(4, 3, wx.wxColour(wx.wxGREEN))--This code changes the new cell to green
« Last Edit: December 22, 2014, 12:52:00 PM by Ya-Nvr-No »

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #245 on: December 22, 2014, 02:14:22 PM »
your going to end up with a do everything M4 how much more can you add. And as you said its a lot of hard work I still cant get what I am trying to do to work I know what's wrong just not how to fix it ill get next year some time.

anyway thanks for shearing 

you should see if you can program it to make your coffees at smoko

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #246 on: December 22, 2014, 04:19:40 PM »
Quote
As I thank you for the kind words, Both Scott(PoppaBear) and I have provided countless examples and code snippits.

Yeap...... In the Tool box, there is a "controls" example that shows you how to do/use Grids, and several other controls.
It should be a good start point, to give you a leg up on the learning curve.

Unfortunately, other than the wxLua examples on the internet, to include Lua examples and wxWidgets examples (websites),
the one most applicable is the wxLua examples site, the other address the two separate language sites.

Craig has dumped 1,000's of hours into his stuff/learning, myself also, I do wish there was an easier way.
But, at this time, you will have to dig into the screen designer, wxLua and experiment.
Like Craig, I do my own screen mods......... and more often than not,
you learn by blowing stuff up, and starting over....lots and lots of tears and cursing...  :)

On the wxLua site and others like: Code Guru etc., you can find all kinds of code examples on things.
Example, reading/writing, from/to CVS files and the like.....  There is a huge ugly learning curve on this stuff.......

I know Vendors like Mach Motion have dumped Massive Man hours into doing their screens and stuff also.
There are many Vendors and OEMs that are having to sink major man hour capital into this to be ready to run by release date.

I guess my point is, your going to have to dump your time to learn it, or pay money to someone else to get what you want.

There is a lot of frustration with this stuff there is NO doubt, but, I understand Craig's point. He puts this stuff out,
to peak your interest and get YOU to dig, and figure it out for yourself.

The common hope that Craig, Brett and Myself share is to get the users to start playing, learning and posting up their work.

Scott



fun times

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Screen Set Ideas
« Reply #247 on: December 22, 2014, 05:27:17 PM »
good words Its a steep learning curve.

to get simple thing like inputs outputs working just a simple on/off that's not to hard its all those other functions that get hard. the thing I am have trouble with is when you need to add something in other places to get something to work like in plc script and places like that.

cant weight for the manual to finely get done until then Ill keep banging my head against the wall.

 Craig, Brett and poppabear thanks for all that you have sheared so far its more than you needed to do but it helps to see what can be done

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Screen Set Ideas
« Reply #248 on: December 22, 2014, 06:52:11 PM »
Hmm......

Personaly I am happy that Scott and Craig and a some others have expanded their expertise to add  and explore functionality to Mach 4 as it develops. Should be interesting to see how it all will be, in say, another year or so.

Wish I could help but programming is just not my thing.

Keep up the good work guy's I follow along  with interest.....

RICH
Re: Screen Set Ideas
« Reply #249 on: December 22, 2014, 10:24:47 PM »
Thanks guys;

had an issue today with setting up Darwin, after chatting with Art, he made me aware of the baseline to setup the Slider Freq in Hz.

I needed to set my freq just above the minimum Hz computed value.

So guess what I made? , a wizard to help in the future.

But it comes down to a simple formula (Counts * Velocity)/60 for each motor.

Update: (velocity is in units/min and kernel is in ints/second, so 60 makes velocity in seconds.)

Then just need to set the slider above the Highest Hz computed for all the axis
I made this one to handle up to 7 motors.
« Last Edit: December 28, 2014, 05:24:52 AM by Ya-Nvr-No »