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:

BehindYou

Verified Members
  • Posts

    46
  • Joined

  • Last visited

About BehindYou

  • Birthday 08/06/1991

Profile Information

  • Gender
    Male

Uncategorized

  • Location
    Croatia

Recent Profile Visitors

504 profile views

BehindYou's Achievements

Enthusiast

Enthusiast (6/14)

  • Collaborator Rare
  • Conversation Starter Rare
  • One Month Later
  • Dedicated Rare
  • Reacting Well Rare

Recent Badges

20

Reputation

  1. Greetings, here is sample which I am using pexit_program endday = 26 endmonth = 6 endyear = 22 if (year$ < endyear), e$ else, if (year$ = endyear & month$ < endmonth), e$ else, if (year$ = endyear & month$ = endmonth & day$ <= endday), e$ else, [ "Your post is not valid anymore", e$ exitpost$, e$ ] keep in mind user can always change something (i can say more in PM) Kind regards Ivan.
  2. Greetings @lim-mazak What you can do is limit how many lines you want in your output file. To do that please first do backup of your post file. Now create new buffer where you will store your output information's and set variables ( the ones below its just an example from my post file) #---------------------------File manipulation buffer------------------------------------------------------ #Buffer 6, wc6 : 1 rc6 : 1 size6 : 0 file_size : "" sbufname6$ : "" fbuf 6 0 255 1 1 #---------------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------------- output : 0 # Variable is used for string comparisons return : 0 # Variable is used for closing open files sauxfile : "" # For using aux file to store new NC file during ppost$ processing sncfile : "" # Stores path of NC file s_output : "" # Path of the DOC output file (optional) Create new postblock " ppost$" In the varable size6 you will limit the lines amount which you want to be outputted Keep in mind we are getting total 300 lines in this example, which includes things from pheader$ and other things before the actual code ppost$ sncfile = spathnc$ + snamenc$ + sextnc$ sauxfile = spathnc$ + snamenc$ + sextaux$ sbufname6$ = spathnc$ + snamenc$ + sextnc$ spathaux$ = spathnc$ snameaux$ = snamenc$ s_output = spathnc$ + snamenc$ + sextnc$ auxprg$ = 1 newaux$ subout$ = 2 size6 = 300 rc6 = 1 while rc6 <= size6, [ file_size = rbuf(6, rc6) *file_size , e$ ] subprg$ = 2 newsub$ mergesub$, e$ return = fclose(sauxfile) return = remove(sncfile) return = rename(sauxfile, sncfile) #return = remove (sbufname6$) clearsub$ clearlcc$ Once again before doing any changes do backup. Kind regards Ivan.
  3. Greetings. When you have extra time at work you can do many things Here is sample of the code how to convert your G- code output to binary output if you want to try yourself All the numbers are rounder up, all the negative numbers are converted to positive. Also mastercam has limit for the amount of decimal spaces so big numbers can be converted correctly( or there is another way?) code below require more work if you want to convert I, J and K to binary For example for k$ you need 4 checks if k$ < 0, k$ = k$ * m_one if k$ < one & k$ > zero, k$ = k$ * two^8 if k$ > zero & k$ > m_one, if k$ < zero, have fun guys, and remember if you want to try this do backup first if binary_output = one, [ sbinary = " " if xabs < zero, xabs = xabs * m_one decimal = round(xabs) # Check if the decimal number is 0 if decimal = zero, *decimal, e$ # Initialize a variable to keep track of the power of 2 power = zero # Loop to find the highest power of 2 less than or equal to the decimal number while two^power <= decimal, [ power = power + one ] # Adjust the power as we overshot in the loop # Loop through each power of 2 in descending order while power > zero, # If the current power of 2 can be subtracted from the decimal number [ if decimal - two^(power - one) >= zero, [ sbinary = sbinary + sbinary_one # Concatenate '1' to the string decimal = decimal - two^(power - one) # Update decimal value ] else, [ sbinary = sbinary + sbinary_zero # Concatenate '0' to the string ] power = power - one # Decrement power ] binary_digits = rpar(sbinary, one) xabs = binary_digits *xabs ] else, [ if absinc$ = zero, *xabs, !xinc else, xinc, !xabs ] !xabs Before N100 G21 (TOOL - 5 OFFSET - 5) (WALTER_VNMG INSERT - INSERT) N110 G0 T0505 N120 G18 N130 G97 S2000 M03 N140 G0 G54 X16.973 Z4.464 M8 N150 G50 S2000 N160 G96 S185 N170 G99 G1 X14.144 Z3.05 F.2 N180 X14.144 Z-6.757 F.2 N190 G18 G3 X14.2 Z-7.4 I-7.422 K-.643 F.2 N200 G1 X14.2 Z-17.959 F.1 N210 X14.2 Z-17.97 F.2 N220 X14.2 Z-24.1 F.2 N230 X17.028 Z-22.686 F.2 N240 G0 X17.028 Z4.464 N250 X15.117 N260 G1 X12.289 Z3.05 F.2 N270 X12.289 Z-3.75 F.2 N280 G3 X14.144 Z-6.758 I-6.494 K-3.651 F.2 N290 G1 X16.973 Z-5.343 F.2 N300 G0 X16.973 Z4.464 N310 X13.262 N320 G1 X10.433 Z3.05 F.2 N330 X10.433 Z-2.449 F.2 N340 G3 X12.289 Z-3.749 I-5.566 K-4.951 F.2 N350 G1 X15.117 Z-2.335 F.2 N360 G0 X15.117 Z4.464 N370 X11.406 N380 G1 X8.578 Z3.05 F.2 N390 X8.578 Z-1.57 F.2 N400 G3 X10.388 Z-2.423 I-4.639 K-5.83 F.2 N410 X10.433 Z-2.449 I-5.544 K-4.977 F.2 N420 G1 X13.262 Z-1.035 F.2 N430 G0 X13.262 Z4.464 N440 X9.551 After N100 G10101. (TOOL - 5 OFFSET - 5) (WALTER_VNMG INSERT - INSERT) N110 G0 T0505 N120 G10101. N130 G1100001. S11111010000 M03 N140 G0 G110110 X10001. Z100. M8 N150 G110010. S11111010000 N160 G1100000. S10111001 N170 G10111001. G99 G1 X1110. Z11. F.00110011 N180 G110011. X1110. Z1110. F.00110011 N190 G110011. G3 X1110. I1110. K111. F.00110011 N200 G110011. G1 X1110. F.00011001 N210 G11001. X1110. F.00110011 N220 G110011. X1110. F.00110011 N230 G110011. X10001. Z10001. F.00110011 N240 G110011. G0 X10001. Z100. N250 G100. X1111. N260 G100. G1 X1100. Z11. F.00110011 N270 G110011. X1100. Z1100. F.00110011 N280 G110011. G3 X1110. Z1110. I1110. K111. F.00110011 N290 G110011. G1 X10001. Z10001. F.00110011 N300 G110011. G0 X10001. Z100. N310 G100. X1101. N320 G100. G1 X1010. Z11. F.00110011 N330 G110011. X1010. Z1010. F.00110011 N340 G110011. G3 X1100. Z1100. I1100. K111. F.00110011 N350 G110011. G1 X1111. Z1111. F.00110011 N360 G110011. G0 X1111. Z100. N370 G100. X1011. N380 G100. G1 X1001. Z11. F.00110011 N390 G110011. X1001. Z1001. F.00110011 N400 G110011. G3 X1010. Z1010. I1010. K111. F.00110011 N410 G110011. X1010. I1010. K111. F.00110011 N420 G110011. G1 X1101. Z1101. F.00110011 N430 G110011. G0 X1101. Z100. N440 G100. X1010. Kind regards
  4. Greetings, In your post find this section. If you are able to open it check the section below (If your post file ends with .psb you can't edit your post and you should contact your reseller) # Drill output # -------------------------------------------------------------------------- fmt "R" 2 refht_a #Reference height fmt "R" 2 refht_i #Reference height fmt "X" 2 initht_x #Initial height, mapped X fmt 2 initht_y #Initial height, mapped Y fmt "Z" 2 initht_z #Initial height, mapped Z fmt "X" 2 refht_x #Reference height, mapped X fmt 2 refht_y #Reference height, mapped Y fmt "Z" 2 refht_z #Reference height, mapped Z fmt "X" 2 depth_x #Depth, mapped X fmt 2 depth_y #Depth, mapped Y fmt "Z" 2 depth_z #Depth, mapped Z fmt "Q" 2 peck1$ #First peck increment (positive) fmt 2 peck2$ #Second or last peck (positive) fmt "R" 2 peckclr$ #Safety distance fmt 2 retr$ #Retract height fmt "Q" 2 shftdrl$ #Fine bore tool shift # -------------------------------------------------------------------------- second step: check if output is fine by you, if you want output without dot make sure to check Format statements section in your post and set how you want your output. If you have more questions, feel free to ask. Kind regards. Ivan
  5. Please next time send me a PM or post it here why are you removing my post. Didn't know that is forbidden to share mastercam books. Thank you .
  6. Check your PM, Code is there, Make sure that you did backup before changing your code. Kind regards Ivan
  7. OFC it's possible Here is my output which I use (----------------------------------------------------------) (T27 | KENNAMETAL_D20_3D | D27 | INSERT - R0.00 ) (#1. | Lathe_Drill | ) ( | VC = S2627 mm/min | ) ( | MAX RPM = S2627 RPM | ) ( | Feedrate = 0.15 mm/rev | ) (==========================================================) (==========================================================) (T1 | WALTER_CNMG | D1 | INSERT - R0.80 ) (#2. | Facing | ) ( | VC = S265 mm/min | ) ( | MAX RPM = S2685 RPM | ) ( | Feedrate = 0.23 mm/rev | ) (==========================================================) (==========================================================) (T41 | ISCAR_DCGT | D41 | INSERT - R0.10 ) (#4. | Rough | ) ( | VC = S185 mm/min | ) ( | MAX RPM = S2874 RPM | ) ( | Feedrate = 0.20 mm/rev | ) (==========================================================) (==========================================================) (T74 | 3D LATHE TOOL-2 | D74 | INSERT - R0.20 ) (#5. | Plunge rough; also, chained grooves | ) ( | VC = S125 mm/min | ) ( | MAX RPM = S1850 RPM | ) ( | Feedrate = 0.10 mm/rev | ) (==========================================================) (==========================================================) (T75 | WALTER_ID_GROOVE_D20.00_2.00 | D75 | INSERT - R0.20 ) (#6. | Plunge rough; also, chained grooves | ) ( | VC = S100 mm/min | ) ( | MAX RPM = S1850 RPM | ) ( | Feedrate = 0.10 mm/rev | ) (==========================================================) (==========================================================) (T5 | WALTER_VNMG | D5 | INSERT - R0.40 ) (#8. | Finish | ) ( | VC = S185 mm/min | ) ( | MAX RPM = S2874 RPM | ) ( | Feedrate = 0.14 mm/rev | ) (==========================================================)
  8. Greetings. Download mastercam2022-mp-reference and run index.htm from the link below https://www.dropbox.com/scl/fo/328x8yqnyr7jdfrkqzchc/h?rlkey=ggxsxrhlda1pwos451wh4tnqr&dl=0 Now Click on NCI Lines/20000 Lines and choose 20007 From here you can retrieve information related with total tool length( tool + holder) also check Mcam2022_Parameter_Ref.pdf you may find other information's which you need. But make sure you can edit your post. Kind Regards Ivan
  9. Greetings everyone. While designing program for lathe machines how do you tell CNC Operator information related with stock. While taking 0 point (G54 or any other) on the part he should know Value of the "Right Margin" for phase one and "Left Margin" for phase two ? Here is my solution how I am doing it but I want to know if there is any better idea. So what I did: post processor will check the name of the saved file O0023(Program Name = 230105-MM-374-F1) ( in my chase F1 means phase 1 and F2 phase 2) If file name contains F1, it will print out "Right Margin" ( | Stock_at_Right_Side 1.00 mm | ) If file name contains F2, it will print out "Left Margin" ( | Stock_at_Right_Side 3.00 mm | ) if file name contains F3 , it will set "Right/Left Margin" to 0 because logically there is no stock left after phase one and phase two But if there is no key word in the file name it will get only "Right Margin" Value I am using stock flip option all the time so my stock leftover can be updated all the time We are using Doosan Puma 5100, 3100 machines(fanuc) If you have some better solution for the question above it would be nice. Kind Regards Ivan.
  10. Greetings I am trying to get information's from 20004 parameter to get (----------------------------------------------------------) (T12 | D12 |No. Flutes = 2 | DIA. - 5. mm) (#8. | Face drilling - C axis | ) ( | Speed = 3820 RPM VC = 60.00 mm/min | ) ( | Feedrate = 687.60 mm/min | ) (==========================================================) (==========================================================) (T16 | D16 |No. Flutes = 6 | DIA. - 10. mm) (#21. | 2D Dynamic Mill | ) ( | Speed = 3979 RPM VC = 125.00 mm/min | ) ( | Feedrate = 1909.92 mm/min | ) (==========================================================) So what I did is : Created numerical variables to store the results of each value in the string (total 27 of them) if prmcode$ = 20004, tool_no = rpar(sparameter$, 27) when I add tool_nf variable in any postblock which isn't mtlchg$ value is always same as the first tool if the first tool have 2 flutes every other tool will have same value But if I use it in mtlchg$ postblock its updating all the time I cant see what I am missing here Should I use nci_rewind$ to get what i need ?
  11. Greetings @JParis I wish I had this info in my post Thank you so much for pointing this out After few changes not it works flawlessly if rotary_type$ = 0 | rotary_type$ = 3, [ b1_ymax = y_max$ b1_ymin = y_min$ ] Now only when I have y selected or no axis selected (while using mill operations) buffer will fill min/max variables Once again thank you @JParis Kind regards Ivan
  12. Greetings everyone. Related with y_max$ and y_min$ (lathe) Why the C-Axis value is stored in the above mentioned variables? Example output (=========================================================) ( | Max_Z position = +10.000 mm | ) ( | Min_Z position = -26.000 mm | ) ( | Min_Y position = -109.771 mm | ) ( | Max_Y position = +109.771 mm | ) (=======================================================) ( | Rapid Time = 4 sec | ) ( | Feed Time = 41 sec | ) (=======================================================) ( | Total Time = 45 sec | ) (=======================================================) (C_AXIS_DRILL_D5.0) ( #8. Face drilling - C axis | ) N15 G0 G40 G80 G13.1 G98 N20 G0 T1212 N25 G17 N30 M35 N35 M90 (Clamp Off) N40 G28 H0. N45 G0 G54 Z10. C12. N50 X220.752 Y0. ----> Y=0 and there is no other Y Value N55 G98 G97 S3820 P12 M03 N60 M08 N65 G83 Z-26. R-5. F687.6 M89 (Clamp On) N70 C36. N75 C60. N80 C84. N85 C108. N90 C132. N95 C156. N100 C180. N105 C204. N110 C228. N115 C252. N120 C276. N125 C300. N130 C324. N135 C348. N140 G80 N145 M09 N150 M90 (Clamp Off) N155 M05 N160 G28 V0. N165 G28 U0. N170 G28 W0. H0. N175 T1212 N180 M30 %
  13. Greetings @ogu79 You aren't able to changes by yourself, because all the main things are in .psb file You should talk with your reseller to do changes for you. Kind Regards Ivan.

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...