584,830 active members*
5,222 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Using the "FOCAS" set of libraries (FANUC Open CNC API Specifications)
Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2011
    Posts
    0

    Using the "FOCAS" set of libraries (FANUC Open CNC API Specifications)

    Hello everybody,

    First of all, I apologize in advance for my English mistakes.

    Do someone know how to use the "FOCAS" set of libraries ?
    (Despite the documentation and some researchs on the Internet, I need some help)

    I do a professional training and I'm trying to create a little application in C# which uses the fwlib32 library (which is included in FOCAS) to communicate with a FANUC controller Oi-MB.

    When I call the function "cnc_delall" to clear the memory of the machine, the machine must be in EDIT mode (if it doesn't be in this mode, the return of the fonction is : "the machine is busy")

    To avoid a manual operation on the operator panel, I want to change the mode automatically. That's why I try to use this functions :
    cnc_wropnlsgnl (Writes the output signal of software operator's panel.)
    cnc_rdopnlsgnl (Reads the output signal image of software operator's panel.)

    When I try to read the data, there is no error return, but all the values readed are 0 whatever the mode is.

    Is it the function which I need ?

    If there is a need, I will give more details.

    Thank you in advance for your help.

    Regards,

    Gwaihir

  2. #2
    Join Date
    Mar 2005
    Posts
    12
    According to the Focas Documentation :
    FWLIBAPI short WINAPI cnc_rdopnlsgnl(unsigned short FlibHndl, short slct_data, IODBSGNL *sgnl);

    slct_data : specify the data select flag. * When the bit corresponding to the signal is set to 0, that signal is not read. To read the signal, set the corresponding bit to 1.

    bit 0 : Mode signal : My point of view, you should set this bit to 1 in order to get/set the result for the Signal Mode. Otherwise the informations are not read.

  3. #3
    Join Date
    Apr 2013
    Posts
    5
    Hi,
    Where or how can I see more information about "FOCAS", I'm developing a software that interacts with heidenhein and enjoyed by communicating with FANUC, and it seems to me that these libraries allow communication with Fanuc NC.

  4. #4
    Join Date
    Mar 2005
    Posts
    12
    Hello,

    It used to be a copy of the HTML documentation on this web site :
    Library handle

    But today this link is over. Otherwise you need to by the CD including the HTML documentation and the last release of the dll's (contact you Fanuc reseller or your machine builder). It's not expensive (I don't remenber exactly the price but less than 100€) If you are familiar with the remotools package of Heidenhain, becarefull : Focas is much more complexe and not so easy to "tame". Compare also to the remotools of heidenahin the Fanuc CD doesn't contain any sample program. But depending of your Fanuc CNC reference if you are luky you won't need to add any licence to get the focas communication. So it's cheaper than the Heidenhain or Siemens solution.

    Best regards
    CUQ

  5. #5
    Join Date
    Apr 2013
    Posts
    5
    HI,

    You have some exemple? I go buy the dll, but if this dll don´t have exemple or help files is not good!!!!


    "if you are luky you won't need to add any licence to get the focas communication."


    what licence? I don't see nothing about this!

  6. #6
    Join Date
    Mar 2005
    Posts
    12
    For some Fanuc CNC series the Focas interface is not include as standard. So you need to buy the option. But for the newest CNC controler like the Fanuc31i it's not an option so you don't need to buy this option to get the communication with the controler.

    Concerning the CD, You can purchase a Focas2 drivers & library CD which includes software and documentation. Reference for the product A02B-0207-K737.

    A02B-0207-K737 FANUC OPN CNC FOCAS1/2 LIBRARIES EDITION : 04.00 (04.00 is the current release for most of the DLL in the CD except the Fwlib32.dll in release 6.0)


    try also : http://alvarestech.com/temp/mtconnec...2.5-Focas2.rar (even if it's an old release it will give you an idea of the CD

    Best regards,
    Cuq

  7. #7
    Join Date
    Mar 2005
    Posts
    12
    -

  8. #8
    Join Date
    Apr 2013
    Posts
    5
    Thanks!

    BR,

    Tiago Lopes

  9. #9
    Join Date
    Mar 2013
    Posts
    4
    hi,
    can you share the cd with me please
    ragards

  10. #10

    Re: Using the "FOCAS" set of libraries (FANUC Open CNC API Specifications)

    Hi,
    I have the same problem with cnc_rdopnlsgnl.
    This is my code:
    IODBSGNL sgnl;
    short slct_data = (1 << 4) | (1 << 5); // bit 5: Feedrate override signal, bit4: Manual feedrate override signal
    short ret = cnc_rdopnlsgnl(m_handle, slct_data, &sgnl);
    if (ret == EW_OK)
    {
    printf("FEED: t:%d f:%d j:%d", sgnl.type, sgnl.feed_ovrd, sgnl.jog_ovrd);
    }

    And the output is: FEED: t:48 f:0 j:0 all the time.
    And I think this should be 100 for feed_ovrd and 10 for jog_ovrd according to the manual, when there is no override.

    Is this working for anybody ?

    Thank you!

  11. #11

    Re: Using the "FOCAS" set of libraries (FANUC Open CNC API Specifications)

    I have found a solution! I have tested with 0i-F and 0i-D. The negative values might have to handle differently for some machines...
    "m_handle" -is what cnc_allclibhndl3 gave back.

    IODBPMC pmc;
    short ret = pmc_rdpmcrng(m_handle, 0, 0, 12, 12, 9, &pmc); // G012 = FeedOvr
    if (ret == EW_OK)
    {
    short value = pmc.u.cdata[0];
    if (value < 0)
    value = -value - 1;
    return value;
    }

    Quote Originally Posted by sbela View Post
    Hi,
    I have the same problem with cnc_rdopnlsgnl.
    This is my code:
    IODBSGNL sgnl;
    short slct_data = (1 << 4) | (1 << 5); // bit 5: Feedrate override signal, bit4: Manual feedrate override signal
    short ret = cnc_rdopnlsgnl(m_handle, slct_data, &sgnl);
    if (ret == EW_OK)
    {
    printf("FEED: t:%d f:%d j:%d", sgnl.type, sgnl.feed_ovrd, sgnl.jog_ovrd);
    }

    And the output is: FEED: t:48 f:0 j:0 all the time.
    And I think this should be 100 for feed_ovrd and 10 for jog_ovrd according to the manual, when there is no override.

    Is this working for anybody ?

    Thank you!

Similar Threads

  1. Replies: 4
    Last Post: 02-03-2014, 06:29 PM
  2. Replies: 4
    Last Post: 05-28-2013, 09:20 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. Autodesk 123D "file open" help needed
    By studysession in forum Autodesk
    Replies: 0
    Last Post: 01-04-2012, 02:53 AM
  5. "Open Source" Aluminum Extrusion Profiles
    By devers6 in forum DIY CNC Router Table Machines
    Replies: 17
    Last Post: 12-18-2005, 12:04 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
  •