Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Ruanb on February 21, 2008, 03:28:18 PM
-
Hi all
I hope someone can guide me in my quest.
I have a lathe I've been battling years on. A "ancient" Okuma. Now I've bypassed the old control and managed to get those enormous motors running on Mach3.
But now I want to run both my turrets as well as my spindle from Mach3.
A little background on the turrets: They consist of a 4 position front and a 6 position rear. They are controlled by relays and ordinary switches. The relays are switched in combination to achieve desired tool position. I have all the electrical schema's etc.
The spindle. It is a automatic 6 speed gearbox which gives out 12 possible running speeds. Also controlled by relays.
Now for the help part I need:
I bought a PCI card which is installed within my PC which can controll 32 out and 8 in I/O's. I have written a program which succesfully does what I need it to do in VB. BUT I would like to interface it to Mach3, I can write basic VB, and I do not know C++ at all.
What would be the best way of doing this, Macro's VB Script or .........C++
Any guidance will be greatly appreciated.
Regards
Ruan Basson
South Africa
-
Not being very clever at this, but I would suggest using the coolant on /off functions (M7,M8,M9) to control the turrets ( via the existing LPT1 port outputs) and just turn the coolant on / off with the spindle function (M3,M4,M5). Does this make sense ?.
Best regards,
Tweakie.
-
Hi Tweakie
I thought about it, but I have to many outputs that needs to be trigered.
My front turret has one relay to identify it, then 4 3 relays to trigger the T commands. The back turret have in total 7 relays, then there is the spindle which needs another 7 relays at minimum, that is if I want only CW, there is other relays for controlling the rolling, relays for telling the control when tha gears have been changed etc.
I thought of adding another LPT as well, but I would still be a few outputs short.
DAmn................. If I could only afford a PLC...... ???
-
Here you go the cheapest and easiest PLC ever!
http://cubloc.com/product/01_01cb405.php
I use it will mach3 through serial modbus and works perfect. If you need help setting it up just ask.