MESA PWM

More
16 Jul 2013 20:34 #36706 by andypugh
Replied by andypugh on topic MESA PWM

I'm know that General I/O is available in free pins. Just the problem is that it isn't available in Pncconf


I can't really advise there, I never use Pncconf.
However, what do you get if you set the step generators (etc) to zero?

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

More
16 Jul 2013 20:47 #36707 by eslavko
Replied by eslavko on topic MESA PWM

I'm know that General I/O is available in free pins. Just the problem is that it isn't available in Pncconf


I can't really advise there, I never use Pncconf.
However, what do you get if you set the step generators (etc) to zero?


If I decrease number of stepgens then I had that pins available as general I/O

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

More
16 Jul 2013 20:48 #36708 by eslavko
Replied by eslavko on topic MESA PWM
I mean if I select only 5 stepgens then I got two pins for general I/O.

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

More
16 Jul 2013 22:23 #36712 by PCW
Replied by PCW on topic MESA PWM
This may indicate a pncconf bug or a xml file problem

You might look at the working xml file vs the new ones

I do notice that my xml files use "Not Used" as the
secondary function tag for GPIO only pins but Chris's
files seem to use 0. Not sure if this matters or not, since if the
secondary function is "None", thats all you need to know...
The following user(s) said Thank You: eslavko

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

More
16 Jul 2013 23:44 #36718 by eslavko
Replied by eslavko on topic MESA PWM

This may indicate a pncconf bug or a xml file problem

You might look at the working xml file vs the new ones

I do notice that my xml files use "Not Used" as the
secondary function tag for GPIO only pins but Chris's
files seem to use 0. Not sure if this matters or not, since if the
secondary function is "None", thats all you need to know...


Replacing "Not Used" with "0" solve the problem, at least with Pncconf. (I didn't test if real hardware work)

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

More
17 Jul 2013 13:02 #36732 by cmorley
Replied by cmorley on topic MESA PWM

This may indicate a pncconf bug or a xml file problem

You might look at the working xml file vs the new ones

I do notice that my xml files use "Not Used" as the
secondary function tag for GPIO only pins but Chris's
files seem to use 0. Not sure if this matters or not, since if the
secondary function is "None", thats all you need to know...


Pncconf uses the second number as a switch. mainboard GPIO is 0 meaning it can be changed from input to output.
sserial I/O uses 100 meaning it cannot be changed,
This allows me to use the GPIO routines for both types of I/O.

So that's why it matters :)

Chris M

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

More
08 Aug 2013 23:03 #37500 by eslavko
Replied by eslavko on topic MESA PWM
Hello...

Finally I have near finished electric box for machine.
Today I connect Mesa card and pc.
Well provided "custom" bit file doesn't work, but SVST4_4 for example work. All other data is same. I just configured simple 3 axis and try to start LinuxCnc.
With SVST4_4 program runs and seems to communicate witj card. But enslavko400 config give me error when I run LinuxCnc.

Any help?
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.3
Machine configuration directory is '/home/primoz/linuxcnc/configs/enslavko_surov'
Machine configuration file is 'enslavko_surov.ini'
INIFILE=/home/primoz/linuxcnc/configs/enslavko_surov/enslavko_surov.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Killing task linuxcncsvr, PID=2593
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/hm2_7i43.ko': -1 Unknown symbol in module
enslavko_surov.hal:9: exit value: 1
enslavko_surov.hal:9: insmod failed, returned -1
See the output of 'dmesg' for more information.
2593
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 2088.898067] I-pipe: Domain RTAI registered.
[ 2088.898075] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 2088.898079] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 2088.898159] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2088.898163] PIPELINE layers:
[ 2088.898167] f9b8de20 9ac15d93 RTAI 200
[ 2088.898170] c085cb20 0 Linux 100
[ 2088.924329] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2088.924534] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2088.924544] RTAI[sched]: hard timer type/freq = APIC/12468620(Hz); default timing: periodic; linear timed lists.
[ 2088.924551] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2992531000 hz.
[ 2088.924555] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 2088.924647] RTAI[usi]: enabled.
[ 2088.976743] RTAI[math]: loaded.
[ 2089.065284] hm2: loading Mesa HostMot2 driver version 0.15
[ 2089.069906] hm2_7i43: loading HostMot2 Mesa 7i43 driver version 0.3
[ 2089.071950]  hm2_7i43.0: firmware: requesting hm2/7i43-4/enslavko400.BIT
[ 2089.074136] hm2/hm2_7i43.0: firmware hm2/7i43-4/enslavko400.BIT not found
[ 2089.074143] hm2/hm2_7i43.0: install the package containing the firmware.
[ 2089.074151] hm2_7i43.0: board at (ioaddr=0x0378, ioaddr_hi=0x0778, epp_wide ON) not found!
[ 2089.427249] hm2: unloading
[ 2089.480922] RTAI[math]: unloaded.
[ 2089.527955] SCHED releases registered named ALIEN RTGLBH
[ 2089.557409] RTAI[malloc]: unloaded.
[ 2089.657039] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2089.660610] I-pipe: Domain RTAI unregistered.
[ 2089.660701] RTAI[hal]: unmounted.

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

More
08 Aug 2013 23:42 #37501 by PCW
Replied by PCW on topic MESA PWM
Looks like linuxcnc cannot find the bit file:

[ 2089.071950] hm2_7i43.0: firmware: requesting hm2/7i43-4/enslavko400.BIT
[ 2089.074136] hm2/hm2_7i43.0: firmware hm2/7i43-4/enslavko400.BIT not found

Do you possibly have capitalization wrong?

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

More
09 Aug 2013 00:49 #37505 by eslavko
Replied by eslavko on topic MESA PWM

Do you possibly have capitalization wrong?


Yes I do.
What a stupid mistake... I look all around and didn't see that.

Is it there maybe some tool to manualy toogle individual pins? (to check everithing before running.)
And how the output's are configured?
For output I have optocouplers with connection to 5V and 7i43 is configured as 5V tolerant. But just right now I read that if output is push/pull they leave 1.7V on photocoupler even in logic 1 state, and should be used as open drain. So is it possible to drive all outputs as open drain? (Maybe this is somewhere alreday written but I didn't reach yet). Or new bitfile is needed?

Thanks in advice.

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

More
09 Aug 2013 01:36 #37507 by PCW
Replied by PCW on topic MESA PWM
All pins can be inputs or outputs, and output can be set to open drain or push-pull mode on a pin by pin basis

The hostmot2 manual page details the GPIO options

man hostmot2

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

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