586,103 active members*
3,370 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Comparing "DATA EMPTY" Value in Macro Variable ?
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Posts
    157

    Comparing "DATA EMPTY" Value in Macro Variable ?

    I' am facing a problem WRT Custom Macro programming on Fanuc. Below is a line where I want to execute a conditional statement.

    IF [#147 EQ 0] GOTO 1

    In this case, if the value #147 shows "DATA EMPTY" then this is not considered as zero and the conditional statement does not get executed.

    How to compare "DATA EMPTY" or Nul value in a variable in conditional statement ?

    Thanks a Ton

  2. #2
    Join Date
    Feb 2006
    Posts
    1792

    Re: Comparing "DATA EMPTY" Value in Macro Variable ?

    [#147 EQ #0] would be TRUE if #147 is undefined.

  3. #3
    Join Date
    May 2008
    Posts
    157

    Re: Comparing "DATA EMPTY" Value in Macro Variable ?

    On my machines it is not true and I have tried on 4 machines before I gave up. Actual value of Zero in the variable returns true but undefined returns False. Undefined is actually "Nul" character and hence cannot be considered as Zero.

    Anyways I found a work around. #0 is always undefined and it is also not permitted to assign a value to it. If I use [#147 EQ #0] (only in the cases of undefined values to be compared), this will return true

  4. #4
    Join Date
    Feb 2006
    Posts
    1792

    Re: Comparing "DATA EMPTY" Value in Macro Variable ?

    This is exactly what I suggested.
    Except EQ and NE in logical statements, #0 is equivalent to 0.

Similar Threads

  1. The "I" macro variable
    By Shizzlemah in forum Fadal
    Replies: 16
    Last Post: 01-19-2021, 03:19 AM
  2. Haas "Tool Type" Macro Variable?
    By ChipHead99 in forum Haas Mills
    Replies: 6
    Last Post: 03-18-2020, 05:28 PM
  3. X Axis "Goes Off Pattern", "Awry", "Skewed", "Travels"
    By DaDaDaddio in forum Laser Engraving / Cutting Machine General Topics
    Replies: 1
    Last Post: 05-06-2013, 09:59 AM
  4. Replies: 1
    Last Post: 03-26-2013, 04:06 PM
  5. Replies: 2
    Last Post: 05-01-2010, 01:41 PM

Tags for this Thread

Posting Permissions

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