5i25 with 7i77 HAL and wiring schematic for servo

More
22 Feb 2013 01:12 #30420 by vmipacman
Hello,
I am struggling trying to get LinuxCNC to run my three axis kneemill. It had a Heidenhain TNC145 controller that gave out. I thought LinuxCNC would be a bit more difficult that Mach3 but would give me more flexibility and reuse all the existing hardware. So far it has been an extemely steep learning curve having no experience with linux, command line stuff, or this HAL file language.

I purchased the 5i25/7i77 package from Mesa and am having difficulty figuring out a Hal file to make this run. I have only the one example 5i25/7i77 hal file that mesa provided on their "freeby" server but am missing the wiring schematic that the file would correspond to it. I am having trouble corolating the physical pin to the labels in the file.

If anyone has a 5i25/7i77 file they could share with a wiring schematic it would help me alot. My hardware is three Heidenhain (LS701) linear encoders run through EXE602D's so the output is in TTL quadrature, three Contraves NC400 servo drives requiring an analogue +/-10V and various pushbuttons. I have attached a schematic of how I wired the 7i77 incase someone has a HAL file that would correspond. I could also do with a file with just a few input/outputs so I could test a few buttons just to verify the board is talking the LinuxCNC.

Thanks alot,
Paul

File Attachment:

File Name: 7I77WIRING...ATIC.PDF
File Size:52 KB
Attachments:

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

More
25 Feb 2013 04:39 #30540 by andypugh

I am struggling trying to get LinuxCNC to run my three axis kneemill. It had a Heidenhain TNC145 controller that gave out. I thought LinuxCNC would be a bit more difficult that Mach3 but would give me more flexibility and reuse all the existing hardware. So far it has been an extemely steep learning curve having no experience with linux, command line stuff, or this HAL file language.

LinuxCNC is actually easier than Mach3 in this situation, but only because Mach3 doesn't do closed-loop servo control at all…

Your wiring diagram looks OK (assuming that the 7i77 pins are correct, I haven't checked).

You can control HAL directly, at the command line (neatly combining two of the things you said you are unsure of).

in a terminal, with LinuxCNC not running, type

halrun

The prompt changes to halcmd: and you can now interact directly with HAL to test your cards. You first need to set up the realtime threads and load the Mesa drivers.

loadrt threads
loadrt hostmot2
loadrt hm2_pci
addf hm2_5i25.0.read thread1
addf hm2_5i25.0.write thread1
addf hm2_5i25.0.pet-watchdog thread1
start

This should wake the card up. You don't need to type all the above in full, as tab-completion works. for example addf h<tab>pet<tab><tab> for the penultimate line. In fact I suggest that you do it that way as I am not sure if it is pet- or pet_
You can now set or read individual pins. You probably want a list of all the pins, so type

show pin

to set the value of a pin use (for example)

setp hm2_5i25.0.7i77.0.0.analogout0 -0.5

Again, tab-completion saves typoes :-)

When you have finished:

exit

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

More
25 Feb 2013 08:18 #30544 by cncbasher
paul,
have you the following link and files etc, although it's listed as for a Bridgeport Anilam conversion , it is in effect exactly the same as your looking for
which is analog servo drive etc , dont forget you need field power connected before the 7i77 will be operational

i dont have a 7I77 Configuration but should be able to help you on your way , with some information .

gnipsel.com/linuxcnc/configs/7i77.html
The following user(s) said Thank You: reddtekk

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

More
25 Feb 2013 21:14 #30557 by vmipacman
Thank you all for your replies. I did make some progress. Firstly I got PncConf working with the .xml files. I was confused by the final screen of pncconf where you select the 7i77x1 configuration and then Pnc generates the I/O pin tabs. Pnc was only listing the the encoders. The selection box for PWM generators was greyed out which confused me since I thought there was 6 to choose from on the 7i77. Anyway, it didn't seem to matter since PncConf did generate tabs for the analog servo pins.

I do have the sample 5i25/7i77 hal file. At first I could not get anything to work. I tried with a multimeter to watch the x axis +/-10v pin and look for a voltage change when I jog x axis in LinuxCNC. LinuxCNC produced a "following error" immediately, probably too fast to read anything on the multimeter.

Then I wired a quadrature rotary encoder to the x axis to see if that also produced a following error when turned. Basically nothing happened. A following error was occasionally produced but it was intermittent. Out of curiosity I removed the /a and /b encoder wires (basically making it a single ended encoder I believe) and shifted the jumpers on the 7i77 to the left. Now the dro on Linuxcnc works! I can rotate the encoder and see the graphical tool moving. The analog x axis pins output a voltage for a second until the following errorl.

So my question is does the HAL file specify single ended or quardarture encoder input? I think the encoder is working properly and I had is wired correctly as far as I know. Whaat am I missing?

Thanks,
Paul

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

More
25 Feb 2013 22:58 #30568 by PCW
HAL/LinuxCNC does not set or sense the quadrature input mode, input mode setting is done entirely by the mode setting jumpers.

If you have differential mode encoders and they do not work with inputs set to differential mode, I would verify the pinouts, having /A and /B swapped will cause non counting behavior.

An easy way to check differential outputs is to put a voltmeter across the A, /A pins (and B, /B pins) and turn the encoder shaft either very slowly or just to a bunch of random locations. The voltmeter should always read 3 to 5V or -3 to -5V but nowhere in between.

You can also do this test with a pair of back-back LEDs (parallel anode to cathode, cathode to anode) with maybe a 300 Ohm series resistor. With this LED combo across the A,/A or B,/B outputs you should always get one LED on, and if they ever both go off, you have a wiring/encoder problem.

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

More
25 Feb 2013 23:21 #30573 by vmipacman
Thanks! I'll check using that method. The /a and /b are both white with a blue or green stripe so maybe I did mix the up. I'll check tonight.
Thanks

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

More
26 Feb 2013 22:09 #30613 by vmipacman
Hah! I checked the encoder. I had it wired correctly but those wires were not connected inside the encoder housing. This was from a box of encoders I had grabbed from work. All the others I had worked with were quaradture but this one was a single ended.

I checked my linear scale output using the multimeter test and all was good so I put the pc and 7i77 back in the controller cabinet and now I have a fully functional DRO. I just have to hook up the servo drives now but I could verify that the AOUT0 pin was atleast fluctuating before LinuxCNC produced a following error.

Thanks for everyones help.
Paul

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

Time to create page: 0.127 seconds
Powered by Kunena Forum