Mesa 7i39+5i20

More
10 Feb 2012 10:48 #17544 by nikos.chalikias
Replied by nikos.chalikias on topic Re:Mesa 7i39+5i20
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.

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

More
10 Feb 2012 11:21 #17545 by andypugh
Replied by andypugh on topic Re:Mesa 7i39+5i20
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)

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

More
10 Feb 2012 12:57 #17550 by nikos.chalikias
Replied by nikos.chalikias on topic Re:Mesa 7i39+5i20
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:6 KB
Attachments:

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

More
10 Feb 2012 13:24 #17551 by andypugh
Replied by andypugh on topic Re:Mesa 7i39+5i20
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

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

More
10 Feb 2012 13:45 #17555 by nikos.chalikias
Replied by nikos.chalikias on topic Re:Mesa 7i39+5i20
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
#loadrt bldc cfg=qhi,qhi,qhi
#loadrt bldc cfg=qi,qi,qi
#loadrt bldc cfg=qH,a6
#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-9a432...3f38.hal
File Size:6 KB
Attachments:

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

More
10 Feb 2012 14:04 - 10 Feb 2012 14:05 #17559 by andypugh
Replied by andypugh on topic Re:Mesa 7i39+5i20
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.
Last edit: 10 Feb 2012 14:05 by andypugh.

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

More
10 Feb 2012 14:24 #17562 by nikos.chalikias
Replied by nikos.chalikias on topic Re:Mesa 7i39+5i20

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!!!

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

More
10 Feb 2012 15:27 #17564 by andypugh
Replied by andypugh on topic Re:Mesa 7i39+5i20
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

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

Moderators: PCWjmelson
Time to create page: 0.244 seconds
Powered by Kunena Forum