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:

André Lapointe@In-House Soluti

In-House Solutions
  • Posts

    125
  • Joined

  • Last visited

About André Lapointe@In-House Soluti

  • Birthday 03/20/1982

Profile Information

  • Gender
    Not Telling

Uncategorized

  • Location
    Montreal, QC, Canada

Recent Profile Visitors

1,834 profile views

André Lapointe@In-House Soluti's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. inside the control definition file look into the Files tab and make sure you have in the posting error file section all error message to file as message option. This should get rid of the display of reinitializing you see in the posting status bar. As for why running the debugger seeme to fixed it I don't know.
  2. Hi Todd, I can confirm to you that what you want to do is possible. All you have to do is to call from the ppost$ block, the command that launch the execution of the mp.dll and give the second post you want to be run. If I'm not clear let me know and I'll try to gather a quick example. Andre
  3. I get your point. I'll think about it and get my(your) recommandation. we'll see what happens from there. thanks again!
  4. Thanks Roger, The main reason why I wanted the VBS instead of the Nethook is because I didn't want to support the Nethook at every new release of Mastercam. The VBS allow me to just copy and pste to the new folder, I put it in the post folder so I don't even have to change the path in the post for it to work in a more recent version. As for the window I was refering to in Mastercam, yes it is the file select/open dialog box. Thanks for looking at it I really appreciate it! I guess I'll discuss with the customer to see what he prefers, starting on the desktop or in the sub folder with no possibility to go higher in the root. Thanks again.
  5. Hi! my first try to do a vbscript and I'm almost to where I'd like to. Here is the project, I'd like to browse for a folder but I don't want to start from the desktop everytime. I'd like to start from a predefine folder but I would alos like to keep the possibility to go up some level. As I have been able so far to get the the starting folder I wanted but I can't go higher in the root... Also if I could get a window format with the favorites (like the Win7 browser window for example) it would be great! (I've read there is something about the browseinfo function or command but I don't understand how to use it exactly) So basically I'd like to either one of these 2 solutions: - Start to a predefined folder but with the possibility to go up the root or even change completely the location. or - use a browser window like the mastercam one or the WinXP or Win7 browser with the favorites or special folder on the left side for quick selection. Any help is appreciated thanks in advance PS Note that I'm calling this script from a post so that is why I write the selected folder into a text file. André here is the code I'm using right now. '///////////////// My Constants ///////////////// '///////////////// My Global Variables ////////// ' -- Start Script Call Main() ' //////////////////// ' Sub Declaration ' //////////////////// Sub Main() ' *************************************************** ' * This function will open the NC file for the nest ' *************************************************** Dim strOutputFolder Dim FSO, fsoMCX, fsoFiles, fsoNCFile Set FSO = CreateObject("Scripting.FileSystemObject") ' -- Get MCX folder strOutputFolder = BrowseForFolder("Select folder containing MCX files") If FSO.FolderExists(strOutputFolder) Then Set fsoMCX = FSO.GetFolder(strOutputFolder) 'strOutputFolder = BrowseForFolder("Select folder for NC Output files") 'If FSO.FolderExists(strOutputFolder) Then ' Set fsoFiles = fsoMCX.Files ' -- Iterate all files per folder ' For Each fsoMCX In fsoFiles ' -- Only looking for MCX files ' If Right(ucase(fsoMCX.Name), 3) = "MCX" Then ' -- Open it ' Call NewMC(false) ' Call OpenMC(fsoMCX) ' -- Post it 'Call RunPostAll(strOutputFolder, false) 'End If 'Next 'End If FSO = WriteFileText(strOutputFolder) End If ' -- Clean up Set fsoNCFile = Nothing Set fsoFiles = Nothing Set FSO = Nothing End Sub ' ////////////////////////////////////////// ' Function Declaration ' Returns vbNullString if no folder selected ' ////////////////////////////////////////// Function BrowseForFolder(strPrompt) On Error Resume Next Dim objShell, objFolder, intColonPos, objWshShell Dim FSO, varTemp Const sFilestart = "C:\Users\Andre Lapointe\Documents\my mcamx5\Mill\NC" ' -- Create our all important objects Set objWshShell = CreateObject("WScript.Shell") Set objShell = CreateObject("Shell.Application") Set FSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objShell.BrowseForFolder(&H0&, strPrompt, &H1&, sFilestart) ' -- Initialize to failure BrowseForFolder = vbNullString ' -- Did the user Cancel? If Not objFolder Is Nothing Then Select Case objFolder.Title ' -- Did the user select Desktop? Case "Desktop" BrowseForFolder = objWshShell.SpecialFolders("Desktop") Case Else ' -- Get the folder selected varTemp = objFolder.ParentFolder.ParseName(objFolder.Title).Path ' -- If the user does not select a folder or cancels out an error is raised If Err Then Select Case Err.Number ' -- Probably root drive selected e.g. (C:) Case 91, 424 ' -- Check for Root intColonPos = InStr(objFolder.Title, ":") If intColonPos > 0 Then BrowseForFolder = Mid(objFolder.Title, intColonPos - 1, 2) & "\" End If Case Else End Select Err.Clear Else ' -- If we get this far make sure the folder exists ' -- selecting a network folder may result in an invalid folder If FSO.FolderExists(varTemp) Then BrowseForFolder = varTemp End If End Select End If ' -- Check for an error of any kind If Err Then BrowseForFolder = vbNullString ShowString "Error selecting folder: " & Err.Description, vbExclamation, "BrowseForFolder" Err.Clear Exit Function End If ' -- Clean up Set objWshShell = Nothing Set objShell = Nothing Set objFolder = Nothing Set FSO = Nothing End Function '------------------------------------------------------------------------------- ' WriteFileText - Used to write an item to a file in a folder. ' Parameters: ' sFile - The file to read ' ' Returns: ' A string containing the content of the file. '------------------------------------------------------------------------------- Function WriteFileText(sText) 'sFilepath --> path du fichier texte sText---> path que je veux Dim objFSO 'As FileSystemObject Dim objTextFile 'As Object Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 Const sFilePath = "C:\test.txt" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile(sFilePath, True) ' Write a line. objTextFile.Write (sText) objTextFile.Close 'objTextFile.Close End Function
  6. the problem I assume comes from the fact that your pretract block may be called from your ptlchg postblock. Therefore when you get into your phsmoff block, you are looking at the wrong value of the mi5. What you could do is to simply use an intermediate value like sav_mi5 or last_mi5 taht will save the mi5 value after each toolchange (at the end of the ptlchg block) and refer to this value in your phsmoff block. This shoudl do the trick inmy opinion. HTH
  7. Well I know In-House Solutions has a post for 5 Axis Omax machines but I don't know if they have done the A-Jet specifically. You should ask them. HTH
  8. You shouldn't have big issues using Mastercam to program a Mazak MSY type of lathe. Where people mostly complaints is about machines like Integrex or any multi-turret and multi-spindle and the difficulty for now in Mastercam to properly synchronize the work of both turret at the same time. But for a 4 axis lathe with a sub spindle spindle you should be able to do what you need with a Lathe level1 add-on and the proper post. You may start from mplmaster but it may need some modifcations to better suits the Matrix control. HTH
  9. The Wear comp does a mix of computer comp as the coordinates are already compensated for the tool radius by the software, but it also calls the G41/G42 command to be able to compensate for the tool wear (the difference between the tool radius programmed and the real tool radius). As Chris mentionned the reverse wear works the same way but for machine that doesn't accept negative offset. HTH
  10. The problems comes from the fact that the back and bottom tool plane have the X+ direction to the left as the TOP and front have the X+ direction to the right. To make sure you always have good coordinates and no error message you need to proceed like you did. Create yourself 2 new sets of plane by rotating the TOP plane by 90 and 180 to match the back and bottom plane and rogram off these. On a vertical Machine you shoud almost never have to use the bottom and back plane because when using the rotay axis you need to have the toolpane vectorof the rotary axis (in this case X) always oriented in the same direction to avoid errors. HTH
  11. you can use the change recognition feature in Mastercam to make the change to an already program part who just had a revision on it. it will let you know what has changed between the 2 drawing and will allows you to see and change the toolpath that are going to be affected by the changes.
  12. I would recommend to use wear comp instead of control. You will get the same coordinate output as the computer comp but with the compensation code call as well so that you compensate on the control itself only for the tool wear instead of the complete diameter. This allows you to use smaller lead-in/out and generate a lot less compensation error related to arc radius. Note that you generally need to use a linear move (longer or equal to the value you will compensate for in the control) to let the machine take his compensation and avoid to call this G41/G42 code on an arc move.
  13. I have seen this already and it's weird. Are you using lathe entry or a lathe level 1 module? I've seen this happen on lathe entry but not on lathe level 1. I refered it to CNC Software already and IIRC they logged it as defect.

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