Hello Guest it is March 29, 2024, 06:56:49 AM

Author Topic: Mach 4 with ESS and Linear Scales  (Read 435 times)

0 Members and 1 Guest are viewing this topic.

Mach 4 with ESS and Linear Scales
« on: August 21, 2022, 06:43:34 PM »
*First off, this is not a question about closed loop usage.*

I sometimes like to use my CNC mill in manual mode. I disable the stepper motors and use the hand cranks to move the table. Of course, there is nothing telling Mach that the table is moving and I was thinking of installing linear scales and connecting them to Mach so that I can monitor positions in Mach software DRO.

Based on what I have seen on other posts that focus on the closed loop questions, its mentioned this is possible, but I have not seen any additional information on how to actually do this.

Ideally, I would like to be able to transition from Mach DRO control (in CNC mode where the motors are controlling the table) to manual control mode where the DRO's are updated from the linear scales.

Any help would be greatly appreciated!
Re: Mach 4 with ESS and Linear Scales
« Reply #1 on: August 21, 2022, 07:16:36 PM »
Hi,
the ESS can read MPGs and linear scales no trouble. The ESS reports an integer number back to Mach and Mach decodes that number to display a position in
a register which can in turn be displayed in a DRO.

To do as you wish you would de-power or disable the steppers so they were not locked and then use manual wheels. There will be a delay between the linear scale
and the DRO, approximately the cycle time of the ESS, which is by default 40Hz, or a worse case delay of about 25ms. I doubt you would notice it.

A number of people have tried using Mach to drive the machine, but rather than the DROs displaying where Mach 'thinks' the machine they use linear scales
to drive the DROs. The delay in that circumstance is noticable and objectionable. The only time when the DROs are accurate is when the machine is stopped
and the linear scale/ESS/BoB/Mach delay catches up. The general feeling is that its not the right way to go.

The delay would however totally screw any attempt to use it to drive a closed loop, for which the delays would have to be a few microseconds max.

To do this you would need at least six spare inputs on the BoB/ESS combination, 2 inputs (A & B) per axis. Do you have spare inputs, or are you prepared to buy another
BoB to do so?

Craig
« Last Edit: August 21, 2022, 07:21:18 PM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 4 with ESS and Linear Scales
« Reply #2 on: August 21, 2022, 07:51:23 PM »
Thanks for the info, Craig!

It sounds like this is fairly straight forward to do. The delay is not a concern for me, especially at only ~25ms! I also agree that the scale reading would only be appropriate while using in manual mode.

Some more details:
I am planning on making a custom PCB that acts as a breakout. All the scales would plug their standard 9-pin D-Sub connector to it and it would have an output connector that runs to my controller box. I currently have minimal connections on the ESS, so I have the input connections needed.

How the actual setup is done on the ESS and in Mach? Is there a diagram that illustrates what kind of signals come from the scales are and how the ESS knows to interpret them a certain way? My guess is that it is some kind of clock/data protocol that gets mapped to the ESS? Once the ESS is setup to read the signals to get the integer value from the scale, how does Mach get configured to use that in the DRO instead?

Thanks again!
-Ryan
Re: Mach 4 with ESS and Linear Scales
« Reply #3 on: August 21, 2022, 08:26:52 PM »
Hi,
have a look at Machs Control plugin, the MPGs tab. There you can enable MPGs/Encoders. This will cause Mach to make the appropriate registers for each MPG/encoder enabled.
Then look at the InputSignals tab of the ESS plugin, if you scan down you will find that there is provision to assign A & B inputs for Encoder0, Encoder1 etc.

Note the requires that the A & B inputs be attached to the ESS, usually via a BoB, ie you require six spare inputs. Do you have them?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'