Mill conversion with Mesa 7i96

More
07 Jan 2019 21:30 - 07 Jan 2019 21:31 #123725 by Clive S
I am doing a small mill conversion with a mesa 7i96 the only inputs I require are 3 for homing PNP sensors (or NPN) and 3 for mpg hand wheels, these will be used for just jogging. Plus estop. I think that takes up 10 inputs

Q1. Could I use TB3 for the A&B inputs for the mpg. If so as the mpg's are run at 5V and the inputs on the TB3 all have to be at 3- 24V and the sensors would be better at 12-24V

Could this be achieved by using an opto isolater board like this www.aliexpress.com/item/PC817-4-Channel-...1.0.0.46754c4dDZmzDQ

Q2. Or would it be better to put a simple BOB on P1 for the mpg's. I would prefer to keep it all on the 7i96 if possible
Last edit: 07 Jan 2019 21:31 by Clive S.

Please Log in or Create an account to join the conversation.

More
07 Jan 2019 21:55 #123727 by Todd Zuercher
Were you going to use the spindle encoder input on TB2? (it usually isn't for most simple mills). There isn't much reason to unless you intend to do rigid tapping.

If not, use that encoder input on TB2 for the MPG. Then you don't need to worry about the voltage of the other inputs messing with the 5v of the MPG.

But if you set up the inputs using common ground it may not matter. Both a 24v sensor and the 5v MPG could share the same ground common.
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
07 Jan 2019 23:24 #123733 by Clive S
Thanks Tod
I need 3 mpg's I realised that I could use the input for one of them on TB2

Re the common ground would I then use the PNP sensors with 24V + > brown . blue -ve. black >TB3 input
Mpg +/- to 5V A phase and B phase to TB3 inputs.

Are the inputs fast enough for jogging (no more than 1500mm/min) on TB3.

Please Log in or Create an account to join the conversation.

More
09 Jan 2019 16:42 #123838 by Clive S

But if you set up the inputs using common ground it may not matter. Both a 24v sensor and the 5v MPG could share the same ground common.


I am have trouble with the inputs on TB3 with the mpg's in that the mpg only puts out about 3.4V on A & B so does not trigger the input. (the led's on the inputs do flicker when turning the mpg)

I have also got the PNP sensors to trigger the inputs with these powered at 5V would would like to power them at 24V

Q1. Is it safe to apply 24V + and 5V + to different inputs at the same time using a common ground?

Q2. Are the inputs fast enough for jogging with mpg's (no more than 1500mm/min) on TB3.

Please Log in or Create an account to join the conversation.

More
09 Jan 2019 16:51 - 09 Jan 2019 17:10 #123841 by PCW
Replied by PCW on topic Mill conversion with Mesa 7i96
Yeah 3.4v is going to be marginal.

You can fix this by adding pullup resistors (with common connected to +5V) to the A/B outputs of the MPG

The inputs will be sampled at 1 KHz so that will limit the maximum count rate
There is firmware that adds 4 MPGs and programmable filtering to the 7I96 inputs
but it still needs LinuxCNC driver support

In addition is possible to build a configuration that puts standard encoders on the 7I76 isolated input pins. With either the MPG firmware or standard encoders you are still limited to about 10KHz max count rate by the Optocoupler characteristics.

And yes you can mix any input voltages from ~3 to 36V if you have a common negative
Last edit: 09 Jan 2019 17:10 by PCW.
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
09 Jan 2019 17:09 #123843 by Clive S
Thanks Peter.
I will try with the mpg will 1k R be fine.

Could you confirm this Q1. Is it safe to apply 24V + and 5V + to different inputs at the same time using a common ground?

Please Log in or Create an account to join the conversation.

More
09 Jan 2019 17:12 - 09 Jan 2019 17:12 #123844 by PCW
Replied by PCW on topic Mill conversion with Mesa 7i96
Yes, this is fine as long as the power supplies have the
same negative common (usually ground but does not need to be)
Last edit: 09 Jan 2019 17:12 by PCW.
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
10 Jan 2019 12:56 #123897 by Clive S
I can't see the wood for the trees. I can't seem to see the reason for the mpg not moving the axis.
axis.x.pos-cmd only changes with keyboard jog and not with the mpg.

loadrt encoder num_chan=5
addf encoder.capture-position servo-thread
addf encoder.update-counters servo-thread

# MPG stuff here
#### load ilowpass for mpg smoothing ###
loadrt ilowpass names=ilowpass.mpgX,ilowpass.mpgY,ilowpass.mpgZ
addf ilowpass.mpgX servo-thread

setp ilowpass.mpgX.scale 1
setp ilowpass.mpgX.gain 0.1

setp axis.x.jog-vel-mode 1
setp encoder.0.x4-mode 0

#set axis to the required increment ( 0.01)
net jog-inc-x joint.0.jog-scale axis.x.jog-scale
sets jog-inc-x 0.01

#encoder X
net mpg-xa encoder.0.phase-A <= hm2_7i96.0.gpio.000.in
net mpg-xb encoder.0.phase-B <= hm2_7i96.0.gpio.001.in

# send mpg-encoder counts to required axis
net pend-counts-x encoder.0.counts
net pend-counts-x ilowpass.mpgX.in

net pend-x ilowpass.mpgX.out
net pend-x axis.x.jog-counts

setp axis.x.jog-enable true
setp joint.0.jog-enable true

Attachments:

Please Log in or Create an account to join the conversation.

More
10 Jan 2019 14:12 #123900 by PCW
Replied by PCW on topic Mill conversion with Mesa 7i96
Is the system homed? if not you would have to jog individual joints, not axis.

Please Log in or Create an account to join the conversation.

More
10 Jan 2019 14:37 #123901 by Clive S

Is the system homed? if not you would have to jog individual joints, not axis.

Thanks Peter
Yes I forgot about that the above now works when homed.:)

This is on a small mill so can I change it to jog joints instead of axis
The following user(s) said Thank You: COFHAL

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.113 seconds
Powered by Kunena Forum