

Our DNC software just watches this signal, and knows the CNC is in cycle if it's on, and out of cycle when it's off. This relay then turns on one of the unused handshake lines on the RS232 cable (say, pin #8, or CD). You can use a small relay and connect it to the signal that powers the "in cycle" light bulb or LED on the operator's panel.

We even tie this into our automatic paging and e-mail software, so someone can get a page or e-mail if the machine has been idle for more than (x) minutes.įor machines that DON'T have User Macro B, you can try another method for cycle start/stop monitoring: You can then go back later and analyze all these events and calculate how many cycles you have, average cycle time, average load time, etc. On the DNC side, just keep the port open and listen for the word "CYCLESTART" or "CYCLESTOP" (followed by a Line-Feed) then record the event in a file with the Date and Time variables from the PCs internal clock. The parameter locations for these settings are different in each model Fanuc control, so you will have to look them up in the manual. Similarly, you can have the control call the "CYCLESTOP" macro with the M30. For example, if all your programs have a certain G-code at the beginning (say, "G20" for Inch programming), you can just put the number "20" in a parameter to make "G20" always call macro 9010. In some cases, you won't even need to modify your programs at all. If you use certain O-numbers for these macros, you can also assign a custom G-code or a custom M-code to automatically call them. At the beginning of all NC programs, insert this Macro Call: These quite simple macros utilize the DPRNT declaration to transmit a short character string from the serial port of the CNC. Insert a Macro Call Command at the beginning of the NC Program, right after the ‘O’, and another Macro Call Command at the end, just before 'M30’. Then the CNC doesn't recognize the POPEN key word, and you don't have the option. If it puts spaces between each letter, like this: On any Fanuc control, if you go to EDIT mode and type: POPEN then press INSERT, the CNCs that have the option will display the word just like it's shown. Not all Fanuc have this option, however, so we use another method as well.

If you have "User Macro B" in your Fanuc control, you can use the POPEN, DPRNT, and PCLOS statements. The following describes how to set it up. The Machine monitor function in DNC Precision utilizes the Fanuc Macro-B functions to passively monitor "Cycle start", "Cycle stop", "Tool change" and other events that your machine can generate.
