What's new
What's new

Speedio - controlling air solenoid with M-code... how?

SRT Mike

Stainless
Joined
Feb 20, 2007
Location
Boston MA
So I am working with an R650X2 and using the Renishaw OTS for tool breakage. During roughing, the table is covered in chips... playing with orientation/aiming of coolant hoses doesn't help. I don't want to waste time moving the spindle to the OTS to wash it off... so I wanna rig up an air blast that I can control with an M-code.

Anyone know how to do it? I know I could piggyback off the OTS turn-on signal, but I have future plans for other devices as well, so I want to learn how to do it with an M-code. Does it involve a ladder change, or are some M-codes already routed out to external IO's on the machine?
 
So I am working with an R650X2 and using the Renishaw OTS for tool breakage. During roughing, the table is covered in chips... playing with orientation/aiming of coolant hoses doesn't help. I don't want to waste time moving the spindle to the OTS to wash it off... so I wanna rig up an air blast that I can control with an M-code.

Anyone know how to do it? I know I could piggyback off the OTS turn-on signal, but I have future plans for other devices as well, so I want to learn how to do it with an M-code. Does it involve a ladder change, or are some M-codes already routed out to external IO's on the machine?

My Metrol toolsetter has an air blast on M402 for this. Yamazen also has a kit for adding a tool air blast (with awesome instructions). You pretty much want the same thing but not aimed at the tool. If you can get the instruction sheet from them it had a full bill of materials. If not I’ll see if I can hunt my copy up. No ladder changes required, the solenoid control leads go into the external IO ports on the left side of the electrical cabinet.
 
Wire the coil between XTO_A100 and XTO_B100. In the data bank go to the external output signal screen and set No. 100 to "15. M400". M400 with turn the solenoid on, M401 will turn the solenoid off.
 
Wire the coil between XTO_A100 and XTO_B100. In the data bank go to the external output signal screen and set No. 100 to "15. M400". M400 with turn the solenoid on, M401 will turn the solenoid off.
Might need to use another M code, depending on the machine. IIRC on my R450 M400 turns on the wash down coolant system, M401 turns it off.
Good luck!
 
Might need to use another M code, depending on the machine. IIRC on my R450 M400 turns on the wash down coolant system, M401 turns it off.
Good luck!

Yeah, when you get to the external output screen you'll see a list of output numbers that correspond to the numbers on the output terminal strip in the back of the machine and next to them any M-codes that have been assigned (i.e. M400, etc.) There will also be a list of M-codes and their corresponding "number" you use to assign them (i.e. "15" = "M400", etc.) Good luck!
 
You Can Use M450 in the control for this. This is a time M-Code that does not require a finish signal. You can set the duration in the user parameter. Assign M450 to any output on the I/O board that is not being used. Hook your value to the output (orange terminal is + and gray terminal is -). make sure your value does not draw more than 300ma at 24vdc otherwise you will have to add a relay to switch the valve.
 
Thanks for the info guys.... hoping to get on this project maybe next week (solenoid incoming). Luckily the R650 has plenty of air lines already plumbed from the back of the machine right to the table, so this should be an easy-ish project.
 
Do you really want to add the solenoid coil right to the machine i/o? I started down this road but its still just a pile of parts in the bottom of the cabinet. I was planning on driving a solid state relay from the control and using the relay to drive the coil. Just not quite sure if the outputs are designed to drive an inductive load directly.
 
Brothers are blessed to have extra input/outputs on them standard and setting them up / using them is simple. They do have optional I/O expansion cards available too, along with communication cards to more or less directly interface with external PLC's (Profibus, etc). And they have a built in PLC you can use. Very good bang for the buck in that control.
 
I'm a little confused by the I/O layout. For the PNP inputs, to trigger the input would you effectively jumper the N and P terminals for the input? I'm used the the N being COM(ground) and it being just one terminal not an entire strip, but maybe I'm misunderstanding. Thanks

IO.jpg
 
For PNP you supply "source" the input with +24V when the input is to be ON.
For NPN you "sink" the input to ground when the input is to be ON.

So you would hook up + to 24V, go to your sensor/switch and then the output of the sensor/switch goes to the input terminal. When the switch makes, it supplies 24V to the input and the input turns on.
 
hook up + to 24V, go to your sensor/switch and then the output of the sensor/switch goes to the input terminal. When the switch makes, it supplies 24V to the input and the input turns on.

So, is the the P terminal at +24 and the N terminal the input?

Wire from P to sensor, output of sensor goes to N. I'm going to use a relay so I'd effectively by jumping the P to the N to trigger it. Sound right? Thanks
 
I'm a little confused by the I/O layout. For the PNP inputs, to trigger the input would you effectively jumper the N and P terminals for the input? I'm used the the N being COM(ground) and it being just one terminal not an entire strip, but maybe I'm misunderstanding. Thanks

View attachment 317345

CosmosK, looking at the input terminal, you can see you have #100 thru 115 on both the grey and orange terminal strips. These correspond to the screen of the mappable inputs in the Data Bank display. To make an input, you essentially jumper the orange terminal to the grey terminal. for example if you want to trigger or make the mappable input 102, put a jumper from grey terminal 102 to orange terminal 102. The jumper can also be a set of relay contacts. No voltage required. Please reference the Installation manual for precautions and requirements of Input and Output terminals. The outputs actually supply 24 volts dc when activated and can actuate a relay or small load such as certain solenoids or led lights... The mapping details are in the Operation 'Data' manual.
 
CosmosK, looking at the input terminal, you can see you have #100 thru 115 on both the grey and orange terminal strips. These correspond to the screen of the mappable inputs in the Data Bank display. To make an input, you essentially jumper the orange terminal to the grey terminal. for example if you want to trigger or make the mappable input 102, put a jumper from grey terminal 102 to orange terminal 102. The jumper can also be a set of relay contacts. No voltage required. Please reference the Installation manual for precautions and requirements of Input and Output terminals. The outputs actually supply 24 volts dc when activated and can actuate a relay or small load such as certain solenoids or led lights... The mapping details are in the Operation 'Data' manual.

Frank, the manual left me wondering still, so I asked here.

So, can you give me a similar explanation for the NPN outputs? Is P normally high (+24) and the go low(same as N) when the output is on?

Thanks to both of you. I look forward to trying it out.
 
Frank, the manual left me wondering still, so I asked here.

So, can you give me a similar explanation for the NPN outputs? Is P normally high (+24) and the go low(same as N) when the output is on?

Thanks to both of you. I look forward to trying it out.

It is my understanding (and the way I've always used these), is that NPN and PNP change the 'Common' for outputs. In other words, one way, common is 0 volts and 24V is supplied when active. The other way, 24V is common and 0v or IO ground is supplied when active. Easy to test if you have a voltmeter.
Set your meter to DC in a range that can measure 24V. On the lower left of the IO board, there is a terminal strip where the work lights are connected. There are terminals there for IOG and IO24. You can measure a constant 24v there. Black lead on IOG, red on IO24. Now map an unused output (example 55,56 ...) to 'RED'. RED becomes active in alarm state such as ESTOP. Put black test lead on the IOG terminal and measure the voltage present at the orange and grey terminals you mapped to RED. Measure in ESTOP state and ready to run state. You will see which goes to 24v when switched. You can do the same thing by putting the red lead on the IO24 terminal, and check the mapped output terminals to see which supplies IOG when active. If there are outputs used already, do not change from NPN or PNP now.
 
I suppose I never checked the current draw but we’ve got little solenoids hooked to all ours for years with no problem. We use them for air blast and for activating hydraulic (air over oil) clamping. I could be totally wrong but does the PNP/NPN thing even matter for a solenoid valve? Just plug in the wires and map the outputs!
 
Awesome, thanks Frank.

While we're on the subject, is there a way to add a button into the feed hold loop? I'd like to be able to put the machine in feedhold from another source besides opening the door. Something like a button across the room type of thing. Since opening the door does it, maybe I can tee in another signal where the door sensor plugs in. Thanks
 
Awesome, thanks Frank.

While we're on the subject, is there a way to add a button into the feed hold loop? I'd like to be able to put the machine in feedhold from another source besides opening the door. Something like a button across the room type of thing. Since opening the door does it, maybe I can tee in another signal where the door sensor plugs in. Thanks

We can put a man on the moon can't we! :D I've added extra feed hold and cycle start buttons on machines. Just wired them in parallel to the standard switches.
 
It’s been a while since I looked at these i/o’s in detail but I thought you could also do feedhold / cycle start through the i/o terminal block too.
 








 
Back
Top