Setting up 5i25+7i85+8i20

More
17 Nov 2013 03:34 #40878 by stes
I'm trying to set up these but I can't find xml file for 7i85

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

More
17 Nov 2013 05:39 #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 or Create an account to join the conversation.

More
18 Nov 2013 21:03 #40936 by andypugh
Replied by andypugh on topic Setting up 5i25+7i85+8i20

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
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 or Create an account to join the conversation.

More
29 Nov 2013 15:55 #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 or Create an account to join the conversation.

More
29 Nov 2013 20:25 #41220 by andypugh
Replied by andypugh 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 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 or Create an account to join the conversation.

More
30 Nov 2013 15:21 #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 or Create an account to join the conversation.

More
30 Nov 2013 22:44 #41265 by andypugh
Replied by andypugh 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.


Using Hall sensors is the best way to get the motor initialised. This is the test script I use to set up a motor
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:
halrun
source 8i20.hal
Now open a some halmeters to check the hall inputs
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.
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.
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.
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:
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
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.
The following user(s) said Thank You: blazini36

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

More
30 Nov 2013 22:46 #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 or Create an account to join the conversation.

More
09 Sep 2017 13:30 #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 or Create an account to join the conversation.

More
10 Sep 2017 00:02 #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 or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.291 seconds
Powered by Kunena Forum