Halui has bug in pin processing when one signal has several output
halui pins. So in following HAL setup only one (AXIS_0) axis get homed:

net all-home          pyvcp.all.home
net all-home       => halui.joint.0.home
net all-home       => halui.joint.1.home
net all-home       => halui.joint.2.home

Problem is in pin handling code where shared memory pins are compared to
saved state in local memory. If some change is found then control command is
sent and emcCommandWaitReceived function is called. While wait call is sleeping
other pins in shared memory may their state and other joints in above example
are never homed.

Since halui is userspace process it will loose some data, for example while
sleeping between iteration but I believe that making snapshot of shared memory
before processing will provide more consistent behavior.

There was discussion [1] on #emc-devel about this problem and it seem that least
intrusive way to fix it is to create copy function and drop local_halui_str.

Sending 3 patches:

 * first patch adds awk script that parses halui_str and generates list with 
sizes
   of it members;
 * second patch adds init and copy functions for halui_str;
 * third patch replaces all checks between shmem and local memory to local-only.

Idea under this approach is that all members of halui_str are pointers, which
have same size. Also fixed arrays of pointers are represented as subsequent
pointers in memory. So halui_str is large "pointer array". We generate size list
for each data-type of pointers from halui_str to enshure that during copy we
don't trigger SIGSEGV on page border.


                                        Pavel Shramov

--
[1] 21:49 -- 22:35 
http://www.linuxcnc.org/irc/irc.freenode.net:6667/emcdevel/2010-09-29.txt

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to