Setting up 5i25+7i85+8i20

More
12 years 11 months ago #40878 by stes
I'm trying to set up these but I can't find xml file for 7i85

Please Log in to join the conversation.

More
12 years 11 months ago #40883 by cmorley
Replied by cmorley on topic Setting up 5i25+7i85+8i20
sorry I have taught pncconf about the 7i85.

probably time to update pncconf with new cards...

Chris M

Please Log in to join the conversation.

More
12 years 11 months ago #40936 by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20

stes wrote: I'm trying to set up these but I can't find xml file for 7i85


You might be able to get a start by pretending that you have a 7i77 instead. Clearly many of the 7i77 pins won't actually exist, but the encoders "belong" to the 5i25, and the 8i20 pin names will be the same too.

There is information that you might find useful in the future that can be gleaned at the command line.

Install the 5i25 and connect the 7i85. Optionally connect the 8i20.
Open a terminal window and type
Code:
sudo dmesg -c {You will be asked for a password} halrun loadrt hostmot2 loadrt hm2_pci show pin show param exit dmesg
You should be able to copy and paste the output from "show pin" and "show param" into a text file for future reference.
These are the pins that can be used in the HAL file, that you can either create by hand, or have PNCCONF create for you, or (most typically) a bit of both.
The second dmesg will show you which FPGA functions are on which 5i25 pin (this isn't all that much help in telling you which terminals those are on the 7i85)

Please Log in to join the conversation.

More
12 years 11 months ago #41218 by stes
Replied by stes on topic Setting up 5i25+7i85+8i20
Andy,

I have noticed that you use a 8i20 to drive ac servo motors also. Is it complicated to set it up? I have never used Linuxcnc, so this is all new for me.

Please Log in to join the conversation.

More
12 years 11 months ago #41220 by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20

stes wrote: Andy,

I have noticed that you use a 8i20 to drive ac servo motors also. Is it complicated to set it up?


I think the answer is "Yes", mainly because AC servos are themselves fairly complicated.

What motors do you have?

The complexity is not with the 8i20 (which simply needs to know what current to supply, and at what phase angle) but in working out where the rotor is. How you do this depends on the motor and what feedback it offers. it is simpler for spindles than for axis motors.

Please Log in to join the conversation.

More
12 years 11 months ago #41244 by stes
Replied by stes on topic Setting up 5i25+7i85+8i20
I'm using Sanyo Denki P5 1kw. Would it be easiest to detect the phase by powering one of the phases at start up?
This motor has hall effect sensors also.

Please Log in to join the conversation.

More
12 years 11 months ago #41265 by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20

stes wrote: I'm using Sanyo Denki P5 1kw. Would it be easiest to detect the phase by powering one of the phases at start up?
This motor has hall effect sensors also.


Using Hall sensors is the best way to get the motor initialised. This is the test script I use to set up a motor
Code:
loadrt hostmot2 loadrt hm2_pci config="sserial_port_0=00000000" loadrt threads name1=thread1 period1=500000 loadrt bldc cfg=h addf hm2_5i25.0.read thread1 addf bldc.0 thread1 addf hm2_5i25.0.write thread1 addf hm2_5i25.0.pet_watchdog thread1 net h1 hm2_5i25.0.7i76.0.0.input-00 bldc.0.hall1 net h2 hm2_5i25.0.7i76.0.0.input-01 bldc.0.hall2 net h3 hm2_5i25.0.7i76.0.0.input-02 bldc.0.hall3 net ang bldc.0.rotor-angle hm2_5i25.0.8i20.0.1.angle setp bldc.0.pattern 34 start
Save that in a file somewhere called 8i20.hal. Then edit it to suit your hardware (you won't have any "7i76" pins with a 7i85, for example)
Then start a HAL session and load the script:
Code:
halrun source 8i20.hal
Now open a some halmeters to check the hall inputs
Code:
loadusr halmeter signal h1 loadusr halmeter signal h2 loadusr halmeter signal h3
and check that the halls twiddle as you manually rotate the motor.
Now you can apply a small current to the motor and see if it spins. It probably won't as there is only a 1 in 42 chance that "34" was the correct hall pattern.
Code:
setp hm2_5i25.0.8i20.0.1.current 0.5
The motor might kick, it might buzz. It might even spin.
Now try all the hall patterns and see which one works best.
Code:
setp bldc.0.pattern 0 setp bldc.0.pattern 1 ... setp bldc.0.pattern 42
Make a note of which ones spin the motor best. You will probably find two that work well, but which spin the motor in different directions. Choose one, that is your hall pattern. A further test that it is a good pattern is to try it at higher and lower currents, and make sure that it will reverse the motor properly.
Code:
setp setp hm2_5i25.0.8i20.0.1.current 0.5 setp hm2_5i25.0.8i20.0.1.current 1 setp hm2_5i25.0.8i20.0.1.current -1 setp hm2_5i25.0.8i20.0.1.current 0.1
and so on.

Running your motors like this will work, but isn't ideal. This is trapezoidal commutation, and it is noisy and less efficient. The next stage is to switch the "bldc" component to "qh" mode, where it uses trapezoidal commutation to start, then uses the quadrature encoder for sinusoidal commutation after the first Hall transition.
So, exit halcmd, and edit the 8i20.hal file:
Code:
loadrt hostmot2 loadrt hm2_pci config="sserial_port_0=00000000" loadrt threads name1=thread1 period1=500000 loadrt bldc cfg=qh net rawcounts bldc.0.rawcounts hm2_5i25.0.encoder.00.rawcounts [color=#ff0000]setp bldc.0.poles 4 setp bldc.0.scale 4000[/color] addf hm2_5i25.0.read thread1 addf bldc.0 thread1 addf hm2_5i25.0.write thread1 addf hm2_5i25.0.pet_watchdog thread1 net h1 hm2_5i25.0.7i76.0.0.input-00 bldc.0.hall1 net h2 hm2_5i25.0.7i76.0.0.input-01 bldc.0.hall2 net h3 hm2_5i25.0.7i76.0.0.input-02 bldc.0.hall3 net ang bldc.0.rotor-angle hm2_5i25.0.8i20.0.1.angle [color=#ff0000]setp bldc.0.pattern 34[/color] start

The lines in red need to be set to suit your hardware. Note that there is a 50:50 chance that the bldc scale will have to be negative.

Now you should find that the motor runs smoothly under speed and direction current commands, and you can integrate the bldc and 8i20 HAL into your machine HAL configuration.

One troubleshooting tip. At the halcmd: prompt
Code:
show all *8i20*
will show you the 8i20 status, if it isn't working then there should be a clue as to why not in there, such as undervoltage, or enable not set, or whatever.

Please Log in to join the conversation.

More
12 years 11 months ago #41266 by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20
I forgot the link to the bldc docs:

www.linuxcnc.org/docs/html/man/man9/bldc.9.html

Please Log in to join the conversation.

More
9 years 1 month ago #98727 by stes
Replied by stes on topic Setting up 5i25+7i85+8i20
I'm back to my project. I made the 8i20.hal file, but when I try to source it I get this message "Could not open hal file '8i20.hal': No such file or directory"

Please Log in to join the conversation.

More
9 years 1 month ago #98753 by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20
I guess that is a file path problem. You could try an absolute path from root. eg
/Users/yourname/linuxcnc/configs/the-file

(That's a guess, I am on a Mac right now and can't actually recall the Linux user paths. could be "Homes" for example)

Please Log in to join the conversation.

Time to create page: 0.097 seconds
Powered by Kunena Forum