Newbie @ EMC2 : How to reroute EMC2 (HAL) ouput?

More
01 Nov 2011 15:27 - 01 Nov 2011 15:29 #14489 by Grimg
I tried today do run

loadrt sampler depth=600 cfg=bbbbbbbbb
net xstep => sampler.0.pin.0
net xdir => sampler.0.pin.1
net ystep => sampler.0.pin.2
net ydir => sampler.0.pin.3
net zstep => sampler.0.pin.4
net zdir => sampler.0.pin.5
net astep => sampler.0.pin.6
net adir => sampler.0.pin.7
net xenable => sampler.0.pin.8
addf sampler.0 servo-thread
start
loadusr halsampler XYZsempler.txt

In custom_postgui.hal and it seems that the last command is not working - that is, I dont get XYZsempler.txt file.

Is this OK or is it a bug? What is the difference between custom.hal and custom_postgui.hal?
Last edit: 01 Nov 2011 15:29 by Grimg.

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

More
01 Nov 2011 15:51 - 02 Nov 2011 15:23 #14490 by andypugh
Grimg wrote:

addf sampler.0 servo-thread
start
loadusr halsampler XYZsempler.txt

In custom_postgui.hal and it seems that the last command is not working - that is, I dont get XYZsempler.txt file.

Is this OK or is it a bug? What is the difference between custom.hal and custom_postgui.hal?


It might be that the HAL file drops out with an error at the "start" command because the realtime system is already started (this is a guess, I don't know for sure that it is started at that point, or that starting twice is an error).

What does dmesg say? (type dmesg in a terminal window).

Is it possible that it is creating the file somewhere unexpected? Maybe it is trying to create the file somewhere in the filesystem that you don't have write access?
Last edit: 02 Nov 2011 15:23 by andypugh.

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

More
01 Nov 2011 17:10 #14493 by Grimg

[16430.037603] RTAI[math]: unloaded.
[16430.101772] SCHED releases registered named ALIEN RTGLBH
[16430.132559] RTAI[malloc]: unloaded.
[16430.232073] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[16430.238754] I-pipe: Domain RTAI unregistered.
[16430.238804] RTAI[hal]: unmounted.
[16451.461971] I-pipe: Domain RTAI registered.
[16451.461981] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[16451.461985] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[16451.462027] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[16451.462031] PIPELINE layers:
[16451.462035] fda82e20 9ac15d93 RTAI 200
[16451.462038] c085cb20 0 Linux 100
[16451.489820] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[16451.490100] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[16451.490108] RTAI[sched]: hard timer type/freq = APIC/8333578(Hz); default timing: periodic; linear timed lists.
[16451.490113] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1600037000 hz.
[16451.490116] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[16451.490247] RTAI[usi]: enabled.
[16451.562991] RTAI[math]: loaded.
[16451.659882] config string '0x378 out '
[16451.680560] creating ladder-state
[16526.423996] RTAI[math]: unloaded.
[16526.476158] SCHED releases registered named ALIEN RTGLBH
[16526.508525] RTAI[malloc]: unloaded.
[16526.608022] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[16526.612852] I-pipe: Domain RTAI unregistered.
[16526.612905] RTAI[hal]: unmounted.
[17852.861844] I-pipe: Domain RTAI registered.
[17852.861854] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[17852.861858] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[17852.861899] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[17852.861902] PIPELINE layers:
[17852.861906] f84fbe20 9ac15d93 RTAI 200
[17852.861910] c085cb20 0 Linux 100
[17852.889331] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[17852.889519] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[17852.889527] RTAI[sched]: hard timer type/freq = APIC/8333578(Hz); default timing: periodic; linear timed lists.
[17852.889532] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1600037000 hz.
[17852.889535] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[17852.889665] RTAI[usi]: enabled.
[17852.967683] RTAI[math]: loaded.
[17853.063112] config string '0x378 out '
[17853.081560] creating ladder-state
[17903.768491] 50750: ERROR: Unexpected realtime delay: check dmesg for details.
[17903.768498]
[17903.768499] In recent history there were
[17903.768500] 1601328, 1594704, 1597776, 1596804, and 1599720
[17903.768502] elapsed clocks between calls to the motion controller.
[17903.768506] This time, there were 1922472 which is so anomalously
[17903.768507] large that it probably signifies a problem with your
[17903.768508] realtime configuration. For the rest of this run of
[17903.768510] EMC, this message will be suppressed.
[17903.768519]
[18139.922601] RTAI[math]: unloaded.
[18139.977390] SCHED releases registered named ALIEN RTGLBH
[18140.008458] RTAI[malloc]: unloaded.
[18140.108019] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[18140.113283] I-pipe: Domain RTAI unregistered.
[18140.113333] RTAI[hal]: unmounted.
[19516.048891] I-pipe: Domain RTAI registered.
[19516.048901] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[19516.048905] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[19516.048947] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[19516.048951] PIPELINE layers:
[19516.048955] f9589e20 9ac15d93 RTAI 200
[19516.048959] c085cb20 0 Linux 100
[19516.076390] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[19516.076612] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[19516.076619] RTAI[sched]: hard timer type/freq = APIC/8333578(Hz); default timing: periodic; linear timed lists.
[19516.076624] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1600037000 hz.
[19516.076627] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[19516.076757] RTAI[usi]: enabled.
[19516.143535] RTAI[math]: loaded.
[19516.240684] config string '0x378 out '
[19516.260373] creating ladder-state


Phewww very large dmesg file. :huh: Dmesg says that I don't have good computer to run EMC. Other than that I don't see reason for not making my file.
I tried whole system search and I did not find anything (maybe it tries to make file somewhere but it can't as you said). On the other side, I have admin rights on system.

The only reason i wanted to run postgui hal custom commands is to make smaller .txt file - so I figured custom_postgui.hal runs after custom.hal => lesser commands sent => smaller .txt file.

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

More
02 Nov 2011 15:25 #14518 by andypugh
No clues there as to why it isn't working.

Sorry, I am out of ideas.

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

More
03 Nov 2011 19:10 #14557 by Grimg
No worries. I am sticking to custom.hal - it does the work.

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

More
04 Nov 2011 02:21 #14562 by cmorley
inside a HAL file try :
halcmd loadusr 'your commands here'

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

Time to create page: 0.112 seconds
Powered by Kunena Forum