585,930 active members*
3,869 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    1

    OSP-P200M question

    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)
    Code:
    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

  2. #2
    Join Date
    Feb 2009
    Posts
    202

    MSG Function

    try this:

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

    MISSING DATA D is the msg to display

  3. #3
    Join Date
    Dec 2008
    Posts
    3109
    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 ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •