Bugs item #3595718, was opened at 2012-12-13 16:25 Message generated for change (Settings changed) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106744&aid=3595718&group_id=6744
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: HAL Group: None Status: Open Resolution: None >Priority: 1 Private: No Submitted By: https://www.google.com/accounts () Assigned to: John Kasunich (jmkasunich) Summary: Can't loadrt encoder component with 8 names Initial Comment: Using current master branch Man page for encoder says it supports a maximum of 8 channels. An error occurs when using loadrt to load the encoder hal component with exactly 8 names. Using 7 names or num_chan=8 works ok. See below for patch. It appears at_pid, encoder_ratio, pid, siggen, and sim_encoder may have the same problem, but I have not tested them. Steps to reproduce -- $ halrun loadrt encoder names=encoder.1,encoder.2,encoder.3,encoder.4,encoder.5,encoder.6,encoder.7,encoder.8 insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/encoder.ko': -1 Operation not permitted <stdin>:1: exit value: 1 <stdin>:1: insmod failed, returned -1 See the output of 'dmesg' for more information. quit $ dmesg | grep ENCODER [10316.169439] ENCODER: ERROR: invalid number of channels: 9 Patch follows: --- a/src/hal/components/encoder.c +++ b/src/hal/components/encoder.c @@ -204,7 +204,7 @@ int rtapi_app_main(void) if(num_chan) { howmany = num_chan; } else { - for(i=0; names[i]; i++) {howmany = i+1;} + for(i=0; names[i]; i++) {howmany = i;} } /* test for number of channels */ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106744&aid=3595718&group_id=6744 ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
