What's new
What's new

FANUC CNC retrofit controller. Control relays, pumps, lights, valves. Interested?

EVX

Plastic
Joined
Dec 30, 2019
Location
Sheridan, IL USA
I've developed a controller that "spies" on the RS232 port of a CNC machine and reacts to specific data to manipulate a few 10 amp relays. As long as your machine can DPRNT from within the Gcode program, you can use this device. I use it for a solenoid valve to provide air blast for milling and an in-process buzzer to keep the machine from sitting idle. I can keep the project simple and cheap ($) where you wire up the peripheral electronics you want or I can enclose it all in a watertight box along with a solenoid air valve and buzzer ($$$) This will be a great addition to any CNC machine!

One could use the 10A relays provided to trigger more powerful relays to control things like dust collection or other large devices. I figure 3 small relays would be a good start.

Configuration is done on a PC. Drag and drop some setup files on an SD card for the machine's COM port settings.

I haven't figured out a single way to produce the device yet,such as enclosed with all options or bare bones... I'm interested in what you would like to see.

Let me know if you are interested, I'm excited to get this thing out there!
 
So you would use this in the place of spare M codes if your machine wasn't equipped with them?
 
Exactly. Machines that don't have extra relays controlled by M Codes would use this controller for things like adding air blast or a buzzer, whatever device you wish. I ran a Haas VF3 that had 2 or 3 relays on the control board in back and I used those for air blast and buzzer. The DPRNT controller is perfect if there are no extra relays to tinker with or if you feel like staying out of the back of your machine.
 
.....whatever device you wish. .......

As long as whatever you are driving does not need to stop execution of the CNC program to do whatever. Things like air blast or buzzer would be fine. Not so good for say a parts catcher or indexer. Things like that need to halt CNC execution until they complete their operation and issue a finish signal.
 
The controller has upward of 12 channels of I/O, so it could be used to monitor any device, then one of the dedicated relays could close the skip signal circuit. I'd think it would be superior to the usual single device plugged into the skip signal, this could monitor many custom devices and each unique command (example - DPRNT[waitfor4th]) command could be monitored and the skip signal for that device would be sent when that input is triggered. I suppose that running multiple devices requiring a skip signal at the same time would take a tiny amount of additional programming, but at least it's possible.

FYI,

-EVX
 
How would skip be used to hold program execution while an external function is performed? I have only seen the skip signal used in conjunction with axis motion during probing or in-process workpiece measuring.

Below is the Fanuc description of the G31 Skip Signal function from the 16i, 18i operation manual.


Linear interpolation can be commanded by specifying axial move
following the G31 command, like G01. If an external skip signal is input
during the execution of this command, execution of the command is
interrupted and the next block is executed.
The skip function is used when the end of machining is not programmed
but specified with a signal from the machine, for example, in grinding. It
is used also for measuring the dimensions of a workpiece.
 
A few dozen moons ago, I made a simple tool probe to test the skip signal on a VF3. I used G31 to feed into a micro switch and store the Z value. As I recall, but don't quote me, a stand alone G31 will halt program execution while waiting for the two terminals to be closed on the skip input. Thus, if you issue a DPRNT command to the control to do something, followed by a G31, the control will wait for the signal from the DPRNT controller monitoring the device. (Or just wire the device to the skip input per usual). In the case of a home-brewed part catcher or something, that signal would be a simple micro switch that is normally open, and closes the circuit when the device is in the intended position.

I'm pretty sure this is the way that Gene Haas got started, issue an RS232 command to the rotary and then wait (G31) for the rotary to signal completion. That is a good example of how this setup would work. In this case, I'd need to consider what type of input there would be for most cases. Probably an external board or relay to isolate the DPRNT controller from high voltages...

It has been a while since I wired up to the skip signal, but this is the second time this has been pointed out, so I'll test in the next day or two.

Thanks for the great input, this is exactly what I needed!

-EVX
 
Never set up or saw a Haas indexer that had an RS-232 input. The ones I have worked on or installed had their own program stored in the Haas controller and just executed one step of the stored program on each occurrence of an M code executed by the CNC. The Haas controller then issued an MFIN pulse to the CNC on completion of its program step to allow the CNC program to resume.

I did set up an NSK indexer that used RS232 and DPRINT to send the index angle data to the NSK controller. That only stored the data though. It used an M code similar to how I described it above to begin its motion and suspend CNC execution until the indexer was done and clamped.

Skip signal does not halt CNC execution. The programmed move on the G31 line is performed the same as if G01 were commanded with the exception that motion is stopped at the point where the skip signal is read. The remaining motion on that line is skipped and the next CNC line is executed. If skip signal is not read by the completion of the G31 block the next block of the program is executed.

It's kind of hokey, but one could do a conditional test (IF statement) as the next CNC program block and check if the G31 block achieved its programmed end position. If it did then that would mean that your device did not send the skip signal before the G31 block was completed indicating that the external device did not complete its function within the allowed time. If the conditional test resulted in a true state it would branch (GOTO) to a sequence number with a #3000 macro alarm to stop the CNC and display an alarm message that the external function did not finish within the time allowed.

So, it would be possible to use the Skip signal to verify if the external function was completed or not, but sort of a kludge. As a "no other alternative" probably OK. An M code and corresponding MFIN signal processed in the Ladder for an external function is much more simple and clean.
 
Ah, I see that I was thinking of the MFIN signal. My bad. Likely an IF THEN statement monitoring an input would be the way to go, but at that point, why not just interface the outputs directly from the machine. At this point, the best use for this controller would just be simply adding the "dumb" non-critical peripherals without opening up the back cabinet on any machine that can DPRNT.
 
Thought about this a little more last night.....

For someone wanting to control a device that needed to halt CNC program execution until the device had completed its operation, you could use two of your outputs and tie them into the Feed Hold and Cycle Start circuits of the CNC. The Feed Hold circuit would connect a NC contact of your controller in series with the machines circuit. Cycle Start would connect a NO contact of your controller in parallel with the machines circuit. When your control receives the DPRINT command it would pulse the Feed Hold output to halt CNC execution. When your controller determines the external operation is complete then it would pulse its Cycle Start output to restart the CNC program.

I think this would be a cleaner approach than using the G31 method.
 
"...you could use two of your outputs and tie them into the Feed Hold and Cycle Start circuits of the CNC. The Feed Hold circuit would connect a NC contact of your controller in series with the machines circuit. Cycle Start would connect a NO contact of your controller in parallel with the machines circuit. When your control receives the DPRINT command it would pulse the Feed Hold output to halt CNC execution. When your controller determines the external operation is complete then it would pulse its Cycle Start output to restart the CNC program.

I think this would be a cleaner approach than using the G31 method.

I'd be a tiny bit worried about a "high" spike enabling a cycle start without warning. I'd rather have the control look at some other input location and proceed accordingly.

I do somewhat like the idea of interfacing the E-Stop in the manner above in some cases (wired or logic). That could be useful for some items like stopping the machine in the absence of coolant or whatnot...

Good stuff Vancbiker.
 
Quick video of the RS232 CNC Auxiliary Controller

Here is a quick video of the prototype unit in operation.

https://youtu.be/F51v8tvJK2M
 

Attachments

  • 20201023_165149.jpg
    20201023_165149.jpg
    89 KB · Views: 61
  • Controller Prototype.jpg
    Controller Prototype.jpg
    73.1 KB · Views: 50
  • Controller Prototype Rotated.jpg
    Controller Prototype Rotated.jpg
    73 KB · Views: 46
Last edited:
Very cool. Glad to see this is still alive. I will keep it in mind for future projects on my machines.
 








 
Back
Top