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:

Removing spaces-adding E params


Recommended Posts

I am programming for a Deckel-Maho control which uses "E" parameters for variables in the machine programs.

An example would be:

E10=25

G1 X0.25 F=E10

I use the mi2$ post variable to input the required E param. number.

Altering the output for feedrates is pretty easy.

I need to program E params. for instances like probed locations and

attempting to format the output for X, Y and/or Z axis is difficult due

to a space between the axis value and the E parameter value.

The control inserts spaces between words automatically and the post is set to also add spaces.

The result so far is:

G1 X=0.25 +E10 Y=0.125 +E11 F10

_________^space_______^space

I want the post to output without the spaces before the E params.

Can anyone suggest how to do this? THANK YOU

Link to comment
Share on other sites
  • 2 weeks later...
Guest Jim Evans

you might find yourself in a bind here and depending on your post skills you might be better off getting someone to do this for you but here are a couple of suggestions.

 

For controlling the spaces in the entire program use the spaces setting in the control definition and you can suppress the spaces being output from here as well.

 

You can also manipulate spaces for an entire section of code by overwriting and then resetting the spaces$ variable. This can be a little tricky depending on your knowledge and post writing skills.

 

       !spaces$
       spaces$ = zero
       "(", *tnote, *toffnote, ")", e$
       if posttype$ = two, #Lathe toolpath operation
         [
         if tool_op$ = 64, "(", *strtool$, ")", e$ #Drill operation
         else, "(", *strtool$, " ", *stinsert, *stinsert2, ")", e$
         ]
       else, "(", *strtool$, ")", e$ #Mill toolpath operation
       spaces$ = prv_spaces$

 

 

You can also control individual spaces if needed by using no_spc$ to remove a space between variables, or using string literals or ASCII value to force a space as necessary.

 

 

          [
         sopen_prn, no_spc$, scomm$, no_spc$, sclose_prn, e$  #removing spaces between braces and output
         sopcomment = snull
         ]

Link to comment
Share on other sites

When I edited the POST for our Fadal it had spaces everywhere I had to modify the "sopen_prn" which had a space in the string itself "( " this was causing a boatload of spaces. You can either search your post for this and remove the space after the parenthesis “(“ or do as Guest_Jim Evans_* said and add the no_spc$ but you would have to add this in every line you want to remove the spaces from.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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