GithubHelp home page GithubHelp logo

fwlib's Introduction

Fanuc FOCAS Library

Docker Hub
Header and runtime files for CNC communication

Docker

Build the base image with docker build .

Build an example with docker build examples/c/Dockerfile

examples/

Link or rename appropriate libfwlib\*.so (based on platform) to libfwlib32.so.1 and libfwlib32.so

On linux x86_64 for example: ln -s libfwlib32-linux-x64.so.1.0.5 libfwlib32.so

More instructions in each example folder

fwlib's People

Contributors

strangesast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fwlib's Issues

Compile for aarch64

Hi,

Sorry to bother, i go directly to my question:
Is there a way to compile and run the examples on AARC64?

un-normal read value using ubutun 20 x64 with libfwlib32-linux-x64.so.1.0.5

I build my app in ubuntu 20 x64 with ibfwlib32-linux-x64.so.1.0.5, some of the read result is extremely huge and i think it is un-normal, as below:

connected to machine at 10.10.235.161:8193
machine id: 3c7b5d01-da91ac76-5e31c389-4b92c469, handler: 32769
running status 0
emergency 0
alarm 1
running program no: 0, main program no: 12
spindle speed: 93962030282464
current feed rate = 93962030282464

the spindle speed and feed rate seems not right

Do I miss some options in linux x64?

My gcc build is:

gcc -L./lib -Wl,-rpath . ./src/reader.c ./src/fanuc.c -lfwlib32 -lm -lpthread -o reader

skipping incompatible fwlib32.lib

I am trying to run c-minimal example and i am getting this error.
I am running this on windows10

To Run this
gcc -L./ -Wl,-rpath . examples/c-minimal/main.c -lfwlib32 -lm -lpthread -o fanuc_minimal

Output
skipping incompatible .//fwlib32.lib when searching for -lfwlib32
skipping incompatible .//fwlib32.dll when searching for -lfwlib32
skipping incompatible .//fwlib32.lib when searching for -lfwlib32
skipping incompatible .//fwlib32.dll when searching for -lfwlib32
skipping incompatible ./\fwlib32.lib when searching for -lfwlib32
skipping incompatible cannot find -lfwlib32

Is this related to your .lib or its error on my part because of my configuration

Libs for mipsel linux

Hello, do you have any plans to compile the libs for mipsel linux. Or tell me how to build it myself. Thanks

how to use the library in a windows container

I have a container built from 3.11.3-windowsservercore-ltsc2022, then the container has a 64bit architecture. How can I use the library inside my Python code which runs in the container ?
Simply running ctypes.CDLL('Fwlib32.lib') I get the error not a valid Win32 application.
Any help ? Thank you in advance!

Hello, will you support macos?

get error
d: warning: ignoring file /usr/local/lib/libfwlib.so, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
ld: warning: object file (/Users/knd/Desktop/20230606/pro1/src-tauri/target/debug/deps/libobjc_exception-236369846b337e66.rlib(exception.o)) was built for newer macOS version (12.0) than being linked (10.13)
ld: warning: object file (/Users/knd/Desktop/20230606/pro1/src-tauri/target/debug/deps/libtao-2d885f6670b54971.rlib(carbon_hotkey_binding.o)) was built for newer macOS version (12.0) than being linked (10.13)
Undefined symbols for architecture x86_64:
"cnc_allclibhndl3", referenced from:
productLineControl::send_file_to_fanuc_cnc::
$u7b$$u7b$closure$u7d$$u7d$::he83a4abb63bc6a11 in productLineControl-6ea42e8d455301db.2lidcfi07cay98pl.rcgu.o
"_cnc_download3", referenced from:
productLineControl::dw_file::h97a2371f2908b212 in productLineControl-6ea42e8d455301db.4np8v3r30bw0rxwz.rcgu.o
"_cnc_dwnend3", referenced from:
productLineControl::dw_file::h97a2371f2908b212 in productLineControl-6ea42e8d455301db.4np8v3r30bw0rxwz.rcgu.o
"_cnc_dwnstart3", referenced from:
productLineControl::dw_file::h97a2371f2908b212 in productLineControl-6ea42e8d455301db.4np8v3r30bw0rxwz.rcgu.o
"cnc_freelibhndl", referenced from:
productLineControl::send_file_to_fanuc_cnc::
$u7b$$u7b$closure$u7d$$u7d$::he83a4abb63bc6a11 in productLineControl-6ea42e8d455301db.2lidcfi07cay98pl.rcgu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

is cnc_rdparam() able on ubuntu64?

It returns same random idata value(17208 or 17304 or 0) when parameter num is deferent.
Same code on win10 x64 is ok, seems "cnc_rdparam()" function has failed
Please help....

param.wrong.value.mp4
 unsigned short h; //定义句柄
    char str[] ="192.168.88.134"; //定义ip地址
    short ret; //连接函数返回值
    ODBST buf; //设备状态
    ODBEXEPRG exeprg; //执行文件名
    ODBSYS info;
    IODBPSD param ;
    short  paramnum=6712; //读取加工零件数p299 6711 6712
    //连接cnc
    ret=connectCNC(str,8193,10,&h);
    // ret = cnc_allclibhndl3( "192.168.88.128", 8193, 10, &h ) ; //VMWARE使用NAT模式连接成功,切换网络模式后需要重启模拟器
    if ( !ret ) {
            cnc_sysinfo( h, &info ) ; //获取系统信息
            cnc_statinfo( h, &buf ) ; //获取设备状态
            // cnc_exeprgname(h &exeprg); //获取文件名
            getExePrgname(h, &exeprg);
            cnc_rdparam( h, paramnum, -1 , (4+4*3), &param ) ;//读取加工零件数p299 
            printf("-----------------------------------\n");
            printf("connect success,hndl: %d\n",h);
            printf("cncrun status:%d\n",getCNCStatus(h,&buf));
            printf("executed file name: %s\n",exeprg.name); //没有执行是返回O0
            printf("-----------------------------------\n");
            printODBST(buf);
            printODBSYS(info); 
            printf( "read param %d ldata : %ld\n", paramnum,param.u.ldata ) ;
            printf( "read param %d  idata : %d\n", paramnum,param.u.idata ) ;
            printf( "read param %d  datano : %d\n", paramnum,param.datano ) ;
            printf( "read param %d  type : %d\n", paramnum,param.type ) ;
            // int idx;
            //  for ( idx = 0 ; idx < 32 ; idx++ ) {
            //      printf( "#%d\n", idx+1 ) ;
            //      printf( "%c\n", param.u.cdatas[idx] ) ;
            //  }
            //断开连接
            cnc_freelibhndl( h );

image

Undefined symbol calling cnc_sdtsetchnl

I'm trying to use cnc_sdtsetchnl but i get an error (undefined symbol) even if the declaration of function is present in .so and .h

/home/ubuntu/gateway/fwlib-master/libfwlib32.so: undefined symbol: cnc_sdtsetchnl

armv8

Can the c-libs be provided for us to compile for armv8? Or can an armv8 .so be provided?
Thank you!!!

Libs for armv7

Hi there,

I'm looking for the lib for 1.0.0 for armv7.

The lib libfwlib32-linux-armv7.so.1.0.5 works fine for me. But unfortunately functions that I need have been removed in this version.

Is there any way to get these libs: libfwlib32-linux-armv7.so.1.0.0 or libfwlib32-linux-armv7.so.1.0.1?

Many thanks in advance.

Perform "cmake .." fail in "examples/c/build"

Hi, here comes a question.

Like the title, I perform command cmake .. failed in directory examples/c/build and get the following error message:

CMake Error at test/CMakeLists.txt:3 (add_subdirectory):
  The source directory

    /home/guosj/Documents/xuelangOpenSourceProject/fwlib/examples/c/extern/googletest

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!
See also "/home/guosj/Documents/xuelangOpenSourceProject/fwlib/examples/c/build/CMakeFiles/CMakeOutput.log".

So, how to fix it?

Got an error on Ubuntu 16 64bit

Hi
I used libfwlib32-linux-x64.so.1.0.5 by Python directly but got the below error from gdb
0x00007ffff6177f22 in cnc_allclibhndl4 () from /usr/local/lib/libfwlib32.so.1
I call cnc_allclibhndl3 function in python code only
result = focas.cnc_allclibhndl3(c_char_p(self.ip), c_ushort(self.port), c_long(self.timeout),addressof(self.handler))
Pls help to check
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.