Encoder wiring - Mesa 7i33

More
23 Mar 2011 22:02 #8034 by Fordperf393W
John, I found the folder with the .ini file named m5i20.ini, however i cannot find the line you reference to edit. i added a 3rd axis in the trajectory section and added [AXIS_03]. The line shows up in the interface but doesn't count with an encoder connected.

Also, for the time being i would just like to use the software as a readout while i source servos. Can i zero out all the axes once i manually find my 'zero'

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

More
23 Mar 2011 22:16 #8035 by andypugh
What is the full path of the INI file you found?

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

More
23 Mar 2011 23:29 #8038 by Fordperf393W
home/enc2/configs/m5i20/m5i20.ini

I did find the line in h2m-servo/5i20.ini. i edited it and ran that sample file with no luck either.

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

More
24 Mar 2011 01:31 #8039 by PCW
Replied by PCW on topic Re:Encoder wiring - Mesa 7i33
no luck meaning EMC didnt start or ?

Nothing will happen with the new encoder/PWM/stepgens unless you edit the matching HAL file (the new pins will be there, but nothing in the example HAL file connects to them)

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

More
24 Mar 2011 11:50 #8045 by andypugh
Fordperf393W wrote:

home/enc2/configs/m5i20/m5i20.ini.


Is that the configuration you are starting EMC2 with?

Normally the config would be named after your machine (I have configs/lathe, configs/millXYZ, configs/millXYZA )

What do you want to do with the extra encoder?

The INI file by itself does very little, it is just a central place for data and setting to be stored. For example the config line you are editing is used by a line in the HAL file which says something like:
loadrt hm2_pci config=[SECTION OF INI FILE]setting in ini file

All the "magic" happens in the HAL files. Those load various realtime modules and link the signals between them. It is very likely that you now do have 4 encoders, but that one of them isn't sending data anywhere.

In the Axis GUI you can look in "Machine" -> "Show HAL config" and you will probably see that you have a pin called hm2_5i20.0.encoder.03.value that changes when you turn the encoder. It just isn't linked to anything. (Hal modules count from zero, so 03 is the fourth)

This section of the documentation is well worth reading: linuxcnc.org/docs/html/hal_basic_hal.html

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

More
24 Mar 2011 14:33 #8050 by BigJohnT
Fordperf393W wrote:

home/enc2/configs/m5i20/m5i20.ini

I did find the line in h2m-servo/5i20.ini. i edited it and ran that sample file with no luck either.


In the unmodified 5i20.ini file is it line 5
CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=3 num_pwmgens=3 num_stepgens=0"

John

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

More
24 Mar 2011 23:30 #8059 by Fordperf393W
i see the encoder counts in the hal config. i changed the config line in the ini. when i tried added the axis in the hal and ini file, following the syntax of the other axes, emc kicked it back with an error.

the 4th axis is for the quill. at the moment i am using the machine for manual operation. no servos installed.

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

More
25 Mar 2011 00:06 #8060 by PCW
Replied by PCW on topic Re:Encoder wiring - Mesa 7i33
Could you post your .hal, .ini files and output of dmesg? This would help in debugging
to get the dmesg listing type:
dmesg > dmesglog
in a terminal window, and post the dmesglog file here
also running emc from a terminal window and copying the error message here would help

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

More
25 Mar 2011 11:47 #8066 by BigJohnT
Please attach things like your ini and dmesg as text files to your reply instead of pasting them in the message body.

Thanks
John

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

More
25 Mar 2011 14:07 #8068 by Fordperf393W
Print file information:
RUN_IN_PLACE=no
EMC2_DIR=
EMC2_BIN_DIR=/usr/bin
EMC2_TCL_DIR=/usr/share/emc/tcl
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.4.6
Machine configuration directory is '/home/server/emc2/configs/hm2-servo'
Machine configuration file is '5i20.ini'
INIFILE=/home/server/emc2/configs/hm2-servo/5i20.ini
PARAMETER_FILE=hm2-servo.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
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
Shutting down and cleaning up EMC2...
Killing task emcsvr, PID=5326
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
hm2-servo.hal:205: Pin 'hm2_5i20.0.pwmgen.03.enable' does not exist
5326
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[139750.181430] I-pipe: Domain RTAI registered.
[139750.181450] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[139750.181458] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[139750.181622] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[139750.181631] PIPELINE layers:
[139750.181639] fe186e20 9ac15d93 RTAI 200
[139750.181646] c085cb20 0 Linux 100
[139750.233662] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[139750.234473] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[139750.234486] RTAI[sched]: hard timer type/freq = APIC/10416768(Hz); default timing: periodic; linear timed lists.
[139750.234495] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1666691000 hz.
[139750.234501] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[139750.234646] RTAI[usi]: enabled.
[139750.321506] RTAI[math]: loaded.
[139750.452524] hm2: loading Mesa HostMot2 driver version 0.15
[139750.459954] hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.6
[139750.460020] hm2_pci: discovered 5i20 at 0000:05:00.0
[139750.460350] hm2_5i20.0: firmware: requesting hm2/5i20/SVST8_4.BIT
[139750.637911] hm2/hm2_5i20.0: 72 I/O Pins used:
[139750.637924] hm2/hm2_5i20.0: IO Pin 000 (P2-01): Encoder #1, pin B (Input)
[139750.637933] hm2/hm2_5i20.0: IO Pin 001 (P2-03): Encoder #1, pin A (Input)
[139750.637941] hm2/hm2_5i20.0: IO Pin 002 (P2-05): Encoder #0, pin B (Input)
[139750.637950] hm2/hm2_5i20.0: IO Pin 003 (P2-07): Encoder #0, pin A (Input)
[139750.637958] hm2/hm2_5i20.0: IO Pin 004 (P2-09): Encoder #1, pin Index (Input)
[139750.637967] hm2/hm2_5i20.0: IO Pin 005 (P2-11): Encoder #0, pin Index (Input)
[139750.637976] hm2/hm2_5i20.0: IO Pin 006 (P2-13): PWMGen #1, pin Out0 (PWM or Up) (Output)
[139750.637985] hm2/hm2_5i20.0: IO Pin 007 (P2-15): PWMGen #0, pin Out0 (PWM or Up) (Output)
[139750.637994] hm2/hm2_5i20.0: IO Pin 008 (P2-17): PWMGen #1, pin Out1 (Dir or Down) (Output)
[139750.638003] hm2/hm2_5i20.0: IO Pin 009 (P2-19): PWMGen #0, pin Out1 (Dir or Down) (Output)
[139750.638012] hm2/hm2_5i20.0: IO Pin 010 (P2-21): PWMGen #1, pin Not-Enable (Output)
[139750.638021] hm2/hm2_5i20.0: IO Pin 011 (P2-23): PWMGen #0, pin Not-Enable (Output)
[139750.638030] hm2/hm2_5i20.0: IO Pin 012 (P2-25): Encoder #3, pin B (Input)
[139750.638038] hm2/hm2_5i20.0: IO Pin 013 (P2-27): Encoder #3, pin A (Input)
[139750.638047] hm2/hm2_5i20.0: IO Pin 014 (P2-29): Encoder #2, pin B (Input)
[139750.638055] hm2/hm2_5i20.0: IO Pin 015 (P2-31): Encoder #2, pin A (Input)
[139750.638064] hm2/hm2_5i20.0: IO Pin 016 (P2-33): Encoder #3, pin Index (Input)
[139750.638072] hm2/hm2_5i20.0: IO Pin 017 (P2-35): Encoder #2, pin Index (Input)
[139750.638080] hm2/hm2_5i20.0: IO Pin 018 (P2-37): IOPort
[139750.638088] hm2/hm2_5i20.0: IO Pin 019 (P2-39): PWMGen #2, pin Out0 (PWM or Up) (Output)
[139750.638096] hm2/hm2_5i20.0: IO Pin 020 (P2-41): IOPort
[139750.638104] hm2/hm2_5i20.0: IO Pin 021 (P2-43): PWMGen #2, pin Out1 (Dir or Down) (Output)
[139750.638112] hm2/hm2_5i20.0: IO Pin 022 (P2-45): IOPort
[139750.638120] hm2/hm2_5i20.0: IO Pin 023 (P2-47): PWMGen #2, pin Not-Enable (Output)
[139750.638158] hm2/hm2_5i20.0: IO Pin 024 (P3-01): IOPort
[139750.638168] hm2/hm2_5i20.0: IO Pin 025 (P3-03): IOPort
[139750.638177] hm2/hm2_5i20.0: IO Pin 026 (P3-05): IOPort
[139750.638186] hm2/hm2_5i20.0: IO Pin 027 (P3-07): IOPort
[139750.638194] hm2/hm2_5i20.0: IO Pin 028 (P3-09): IOPort
[139750.638203] hm2/hm2_5i20.0: IO Pin 029 (P3-11): IOPort
[139750.638212] hm2/hm2_5i20.0: IO Pin 030 (P3-13): IOPort
[139750.638221] hm2/hm2_5i20.0: IO Pin 031 (P3-15): IOPort
[139750.638230] hm2/hm2_5i20.0: IO Pin 032 (P3-17): IOPort
[139750.638239] hm2/hm2_5i20.0: IO Pin 033 (P3-19): IOPort
[139750.638248] hm2/hm2_5i20.0: IO Pin 034 (P3-21): IOPort
[139750.638257] hm2/hm2_5i20.0: IO Pin 035 (P3-23): IOPort
[139750.638265] hm2/hm2_5i20.0: IO Pin 036 (P3-25): IOPort
[139750.638274] hm2/hm2_5i20.0: IO Pin 037 (P3-27): IOPort
[139750.638283] hm2/hm2_5i20.0: IO Pin 038 (P3-29): IOPort
[139750.638292] hm2/hm2_5i20.0: IO Pin 039 (P3-31): IOPort
[139750.638301] hm2/hm2_5i20.0: IO Pin 040 (P3-33): IOPort
[139750.638310] hm2/hm2_5i20.0: IO Pin 041 (P3-35): IOPort
[139750.638319] hm2/hm2_5i20.0: IO Pin 042 (P3-37): IOPort
[139750.638328] hm2/hm2_5i20.0: IO Pin 043 (P3-39): IOPort
[139750.638337] hm2/hm2_5i20.0: IO Pin 044 (P3-41): IOPort
[139750.638345] hm2/hm2_5i20.0: IO Pin 045 (P3-43): IOPort
[139750.638354] hm2/hm2_5i20.0: IO Pin 046 (P3-45): IOPort
[139750.638363] hm2/hm2_5i20.0: IO Pin 047 (P3-47): IOPort
[139750.638372] hm2/hm2_5i20.0: IO Pin 048 (P4-01): IOPort
[139750.638381] hm2/hm2_5i20.0: IO Pin 049 (P4-03): IOPort
[139750.638390] hm2/hm2_5i20.0: IO Pin 050 (P4-05): IOPort
[139750.638399] hm2/hm2_5i20.0: IO Pin 051 (P4-07): IOPort
[139750.638408] hm2/hm2_5i20.0: IO Pin 052 (P4-09): IOPort
[139750.638416] hm2/hm2_5i20.0: IO Pin 053 (P4-11): IOPort
[139750.638425] hm2/hm2_5i20.0: IO Pin 054 (P4-13): IOPort
[139750.638434] hm2/hm2_5i20.0: IO Pin 055 (P4-15): IOPort
[139750.638443] hm2/hm2_5i20.0: IO Pin 056 (P4-17): IOPort
[139750.638452] hm2/hm2_5i20.0: IO Pin 057 (P4-19): IOPort
[139750.638461] hm2/hm2_5i20.0: IO Pin 058 (P4-21): IOPort
[139750.638470] hm2/hm2_5i20.0: IO Pin 059 (P4-23): IOPort
[139750.638479] hm2/hm2_5i20.0: IO Pin 060 (P4-25): IOPort
[139750.638487] hm2/hm2_5i20.0: IO Pin 061 (P4-27): IOPort
[139750.638496] hm2/hm2_5i20.0: IO Pin 062 (P4-29): IOPort
[139750.638505] hm2/hm2_5i20.0: IO Pin 063 (P4-31): IOPort
[139750.638514] hm2/hm2_5i20.0: IO Pin 064 (P4-33): IOPort
[139750.638523] hm2/hm2_5i20.0: IO Pin 065 (P4-35): IOPort
[139750.638532] hm2/hm2_5i20.0: IO Pin 066 (P4-37): IOPort
[139750.638541] hm2/hm2_5i20.0: IO Pin 067 (P4-39): IOPort
[139750.638550] hm2/hm2_5i20.0: IO Pin 068 (P4-41): IOPort
[139750.638558] hm2/hm2_5i20.0: IO Pin 069 (P4-43): IOPort
[139750.638567] hm2/hm2_5i20.0: IO Pin 070 (P4-45): IOPort
[139750.638576] hm2/hm2_5i20.0: IO Pin 071 (P4-47): IOPort
[139750.638903] hm2/hm2_5i20.0: registered
[139750.638911] hm2_5i20.0: initialized AnyIO board at 0000:05:00.0
[139751.332443] hm2_5i20.0: dropping AnyIO board at 0000:05:00.0
[139751.332453] hm2/hm2_5i20.0: unregistered
[139751.332540] hm2_pci: driver unloaded
[139751.339208] hm2: unloading
[139751.425654] RTAI[math]: unloaded.
[139751.489245] SCHED releases registered named ALIEN RTGLBH
[139751.553022] RTAI[malloc]: unloaded.
[139751.652028] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[139751.658305] I-pipe: Domain RTAI unregistered.
[139751.658456] RTAI[hal]: unmounted.

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

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