Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

make a post configure short cut program for the laymen

make a post configure short cut program for the laymen

Ok I have ask for help on posts, since I am EDU resellers wont help cause we get everything for free, can you guys make a program that can just fix what ever post I need to turn on or flip things to how I want??????

 

things that should be a button click are not

 

so here are the buttons\toggles whatever the hell you want to call them.

 

1) I use G54 style inputs for my offsets, not 1, 2, 3, 4 .......................whatever, button\toggle\slider for 54 style to 1-2-3 style

2) File names need to be names "words" not a number.........................button\toggle\slider 

3) program number in the property field so I can just type it in

4) option to change end of program from G28 to G53 .......................button\toggle\slider

 

so 4 simple fast things that you don't have to be a html programmer to fix and F-UP!!!

 

been messing with the hurco post for 2 friken months to get it to work like my haas post copy and paste isn't working

25 Comments
lenny_1962
Advisor

for all post.JPG

ArjanDijk
Advisor

Hi Len, I will think about helping you, but just because you ask so nicely 😉

 

But its not clear what you want.

 

  1. Do you want a Generic Hurco post?
  2. Why not input 54/55 in your WCS field. Properties is not the place for that. Thats like overruling all kind of logic from the program
lenny_1962
Advisor

@ArjanDijk Thanx for the offer it's more than I've gotten so far.

 

As for having the G54 in the properties it is for convenience, if I need to post out for another offset just change it there not having to go into the job. as well as change the program number at the same time...simple simple simple 

ArjanDijk
Advisor
So a post for which control?
ArjanDijk
Advisor

Here are the instructions to change it: good luck

 

 

 

machineAxisABC: "ABC", //(add a comma to the latest entry)

programnumber: 1001 // sets program number, no comma here

 

change this line

writeBlock(gFormat.format(53 + workOffset))

to this

writeBlock(gFormat.format(properties.workoffset))

 

change: 

 

programNameIsInteger = true;

to

programNameIsInteger = false;

 add to that same block

 

filename=programName;

 

if (programName) {
var programId;
try {
programId = getAsInt(programName);
} catch(e) {
error(localize("Program name must be a number."));
return;
}
if (!((programId >= 1) && (programId <= 9999))) {
error(localize("Program number is out of range."));
}
var oFormat = createFormat({width:4, zeropad:true, decimals:0});
writeln(
"O" + oFormat.format(programId) +
conditional(programComment, " " + formatComment(programComment))
);
} else {
error(localize("Program name has not been specified."));
return;
}

 

to 

if (programName) {
var programId;
try {
programId = getAsInt(properties.programnumber;
} catch(e) {
error(localize("Program name must be a number."));
return;
}
if (!((programId >= 1) && (programId <= 9999))) {
error(localize("Program number is out of range."));
}
var oFormat = createFormat({width:4, zeropad:true, decimals:0});
writeln(
"O" + oFormat.format(programId) +
conditional(programComment, " " + formatComment(programComment))
);
} else {
error(localize("Program name has not been specified."));
return;
}

 

 

workOffset: Sorry, this belongs in the setup, there is a lot of logic build in the post using this:

Change: 

var workOffset = currentSection.workOffset;
if (workOffset == 0) {
warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET);
workOffset = 1;
}
if (workOffset > 0) {
if (workOffset > 6) {
error(localize("Work offset out of range."));
return;
} else {
if (workOffset != currentWorkOffset) {
writeBlock(gFormat.format(53 + workOffset)); // G54->G59
currentWorkOffset = workOffset;
}
}
}

 

to:

 

var workOffset = currentSection.workOffset;
if (workOffset == 0) {
error(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET);
workOffset = 54;
}
if (workOffset < 54|| workOffset > 59) {
error(localize("Work offset out of range."));
return;
} else {
if (workOffset != currentWorkOffset) {
writeBlock(gFormat.format(workOffset)); // G54->G59
currentWorkOffset = workOffset;
}
}

 

 

  if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) {
    writeBlock(gFormat.format(28), gAbsIncModal.format(91), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0)); // return to home
  } else {
    var homeX;
    if (machineConfiguration.hasHomePositionX()) {
      homeX = "X" + xyzFormat.format(machineConfiguration.getHomePositionX());
    }
    var homeY;
    if (machineConfiguration.hasHomePositionY()) {
      homeY = "Y" + xyzFormat.format(machineConfiguration.getHomePositionY());
    }
    writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), homeX, homeY);
  }
  

to

 
 writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(0)); // return to home Z
writeBlock(gFormat.format(28), gAbsIncModal.format(91), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0)); // return to home

 

 

lenny_1962
Advisor

@ArjanDijk Thanx for this, I will try to put those in where they belong.

 

As for the G54 in the properties again it is a choice, right or wrong in your view, it's how I would like it to work.

 

Isn't that the power of how you can edit the post to how you want it to work?  

 

If I get I have it and I don't like it I can always revert back to one that doesn't use it, correct???

 

For 25 years I have used surfcam aka Traditional, and when I post it ask what program # and offset at the start, love it and want to do the same with HSMWorks, cause I still use surfcam when HSMWorks cannot do what I need, remember the projection of an existing toolpath, rocks doesn't it.

ArjanDijk
Advisor

Hi @lenny_1962. I know different CAM systems shine in different situations.

 

The reason that changing G54 from post to properties is because of the way the post is build.

 

At the beginning of every operation, it checks if the workoffset is changed (currensection.workoffset). What you want is hardcoded override this.

 

There are a few reasons I do not offer you a solution for this:

 

  • currentsection.workoffset is a parameter that is used multiple times is in the post, so you need a few hours to check if removing all these statements does not break your post
  • If make your post work differently then the software is designed (its kind of a hack) and reduces functionality
  • There is a perfect good place to enter your 54 number (in the setup) that does not require hours of work and keeps software functionality intact

So I surely want to help other forum members by sharing knowledge and learning something for myself on the side, but breaking good functionality while investing time is not something I want to do.

 

How hard is it to adjust the habit of entering it in the setup instead of the properties?

lenny_1962
Advisor

Well it's alot more clicks and scrolling that having it right there in your face now isn't it???

 

and well SW allows many ways to do one thing that change things, why not HSMWorks

 

and why can't that property box just automatically change the setup field?

 

programmers should be able to make that work

ArjanDijk
Advisor

For sure they could, but it requires serious rebuilding of the software and I'm sure thats not were the priorities are right now.

 

For me its no more clicks to adjust it in the setup, but it depends on what you a re used to I think 🙂

lenny_1962
Advisor

well here is the HAAS post made by nextgencam back in 2013 or 2014, before Autodesk bought HSMWorks

 

watch the screencast and you will see alot less mouse clicks and movement

 

http://autode.sk/2ibNJIO

ArjanDijk
Advisor
I don't see the timesaving. I change my wcs when I start with a new setup. If you do it afterwards you will indeed save a few seconds.

But then Im stuck with 2 questions :
Is your time so valueable that you cant miss a few seconds? In that case hiring someone cant be a problem. at least you would be able to adjust many wcs's in the time you wrote these post and recorded the screencast
Is your process so optimized that there is nothing to wib except for this? If yes: good job, you are ahead of 100% my customers. If no, focus on other things. They will bring you more.
lenny_1962
Advisor

Well yes my time is that valuable, when I have to bounce back and fourth between programming and instructing students on the manual machines, I sometime forget to set the work offset and then go back and edit the setup, I do not always use 54 and if left at 0=G54 i have to go in and change it, if it is in the prop I can change it there and repost badabing it's friken done !!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

We do not train machinist, we are just a support lab for the engineering students to use, none have any machine experience "period", so all they get is crash course on all the manual equipment and how to do the basics, some get it and some are lost, math wizards yes. so anything to tweak makes life great.

 

as for others getting Hired not going to happen soon, just the 2 of us here probably for the next 10 years. so just because you do not like how I want "MY POST TO WORK" has no affect on you or your clients, I just need help to make it so and who says others may not like it this way, we can B_I_T_C_H back and fourth but it doesn't harm you or them, just me.

 

this is like a steal sliver in your hand, you keep working until the D_A_M_N thing irritates you to no end then it's on and you gotta get it out!!

ArjanDijk
Advisor

Ok, then there are only three options:

  • Hope for someone else here who will dedicate his time for free to work on your solution
  • Teach yourself how to edit a postprocessor
  • Live with it

Good luck!

lenny_1962
Advisor

@ArjanDijk 

 

Thanks for what you have put up for me to change, some worked and some did not.

 

finally got texted file names to work, had to rem out the program number portion, also got the WCS to work with 54, 55......59 to type in the box in setup, just haven't got the program number in the property box to work, so I have to hand edit a program number in the editor after the % sign.

 

worked all day yesterday to get that much..................I'll see how many hours I can waste today Smiley Frustrated

ArjanDijk
Advisor

Very good @lenny_1962. Nice to see that you got this far. The number and name works here with the pasted code

 

PropertiesPropertiesFilename and numberFilename and number

lenny_1962
Advisor

I've pasted it in and get errors or no fields in the property box when posting. 

can you give me a screen shoot of what yours looks like, maybe i'm not getting errors do to the pasting???

or have you added something else to the property lines in the post?

 

 

if (programName) {
var programId;
try {
programId = getAsInt(properties.programnumber;
} catch(e) {
error(localize("Program name must be a number."));
return;
}
if (!((programId >= 1) && (programId <= 9999))) {
error(localize("Program number is out of range."));
}
var oFormat = createFormat({width:4, zeropad:true, decimals:0});
writeln(
"O" + oFormat.format(programId) +
conditional(programComment, " " + formatComment(programComment))
);
} else {
error(localize("Program name has not been specified."));
return;
}

 

hurco program name in property field.JPG

ArjanDijk
Advisor

Sorry, missed one dash, try this:

 

 if (programName) {
var programId;
try {
programId = getAsInt(properties.programnumber);
} catch(e) {
error(localize("Program name must be a number."));
return;
}
if (!((programId >= 1) && (programId <= 9999))) {
error(localize("Program number is out of range."));
}
var oFormat = createFormat({width:4, zeropad:true, decimals:0});
writeln(
"O" + oFormat.format(programId) +
conditional(programComment, " " + formatComment(programComment))
);
} else {
error(localize("Program name has not been specified."));
return;
} 
al.whatmough
Alumni
Status changed to: Accepted
 
al.whatmough
Alumni

there is something in the works that solves some of these problems 🙂

 

2017-12-09_10-09-22.png

lenny_1962
Advisor

Thanx Al!

 

that may be the cats meow!

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report