PDA

View Full Version : Problem OSP-P200M question



RebeX
03-11-2009, 07:46 PM
Hi,

I want to make a program that checks every tools status and then using the MSG-function display it on the screen.
But I have run in to some trouble, I want to use a variable in the MSG function.
Something like this:
(G120 is a macro to check tool status)


VC1=0
N9999
VC1=VC1+1
G120 T=VC1
IF [VC200 GT 0] GOTO N9998
IF [VC1 LT 200] GOTO N9999

N9998
MSG(T=VC1 is not ok)
...

I can't get it to work...
Is there a way to do this?

Thank you in advance and I apologize for my bad grammar.

Robin

DIFF OVER
03-11-2009, 08:50 PM
try this:

VNCOM[1]=1
MSG(MISSING DATA "D")

MISSING DATA D is the msg to display

Superman
03-12-2009, 05:53 AM
The main problem is the message, it is a comment and will be printed onto the screen as stated, it has to be outside the comments so that it can be parsed by the control
Modified a little, so if the tool cannot be identifed by the message, VC1 is the bad tool. VC200 and ERROR checking should be removed and placed in the G120 macro, as this sets and controls that variable (VC200).


VC1=1
NCHK
G120 T=VC1
VC1=VC1+1
IF [ VC1 LE 200 ] GOTO NCHK
GOTO NEND
...
...
NEND
M30

( this should be in G120 macro )
IF [ VC200 GT 0 ] GOTO NERR
...
NERR
VNCOM[1]=1
MSG T=VC1 ( is not ok) ( not sure if it will work, but this is what you want )
M00 (TOOL is not ok)
NMSG
...
...
NEND
M30

What part of "status" are you checking ?
Is it the D offset for each tool ?
There may be another "system" variable that can be directly checked ?