×
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

Postbuilder Custom Command Help, Event count or numbering
2

Postbuilder Custom Command Help, Event count or numbering

Postbuilder Custom Command Help, Event count or numbering

(OP)
Hello,

I'm sorry if this is confusing.

I'm using postbuilder 7.5.2 and I am wondering if there is anyway to count or only do a command on a certain number of times.

I guess the best way to put this is, I have a command that only outputs correctly in the posted program if it is placed in the Approach move block.  However, it repeats the command for every approach move, and there is actually 1 approach move before getting the desired result.

Is there a way to count, or a "do only" on 2nd attempt logic command?

Thanks

 

RE: Postbuilder Custom Command Help, Event count or numbering

In start of program initialize a counter var to 1

In your command do a check like this (for the second instance)
if {$counter == 2} {
    do whatever here
}
incr counter

Then in the end of operation reset the var to 1

 

RE: Postbuilder Custom Command Help, Event count or numbering

You could set a variable at the end of the procedure and then reset it back at the end of path or a tool change.
Global my_kount

if { $my_kount == 0  } { do some stuff }



set my_kount 1


Then at the end of path or a tool change event have a second procedure that sets the count back to 0

global my_kount

set my_kount 0

If you only want this action performed once per tool then I would re-set it at the tool change event

 

John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6.0.5.3

RE: Postbuilder Custom Command Help, Event count or numbering

(OP)
That is perfect thanks Shags and John!!!!

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