7i70 at 24v - want to connect 5v mpg.

More
17 Sep 2019 15:57 #145400 by DaOne
I am using a 7i70 at 24v and would like to keep the noise immunity on those pins. I read there is a way to set specific pins to detect a much lower voltage threshold without effecting the others. Basically I need 2 pins for a 5 volt tolerant mpg. Is this possible? What do I need to do to set that up if it is?

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

More
17 Sep 2019 20:41 #145436 by PCW
If you have 2 free analog inputs(I think the 7I70 has 6) , you could do this by adding a couple "comp" components to convert the analog channels to digital bits and feeding these bits to the encoder component.

Not sure why the 7I70 doesn't have a native MPG mode like the 7I76/7I77/7I84 do

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

More
17 Sep 2019 21:49 #145452 by DaOne
I might just go a different route and do that whole board as 5 volt. Wire lengths are short. It's basically handling the front user panel only. Is there is a a reason why I should not do it this way I might be missing? It's just a bunch of selector switches and push buttons. Can I pull 5 volts directly off the 7i70?

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

More
17 Sep 2019 22:28 #145462 by andypugh

I might just go a different route and do that whole board as 5 volt. Wire lengths are short. It's basically handling the front user panel only.


That's what the 7i73 is meant for. :-)

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

More
17 Sep 2019 23:11 #145465 by bevins
What are ou connecting the 7i70 to. The rs-422 port.

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

More
17 Sep 2019 23:32 #145466 by PCW

I might just go a different route and do that whole board as 5 volt. Wire lengths are short. It's basically handling the front user panel only. Is there is a a reason why I should not do it this way I might be missing? It's just a bunch of selector switches and push buttons. Can I pull 5 volts directly off the 7i70?


You can run the 7I70 inputs at 5V but you will need to supply VIN with 7..32V
There is no 5V power on the 7I70 except the host power that runs the RS-422
interface isolation section.

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

More
17 Sep 2019 23:40 #145468 by DaOne
I originally was going to use 24 volt for everything. I didn't notice that the mpg ran on 5 volts. Oops. I probably would have got the 7i73 if I would have caught that. Basically everything on the input side can be whatever I want it to be. It's just simple switches. What I would like to do is run all the switches (42 of them) on 24 volts and then input the MPG which is 5 volt. I might just use a couple of opto isolators to change the output to 24 volt if there isn't an easy way to make the 7i70 read both the 24 volt switches and at the same time read the 5 volt A and B signals from the MPG.

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

More
18 Sep 2019 03:41 #145482 by PCW
You can do this with 24V power as i mentioned by using two 7I70 analog channels for the MPG A and B

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

More
18 Sep 2019 08:21 #145492 by DaOne
So to setup analog I just need to set it to mode 1 correct? Are the analog pins 0-6 or can they be set to something else?

Setup I am using is a 5i25 connected to a 7i77 on port 1 and a 7i74 connected to port 2. I have 2 7i70 and 2 7i71 connected to the 7i74. I know I can do the MPG with the 7i77 but I am trying to avoid a long wire run. The 7i70 is right next to the mpg so I am hoping to use that. I am still very new at this so I am learning as I go. Trying to get all the cards setup so the pins are available. Maybe you can help me with the proper configuration strings in HAL for this setup?

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

More
19 Sep 2019 11:47 - 19 Sep 2019 11:47 #145575 by andypugh

Maybe you can help me with the proper configuration strings in HAL for this setup?


Note that the suggestion was to use software encoder counting, so your MPG will lose counts above 10 revs / second. But if you are twirling that fast you won't notice.

This is using "names" rather than count for the HAL components. which means that the pin names are not the defaults as defined in the component docs:
linuxcnc.org/docs/2.7/html/man/man9/comp.9.html
linuxcnc.org/docs/2.7/html/man/man9/encoder.9.html
# load the required components
loadrt comp names=compA,compB
loadrt encoder names=mpg
# add new functions to servo thread
addf compA servo-thread
addf compB servo-thread
addf mpg servo-thread
# make the hal connections
net analogA hm2_5i25.0.7i70.1.3.analog0 => compA.in1
net analogB hm2_5i25.0.7i70.1.3.analog1 => compA.in1
net pulseA compA.out => mpg.phase-A
net pulseB compB.out => mpg.phase-B
# thresholds will need tweaking, use halmeter to see what the actual analogue input values are on the HAL pins. 
setp compA.in0  2.5
setp compB.in0 2.5
# The rest is the same as any other mpg...
net jog-counts <= mpg.counts
net jog-counts axis.X.jog-counts joint.0.jog-counts
...
...
Last edit: 19 Sep 2019 11:47 by andypugh.

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

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