Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postbuilder Custom Command Help, Event count or numbering 2

Status
Not open for further replies.

Buckshott00

Bioengineer
Aug 10, 2010
229
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

 
Replies continue below

Recommended for you

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

 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor