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 2007-04-06 14:44:32

vhubbard
Beta User
From: Dallas, TX
Registered: 2004-11-11
Posts: 222
Website

Upgrade Macro B support

More Macro B simulation checking is needed in Vericut.  When syntax is not checked errors are often found at the machine.

Priority High
1A. A way to match check the use of [] or LEFT_PRECEDENCE & RIGHT_PRECEDENCE characters.  When the number of left and right precedence do not match, they fail at the machine.  Vericut currently shows no errors of any kind.

1B. Also a way to check that [] are used when required.  Needed for the condition with IF and WHILE  statements. IF [xxx] and WHILE [xxxx]

They are also required on right side of, SIN, COS, TAN, SQRT, ABS, ROUND, FIX, FUP, LN, EXP, BIN, BCD   There is a special case for ATAN. example #1=ATAN [value ]/[value ]

2. Command matching
IF statements can use GOTO or THEN, one or the other must be listed or controls fail.  Example.
IF [#1 LT 5.] GOTO 45
or
IF [#1 LT 5.] THEN #2=3.

Currently when the THEN is left off in Vericut, it still processes
IF [#1 LT 5.] #2=3    This fails at the machine.   

This is a two fold problem.  There is no definition for THEN in Vericut that we can find.  It is usually set to type IGNORE.   IF, when true, defaults to a THEN action.   There needs to be a THEN condition to cause the then action with IF.

Our current IF & GOTO definitions
    WORD_VALUE "IF" {
        MACRO "IfCheck"
    }
    WORD_VALUE "GOTO" {
        MACRO "GotoJumpForwardBackwardStart"
    }

WHILE also requires a DOx and ENDx.  DOx must have matching ENDx, but does not require the WHILE condition.

Priority Medium

3.  Simulate of POPEN/PCLOSE BPRNT DPRNT.  When defining POPEN, have it define a file to print to instead of RS232 port.  The only way we can debug these now is by testing at the machine.

4.  Bitwise_XOR, Bitwise_OR, Bitwise_AND subtypes documented in the online docs and FANUC library .ctl files defining XOR, OR , AND.  Many people use these files as a base and they should be correct to begin with.

Priority Low

5.  Support conversion functions BIN, BCD

Offline

#2 2007-04-06 15:17:33

SergeV
Senior Member
From: Irvine, CA
Registered: 2004-10-08
Posts: 507
Website

Re: Upgrade Macro B support

Currently when the THEN is left off in Vericut, it still processes
IF [#1 LT 5.] #2=3 This fails at the machine.

You could have multiple conditions with the word IF and check if it isspecified without GOTO or THEN.

If_statement.jpg

Offline

#3 2007-04-09 19:26:31

vhubbard
Beta User
From: Dallas, TX
Registered: 2004-11-11
Posts: 222
Website

Re: Upgrade Macro B support

I tried it as listed and also.

    WORD_VALUE "IF" {
        COND_AND "THEN" {
            MACRO "IfCheck"
        }
        COND_AND "GOTO" {
            MACRO "IfCheck"
        }
        MACRO "MessageMacro" {
            OVERRIDE_VALUE 1 TEXT_OVERRIDE_VALUE "IF[xx]THEN or GOTO SYNTAX ERROR"
        }
        MACRO "IfCheck"
    }

It would not work for the THEN check.  It always failed.
Vericut will not recognize words for conditional checks when defined as

    NAME "THEN" {
        TYPE IGNORE
    }

I had to change it to

    NAME "THEN" {
        TYPE MACRO_CALL
        VALUE_TYPE None
    }

More tests have to be done to make sure THEN still works the same in all cases.

Same problem with "[" an "]" word checks when attempting simple left/right checking.  The conditional word checks do not work on words defined as Math types,  Left_precedence and Righ_precedence for [ & ].

Offline

#4 2007-04-09 19:47:25

SergeV
Senior Member
From: Irvine, CA
Registered: 2004-10-08
Posts: 507
Website

Re: Upgrade Macro B support

When I did my test, I did change the word format for THEN as you specified and forgot to mention it. :oops:

Offline

#5 2008-04-25 19:26:09

Smythe
Member
From: Clinton,Ohio
Registered: 2005-12-15
Posts: 42
Website

Re: Upgrade Macro B support

Just an idea on the bracket checking. Could you set a variable to be itself+1 for everytime there was a bracket? You could then check the sum at the end of the command and if it was not even you knew you had an open bracket.
  I know the bracket is a math operator and not a word at the moment, so macro capability is difficult. Maybe it could be a special both as an operator and a macro? I've been wrong before..

Offline

#6 2008-04-25 19:30:22

SergeV
Senior Member
From: Irvine, CA
Registered: 2004-10-08
Posts: 507
Website

Re: Upgrade Macro B support

In 6.2 we are implementing syntax checking and the even number of brackets is something that can be checked.

Offline

Board footer