Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.
Use your display name or email address to sign in:
I dumped all the machine group parameters and that string wasn't in there, so I don't think you can capture data from that combo box.
Parameter 19123 returns the string from the material textbox, so it won't work with a string select table(also, your table is defined incorrectly). If you are in Mastercam 2017+ you can (and should) use the groupinfo function to capture that string, but in X9 you'll have to use the pmachineinfo$ post block.
I strongly recommend you do not include a Z move at FMAX when you are testing. When I worked for a MTB that integrated 530's Z0. was the pallet rest surface on 5 axis machines. So Z-.2 M91/M92 FMAX would not be fun.
If that's the only thing in pparameter$ you're introducing quite a bit of overhead. You can simply add the following line to pTotalHoles;
pTotalholes
TotalHoles = opinfo(15083, 0) #Get the number of points in the current op.
You can also loop through the posted ops with opinfo to build a table of selected points at the top of your file.
Yes, the number of entities in an operation is stored in parameter 15083.
Below is an example of how to retrieve that number for the current operation using opinfo ;
points = opinfo(15083, 0)
That's not exactly true. You can use opinfo with the old preread post block, you just won't get the efficiently benefits of opinfo. This is because the preread postblocks will still loop.
So yes, it is better and you should move your post to use the new opinfo functions, but the post should still work with opinfo and preread postblocks.
If you are using Mastercam 2017+ you should try the opinfo function; opinfo provides a much more efficient way to get parameter information than pparameter$.
Below is a very simple post block/snippet showing opinfo in use for this application.
hasDepthCuts : 0
roughStep : 0
toolpathDepth : 0
numberOfCuts : 0
currentCut : 1
fmt 4 currentCut
fmt 4 numberOfCuts
pDepthCutCount
if prv_op_id$ = op_id$,
[
hasDepthCuts = opinfo(15211, 0)
if hasDepthCuts = yes$,
[
roughStep = opinfo(10065, 0)
toolpathDepth = opinfo(10029, 0)
numberOfCuts = abs(toolpathDepth)/abs(roughStep)
n$, "( Depth Cut ", *currentCut, "of ", *numberOfCuts, " )", e$
if numberOfCuts = currentCut, currentCut = 1
else, currentCut = currentCut + 1
]
]
eMastercam - your online source for all things Mastercam.
Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.