Jump to content

Welcome to eMastercam

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:

Zaffin_D

Verified Members
  • Posts

    374
  • Joined

  • Days Won

    1

Everything posted by Zaffin_D

  1. The GitHub makes it seem like a Fanuc post with a few tweaks would do the trick, do you have a Fanuc post you could try? List of Supported G-Codes in Grbl v0.9 Master: - Non-Modal Commands: G4, G10L2, G10L20, G28, G30, G28.1, G30.1, G53, G92, G92.1 - Motion Modes: G0, G1, G2, G3, G38.2, G38.3, G38.4, G38.5, G80 - Feed Rate Modes: G93, G94 - Unit Modes: G20, G21 - Distance Modes: G90, G91 - Arc IJK Distance Modes: G91.1 - Plane Select Modes: G17, G18, G19 - Tool Length Offset Modes: G43.1, G49 - Cutter Compensation Modes: G40 - Coordinate System Modes: G54, G55, G56, G57, G58, G59 - Control Modes: G61 - Program Flow: M0, M1, M2, M30* - Coolant Control: M7*, M8, M9 - Spindle Control: M3, M4, M5 - Valid Non-Command Words: F, I, J, K, L, N, P, R, S, T, X, Y, Z
  2. Quite a few of CNC's posts have the logic in them, download MPFAN from the tech exchange and have a look. If that doesn't help, contact your Mastercam reseller, there's documentation available.
  3. Have a look at the documentation, project examples, and SDK fourm to start with. If you get stuck, your reseller should be able to open a support ticket for SDK issues on your behalf.
  4. Depending on the operation types you're dealing with, you may be able to do this with a Net-Hook that's configured to launch from a keyboard shortcut.
  5. Some of the comments put portions of that code as being added '03. I'm guessing the rest of logic is older than that. Code ages, and I really think you should investage some of the new methods MP has to offer.
  6. You do not need to remove the legacy parameter read methods from the post to use the enhanced tool table. They old and new parameter read methods can coexist in a post, but you'll lose out on the speed benefits the new methods offer.
  7. Hey, I used to work for Mikron in the states! The control runs on Linux (well, most of the time, there were some windows based Mikrons out there.) so I would think you'd be safe. If your machines have the rconnect box in them that's also a firewall if I remember correctly.
  8. You have a post block called pwritbuf1 that writes to buffer 4. It's not part of you're problem, but it is confusing. Buffer 4 appears to be sized incorrectly. Also, if you're reading and writing to a buffer multiple times and you're not using strings, consider using a stack. You should contact your Mastercam reseller about this issue; there's a simpler way to do this.
  9. Check the overloads for the FileManager.Open method. One of them has the bool argument MergeWithCurrent.
  10. V9 coolant only supports three coolants. You would have to use x-style to add another.
  11. Yes, it should have been; result = force(gcode$, gcode$) Sorry.
  12. Use the force function. pcanceldc$ #Cancel canned drill cycle result = newfs(three, zinc) z$ = initht$ if cuttype = one, prv_zia = initht$ + (rotdia$/two) else, prv_zia = initht$ pxyzcout !zabs, !zinc prv_gcode$ = zero pcan pcan1, pbld, n$, sg80, strcantext, e$ if (drillcyc$ = 3 | drillcyc$ = 7) & tap_feedtype, pbld, n$, sg94, e$ result = newfs(15, feed) #Reset the output format for 'feed' pcan2 result = force(sgcode, sgcode) #Force gcode output on the next motion line
  13. What's it not doing that X9's offset contour did?
  14. I'm not exactly sure what you're asking. If you'd like to update the address of a variable, there is an easy way to do that. Some marked up code would be appreciated.
  15. Yes. You won't get the speed benefits of opinfo if you have the legacy parameter postblocks in the post. I'd have your reseller contact CNC's post department, they should be able to provide a post with all the new functions implemented, not just opinfo.
  16. Check the Wireframe tab > Modify group
  17. Click the arrow under the Offset icon.
  18. Not really, other than the information doesn't appear to be correct... The post documentation states the following; "...The difference between drl_cycle$ and drillcyc$ is that when multiaxis drilling is active, MP adds 100 to the value of drillcyc$. This is done to provide backward compatibility for older posts. " But in my own testing it appears to be the opposite of the above statement. % O0000(T) G20 G0 G17 G40 G49 G80 G90 ( 2D DRILLING ) T62 M6 G0 G90 G54 X0. Y0. A0. S2139 M3 G43 H62 Z.1 SOF >>> drillcyc$ 101. drl_cycle$ 1. G99 G83 Z0. R.1 Q.1 F4.11 G80 M5 G91 G28 Z0. A0. M01 ( MULTIAXIS DRILLING ) T256 M6 G0 G90 G54 X2.8738 Y0. A90. S2139 M3 G43 H256 Z2.9242 TOOLCHANGE >>> drillcyc$ 1. drl_cycle$ 1. G98 G83 X0. Z0. R.2496 Q0. F25. G80 M5 G91 G28 Z0. G28 X0. Y0. A0. M30 % So if it were me, I would use drl_cycle$ rather than drillcyc$. And while we're pretending it's me with this issue; I'd check to see what condition my conditions were in. I'm having a hard time making sense of the below logic.
  19. Is display scaling on? Right click on your desktop and click Display settings; if the value under 'Change the size of text, apps, and other items' isn't 100%, try setting it to 100%.
  20. Are you using multiaxs drilling? The value of drillcyc$ gets 100 added to it when multiaxs drilling.
  21. Do you have multiple monitors? Is one of them 4k? Do you have display scaling on? If you have multiple monitors, is the display scaling different between them?
  22. The concept is the same yes. It's a list of named constant integer values. In MP, every numeric variable has four possible values; current, extended, previous, and previous extended. An enumerator on the other hand only has one value, and that's the value it was initialized too. This makes it much lighter weight, and I personally think it makes the code more readable.
  23. The '@' on the end of a variable name makes it an enumerator. Enumerators are light weight variables that don't have previous or extended values. And here is a sample of what you asked about... [POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V21.00 P4 E1 W21.00 T1505932414 M21.00 I0 O10 # ToolExample.mcpost #region Settings #region Post Settings x_tooltable$ : 1 newglobal$ : 1 rotaxtyp$ : 99999 #endregion #endregion #region Initializations #region Enumerators ZERO@ : 0 ONE@ TWO@ THREE@ CUSTOM@ : 0 CENTER_DRILL@ SPOT_DRILL@ DRILL@ RIGHT_HAND_TAP@ LEFT_HAND_TAP@ REAMER@ BORING_BAR@ COUNTERBORE@ COUNTERSINK@ END_MILL@ BALL_MILL@ CHAMFER_MILL@ FACE_MILL@ SLOT_MILL@ RADIUS_MILL@ DOVE_MILL@ TAPER_MILL@ LOLLIPOP_MILL@ BULL_MILL@ BLOCK_DRILL@ ENGRAVE_TOOL@ BRADPOINT_DRILL@ HIGH_FEED_MILL@ THREAD_MILL@ BARREL_FORM@ TAPER_FORM@ LENS_FORM@ TOOL_NOT_OUTPUT@ : 1 #endregion #region Numerics result : 0 slot_thickness : 0 #region Arrays #NCI 20004 tool_number : 0 tool_type : 0 tool_material : 0 corner_type : 0 tool_diameter : 0 corner_radius : 0 pitch : 0 tip_angle : 0 dia_offset : 0 length_offset : 0 linear_feed : 0 plunge_feed : 0 retract_feed : 0 spindle_speed : 0 coolant_type : 0 # Obsolete number_flutes : 0 shank_diameter : 0 taper_length : 0 chamfer_length : 0 drill_length : 0 drill_diameter : 0 secondary_rad : 0 second_c_len : 0 second_c_ang : 0 shank_type : 0 neck_diameter : 0 thread_form : 0 #NCI 20007 pilot_diameter : 0 flute_length : 0 overall_length : 0 Shoulder length : 0 arbor_diameter : 0 holder_diameter : 0 holder_length : 0 spindle_direction : 0 percent_surface : 0 percent_feed : 0 units : 0 tool_projection : 0 Total_holder_length : 0 #endregion #endregion #region Strings s20004 : "" s20007 : "" stool_name : "" sunits : "" #endregion #endregion #region Formats #region Statments fs2 1 0.8 0.8 fs2 2 0.4 0.3 fs2 3 1 0 1 0 #endregion #region Assignments fmt "" 3 op_number "" fmt "T" 3 tool_number " -" fmt "" 3 name_length "" fmt "" 3 assembly_length "" fmt "Diameter : " 2 tool_diameter sunits fmt "Tip Angle : " 2 tip_angle " deg." fmt "Pitch : " 2 pitch sunits fmt "Corner Rad. : " 2 corner_radius sunits fmt "Upper Rad. : " 2 secondary_rad sunits fmt "Thickness : " 2 slot_thickness sunits #endregion #endregion pget_tool_info s20004 = opinfo(20004, ZERO@) tool_number = rpar(s20004, 27) s20007 = opinfo(20007, ZERO@) pilot_diameter = rpar(s20007, 13) ptooltable$ if tt_count$ = TOOL_NOT_OUTPUT@, [ pget_tool_info if tool_type = CENTER_DRILL@ | tool_type = DRILL@, [ *tool_number, "DRILL", e$ " ", *tool_diameter, e$ " ", *tip_angle, e$ ] if tool_type = RIGHT_HAND_TAP@ | tool_type = LEFT_HAND_TAP@, [ *tool_number, "TAP", e$ " ", *tool_diameter, e$ if not(met_tool$), pitch = ONE@ / pitch " ", *pitch, e$ ] if tool_type = SLOT_MILL@, [ *tool_number, "SLOT MILL", e$ " ", *tool_diameter, e$ slot_thickness = flute_length " ", *slot_thickness, e$ " ", *secondary_rad, e$ " ", *corner_radius, e$ ] *e$ ] pheader$ if met_tool$, sunits = "mm" else, sunits = "in" x_tooltable$
  24. Yep, that was my bad. Below will resolve the issue. I only tested it with one tool and assumed that the system variables were updated each time ptooltable$ was called. [POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V21.00 P4 E1 W21.00 T1505932414 M21.00 I0 O10 # ToolList.mcpost #region Settings #region User Settings # Max length of stool_name, used for formatting name_length : 24 # Max length of sassembly_name, used for formatting assembly_length : 14 #endregion #region Post Settings x_tooltable$ : 1 newglobal$ : 1 rotaxtyp$ : 99999 #endregion #endregion #region initializations #region Enumerators ZERO@ : 0 ONE@ TWO@ THREE@ TOOL_INFO_TABLE@ : 1 OP_PARAMETERS@ : 0 TOOL_NOT_OUTPUT@ : 1 #endregion #region Numerics result : 0 op_number : 0 diameter : 0 corner_radius : 0 #endregion #region Strings s1013 : "" stool_name : "" sholder_name : "" sassembly_name : "" sspaces : " " sregex : "" #endregion #endregion #region Formats #region Statments fs2 1 0.8 0.8 fs2 2 0.4 0.3 fs2 3 1 0 1 0 #endregion #region Assignments fmt "" 3 op_number "" fmt " " 3 tt_tool$ " " fmt "" 3 name_length "" fmt "" 3 assembly_length "" fmt "" 2 diameter " " fmt "" 2 corner_radius " " #endregion #endregion #region Lookup Tables fprmtbl 1 5 # TOOL_INFO_TABLE@ 1013 s1013 15240 op_number 20001 stool_name 20020 sholder_name 20021 sassembly_name #endregion pset_string_length sregex = ".{" + drs_str(TWO@, name_length) + "}" stool_name = stool_name + sspaces stool_name = regex(sregex, stool_name) sregex = ".{" + drs_str(TWO@, assembly_length) + "}" sassembly_name = sassembly_name + sspaces sassembly_name = regex(sregex, sassembly_name) pget_tool_size diameter = rparsngl(s1013, TWO@) corner_radius = rparsngl(s1013, THREE@) ptooltable$ if tt_count$ = TOOL_NOT_OUTPUT@, [ result = fprm(TOOL_INFO_TABLE@, OP_PARAMETERS@) pset_string_length pget_tool_size *tt_tool$, stool_name, *diameter, [if corner_radius > ZERO@, *corner_radius, else, " "], sassembly_name, sholder_name, e$ *e$ ] pheader$ "Tool Number Tool Name Diameter Corner Radius Assembly Holder", e$ *e$ x_tooltable$ Ctrl+M will expand all regions.

Join us!

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.

Follow us

×
×
  • Create New...