CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-01-2010, 06:14 AM
 
Join Date: Sep 2010
Location: singapore
Posts: 9
Shen Bingquan is on a distinguished road
Creating a new module in HAL

Hi all,

I was wondering if it is possible to create a new module in HAL so that i can customize my own functions, pins and parameters.

Something like "loadrt pid" but instead i would like to have "loadrt MY_MODULE".

Someone mentioned using .comp. Is it possible using comp? And how to go about doing it? Cuz i keep getting the following message when i type "$ comp ddt.comp"

"The program 'comp' can be found in the following packages:
* mailutils-mh
* nmh
Try: sudo apt get install "

Thanks.

BQ

Last edited by Shen Bingquan; 10-01-2010 at 08:27 AM.
Reply With Quote

  #2   Ban this user!
Old 10-01-2010, 04:52 PM
 
Join Date: Jul 2003
Location: Holmen, WI
Posts: 1,081
samco is on a distinguished road

Yes - you should be able to do that.

read up on
Comp: a tool for creating HAL components

also - take a look at other comps

git.linuxcnc.org Git - emc2.git/tree - src/hal/components/

sam

love to see your fuzzy pid
Reply With Quote

  #3   Ban this user!
Old 10-03-2010, 10:44 PM
 
Join Date: Nov 2005
Location: Canada
Posts: 465
chester88 is on a distinguished road

you have to add the development packages to compile components.
look here:
EMC Documentation Wiki: ContributedComponents
Reply With Quote

  #4   Ban this user!
Old 10-05-2010, 01:41 AM
 
Join Date: Sep 2010
Location: singapore
Posts: 9
Shen Bingquan is on a distinguished road

I tried installing emc2-dev by '$ sudo apt-get install emc2-dev'
But the following error msg keep coming up.

dpkg: error processing /var/cache/apt/archives/emc2-dev_1%3a2.4.4_i386.deb (--unpack):
trying to overwrite '/usr/share/man/man1/comp.1.gz', which is also in package nmh 0:1.3-1
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/emc2-dev_1%3a2.4.4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Help?
Reply With Quote

  #5   Ban this user!
Old 10-05-2010, 02:05 AM
 
Join Date: Nov 2005
Location: Canada
Posts: 465
chester88 is on a distinguished road

hmm not sure what that means but I might guess that the package is already installed or the versions are wrong.

How did you get EMC and what version is it? What distribution on Ubuntu are you using?

Are you trying to compile the comp file correctly now?
(The last way you said you tried it is not right)
You did read the instructions right

Chris M
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-05-2010, 07:56 AM
 
Join Date: Sep 2010
Location: singapore
Posts: 9
Shen Bingquan is on a distinguished road

Ok it seems like the comp command is working after I restarted my computer, but there are still some minor issues.

"$ comp ddt.comp" creates a ddt.c file in my desktop

But when i type "$ comp --install ddt.comp" to install the .ko into my emc2 dir
it outputs an error message Unable to locate Makefile.modinc

Am I still missing anything?
Reply With Quote

  #7   Ban this user!
Old 10-07-2010, 12:38 AM
 
Join Date: Sep 2010
Location: singapore
Posts: 9
Shen Bingquan is on a distinguished road

Well, after i reformatted my whole system and reinstall emc2 followed by emc2-dev there is now a different error after i tried compiling the module

"$ comp install BQ.comp"

WARNING: "hal_init" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "rtapi_print_msg" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "hal_export_funct" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "hal_malloc" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "rtapi_get_msg_level" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "hal_pin_bit_newf" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "hal_pin_s32_newf" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "rtapi_snprintf" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "hal_pin_float_newf" [/tmp/tmpXwbloT/BQ.ko] undefined!
WARNING: "rtapi_set_msg_level" [/tmp/tmpXwbloT/BQ.ko] undefined!
CC /tmp/tmpXwbloT/BQ.mod.o
LD [M] /tmp/tmpXwbloT/BQ.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai'
cp BQ.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/
cp: cannot create regular file `/usr/realtime-2.6.32-122-rtai/modules/emc2/BQ.ko': Permission denied
make: *** [install] Error 1


never seen this error previously..
Reply With Quote

  #8   Ban this user!
Old 12-17-2010, 03:30 AM
 
Join Date: Apr 2004
Location: Martinez, CA
Posts: 40
Ryobiguy is on a distinguished road

Try prepending sudo:
sudo comp install BQ.comp
Reply With Quote

  #9   Ban this user!
Old 10-24-2011, 09:16 PM
 
Join Date: Oct 2011
Location: China
Posts: 1
wangyu is on a distinguished road

I had the same problem.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie- laser module to a new cnc stregoi Laser Engraving & Cutting Machines 4 05-19-2010 01:20 AM
MasterCam art module gabi68 Mastercam 1 02-24-2008 09:21 PM
if you need ic and module,please tell me. keithshen Want To Buy...Need help! 0 01-07-2008 07:07 AM
Lathe Module rodneydeeeee BobCad-Cam 9 08-27-2007 06:09 PM
Please need help on I/O Module yeager General Electronics Discussion 9 01-13-2006 08:19 AM




All times are GMT -5. The time now is 04:58 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361