Do the Undoable in Mastercam with Excel and Scripts

  Рет қаралды 9,740

CamInstructor

CamInstructor

Күн бұрын

Like other machining nerds out there, I'm constantly perusing online forums and user groups about machining and Mastercam. This is where I found the idea for this video. I just may use forum ideas for future videos as I often struggle with content ideas for these videos. So, ya, feel free to leave your ideas for videos to help me out!
The topic starter was asking about how to offset/translate a hole 100x but have the distance between the holes get larger for each individual move. So a distance between holes 1 and 2 of 0.500, holes 2 and 3 of 0.5156, holes 3 and 4 of 0.5312 etc. This is not something you can do with a normal Translate inside of Mastercam. However, we can use some tools in Mastercam to perform this function.
First in this video, I look at importing a CSV file. CSV files can contain the XYZ coordinates of the points you wish to create. So, we can use a program like Excel to generate the numbers of the coordinates we need. Excel is a very powerful software and can be extremely useful for machinists in many different aspects of their jobs. I highly recommend exploring Excel for tasks beyond this example. Once we create the points in Excel, we can open this file with Mastercam and it will create the points for us.
Second, scripting. Now VBScripting is all but dead going forward. It does work in Mastercam now but this is being replaced with .net scripting so I would not suggest putting much into this at this point. I've used it here simply because I have not explored the net scripting yet. Alternatively, this could go directly into a chook as well but this will be a bunch more work than a simple script. Scripts allows us to use programming languages to loop and adjust point positions and have Mastercam create these points programmatically for us.
In closing, just remember, just because there isn't a button or function that doesn't do exactly what you want, this doesn't mean Mastercam isn't able to do it. Sometimes you have to get into these 'extra' tools and make your own functions.
If you have another idea on how to accomplish the offsetting described, please share. I'm sure there's another option out there we did not look at here.
0:00 Intro
1:30 Review of the tasks
3:40 CSV files and Excel
9:06 Scripting
See other blog posts
blog.caminstructor.com
Check out our website
caminstructor.com
#Mastercam #LearnCNC

Пікірлер: 25
@chazz.zaragoza.9561
@chazz.zaragoza.9561 3 жыл бұрын
That's a neat trick
@haroldjoubert1986
@haroldjoubert1986 3 жыл бұрын
This is excellent never new this is possible. 👍 Please do a more in depth video on this and maybe refer more to the net script way. Thank you caminstructor as always sharing important information for Mastercam users 👍
@CamInstructor
@CamInstructor 3 жыл бұрын
Will be looking into net scripting very soon
@chazz.zaragoza.9561
@chazz.zaragoza.9561 3 жыл бұрын
@@CamInstructor Will you be covering making custom C hooks at any point??
@CamInstructor
@CamInstructor 3 жыл бұрын
At some point, yes.
@manojvishwakarma-instructo4612
@manojvishwakarma-instructo4612 2 жыл бұрын
Informative 👍
@CamInstructor
@CamInstructor 2 жыл бұрын
Glad you think so!
@theking-dn3sv
@theking-dn3sv 2 жыл бұрын
Awesome man thanks!
@CamInstructor
@CamInstructor 2 жыл бұрын
Thank you!
@loanpanda0763
@loanpanda0763 3 жыл бұрын
Superb sir
@CamInstructor
@CamInstructor 3 жыл бұрын
Thanks!
@johnny1b099
@johnny1b099 3 жыл бұрын
Great information! But I think you missed the easiest and quickest way to accomplish your example task - use transform to create 100 copies of the point, then scale with the scale origin at the first point using a scale factor of (.5 + .156)/.5. Boom - done!
@CamInstructor
@CamInstructor 3 жыл бұрын
You are on to something here but as described this does not work. The points will keep an even spacing during the scale move, unless I'm overlooking something. Doing a Copy during the Scale kind of works, I can get an increasing offset but not at the positions we're after here. If you want to provide some additional info, I'm all ears.
@johnny1b099
@johnny1b099 3 жыл бұрын
@@CamInstructor OOPS. I didn't think about this thoroughly - your example is not a linear scaling problem. Sorry!
@caseywaite599
@caseywaite599 2 жыл бұрын
An easy way to do this for something like drilled holes or other canned cycles would be to program them in G91. Then you just copy paste X/Y.5156 for the number of instances - 1 for the first hole. This, however, is great for something outside of a canned cycle. Though, arguably could be done with subroutines as well. Anyway… a million ways to skin a cat.
@CamInstructor
@CamInstructor 2 жыл бұрын
That wouldn't quite work as the spacing is different for each hole, its moving 0.0156 more than the last move, not a consistent 0.0156 each time. You would have to change your incremental amount each time,. No real gain over absolute position as you cannot refer to the move you just made. The only solution on the control would be a macro program.
@user-nn9ny8cq3s
@user-nn9ny8cq3s 3 жыл бұрын
супер
@brockfrancis4398
@brockfrancis4398 2 жыл бұрын
Great content! Can you create a line from a csv import?
@CamInstructor
@CamInstructor 2 жыл бұрын
No. CSV for geometry will only create a point. There are ways you could use a csv file to create lines but this would involve either a script or a nethook.
@user-ui4yx2kq1d
@user-ui4yx2kq1d 4 ай бұрын
Is Macros software part of cam software 🤔
@avarillas75
@avarillas75 11 ай бұрын
this is way too much work! why not use G91 instead? create a short subroutine and move incrementally, Done!
@CamInstructor
@CamInstructor 11 ай бұрын
The spacing is changing between each hole. G91 will provide no advantage over G90.
@Zekeneral
@Zekeneral 3 жыл бұрын
ffs move to metric already :)
@CamInstructor
@CamInstructor 3 жыл бұрын
Or...just pretend these are really small metric parts :) I'll keep metric in mind for a future video 👍
@ipadize
@ipadize 6 ай бұрын
americans already move to metric, inch by inch
G-Code Editors in Mastercam
13:15
CamInstructor
Рет қаралды 9 М.
Working Faster in Mastercam
9:24
CamInstructor
Рет қаралды 16 М.
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 3,8 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 15 МЛН
The #1 Mistake on Mastercam Certification Tests and How to Fix It
11:26
C# in 100 Seconds
2:27
Fireship
Рет қаралды 2 МЛН
Dynamic Work Offsets - Make the transtition to multiaxis.
9:16
Mastercam Levels and the Levels Manager
20:18
CamInstructor
Рет қаралды 22 М.
7 Must Know Mastercam Tips
6:28
CamInstructor
Рет қаралды 28 М.
Controlling Where OptiRough Cuts | Xometry Mill Test Part - Video 5
16:04
Programming a CNC Mill as a CNC Lathe in Mastercam!
10:37
CamInstructor
Рет қаралды 14 М.
Creating & Managing Mastercam Tool Libraries
29:31
Axsys CADCAM Solutions WebExpress Distance Learning
Рет қаралды 13 М.
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 3,8 МЛН