- Posts: 423
- Thank you received: 93
wiring MPGs to 7i96s
- Masiwood123
- Topic Author
- Offline
- Platinum Member
-
Less
More
4 years 1 month ago #252953
by Masiwood123
Replied by Masiwood123 on topic wiring MPGs to 7i96s
that is very well done, congratulations! Thanks
Please Log in or Create an account to join the conversation.
4 years 1 month ago - 4 years 1 month ago #252958
by HansU
Replied by HansU on topic wiring MPGs to 7i96s
Quickly created an example how it could look like:
Code:
loadrt ilowpass count=2
addf ilowpass.0 servo-thread
addf ilowpass.1 servo-thread
setp ilowpass.0.scale 1000
setp ilowpass.1.scale 1000
setp ilowpass.0.gain 0.01
setp ilowpass.1.gain 0.01
# For velocity mode, set to 1
# In velocity mode the axis stops when the dial is stopped
# even if that means the commanded motion is not completed,
# For position mode (the default), set to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
setp axis.x.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
# The output from encoder counts is sent to ilowpass
net mpg-x-out ilowpass.0.in <= hm2_7i96s.0.inm.00.enc0-count
net mpg-z-out ilowpass.1.in <= hm2_7i96s.0.inm.00.enc1-count
# Adjust your scaling here
setp axis.x.jog-scale 0.01
setp axis.z.jog-scale 0.01
# Enable jogging
setp axis.x.jog-enable 1
setp axis.z.jog-enable 1
# The output from the ilowpass is sent to each axis jog count
net encoder-counts-x axis.x.jog-counts <= ilowpass.0.out
net encoder-counts-z axis.z.jog-counts <= ilowpass.1.out
Last edit: 4 years 1 month ago by HansU.
The following user(s) said Thank You: Masiwood123
Please Log in or Create an account to join the conversation.
- Masiwood123
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 423
- Thank you received: 93
4 years 1 month ago #252963
by Masiwood123
Replied by Masiwood123 on topic wiring MPGs to 7i96s
I can't describe how happy I am! ..who knows how long I would wander to get to this code..as I am completely ignorant about programming, it also opened my eyes about the hal command..if I get to the weekend I will try to physically implement the encoders and try, from my belief this will work and should be introduced in the linuxcnc documentation as an example of adding more standalone mpg wheels. Thank you very much, I would like to repay somehow!
Please Log in or Create an account to join the conversation.
4 years 1 month ago #252966
by HansU
Replied by HansU on topic wiring MPGs to 7i96s
Yes I thought so too that this could be added to the docs as the parallel port is only rarely used these days.
The following user(s) said Thank You: Masiwood123
Please Log in or Create an account to join the conversation.
4 years 1 month ago #252969
by PCW
Replied by PCW on topic wiring MPGs to 7i96s
The parallel port (or RPI GPIO) setup is almost identical except for the added
software encoder comp setup (and the count pins)
software encoder comp setup (and the count pins)
The following user(s) said Thank You: Masiwood123
Please Log in or Create an account to join the conversation.
- Masiwood123
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 423
- Thank you received: 93
4 years 1 month ago #252970
by Masiwood123
Replied by Masiwood123 on topic wiring MPGs to 7i96s
I and the majority here are beginners, in that direction I believe that not only this but also many other things are unclear here with all the documents, and that in this sense there should be more explanations with practical examples, in the linuxcnc documentation itself, ``because everything must be written ``. That's why, at least in my environment, everyone runs away from it and resorts to mach3 or.. (only usr frendly and nothing else), but luckily there are many of you who know how to help.
Please Log in or Create an account to join the conversation.
Time to create page: 0.174 seconds