- Posts: 210
- Thank you received: 0
Mesa 5i25/7i77 - First Steps
I've recently received a 5i25/7i77 kit from Mesa. While waiting for it I kept busy reading everything I could find on the hardware and configuring for LinuxCNC.
What I haven't been able to find yet is a fairly concise "first steps" or "quick start" sort of document that gets you started with a minimal system. Now I understand the difficulty because there are so many different ways you could put it together, but would a simple example with the board, a +/-10V BLDC servo driver, encoder, and servo not be fairly universal?
If there's anything you think I should have a look at when just starting out, I'd appreciate a link or two that gets me going in the right direction.
Please Log in to join the conversation.
However, it can sometimes be very useful to check things out first _without_ the complexity of getting a full LinuxCNC system up and running.
Here is what I do when I get a new card. (And is actually what the HAL and INI files do, automatically, for you).
Install just the 5i25 and power up the PC. Open a terminal window.
The first command sets up a realtime environment and starts an interactive HAL session.
Then we load the main Mesa driver and the PCI card driver and create a realtime threa.
The next lines add the read/write functions to the realtime thread, then start the thread running.
You can now start to look at the HAL pins and even make the LEDs on the 5i25 change state.
Use "exit" to close the HAL session and unload the drivers.
If you then attach the 7i77 you should see more pins, and if you supply field power to power-up the GPIO on the 7i77 you should see even more. You should also be able to set analogue outputs and read pin values too.
Please Log in to join the conversation.
Your prompt and useful reply was greatly appreciated. It's reassuring to know that there are people like you to help out with this.
Please Log in to join the conversation.
Sparky961 wrote: I'd like to start with just one servo/driver and get that moving before proceeding with the rest of the system.
The HAL structure to control an axis is not 100% simple. You need a PID controller that compares the encoder feedback to the commanded position and outputs a command signal for the analogue output in proportion to the position error.
You then need to spend some time adjusting the P, I and D gains to get the right system response.
Start by getting the encoder scales right, possibly at the command line.
One useful adjunct to the command-line example above
Please Log in to join the conversation.
However, you mentioned that I should see more pins after connecting the 7i77. I don't. As far as I recall the only things I've changed from default are jumper 5i25/W2 _up_ (for breakout power) and 7i77/W5 _left_and 7i77/W1 _left_. I do not yet have anything external connected. No field power yet.
On the 7i77 there are 3 LEDs currently lit: CR1, CR6, and CR7.
Please Log in to join the conversation.
All a bit cryptic, but with some apparent activity going on when I give it commands and no "magic smoke" being emitted, I'm happy with my baby steps so far.
Regarding the pins from the 7i77 you mentioned earlier, they may have been there but perhaps I missed them because they were at the top of the list. I'm not a complete newbie when it comes to Linux but it's certainly been a while. I forgot the massive volume of scrolling terminal output that the developers love to display.
Next I'll work on getting an encoder connected up.
Please Log in to join the conversation.
So, the encoder is alive - mostly. I can observe hm2_5i25.0.encoder.00.position changing as I manually rotate the servo's shaft. The encoder is mounted directly to the back of the BLDC motor. I'm not too concerned about scaling right now, but I do get 4000 counts per rotation which is what I'd expect in 4X quadrature mode.
I can't see any change on hm2_5i25.0.encoder.00.input-index though. I've tried changing hm2_5i25.0.encoder.00.index-enable from FALSE to TRUE, thinking this might make it work... nope. I don't know how wide the pulse is, so maybe I'm just missing the change as I turn it very slowly?
I'll keep plugging away at it.... anyone feel free to jump in if you can offer something helpful or see me going down the wrong track.
Please Log in to join the conversation.
Sparky961 wrote: (side note: why four pins? current capacity? why not have one larger connector?).
I think that the idea is one pin is the power supply and the other pins can be used to take power _to_ switches / optos etc.
Please Log in to join the conversation.
Sparky961 wrote: I can't see any change on hm2_5i25.0.encoder.00.input-index though. I've tried changing hm2_5i25.0.encoder.00.index-enable from FALSE to TRUE, thinking this might make it work... nope. I don't know how wide the pulse is, so maybe I'm just missing the change as I turn it very slowly?.
You will probably never see the pulse.
But, if you set the index-enable pin to true, then rotate the shaft, at some point you should see index-enable reset to false, and the counts and position pins will go to zero.
Please Log in to join the conversation.
Your quick and concise replies have had an incredible effect helping me to figure out whether things are working. Again, it turns out that they are. I can watch hm2_5i25.0.encoder.00.index-enable reset back to FALSE after setting TRUE and rotating the servo shaft somewhere less than a full rotation.
So, next steps.... I have an MPG here that I'm thinking about getting working early on because I don't like having to control axes with a keyboard. The first few times you pick up an MPG it doesn't seem that natural but after a while you don't know how you lived without one. I have a TOSOKU "Handy Controller" HC121. It came to me non-functional and I was able to do some surgery and positively locate and resolve the fault. Its power is supposed to be 12V but I'm thinking I might try it with 5V and see what happens. I don't think I can damage anything with less, can I?
I know that the MPG could be connected in a multitude of configurations but is there any "standard" for which I/O pins to use? I do recall seeing something about this when I first ran PNCConf. At the time I didn't have power applied to the board so I don't think it would work right. I'll be going and searching for more information on that one tonight. Page 27of the 7i77 manual lists 4 "Software Process Data Modes", with mode 3 mentioning 2 MPGs on inputs 16 through 19. How do I know what mode the board is in and/or change it? Do I want to?
Do you think that's a good next step or would it be time to get into the servo amp connections?
Please Log in to join the conversation.
