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