ur probably gonna need the ethernet function
and focas for doing this... call machine maker
I have a question about the networking functionality of the Fanuc 16i. I should preface this by saying that I work in the IT department here and do not know anything about CNC machines, so if I sound like an idiot, I am sorry.
We have several Mazak CNC's that supply data such as idle time, working time, shut-down time, etc., to a central monitoring console in the form of a handy pie chart that our upper management loves. Since the Mazaks run embedded Windows XP, this process was fairly straight-forward. Now attention has turned to the aforementioned Fanuc machines. After reading the manual, the built-in FTP functionality using ethernet looks to be the way for us to go, but I get the feeling that FTP is intended to be used for delivering programs to the machines, not transmitting status information to a central "monitoring" console. Delivery of the programs is already handled via the serial port, so ethernet is my only choice.
I can't find in the manual anything on the type of status information that the Fanuc CNC's log, and as I mentioned I have no knowledge of these machines. Does anyone have experience with this sort of thing? Even if I can get some information from the machine in a text file or .csv file, that would work.
I would really appreciate any insight or ideas that you may have.
ur probably gonna need the ethernet function
and focas for doing this... call machine maker
you can use ethernet for FTP file (program) transfers and for Focas-based status monitoring... the problem is the Focas drivers from fanuc are expensive, and you have to know how to program them... i havent been able to find any decent software for Focas communication that is free or cheap enough to experiment with
i settled on these two approaches... first i tapped into the status-light relay outputs in the machine, and hooked them up to an "input" device on the pc (specifically u-hid) and wrote a script for the pc to use the timing of those signals to generate data about how the machine ran throughout the day
this was a good approach for the 18i's at first because i was using FTP and didn't have any reason to have rs232 hooked up... also an older O-M that didn't have custom macro b forced that solution over the following, better, solution
most of my machines still communicate via rs232 (the ones without embedded ethernet) so i was able to use DPRNT lines to relay status from a cycle to the PC... so i bought a $50 dollar DNC software (called DNC Server from i-logic)... it already supports remote pulling of programs directly at the machine control, so its great for xfering programs... but it has the added benefit of always listening to the rs232 port...
so my programs start with
and my M30 macro has:
and then i wrote a script to be called by the DNC software when it receives a line beginning with //
so DNC Server runs my script, which logs the status and the job name into a log file and a status file for me...
its been collecting data from about 10 machines for over a year now... i don't have a great way to generate pretty reports from it but eventually i will...
anyway, thats the conceptual solution i use on most of my machines... should be the same for your 16i, lmk if you decide to try something similar i can help you out
hi, if you already wrote software to extract data from Matrol/XP platforms, then you would also be able to write a C+/visual basic application to extract the same type of data from any Fanuc 16i/18i-series cnc control.
16i is equiped with an embedded ethernet interface (low volume data).
You need the library software from Fanuc spec. A02B-0207-K737.
with this software you can write your own driver to suite your application.
Thanks for the reply, your method/results sound similar to what we are hoping to get eventually. Let me make sure I am following your process correctly: you use the DNC software from i-logic to transfer programs to the CNC machine in question, and when the machine reads the // in the program name, another script begins to record status information for the current job. Is the status information created by the Fanuc machine itself, or does the DNC software create and track this using the status information that you mentioned in your first method?
dprnt (serial interface):
the "dprnt" command in a part program works well only when the part program is running, meaning that the output of data you want is through the serial port and is cyclic. you will ONLY receive the specified info, defined in the part-program, when the sequence program (part program) get's to that point in the process - the cnc needs to be in AUTO-mode and in "cycle" (executing)
when the cnc is in any other mode, i.e. in manual mode you will not know that.
focas1 (ethernet interface):
any available cnc status/value can be read from the external pc software at any time you wish, the only requirement is that the cnc needs to be ON.
this also means that the info you want at any time is determined you, independent of the operation status and operator actions.
Part programs don't need to be changed.
communication drivers based on focas1 as such are scares, so you would need to write your own communication module using the dll from focas 1 provided by fanuc. you do need C++/ VB experience.
If you have any information that you are willing to share, I'll take it. The only thing I can figure out myself is the NC program transmission and how to export the operation history, which only seems to contain the buttons pushed recently. You can send the info to acallahan at klmicrowave dot com if that would be easier.
Thanks, and I appreciate everyone's help with my issue.
glad to help by sharing what has been successful for me... i am by no means an expert... you can PM me if necessary but i prefer putting stuff on the forum to help others when searching...
so my shop has:
some machines that are RS232 only (0M, 0T, 0iM, 18M)
some machines that are RS232 and Ethernet (18iM, 31iM)
the 31i is the easiest, i have it connected to ethernet only, for both file transfer and status transfer (DPRNT does work via ethernet...)
the 16/18i's use FTP for file transferring... which is fast and easy (low keystrokes)
the RS232-only machines use i-logic's DNC Server for file transfer... basic operation is like so:
dummy programs in the control:
O81 (GET O0001)
O82 (GET O0002)
O83 (GET O0003)...
when puched (OPTR > PUNCH EXEC), "DNC Server" detects the comment is a request for file O0001 and prepares it for sending, waiting for LSK
then on the control OPTR > READ EXEC or the equivalent sets LSK mode on the machine and starts reading the file...
so file transferring can be done without using the computer... and all the workstations post to the machine server with folder for each machine, yada yada
now for status monitoring... (ignoring the 31i for now)... this method is different than FOCAS or any remote monitoring method which can be used via ethernet and without changing programs...
by using DPRNT[//START*PARTNAME] in a program, the DNC Server (which is always listening to the serial port, waiting for file requests or other actions to be sent from the machine) is configured to execute a remote program whenever it reads a line starting with //...
so it runs another script, which I wrote, and sends it "START PARTNAME"... that script logs the cycle timestamps and relays the status around the shop
the end of the program would then have DPRNT[//END] to do the same thing for the end of the cycle... and these can be put in a macro as necessary to simplify programs (ie my M30 macros run the //END)
this same method is used for both the rs232-only machines as well as the ethernet enabled 18i's, because DPRNT will not work in my experience via i/o channel 9 (ethernet)
so i hope this helps... filezilla is running as the FTP server for all machines, and another script handles the 31i's lame way of DPRNTing which i won't get into in this already long post...
Your RS232 + DNC set-up is similar to what we are using, I believe (ours is cimnet, but it still transmits the programs to and from via the RS232 port). Where you are adding the code to the program that tracks statistics during operation, is the output of that transmitted back to the DNC server for storage? Also, if at all possible, could you post an example of the status information macro so I could have an example to give to the machine programmers. After a lot of manual reading, it seems that Fanuc's put a timestamp on just about every event, so this could be very beneficial.
Thank you again for all the help,
a typical program posted from our CAM system would look like this:
and the M30 macro would look like this:Code:% O0001(PXIE5603 COVEROP1) POPEN(1.12.38 PM 7/21/2010) DPRNT[//START*NATIONAL-INSTRUMENTS/PXIE5603-COVER/OP1] PCLOS M6T7 M1(TOOL7 0.375 ENDMILL) G90G54B0. X-0.2743Y0.4737M3S14000 G43Z1.1H7 /M8 T2 G0Z0.1 G1Z-0.389F80.0 ... ... M30
and the computer handles all the cycle lengths, timestamps, etc... by when it receives the commands...Code:O9028 (ENDING...) POPEN DPRNT[//END] PCLOS M30
there are a few more things i havent gotten into here, like changing the I/O channel inside the macro (for memory card usage) and using IO4 (param 110 i think) for seperate input/output channels
my shop,we run a OPC server in a Windows computer,OPC server can read/write data in Fanuc CNC. You need to write a OPCclient by C++/VB.
And use GOOGLE ,you can find the source code about OPC server/client .
i would eventually like to explore this route for the added benefits of reading data and particularly alarm data that would stop program execution and prevent my method of passive machine "listening" from functioning
i see some free OPC servers and some documentation about making an OPC/focas client out there that i will have to explore more... but can you recommend your OPC server or a particular way to start into this?
also what are the costs involved? If you recommend a pay OPC server, also the cost of the FOCAS drivers etc
and do you have this type of solution functioning on non-ethernet CNCs? like 18MC or 0MC thru rs232 or more likely rs422 serial connection
thanks... the method i provided definitely lacks in many of the features possible thru FOCAS from what i've read, but i don't know if switching is worth it