Hello Guest it is April 28, 2024, 06:25:39 PM

Author Topic: Thinking of doing a lathe build and need some basic questions answered.  (Read 876 times)

0 Members and 1 Guest are viewing this topic.

Re: Thinking of doing a lathe build and need some basic questions answered.
« Reply #10 on: December 14, 2022, 10:34:27 PM »
Hi,
if you think you can write a plugin to match MECHATOLINK then have at it. Its a great way for wasting untold time with a slim prospect of success.

The issue is related to your last comment.

Windows is NOT realtime. When Mach plans the trajectory it posts numeric data, something like, and I am guessing here, a 16 word block of 32 bit integers, with
the integer values of at least some of those words representing the machine coordinates of the controlled point at the conclusion of the 1ms time slice. The next block
of data will correspond to the machine coordinates of the controlled point at the conclusion of this 1ms time slice. Each successive time slice has the coordinates of
the controlled point in 1ms intervals.

Windows processes and plans the trajectory and sends multiple, say 100 blocks of data corresponding to 100ms worth of machine movement. The motion controller will buffer
this data and execute successive time slices at one time slice per millisecond. The motion controller will have a buffer of say 180ms, the ESS default for example.

Windows will then go onto other tasks within the PC. Hopefully Windows will get back to Mach4 and devote some CPU time to it, whereon Mach4 will process and post another bunch of data
enough to fill up the motion buffer, before going on to other tasks. In short Windows will offer Mach4 CPU service of a few ms every 50ms or so. Any concept of realtime, or any device or
machine that depends on a continuous stream of data to operate, like a CNC machine will fail.

Imagine a stepper driven CNC machine. If the data ran out the machine would slow or even stop if Windows/Mach4 cannot keep up. Now when a fresh bunch of data
comes along the steppers would have to accelerate instantly to the previously calculated speed, and that won't happen, ie the machine stalls. A CNC machine CANNOT AFFORD
to run out of data....ever.

Quote
This all implies "hand shaking" of some sort. The controller would need to send "complete" to Mach before another set of date is sent.

This is incorrect. Mach4 issues blocks of trajectory data and it expects it to be executed but there is no feedback mechanism such that Mach4 can confirm that the moves
have been executed.

I suspect that MECHATROLINK requires realtime data, and a native Windows PC cannot do that.

There is a means of creating realtime comms on a Windows PC. Interval Zero is a company that produces software that can cause one core of a multicore CPU to have one core dedicated as a
realtime scheduler. Check out their website.

You would have to do something like this just to get your PC to be able to run in realtime.....and that still does not count the plugin. If you are going to go that way then
buy a Mach4/Kingstar/Interval Zero PC which has enacted realtime ethernet comms in the form of Ethercat. Ethercat will not run your servos, but at least it is a well known
industry protocol with a large pool of compliant hardware to draw from. MECHATROLINK is proprietary to Yaskawa and you can be assured they will do everything they can to keep
you locked in. They have a means of extracting money from your person.....drop your trousers, bend over and they will use instruments to withdraw the money!

To be honest I would sell the Yaskawa servos and drives for whatever you can get for them and use that money to buy Delta servos because they are perfectly matched and the
probability of success is nearly 100%, whereas the probability of success writing your own plugin, either with a realtime scheduler or without is slim at best.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Thinking of doing a lathe build and need some basic questions answered.
« Reply #11 on: December 15, 2022, 12:58:58 PM »
Thanks Craig, good information. The drives are posted on ebay (lol)