PDA

View Full Version : Two Machines from one PC



ngwagwa
07-08-2019, 11:33 AM
After a PC crash I am looking into using one PC to drive 2 machines at the same time. Has anyone any experience/advice on using one PC to drive two machines?
I intend to use Denford VR Milling to drive one machine via USB and Mach 3 to drive the second machine via a PCI parallel/serial port to drive the second machine.

magicniner
07-08-2019, 02:07 PM
Two machines from one PC with each machine running at different times will work, if you try to run Mach3 simultaneously with any other software you are likely to have problems with a conflict for resources.

ngwagwa
07-08-2019, 09:24 PM
Cheers.
I was hoping to run them both at once. It will take me a week or so to get everything set up as I will need a mouse,keyboard and monitor next to each machine but as the new PC is a lot faster then the old two put together I will give it a go and report the results

A_Camera
08-08-2019, 12:55 PM
Cheers.
I was hoping to run them both at once. It will take me a week or so to get everything set up as I will need a mouse,keyboard and monitor next to each machine

Get a KVM switch. That's what I'd do if I were you.


but as the new PC is a lot faster then the old two put together I will give it a go and report the results

It may work but only if you are not using parallel port but some controllers.

ngwagwa
08-08-2019, 03:17 PM
A KVM switch is no use as I have one monitor/keyboard/mouse next to one machine and another set next to the other. There are enough USB ports to connect 2 mice and keyboards just need to get a VGA splitter for the monitors.

I will be using the Parallel and Serial port for the Mach3 machine (these ports are on a PCI card) and a USB port for the Denford machine.

I got the Mach 3 sde of it up and running today and it is only using 2% of CPU and 40% of the memory. Tomorrow I will look at the Denford side of things.

AndyUK
08-08-2019, 06:44 PM
I got the Mach 3 sde of it up and running today and it is only using 2% of CPU and 40% of the memory. Tomorrow I will look at the Denford side of things.

One of the things to watch out for is the speed of each machine; I would anticipate that both will work, but they'd both slow down a bit as the USB and Parallel communications each need to perform CPU interrupts (literally what it says on the can - a message comes in, and it forces the CPU to stop what its doing and handle this right now), which might not play well together.

The other issue I see is that with a system running off the parallel port, if there is no command buffer, it relies upon the real-time element to work correctly. Imagine if you're half way through a diagonal move which requires synchronised movement of X and Y, but your PC has to deal with something else halfway between sending these signals - you might get a not so diagonal line - but this is purely speculation! I'm looking forward to hearing about your results :)

Neale
08-08-2019, 07:18 PM
Andy has put his finger on it - the issue is not that Mach3 uses significant cpu power, but that it needs to be able to issue step signals in real time with as little delay as possible. Any other activity can cause small delays, which translates into uneven signals sent to the drivers, which means rough running. That's why laptops, for example, aren't supported by Mach3 via the parallel port - the cpu has a habit of putting user jobs on hold while it does some internal housekeeping which wrecks the steady pulse stream needed. If you really need to run two things at once, best thing would be to add a motion controller on the Mach3 side and scrap the parallel port. These buffer moves so that slight cpu delays aren't significant. However, I'm a little concerned that you also talk about Mach3 using the serial port. That's not usual, so I wonder if there is some other complication in your setup.

ngwagwa
08-08-2019, 09:32 PM
Regarding synchronised Xand Y movement the G01 command tells the machine to move straight to the stated x,y & z so there won't be any issues there.

The Mach 3 uses the serial port to control the VFD as this was the easiest way to do it with existing boards in the unit.

AndyUK
08-08-2019, 09:38 PM
Regarding synchronised Xand Y movement the G01 command tells the machine to move straight to the stated x,y & z so there won't be any issues there.

Mach3 is responsible for converting that single gcode command into the pulses for the steppers. It's the output of those pulses which I'm suggesting might be affected, not the interpretation of the gcode.

Think about that Gcode command - the number of pulses on X, Y and Z to reach the desired location depends on where the machine currently is. G01 also implies that the movement is linearly interpolated (i.e. it has to move in a diagonal line, not two sides of the triangle.) The synchronization and output of those pulses in a timely manner on each axis is very important.

Sent from my SM-G950F using Tapatalk

Neale
08-08-2019, 10:38 PM
...and to put some numbers on that, at 750mm/min, Mach3 will be driving that parallel port at, maybe, 2000 pulses per second. 10 msec delay while the cpu is doing something for the other job means that 20 pulses will be delayed or maybe even lost. At best that means rough running as the steppers are continually changing speed due to varying pulse rates and at worst missed steps and lost accuracy.

You originally asked for people with experience to respond. I suspect that you might have trouble finding anyone who runs like this because it's such a potentially dangerous way to go. You are even recommended to avoid things like internet browsing while running Mach3 for these reasons. Use a motion controller like a UC100 and you might be in with a chance as the device unloads a lot of the time-critical pulse generation from the PC.

cropwell
09-08-2019, 12:48 PM
I am long term friends with owner of Computer Services Nottingham. If my Mach 3 PC crashed, I would get an old machine for free, that somebody has traded in and load it up with my software from the mirrored NAS box. I speak from experience. That way you get a PC good enough to run the fairly low demands of Mach3 and with a parallel port.

My systems are all networked and the Mach3 machine has the Internet Gateway disabled, so no stupid interruptions. All my Gcode is generated on my Win10 machine and filed in the NAS box, so a hard drive failure on the CNC machine has low impact.

Even my 3D Printer has a Wifi enabled SD card, so I can download to it easily.

magicniner
09-08-2019, 07:28 PM
See how it goes, but a fundamental misunderstanding of how Mach3 works with the PP seems to be at the heart of the assumption that this will not be problematic.

cropwell
09-08-2019, 11:42 PM
See how it goes, but a fundamental misunderstanding of how Mach3 works with the PP seems to be at the heart of the assumption that this will not be problematic.

In order to control the PP effectively Mach 3 has its own driver with high priority control of interrupts. That is why I endorse a separate machine. It simply takes control of the interrupts, which can severely affect any other software running.

Boyan Silyavski
10-08-2019, 11:59 AM
Best would be 2 machine and no PC. Each machine its own controller. Why people love so much mach3 when dedicated controllers are so much better and cheap nowadays, i dont get it. Obviously the desire for suffering...:cat:

ngwagwa
15-08-2019, 05:14 PM
And it works!
Ran both machines today cuting fresh air from the same PC for several hours without any issues. The only thing I still need to do is connect 2 keyboards and mice to the PC.

cropwell
15-08-2019, 08:31 PM
And it works!
Ran both machines today cuting fresh air from the same PC for several hours without any issues. The only thing I still need to do is connect 2 keyboards and mice to the PC.

Then you will need a KVM, but be careful you get one that operates backwards as they are normally 1 Kb & Mouse for 2 PCs - you would be better off with a mechanically switched one. Like this one https://www.amazon.co.uk/Sienoc-Port-Manual-Sharing-Switch/dp/B01G1814D6?ref_=Oct_TopRatedC_430437031_1&pf_rd_p=7b277888-d4a0-5d49-8aac-fefa6b9989e1&pf_rd_s=merchandised-search-6&pf_rd_t=101&pf_rd_i=430437031&pf_rd_m=A3P5ROKL5A1OLE&pf_rd_r=Y1FZ8DQQ6DT6V9DPFNJD&pf_rd_r=Y1FZ8DQQ6DT6V9DPFNJD&pf_rd_p=7b277888-d4a0-5d49-8aac-fefa6b9989e1 although the sockets are the wrong way round

ngwagwa
15-08-2019, 08:52 PM
I am hoping I wont need a KVM as I already have both of the monitors working and I am led to believe Windoze wil work with 2 keyboards and 2 mice connected at the same time. Will find out if it is true tomorrow.

AndyUK
15-08-2019, 10:34 PM
I am hoping I wont need a KVM as I already have both of the monitors working and I am led to believe Windoze wil work with 2 keyboards and 2 mice connected at the same time. Will find out if it is true tomorrow.You're correct, absolutely no need for a KVM.

Sent from my SM-G950F using Tapatalk

A_Camera
17-08-2019, 02:29 PM
Why would you use 2 keyboards if you have only one computer and screen? I hope you don't expect the two software to run in one window each and believe that you can allocate one keyboard to each and control them independently. Ms windows allows only one to be active so what's the point of two keyboards?

AndyUK
17-08-2019, 03:01 PM
Why would you use 2 keyboards if you have only one computer and screen? I hope you don't expect the two software to run in one window each and believe that you can allocate one keyboard to each and control them independently. Ms windows allows only one to be active so what's the point of two keyboards?He has one computer, but two screens. Placing the screens at different sides of the workshop and you can use that computer from either of the locations is what I assume he's doing.

Sent from my SM-G950F using Tapatalk

ngwagwa
17-08-2019, 04:00 PM
He has one computer, but two screens. Placing the screens at different sides of the workshop and you can use that computer from either of the locations is what I assume he's doing.

Sent from my SM-G950F using Tapatalk

That's right. One PC and two monitors (one next to each machine) and each monitor now has a keyboard and a mouse with it. Never need to use both keyboards or mice at the same time so the setup is idea for me.
ATM I have the screens set up as though they are side by side so when the mouse cursor is in the left screen, when it is moved to the far right it goes onto the right hand screen. The only hassle is when you open a program it opens in the left screen and has to be dragged to the right screen and the same with any dialog boxes the program opens but with dialogs once they have been dragged to the other screen they will open there next time they are called. I could of course just use the screens in mirror mode but the advantage of how it is set up now is each screen can have a full window of the NC control program of the machine it is next to.