VERICUT Users' Forum

Due to relentless spammers, we are no longer automatically accepting new forum registrations. If you wish to register for this forum, please send an e-mail to: info@cgtech.com

You are not logged in.

#1 2013-03-13 12:43:43

igor
Senior Member
Registered: 2012-07-20
Posts: 47

While loop

Hey guys!
I'm having a problem with this macro here, if anyone knows a way to fix it, could share with me?

well, when I call while function in my program I have a condition, and a if this condition is true, the program is executed (in a loop) until that condition changes to false.
ok
this work really well, but my problem is when the condition, on the first verification, are false, the right way is the program jump the action and goes to the next endwhile. but what vericut does is execute the action once and keep the program...
EX:

R21=0
WHILE (R21<>0)
DBO_CYCALARM
SETAL(xxxxx)
ENDWHILE

In this example, the right way is the program jump the DBO_CYCALARM and SETAL(xxxxx) and goes to the endwhile directly, but what hapens is the execute of that to lines once.
what can I do to fix it????
Anyone?


Igor Freitas
CNC programming
GROB - Brazil

Offline

#2 2013-03-16 17:54:00

MustaphaC
VERICUT Specialist
From: Le Mans, France
Registered: 2004-10-14
Posts: 130
Website

Re: While loop

Hi Igor,

I did the test with our Siemens Library control (V721) and it works as expected, jump after ENDWHILE due to false condition. Picture shows how WHILE/ENDWHILE are configured

[attachment=0:2ex33yss]<!-- ia0 -->while_loop.jpg<!-- ia0 -->[/attachment:2ex33yss]

Note: If DBO_CYCALARM and SETAL(xxxxx) have no corresponding PROC or are not defined as Words VERICUT might misinterpret the NC block


Mustapha

Offline

Board footer