![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hi, I am looking for a sample codes including source writing in C/C++ using the FANUC FOCUS library to talk to the FANUC controller. Any sample code is appreciated. Thanks, Henry |
|
#3
| |||
| |||
Not really, but it's more simple than I thought. First, I assume you already have the Focus library from FANUC, here is an example: unsigned short FlibHndl; // Focus Library hanlde int status; // Get handle by calling cnc_allclibhndl, cnc_allclibhndl2, // or cnc_allclibhndl3 depends on what you want status = cnc_allclibhndl(&FlibHndl); if (status == EW_OK) { // Ok, we get the handle. now use the handle to call // other functions short spdl; status = cnc_rdnspdl(FlibHndl, &spdl); if (status == EW_OK) { // So we got the number of spindles printf ("Number of spindles = %d", spdl); } .... // Release the handle cnc_freelibhndl(FlibHndl); } And that's all folks!! Good luck, Henry |
![]() |
| Tags |
| c/c++, fanuc monitor, focus, host application |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help!- Fanuc 18i MB Host Set-up | Helmuth | Fanuc | 11 | 03-22-2011 12:42 PM |
| PC MONITOR FOR FANUC | CHANDRU | Fanuc | 1 | 01-03-2011 01:25 PM |
| Need Help!- Fanuc monitor info | Dave3891 | Fanuc | 6 | 11-03-2010 09:57 AM |
| Help With a Different Application for a Fanuc 21T | AZDEN | Fanuc | 2 | 06-14-2007 03:33 PM |
| A host of EMC newbie questions - sorry! | gfixler | LinuxCNC (formerly EMC2) | 19 | 01-05-2007 08:31 AM |