×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

postprocessor help

postprocessor help

postprocessor help

(OP)

i need to add a if-then type of feature into the end of a 5 axis post processor.
The tool needs to avoid large jobs by moving to the edge of the envelope, depending on whichever side is nearer to the last Y move in the program.
 The Y axis has a stroke of 5metres, if the last Y move in the program is less than 2500mm then i want it to add a move of Y 100, and if the last Y move is above 2500mm i want it to add a move of Y 4900mm.
I don't know if it's possible, can anyone help?

RE: postprocessor help

Yes it is possible.

You would need to first capture the Y motion this can be done at the end of path event using a custom command

global mom_pos
global last_y

set last_y $mom_pos(1)


Then at the End of Program you can test the last_y variable and output the motion you need.


global last_y


if {$last_y <2500} {MOM_output_literal "Y100."}

if {$last_y >2500} {MOM_output_literal "Y4900."}

See the attached post
 

John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
www.myigetit.com

RE: postprocessor help

(OP)
thanks for your help John, i'll try that out on monday, when i can access postbuilder

RE: postprocessor help

Hi!
I have n other postprocessor problem:
My program groups have attributes, what i use as comments on the shopdoc. It works fine. I want to write these attribs to the program header, but there is a problem:
the NC controllers don't like special characters like
&#225; - &aacute;
etc.

I wrote a code to replace these characters:

global mom_attr_PROGRAMVIEW_MEGJEGYZES
global mom_attr_PROGRAMVIEW_EGYEB

if {[hiset mom_attr_PROGRAMVIEW_MEGJEGYZES]}\
{    set MJ $mom_attr_PROGRAMVIEW_MEGJEGYZES

    while { [string match "*&aacute;*" $MJ] == 1 } {
                regsub "&aacute" $MJ "a" MJ
    }

#..etc.

    while { [string match "*&eacute;*" $MJ] == 1 } {
                regsub "&eacute;" $MJ "e" MJ
    }

    set MJ [string toupper $MJ]
    MOM_output_literal "($MJ)"
}

This code works correctly in a simple Wish console(8.1), but when i try it in a post, only the first regsub has run, all the while cycle has been ignored..
so if i want to change any character from the attrib (ie. "g" to h"") to an other, only the 1st instance will change..
(from "gagagag" will be "hagagag", not hahahah)
what is the problem?
thanks in advance

 

----
kukelyk

RE: postprocessor help

My initial thought is that the proc is not being called for each operation.  Where are you calling the cstom command?  You may need to place it in several location in your post for each event to recognize it.

John Joyce
Tata Technologies iKS
1675 Larimer St.
Denver, CO
www.myigetit.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources