Mesa 7i39+5i20 thread

From emboxit
Revision as of 16:51, 11 September 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hello,

I am also trying to configure emc2 (ubuntu10.04 with emc2.4), to work with 5i20 and 7i39.

Do you have a working system with 5i20-7i39 ?

If yes, could you share the configuration?

Regards, Nikos Chalikias


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- You will need the 2.5~pre version of EMC2 as the necessary drivers are not included in 2.4. A version of the Hostmot2 driver which supports tp_pwmgen and the bldc_sine and/or bldc_hall components will be needed. You will also need one of the Three-Phase PWM-enabled .BIT files for the FPGA board.

I believe that all these are currently included in the 2.5 version, but you will need to download and compile that in order to use it.

You will need to follow steps 2.1.2, 2.2 and 2.4 at this page as a minimum. wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2 Don't neglect step 2.7 which instructs the system to use your new version.

Documentation for the new features is here: www.linuxcnc.org/docview/devel/html//man/man9/hostmot2.9.html (especially the "config modparam" section and "3pwmgen" www.linuxcnc.org/docview/devel/html//man/man9/bldc_hall3.9.html www.linuxcnc.org/docview/devel/html//man/man9/bldc_sine.9.html


Hello Andy,

Thank you for instructions. I followed steps 2.1.2 2.2 2.4 2.7 All successfully.

I run emc as suggested in 2.7 and emc script directs to /emc2-dev

EMC2.4.4 starts instead EMC2.5 !!!!!

Please advise how to get the right version

Regards, Nikos


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- The emc-environment script changes things in the context of the currently-open terminal window only. You need to start emc2-dev from the terninal by typing emc.

If you start from the menu / icon then it still starts the 2.4 version. (You can change the shortcuts to point to the script called "emc" in the emc2-dev directory if you wish)


Junior Boarder Posts: 37 User Online Now Click here to see the profile of this user


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 I run emc script from terminal from /emc2-dev/scripts/, exactly as described in section 2.7 I do not run from the menu.

I have also checked the emc script with the gedit and seems OK, pointing to /emc2-dev/

The file named VERSION inside /emc2-dev/ contains : 2.4.4

My conclusion is that inside /emc2-dev/, it is installed version v2.4.4.

What is the exact way to get EMC 2.5 with GIT?


Moderator Posts: 2638 User Online Now Click here to see the profile of this user


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- Ah, bother! I just noticed that the instructions specifically tell you how to get v2.4. Sorry about that.

git checkout master

Might well do the trick. (I am really no expert with git)


Junior Boarder Posts: 37 User Online Now Click here to see the profile of this user


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 [git checkout master] does not help.

I used synaptic-package-manager and it updated *both* emc and emc2-dev to version 2.4.5 (from2.4.4)

I checked git branches at linuxcnc [git branch -r] and there is no branch that contains the name "2.5"

Where is version 2.5 hiding?


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- I asked on irc, but it looks like it could be git checkout origin/master. I hesitate to experiment as I have uncommitted changes.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- IRC says:

[18:46] psha: git checkout master or if this fails git checkout -b master origin/master [18:46] psha: it depends on how repo was cloned. [18:46] psha: then git pull [18:46] psha: for sure

As an alternative, git gui might help.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 After I tried a lot, I discovered that after the [git checkout master] you suggested, The VERSION file contained 2..5.0.~pre

Then checking to other emails with containing 2.5.0 I found that $ . ../scripts/emc-environment (section 2.7) should be ./scripts/emc-environment.

EMC 2.5.0.~pre now starts!

I have to do the 7i39 configuration work. What should I use in the .ini and .hal files?

Thank you for help.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 in 5i20.ini (from hm2-servo) Below part needs to change [HOSTMOT2] DRIVER=hm2_pci BOARD=5i20 CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=3 num_pwmgen=4 num_stepgens=0"


I believe as below: CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=4 num_3ppwmgen=4 num_stepgens=0"


I think below part of the hm2-servo.hal (from hm2-servo), has also to be changed, but I do not know what to do!

  1. motion controller, get name and thread periods from ini file

loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

  1. standard components

loadrt pid num_chan=3

  1. only the 7i43 needs this, but it doesnt hurt the others

loadrt probe_parport

loadrt hostmot2

  1. load low-level driver

loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)

setp hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency 40000

setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 10000000


  1. ################################################
  2. THREADS
  3. ################################################

addf hm2_[HOSTMOT2](BOARD).0.read servo-thread

addf motion-command-handler servo-thread addf motion-controller servo-thread

addf pid.0.do-pid-calcs servo-thread addf pid.1.do-pid-calcs servo-thread addf pid.2.do-pid-calcs servo-thread

addf hm2_[HOSTMOT2](BOARD).0.write servo-thread addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog servo-thread


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- How do you want to run the motor? Does it have Hall sensors? Does it have an encoder?

A motor with an encoder will run more smoothly (pretty much silently) in sinusoidal mode, but has the drawback that it will jerk about (as much as half a turn) during the initialization stage. (unless it is an absolute encoder).

If you have Hall sensors then you can avoid the jerk, but have the fun of working out what Hall sensor pattern the motor has. (this is probably easiest to do in the Machine Show Hal Configuration window, where you can issue setp bldc-hall3.N.pattern 1 then 2 then so on...

I have attached basic hal file for sinusoidal commutation to this message (one axis only and will attach the Hall sensor one to a second message ) which I used to make the video I linked earlier. They should show how to link the components together.


File Attachment: File Name: bldc_sine.hal File Size: 1509

http://www.linuxcnc.org/images/fbfiles/files/bldc_sine.hal


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- This blasted forum drives me mad. It hides the message text at the least provocation Generally it is a wierd character but as far as I can see that message was clean in desperation I have removed all punctuation This is the hidden text. How do you want to run the motor Does it have Hall sensors Does it have an encoder A motor with an encoder will run more smoothly pretty much silently in sinusoidal mode, but has the drawback that it will jerk about as much as half a turn during the initialisation stage unless it is an absolute encoder If you have Hall sensors then you can avoid the jerk but have the fun of working out what Hall sensor pattern the motor has. this is probably easiest to do in the Machine Show Hal Cofiguration window, where you can issue setp bldc hall3 N pattern 1 then 2 then so on I have attached basic hal file for sinusoidal commutation to the earlier message one axis only and will attach the Hall sensor one to a second message which I used to make the video I linked earlier They should show how to link the components together


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- And the Hall file, not that I expect you to be able to see this text. File Attachment: File Name: bldc_hall.hal File Size: 1619

http://www.linuxcnc.org/images/fbfiles/files/bldc_hall.hal


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- Andy,

It was the ellipse at the end of the third paragraph not being made up of three periods. Do you have an ellipse key?

John


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- No, I typed three dots. My computer might be being over-clever though. I will avoid it in future.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- I noticed when I used the backspace key to erase it the last period (of the 4) disappeared with the first keystroke and the next keystroke took out two periods then the third one took out the last one. Sounds like Excel when it tries to correct your entry into a cell and make it a date...

John

I also lost all my text, so I re-write it:

Motor: Nanotec NEMA23 BLDC with Hall sensors Attached encoder AVAGO HEDS-5540 with 1000 pulses/rot and Index

Sinusiodal commutation is preffered as the torque is smoother. Initialisation phase with half turn movement seems acceptable. Is it really BLAC driving with bldc_sinus driver?

I guess you are using 7i43 AnyI/O card. I use 5i20. Is it OK to replace text [7i43] with text [5i20] in the .hal file?

Should I take care of .PIN files? Is the pinout of 5i20 asigned automatically?


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- You will need to change hm2_7i43 to hm2_pci in the "loadrt" line. Elsewhere it will be just a case of swapping 7i43 for 5i20.

Start emc from the command line and see what happens with no motors connected. dmesg will be useful, it tells you the pin assignments on the 5i20 card. However, the pinout is designed to let you plug a 50-way header directly between the 5i20 and one or more 7i39s so the pinout is the same on any board, and only matters if you want to break-out unused pins for GPIO. (which you should be able to do with a second connector on the same ribbon cable)


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 I used the attached 5i20.ini and bldc_sine.hal files


dmesg output is here File Attachment: File Name: dmesg_output.txt File Size: 33927


from the below part of dmesg output, I can see that SVST8_4.BIT is loaded insteadsvtp4_7i39.bit Probably is default driver for hm2_pci First PWM OUT should be to PINS 19,43 of P2 connector, using different names. 5i20.ini and bldc_sine.hal seem correct (..to me) and they are in the right place. ...attached in next 2 messages I can not find where SVST8_4.BIT and svtp4_7i39.bit are located. I guess they are to root somewhere... Can you understand what is wrong?

http://www.linuxcnc.org/images/fbfiles/files/dmesg_output.txt

Code:

[ 2397.847996] hm2: loading Mesa HostMot2 driver version 0.15 [ 2397.851143] hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.6 [ 2397.851181] hm2_pci: discovered 5i20 at 0000:03:02.0 [ 2397.851313] hm2_5i20.0: firmware: requesting hm2/5i20/SVST8_4.BIT [ 2397.994706] hm2/hm2_5i20.0: 72 I/O Pins used: ..... [ 2397.994738] hm2/hm2_5i20.0: IO Pin 006 (P2-13): PWMGen #1, pin Out0 (PWM or Up) (Output) [ 2397.994742] hm2/hm2_5i20.0: IO Pin 007 (P2-15): PWMGen #0, pin Out0 (PWM or Up) (Output) [ 2397.994746] hm2/hm2_5i20.0: IO Pin 008 (P2-17): PWMGen #1, pin Out1 (Dir or Down) (Output) [ 2397.994750] hm2/hm2_5i20.0: IO Pin 009 (P2-19): PWMGen #0, pin Out1 (Dir


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 5i20.ini attached File Attachment: File Name: 5i20.ini File Size: 3643

http://www.linuxcnc.org/images/fbfiles/files/5i20.ini


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 bldc_sine.hal attached File Attachment: File Name: bldc_sine-15f4a3c2d8ba470dbe63137d5f032349.hal File Size: 1508

http://www.linuxcnc.org/images/fbfiles/files/bldc_sine-15f4a3c2d8ba470dbe63137d5f032349.hal


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- There are two ways to pass a configuration string to the hm2_7i43 or hm2_pci driver. Most of the example configs have the string in the INI file and the hal file reads it from there. My config file is a hand-built one and I don't tend to bother with reading _anything_ from the INI file into the hal file. You probably need to decide which way you want to go, and be consistent. Settings only get transferred from INI to HAL by use of the [STANZA](setting) format. There is no other linkage between them other than that EMC2 reads the INI file to get the names of the HAL files it needs to run at startup.

b]nikos.chalikias wrote:[/b] Probably is default driver for hm2_pciI don't think there is a default firmware, but I could be wrong. First PWM OUT should be to PINS 19,43 of P2 connector, using different names. 5i20.ini and bldc_sine.hal seem correct (..to me) and they are in the right place. ...attached in next 2 messages I can not find where SVST8_4.BIT and svtp4_7i39.bit are located. I guess they are to root somewhere...It does seem that the wrong .BIT file is being loaded into the driver. This is the reason that the pin names (and functions) on the connector are wrong.

You can see what actual BIT files you have available in /lib/firmware/hm2/ You need to choose one which is in the lib/firmware/5i20 directory and has a name which includes "tp", possibly tpen6_6.pin

My hal files were set up to use experimental bit files. I don't know what files (if any) are in the current firmware collection. You might need to get a firmware update (sudo apt-get update hostmot2-firmware ) or direct download from emergent.unpy.net/01267622561

I do notice that the hal file name specified in your INI file is not the same as the name of the file you have posted. Those definitely need to match.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 I found TPEN6_6.BIN inside /lib/firmware/hm2/5i20 Is this a BLDC driver? Should I used it instead svtp4_7i39.bit is it sinus or hall commutation?


Moderator Posts: 2638 User Online Now Click here to see the profile of this user


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- Yes, that is the right driver. It supports 6 encoders and 6 3-phase PWM generators. You should definitely use it instead of svtp4_7i49.bit as I think that svtp4_7i30.bit only exists on about 2 hard-drives in the world, and yours is not one of them.

The distinction between Hall and Sinusoidal commutation depends only on the HAL component used (bld3_hall3 or bldc_sine). The Hostmot2 driver simply takes 3 three-phase amplitudes and converts them to phase-locked PWM values on the connector pins.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 TPEN6_6.BIN is loaded.

from dmseg output File Attachment: File Name: dmesg_output2.txt File Size: 5734

seems that 5i20 is configured to drive BLDC driver-card. but pin-out does not match to 7i39! It needs an extra interface board, just to match the 5i20-7i39 pins all pwm signals are to P2 , all encoders to P4.

I found that TPEN6_6.XML controls the pin-out. I could edit this file and place the pins in the right places. Is this OK to do? Are there any rules to follow in the editing of this XML? but Why are the pins put in this order? Is there a good reason? The person who made all this development, must had something in mind! What was that?

http://www.linuxcnc.org/images/fbfiles/files/dmesg_output2.txt


Moderator Posts: 2638 User Online Now Click here to see the profile of this user


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: pin-out does not match to 7i39! You appear to be correct, which is somewhat unfortunate.

I could edit this file and place the pins in the right placesIt won't help, as you need to re-compile the firmware to change the pin allocations, and that requires software tools that you won't have.

I have sent a query to the developers list about the matter. It is also possible that Mesa have the correct firmware but it has not made it into the EMC2 repository yet.

In either case, it probably makes sense to wait for a software solution (which I expect to take no more than a day or two) than to make a breakout board.


Moderator Posts: 843 User Online Now Click here to see the profile of this user


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 81 Karma+ Karma- Yes, there is no 5i20 three phase PWM config that matches the 7I39 (it would have a 7I39 in its name) I'll build one sometime today when I get a chance.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 81 Karma+ Karma- filebin.ca/oscqdm has bit and .pin files for a 5I20 supporting up to 3 7I39s

http://filebin.ca/oscqdm


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 I had a short eye on svtp6_7i39.pin

As appear on Mesa7i39 ---> As appear on svtp6_7i39.pin

A pins 1,3,5 and 25,27,29 ENCODER LINES ---> ENCODER

B pins 7,9,11 and 31,33,35 HALL LINES ----> NO-FUNCTION

C pins 13,15 and 37,39 SENSE LINES ----> NO-FUNCTION, TPPWM, NO-FUNCTION, TPPWM

D pins 17 and 41 ENABLE LINES -----> TPPMW, TPPMW

E pins 19,21,23 and 43,45,47 PWM LINES -----> ALL TPPWM

A and E appear correct B. no HALL lines? C. 13,37 SENSE not used? 15,39 SENSE replaced by PWM? D. ENABLE inputs replaced by PWM?


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: A Pins 1,3,5 and 25,27,29 ENCODER LINES ---> ENCODER As expected B pins 7,9,11 and 31,33,35 HALL LINES ----> NO-FUNCTION Any pin with no special function becomes a GPIO (general purpose input / output) line. That means that you can read the values from the Hall sensor in HAL if you want to, or you can not bother if you are not using Hall sensors. The 7i39 has on-board Hall sensor inputs which are conditioned to suit the 5i20 inputs. C pins 13,15 and 37,39 SENSE LINES ----> NO-FUNCTION, TPPWM, NO-FUNCTION, TPPWM Pins 13 and 37 are SenseA for the two drivers, I am not sure what they do. 15 and 39 are fault status from the 7i39 SenseB output, and disable the PWM generator if the 7i39 detects a fault. D pins 17 and 41 ENABLE LINES -----> TPPMW, TPPMWThe Enable line from the 5i20 to the 7i39. The HAL file should connect this to Axis.N.amp-enable, you should be able to see this link in the HAL files I published. E pins 19,21,23 and 43,45,47 PWM LINES -----> ALL TPPWM And these are the three PWM outputs which actually drive the motors.


A and E appear correct B. no HALL lines? C. 13,37 SENSE not used? 15,39 SENSE replaced by PWM? D. ENABLE inputs replaced by PWM?

I think you are failing to read the "Pin Func" column of the PIN file. Everything looks right to me. If you specify 3 x 3ppwm and 3 x encoder in the config string then you will find that all of P2 and half of P3 are dedicated to 7i39 functions, and half of P3 and all of P4 are GPIO pins. (you can either ignore the GPIO pins on P3 or split the ribbon cable in half, with one half going to a 7i39 50-way plug and the other to other hardware.)

It all looks good to me.


Re:Mesa 7i39+5i20 1 Year, 8 Months ago Karma: 0 Thanks again for help.

I will configure for 2 7i39 cards ( 4 motors) and I will use the 3d 50pin connector for all the control l/O lines.

In final version I will go with 6 motors And I will use second AnyI/O card for the control


Re:Mesa 7i39+5i20 1 Year, 7 Months ago Karma: 0 Hello,

After some busy time, I am back to complete the 5i20-7i39 setup

After having EMC2.5 installed, updated .ini and hal, I connected one BLDC motor with encoder to axis-X I had below:

- I could start EMC2.5 and from dmseg I could see that 5i20 pin-out was configured correct. - After exit EMC2.5 I could not start again EMC2.5 or EMC2.4. Only possible after reboot. - Encoder was working. If I move the motor by hand I could see the X value change.\ - Not possible to move X from manual-mode ---> ERROR - Immediately after release of E-STOP(and before ENABLE), motor moves some degrees and then back exactly to initial position. Something like position-initialization, but at the wrong time!

Then I thought I should update .ini file, I changed:

MACHINE = HM2-bldc LINEAR_UNITS = milimiters DEFAULT_VELOCITY = 20 MAX_VELOCITY = 100 DEFAULT_ACCELERATION = 20 MAX_ACCELERATION = 30 [AXIS_0] MAX_VELOCITY = 100 MAX_ACCELERATION = 30 DEADBAND = 1

Now: - EMC2.5 does not start even after reboot! - EMC2.4 does not start if EMC2.5 was tried to start

I think I have somehow, to unload EMC2.5 from memory...

Please Help

Nikos Chalikias


Re:Mesa 7i39+5i20 1 Year, 7 Months ago Karma: 0 Additionally: it is the EMC2.5 with BLDC configuration that does not start and blocks EMC2.4 to start EMC2.5 with SERVO configuration is OK


Moderator Posts: 843 User Online Now Click here to see the profile of this user


Re:Mesa 7i39+5i20 1 Year, 7 Months ago Karma: 81 Karma+ Karma- I think this will need Andy Pughs help to figure out, though I'm pretty sure he has an update to the BLDC driver that addresses some of these issues.

The initial motor movement is expected (this is one method of rotor position determination )


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- Sorry for the delay, I have been on a yacht and internet-free for the last week.

Can you post the last dozen or so lines from dmesg after the failed launch? That should give some clues what the problem is.

It might be best to put both the INI and HAL files on www.pastebin.ca so we can try to reproduce the issue.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 Hello,

Thanks for help!

below are dmseg, ini, hal.

pastebin.ca/2018749 pastebin.ca/2018753 pastebin.ca/2018754

Now I use the ini file that runs OK after boot, but not second time. In this single time EMC2.5 runs: Encoder works, Initialized Rotor after E-stop, Try to Jog --> ERROR.

Nikos Chalikias

http://pastebin.ca/2018749 http://pastebin.ca/2018753 http://pastebin.ca/2018754


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- Ah, yes, I think this was my fault, and should be fixed if you get the latest version of 2.5. It is the bug fixed by this commit git.linuxcnc.org/gitweb?p=emc2.git;a=com...0b213dc07a62d8b1513e

http://git.linuxcnc.org/gitweb?p=emc2.git;a=commit;h=176d285a38d5a1f6be040b213dc07a62d8b1513e


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 Hello,

Today I installed latest EMC2.5 using git. I renamed emc2-dev and $ git clone git://git.linuxcnc.org/git/emc2.git emc2-dev from emc2-dev $ cd src $ ./autogen.sh $ ./configure $ make $ make install-menus $ sudo make setuid

Now seems to be one step BACK!!!

EMC does not start. dmseg output attached.

Please Advise,

Regards, Nikos File Attachment: File Name: dmseg_20110105.txt File Size: 1511

http://www.linuxcnc.org/images/fbfiles/files/dmseg_20110105.txt


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- That certainly does not look right.

How are you starting emc2? I wonder if you have both the dev version and the released version installed at the same time.

In the terminal, try this:

. ./emc2-dev/scripts/emc-environment emc

(That is dot space dot slash in the fist line) That should explicitly run the dev version.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- Looking back through the thread I think we have already been through that last suggestion.

That dmesg excerpt is a bit short, it would be useful to go back to the point where EMC2 starts up.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- When I'm having problems I clear the dmesg then attempt to run EMC then the dmesg output will be only for that try.

www.linuxcnc.org/docview/html/common_Linux_FAQ.html#r1_6_6

John

http://www.linuxcnc.org/docview/html/common_Linux_FAQ.html#r1_6_6


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 I can not clear dmseg.

I have attached complete dmseg File Attachment: File Name: dmseg_20110105-20c3633c5f69bbcb6fd7e9112c3842f5.txt File Size: 28784

http://www.linuxcnc.org/images/fbfiles/files/dmseg_20110105-20c3633c5f69bbcb6fd7e9112c3842f5.txt


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 I cleaned dmesg and tried to run EMC2.5 result dmesg attached File Attachment: File Name: dmseg_20110105_2.txt File Size: 1383

http://www.linuxcnc.org/images/fbfiles/files/dmseg_20110105_2.txt


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 this is how I call emc2.5

/home/nikos/emc2-dev/scripts/emc '/home/nikos/emc2/configs/hm2-bldc/5i20.ini'


Junior Boarder Posts: 37 User Online Now Click here to see the profile of this user

Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 In the terminal, try this:

. ./emc2-dev/scripts/emc-environment emc


attached file is the response File Attachment: File Name: terminal.txt File Size: 1748

http://www.linuxcnc.org/images/fbfiles/files/terminal.txt


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- It _looks_ like you missed the sudo make setuid stage of the compile. You will need to type the root password after that command.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 YES, YOU ARE RIGHT

I forgot it was sudo.... and asking the password!!!!!! I did not enter the password. I was running too fast... Sorry for the trouble.

I can start EMC2.5 now

I can also close it and run it again, so the restart problem is now fixed.

Thanks Nikos


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- Glad to hear it.

The next few days should see the release of a new "bldc" component into the development branch that combines the functions of bldc_sine and bldc_hall into one much more capable component (it will, for example, start a motor with hall sensors and an encoder in hall/trapezoidal commutation then switch to sinusoidal commutation once it has an angle fix from a Hall transition or (optionally) from the encoder index.

It has been extensively tested with the 7i39.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 Good news, the new BLDC component.

I am wondering how to combine BLDC, step-motor and DC-motor in the same machine.

The Machine under construction is a Pick-Place.

- X,Y are NEMA23 BLDC to be fast and presise. - The head (Z is included in the head) should be DC motor (weight 20 gram) and linear encoder, due to low mass of the motor, low cost and good speed - The rotation of the component (axis A) is included in the Z plate. It should turn very presisely and be very light. Best approach (...found yet) is a small Step-motor (60grams -2oz with 200 steps/rot) and microstep driver.

I could use CPU-CONTROLED DC-SERVO-BOARD and STEP-DRIVER-BOARD and EMC2 to see only a digital line for each board, but this is not ...so smart! 5i20 with BLDC,DC,STEP boards is better

Any Idea?

Nikos


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: - The head (Z is included in the head) should be DC motor (weight 20 gram) and linear encoder, due to low mass of the motor, low cost and good speed

I think a small brushless motor might work better, it should certainly last longer.

The rotation of the component (axis A) is included in the Z plate. It should turn very presisely and be very light. Best approach (...found yet) is a small Step-motor (60grams -2oz with 200 steps/rot) and microstep driver.

A stepper motor is probably a good solution, but there is no reason that a brushless motor with an encoder couldn't work equally well, and might be faster.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 Now that it is possible to restart EMC2.5 I am trying to move one BLDC motor

- Encoder works - BLDC Initialization after ESTOP released works - After many times ESTOP press-release-cycles, DRO always returns to the same point but not exactly at zero - If EMC2.5 is closed and restarted then the above position is slightly different - ***** JOG works only for few milliliters (2-5mm) then: [joint 0 following error] ******* - If ESTOP pressed and released again then JOG is possible for the same distance as above - Starting EMC2.5 sometimes starts at X=0, Y=0, sometimes at X=1056 or X=-1056. With current configuration starts at 0,0

Encoder is 500 cpr one rotation moves the carriage 32.512mm Motor is BLDC NEMA23 at 24V


bldc_sine.hal, I am using is attached (Encoder and PID configured there!) File Attachment: File Name: bldc_sine-97a6f56c7c726d9318d85f1231dfe43c.hal File Size: 2084

http://www.linuxcnc.org/images/fbfiles/files/bldc_sine-97a6f56c7c726d9318d85f1231dfe43c.hal


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: Now that it is possible to restart EMC2.5 I am trying to move one BLDC motor Encoder is 500 cpr

You have bldc_sine.0.scale as 2000. That is very unlikely to be right with a 500cpr encoder.

Do you know how many poles your motor has? If you apply a very small current to the motor between any two phases you should be able to feel them, normally 2, 3 or 4 "pulses" will be felt turning the motor by hand for 4, 6 or 8 motor poles.

By how much does rawcounts increase with one full revolution of the motor?

The bldc_sine.0.scale value needs to be one full revolutions-worth of rawcounts divided by the number of motor poles. (the scale is how many counts there are per _electrical_ revolution)

Bear in mind that bldc_sine has not been released, and in fact is never going to be released, it has been replaced by a much more capable .comp called simply "bldc" which handles all motor types. This component uses a different way to define the scale, as I realised that 6 pole motors were impossible to give an accurate enough scale to.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 What is rawcounts?


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 Motor has 4 poles (I felt 2 attraction points in one rotation applying a current between 2 phases) Encoder is 500cpr so the rawcount should be 2000 (?) so setp bldc-sine.0.scale =500

But still not working.

Also tested 4 8 10 16 32 32.250 32.512 33 62.5 64 83.333 100 128 125 250 333.333 500 1000 2000 with similar result.

Values around 32, additionally create a crazy movement after a try to JOG All other values allow only some mm to JOG, then [joint 0 following error]

IF YOU HAVE STOPPED DEVELOPING bldc_sine Is it good idea that I continue trying with your new component "bldc" ????


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 I have to admit I was disappointed.

I read carefully www.linuxcnc.org/docview/devel/html//man/man9/bldc_sine.9.html I tested negative value 1000 as setp bldc-sine.0.scale -1000

And now it works. I can move with 48000 mm / min (48m/min) or 800mm/sec !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! very smooth and quiet


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- Ah, yes, of course, I should have thought of that myself


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: IF YOU HAVE STOPPED DEVELOPING bldc_sine Is it good idea that I continue trying with your new component "bldc" ????

Possibly, yes. It would be a good idea to switch over if your motor has Hall sensors, as the new component can start in Hall mode, and then switch to sinusoidal mode as soon as it has an angle fix. This removes the need for the "init" pin and is likely to work a lot better with stiff/heavy axes.

I am hoping to submit the driver to the project today, but if you want to try it out, I have attached it.

If you load it with Code: loadrt bldc cfg=q in the hal file then you should get something which looks exactly like bldc_sine (with a couple more pins) if you load it with Code: loadrt bldc cfg=qh,qh then you will get two of them with extra pins for hall-sensor startup.

You will need to comp --install the new component, but it can co-exist in the system with bldc_sine and bldc_hall3.

man bldc should give you more information once it is installed. I would welcome any feedback or bug reports. File Attachment: File Name: bldc.comp File Size: 36999

http://www.linuxcnc.org/images/fbfiles/files/bldc.comp


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 "I am hoping to submit the driver to the project today"

Does this mean that with: git pull I will get new EMC2.5 source including your new bldc component? If YES, then I will wait for it, while fine-tuning my PID.


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- Until Andy gets it into master you can just copy the comp to the same directory as the rest of the comps and build EMC2.

John


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 "Until Andy gets it into master you can just copy the comp to the same directory as the rest of the comps and build EM"

I have placed bldc.comp to ~/emc2-dev/src/hal/components

then I compiled emc2.5 as below ./autogen.sh ./confugure make make install-menus sudo make setuid WAS THIS NEEDED?


with reference to wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HowToWriteNewHalComponent

from ~/emc2-dev/src/hal/components "sudo comp --install bldc.comp"

seems that worked but there are warnings I have attached the response IS IT OK?


File Attachment: File Name: install_comp_bldc.txt File Size: 1537

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HowToWriteNewHalComponent http://www.linuxcnc.org/images/fbfiles/files/install_comp_bldc.txt


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 documentation at wiki.linuxcnc.org/cgi-bin/emcinfo.pl?BLDC

seems to end ... at === Input Options=== Is there more documentation to come?

what is the meaning of qH or a6? what are the other options ?

Nikos

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?BLDC


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: I have placed bldc.comp to ~/emc2-dev/src/hal/components then I compiled emc2.5 as belowRather embarasssingly I found out yesterday that changes I had made to get the 8i20 to reverse properly had left the 7i39 not reversing at all (reversing the phase angle and the current == no change)

The fixed version should be available here: news.gmane.org/gmane.linux.distributions.emc.devel


./autogen.sh ./confugure make make install-menus sudo make setuid WAS THIS NEEDED? No, you should just need "make" for a new realtime component


"sudo comp --install bldc.comp" That also works (and is the only way to do it if you don't have the full source tree)

seems that worked but there are warningsI think you can ignore those, I get them too and it all works.

http://news.gmane.org/gmane.linux.distributions.emc.devel


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 0 The fixed version should be available here: news.gmane.org/gmane.linux.distributions.emc.devel


From above I downloaded 3964-001.bin I can read it with gedit, but I do NOT know what to do with it. It is a patch? I do not know to use it

Nikos


Re:Mesa 7i39+5i20 1 Year, 6 Months ago Karma: 103 Karma+ Karma- I don't know why it has that name. very odd.

Rename it to bldc.comp and I think it ought to work. Sorry that this is turning out so difficult.


New version of Driver


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 0 Hi,

After some months of normal working with 2.5.0 pre 2-525 and bldc-sine, I have problems again Without changing anything, emc2 does not start. I might be that bldc-sine should be replaced with bldc

Then I thought it was good idea to do some emc2 update. From Synaptic I did emc2 update now I have vesion 2.5.0 pre 2-626 instead 525 before. Nothing changed

Below is the error log

Please advise Nikos


Print file information:
RUN_IN_PLACE=no
EMC2_DIR=
EMC2_BIN_DIR=/usr/bin
EMC2_TCL_DIR=/usr/lib/tcltk/emc2
EMC2_SCRIPT_DIR=
EMC2_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
EMC2_CONFIG_DIR=
EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
EMC2_EMCSH=/usr/bin/wish8.5
EMC2 - 2.5.0-pre2-626-g402b6cd
Machine configuration directory is '/home/nikos/emc2/configs/hm2-bldc'
Machine configuration file is '5i20.ini'
INIFILE=/home/nikos/emc2/configs/hm2-bldc/5i20.ini
PARAMETER_FILE=hm2-servo.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
HALUI=halui
DISPLAY=axis
NML_FILE=
Starting EMC2...
Starting EMC2 server program: emcsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting EMC2 IO program: io
Starting HAL User Interface program: halui
Shutting down and cleaning up EMC2...
Killing task emcsvr, PID=7944
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done
Debug file information:
/home/nikos/emc2/configs/hm2-bldc/bldc_sine.hal:15: Can't find module 'bldc_sine' in /usr/realtime-2.6.32-122-rtai/modules/emc2
7944
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 4918.639769] I-pipe: Domain RTAI registered.
[ 4918.639777] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 4918.639780] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 4918.639816] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 4918.639819] PIPELINE layers:
[ 4918.639822] fc3f5e20 9ac15d93 RTAI 200
[ 4918.639825] c085cb20 0 Linux 100
[ 4918.661816] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 4918.662022] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 4918.662029] RTAI[sched]: hard timer type/freq = APIC/12500408(Hz); default timing: periodic; linear timed lists.
[ 4918.662033] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1799670000 hz.
[ 4918.662037] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 4918.662195] RTAI[usi]: enabled.
[ 4918.708257] RTAI[math]: loaded.
[ 4918.787559] hm2: loading Mesa HostMot2 driver version 0.15
[ 4918.791824] hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
[ 4918.791858] hm2_pci: discovered 5i20 at 0000:03:02.0
[ 4918.792031] hm2_5i20.0: firmware: requesting hm2/5i20/svtp6_7i39.bit
[ 4918.940312] hm2/hm2_5i20.0: 72 I/O Pins used:
[ 4918.940318] hm2/hm2_5i20.0: IO Pin 000 (P2-01): Encoder #0, pin A (Input)
[ 4918.940322] hm2/hm2_5i20.0: IO Pin 001 (P2-03): Encoder #0, pin B (Input)
[ 4918.940326] hm2/hm2_5i20.0: IO Pin 002 (P2-05): Encoder #0, pin Index (Input)
[ 4918.940329] hm2/hm2_5i20.0: IO Pin 003 (P2-07): IOPort
[ 4918.940332] hm2/hm2_5i20.0: IO Pin 004 (P2-09): IOPort
[ 4918.940335] hm2/hm2_5i20.0: IO Pin 005 (P2-11): IOPort
[ 4918.940338] hm2/hm2_5i20.0: IO Pin 006 (P2-13): IOPort
[ 4918.940342] hm2/hm2_5i20.0: IO Pin 007 (P2-15): ThreePhasePWM #0, pin Fault (Input)
[ 4918.940345] hm2/hm2_5i20.0: IO Pin 008 (P2-17): ThreePhasePWM #0, pin Enable (Output)
[ 4918.940349] hm2/hm2_5i20.0: IO Pin 009 (P2-19): ThreePhasePWM #0, pin PWM A (Output)
[ 4918.940353] hm2/hm2_5i20.0: IO Pin 010 (P2-21): ThreePhasePWM #0, pin PWM B (Output)
[ 4918.940356] hm2/hm2_5i20.0: IO Pin 011 (P2-23): ThreePhasePWM #0, pin PWM C (Output)
[ 4918.940360] hm2/hm2_5i20.0: IO Pin 012 (P2-25): Encoder #1, pin A (Input)
[ 4918.940364] hm2/hm2_5i20.0: IO Pin 013 (P2-27): Encoder #1, pin B (Input)
[ 4918.940367] hm2/hm2_5i20.0: IO Pin 014 (P2-29): Encoder #1, pin Index (Input)
[ 4918.940370] hm2/hm2_5i20.0: IO Pin 015 (P2-31): IOPort
[ 4918.940373] hm2/hm2_5i20.0: IO Pin 016 (P2-33): IOPort
[ 4918.940376] hm2/hm2_5i20.0: IO Pin 017 (P2-35): IOPort
[ 4918.940379] hm2/hm2_5i20.0: IO Pin 018 (P2-37): IOPort
[ 4918.940382] hm2/hm2_5i20.0: IO Pin 019 (P2-39): ThreePhasePWM #1, pin Fault (Input)
[ 4918.940386] hm2/hm2_5i20.0: IO Pin 020 (P2-41): ThreePhasePWM #1, pin Enable (Output)
[ 4918.940390] hm2/hm2_5i20.0: IO Pin 021 (P2-43): ThreePhasePWM #1, pin PWM A (Output)
[ 4918.940394] hm2/hm2_5i20.0: IO Pin 022 (P2-45): ThreePhasePWM #1, pin PWM B (Output)
[ 4918.940397] hm2/hm2_5i20.0: IO Pin 023 (P2-47): ThreePhasePWM #1, pin PWM C (Output)
[ 4918.940401] hm2/hm2_5i20.0: IO Pin 024 (P3-01): Encoder #2, pin A (Input)
[ 4918.940404] hm2/hm2_5i20.0: IO Pin 025 (P3-03): Encoder #2, pin B (Input)
[ 4918.940408] hm2/hm2_5i20.0: IO Pin 026 (P3-05): Encoder #2, pin Index (Input)
[ 4918.940411] hm2/hm2_5i20.0: IO Pin 027 (P3-07): IOPort
[ 4918.940414] hm2/hm2_5i20.0: IO Pin 028 (P3-09): IOPort
[ 4918.940417] hm2/hm2_5i20.0: IO Pin 029 (P3-11): IOPort
[ 4918.940420] hm2/hm2_5i20.0: IO Pin 030 (P3-13): IOPort
[ 4918.940423] hm2/hm2_5i20.0: IO Pin 031 (P3-15): ThreePhasePWM #2, pin Fault (Input)
[ 4918.940427] hm2/hm2_5i20.0: IO Pin 032 (P3-17): ThreePhasePWM #2, pin Enable (Output)
[ 4918.940431] hm2/hm2_5i20.0: IO Pin 033 (P3-19): ThreePhasePWM #2, pin PWM A (Output)
[ 4918.940434] hm2/hm2_5i20.0: IO Pin 034 (P3-21): ThreePhasePWM #2, pin PWM B (Output)
[ 4918.940438] hm2/hm2_5i20.0: IO Pin 035 (P3-23): ThreePhasePWM #2, pin PWM C (Output)
[ 4918.940442] hm2/hm2_5i20.0: IO Pin 036 (P3-25): Encoder #3, pin A (Input)
[ 4918.940445] hm2/hm2_5i20.0: IO Pin 037 (P3-27): Encoder #3, pin B (Input)
[ 4918.940449] hm2/hm2_5i20.0: IO Pin 038 (P3-29): Encoder #3, pin Index (Input)
[ 4918.940452] hm2/hm2_5i20.0: IO Pin 039 (P3-31): IOPort
[ 4918.940455] hm2/hm2_5i20.0: IO Pin 040 (P3-33): IOPort
[ 4918.940458] hm2/hm2_5i20.0: IO Pin 041 (P3-35): IOPort
[ 4918.940461] hm2/hm2_5i20.0: IO Pin 042 (P3-37): IOPort
[ 4918.940464] hm2/hm2_5i20.0: IO Pin 043 (P3-39): IOPort
[ 4918.940467] hm2/hm2_5i20.0: IO Pin 044 (P3-41): IOPort
[ 4918.940469] hm2/hm2_5i20.0: IO Pin 045 (P3-43): IOPort
[ 4918.940472] hm2/hm2_5i20.0: IO Pin 046 (P3-45): IOPort
[ 4918.940475] hm2/hm2_5i20.0: IO Pin 047 (P3-47): IOPort
[ 4918.940478] hm2/hm2_5i20.0: IO Pin 048 (P4-01): Encoder #4, pin A (Input)
[ 4918.940482] hm2/hm2_5i20.0: IO Pin 049 (P4-03): Encoder #4, pin B (Input)
[ 4918.940485] hm2/hm2_5i20.0: IO Pin 050 (P4-05): Encoder #4, pin Index (Input)
[ 4918.940489] hm2/hm2_5i20.0: IO Pin 051 (P4-07): IOPort
[ 4918.940492] hm2/hm2_5i20.0: IO Pin 052 (P4-09): IOPort
[ 4918.940494] hm2/hm2_5i20.0: IO Pin 053 (P4-11): IOPort
[ 4918.940497] hm2/hm2_5i20.0: IO Pin 054 (P4-13): IOPort
[ 4918.940500] hm2/hm2_5i20.0: IO Pin 055 (P4-15): IOPort
[ 4918.940503] hm2/hm2_5i20.0: IO Pin 056 (P4-17): IOPort
[ 4918.940506] hm2/hm2_5i20.0: IO Pin 057 (P4-19): IOPort
[ 4918.940509] hm2/hm2_5i20.0: IO Pin 058 (P4-21): IOPort
[ 4918.940512] hm2/hm2_5i20.0: IO Pin 059 (P4-23): IOPort
[ 4918.940515] hm2/hm2_5i20.0: IO Pin 060 (P4-25): Encoder #5, pin A (Input)
[ 4918.940520] hm2/hm2_5i20.0: IO Pin 061 (P4-27): Encoder #5, pin B (Input)
[ 4918.940539] hm2/hm2_5i20.0: IO Pin 062 (P4-29): Encoder #5, pin Index (Input)
[ 4918.940543] hm2/hm2_5i20.0: IO Pin 063 (P4-31): IOPort
[ 4918.940546] hm2/hm2_5i20.0: IO Pin 064 (P4-33): IOPort
[ 4918.940549] hm2/hm2_5i20.0: IO Pin 065 (P4-35): IOPort
[ 4918.940553] hm2/hm2_5i20.0: IO Pin 066 (P4-37): IOPort
[ 4918.940556] hm2/hm2_5i20.0: IO Pin 067 (P4-39): IOPort
[ 4918.940559] hm2/hm2_5i20.0: IO Pin 068 (P4-41): IOPort
[ 4918.940563] hm2/hm2_5i20.0: IO Pin 069 (P4-43): IOPort
[ 4918.940566] hm2/hm2_5i20.0: IO Pin 070 (P4-45): IOPort
[ 4918.940569] hm2/hm2_5i20.0: IO Pin 071 (P4-47): IOPort
[ 4918.940658] hm2/hm2_5i20.0: registered
[ 4918.940662] hm2_5i20.0: initialized AnyIO board at 0000:03:02.0
[ 4919.237564] hm2_5i20.0: dropping AnyIO board at 0000:03:02.0
[ 4919.237569] hm2/hm2_5i20.0: unregistered
[ 4919.237674] hm2_pci: driver unloaded
[ 4919.240561] hm2: unloading
[ 4919.280809] RTAI[math]: unloaded.
[ 4919.318332] SCHED releases registered named ALIEN RTGLBH
[ 4919.352449] RTAI[malloc]: unloaded.
[ 4919.448156] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 4919.450947] I-pipe: Domain RTAI unregistered.
[ 4919.450991] RTAI[hal]: unmounted.


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: I might be that bldc-sine should be replaced with bldc /home/nikos/emc2/configs/hm2-bldc/bldc_sine.hal:15: Can't find module 'bldc_sine' in /usr/realtime-2.6.32-122-rtai/modules/emc2.

Exactly right, bldc_sine no longer exists. Edit your HAL file to load bldc instead, and change all the corresponding lines in the HAL and it might start working again.

bldc_sine and bldc_hall were replaced by a single component that performs both functions (and more)


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 0 I have already tried this, but after your suggestion I did it all over again I still have errors

bldc.hal attached File Attachment: File Name: bldc.hal File Size: 5744

http://www.linuxcnc.org/images/fbfiles/files/bldc.hal


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: I still have errors

You need to change the loadtrt options too, count=3 isn't the way, you need to configure them to suit your hardware.

I guess from your HAL file that you are using encoders only (no Hall sensors) so you will need loadrt bldc cfg=q,q,q


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 0 situation is improved but still some changes needed

I had to make comment #setp bldc.0.dir -1

then emc2 started

I changed as below. (I do have both encoder and Hall-Sensors) loadrt bldc cfg=q,q,q

  1. loadrt bldc cfg=qhi,qhi,qhi
  2. loadrt bldc cfg=qi,qi,qi
  3. loadrt bldc cfg=qH,a6
  4. loadrt bldc count=3

loadrt pid num_chan=3

Initialization of the motor position is done as expected but I have Join following error when I try to move

bldc.hal attached again File Attachment: File Name: bldc-9a43288f20b29ac32fe32a5f7d693f38.hal File Size: 5958

http://www.linuxcnc.org/images/fbfiles/files/bldc-9a43288f20b29ac32fe32a5f7d693f38.hal


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: (I do have both encoder and Hall-Sensors) In that case you probably want to use "qh" mode, and then you can skip the alignment step. That does require you to find the correct Hall pattern.

Initialization of the motor position is done as expected but I have Join following error when I try to move

Do the motors move, and do they move in the right direction?

The fact that you had dir -1 before (but deleted it) makes me suspect that you need to reverse the motor rotation sense. Making the encoder scale negative is one way to do that.


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 0

Do the motors move, and do they move in the right direction?

emc2 starts first time F1-->initialize correctly F2---> Joint error F2 again---> joint error when try to move with arrow-key direction is inversed!! No stability, can not check precisely, motor starts very easily to oscilate changing encoder polarity does not affect direction!!!


Re:Mesa 7i39+5i20 4 Months, 4 Weeks ago Karma: 103 Karma+ Karma- nikos.chalikias wrote: changing encoder polarity does not affect direction!!!

Ah, OK.

Put the encoder back then, and reverse the bldc like you had before.

The pin is now called bldc.N.rev, rather than ..dir.

(You could have figured this out by reading the documentation). www.linuxcnc.org/docview/2.5/html/man/man9/bldc.9.html


Related links