air blow programming

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
mfry
Posts: 14
Joined: Mon Jan 01, 2018 8:41 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 1135
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

air blow programming

Post by mfry »

I have a VMC running CNC10 v2.72. There is an air blow plumbed in (same air blow used for tool changes has a spigot next to the coolant) but it is only operated by the Aux6 key, there is no M code to operate it (machine builder thought it was M7 but it isn't so no help there). Instructions in the manual to write an M-code macro use the M94/M95 mappings to INP33-INP48. But it looks like these are all taken up already with tool changer etc.. Although, the hardware for mist coolant isn't installed but the PLC logic is there for it.

Is there a simple way to just make an M code operate an Aux key? What I would like to do is just be able to turn the air blast on/off with an M code to use it for chip clearing sometimes, preferably with as little disruption to the code already there as possible.
Attachments
report.zip
(162.63 KiB) Downloaded 93 times
cncsnw
Posts: 3857
Joined: Wed Mar 24, 2010 5:48 pm

Re: air blow programming

Post by cncsnw »

No, there is no practical way to make an M code simulate pressing an Aux key.

The PLC program sources on your control are a bit of a mess. However, you can probably achieve what you want with minimal disruption, if you locate the line in the PC-based PLC program which currently reads

Code: Select all

if (!M6 & Aux_6_key) then (pc_aux_6_led),(air_blow_sol) 
and change it to read

Code: Select all

if (!M6 & Mist) then (air_blow_sol)


and recompile it to the pc.plc file.

That way, the Mist coolant controls (M7 in Auto coolant mode, or the Mist key in Manual coolant mode) will turn the Mist output on and off as usual, but the Mist output will in turn trigger the air blow solenoid (in place of the Aux6 key).
mfry
Posts: 14
Joined: Mon Jan 01, 2018 8:41 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 1135
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

Re: air blow programming

Post by mfry »

cncsnw wrote: Fri Apr 13, 2018 10:28 pm The PLC program sources on your control are a bit of a mess.

However, you can probably achieve what you want with minimal disruption, if you locate the line in the PC-based PLC program which currently reads

Code: Select all

if (!M6 & Aux_6_key) then (pc_aux_6_led),(air_blow_sol) 
and change it to read

Code: Select all

if (!M6 & Mist) then (air_blow_sol)


and recompile it to the pc.plc file.

That way, the Mist coolant controls (M7 in Auto coolant mode, or the Mist key in Manual coolant mode) will turn the Mist output on and off as usual, but the Mist output will in turn trigger the air blow solenoid (in place of the Aux6 key).
OK thanks, that's a simple enough solution.

Edit to add:

Is there something I'm doing wrong compiling the .src file? I edit and save the file as above, then run xplccomp, it reports something like "compiled, 2440 lines". Then reboot, and nothing change, air blow still operated by aux6 and not mist or M7. Even when I comment out the line.
cncsnw
Posts: 3857
Joined: Wed Mar 24, 2010 5:48 pm

Re: air blow programming

Post by cncsnw »

By default, the compiler saves its output in a file with the same base name as the source file, and an extension of ".plc".

The control will load and run the compiled PLC code from the file named "pc.plc".

So you either need to tell the compiler to save the output in "pc.plc", or you need to copy the resulting output (in the default-named file) over to "pc.plc". E.g.

Code: Select all

xplccomp  my-pc-plc-program.src
cp  my-pc-plc-program.plc  pc.plc
mfry
Posts: 14
Joined: Mon Jan 01, 2018 8:41 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 1135
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

Re: air blow programming

Post by mfry »

Of course. Thanks

edit to add: This works fine now, just added the line so it still operates via aux6 key but unless I install a mister this is a perfectly good solution for me. many thanks
Post Reply