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! > Electronics > General Electronics Discussion


General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 03-21-2007, 10:45 AM
Haz Haz is offline
 
Join Date: Mar 2007
Location: USA
Posts: 2
Haz is on a distinguished road
Question MicroController/DSP based Motion interface

Hi,
This is my first post on cnczone forums, so I hope this is the right place for it.
I am an embedded systems designer with some closed look motion control experience. My hobby is wodworking, small projects here and there and would like to expand on it, and that's how I got here today. I have been directed here by a friend of mine who has a mechanical background.
I would like to concentrate on designing a controller interface with the driver boards, and add some failsafe, position closed loop and manual control possibility (joystick). I have been looking online for some info to get familiar with the environment to decide the processor to use.

If anyone can direct me on how to start, it would be great. The main information I am missing is the hardware interface through the parallel port.
Is there an industry standard? I am looking for the protocol which explains the G-code to parallel data. Is it just a parallel ASCII of the test which is described in the G-Code? The reason being, I am looking at skipping the whole parallel port, and go from G-code to motion through my planned interface. That would take a lot of variations of parallel port connections out of the equation. Then transferring G-code from any program out there would be across all platforms, and not only limited to the parallel protocol.
I hope my understanding of the whole system is accurate. Feel free to correct it, or add any ideas you can think of. I will first be preparing a MATLAB/SIMULINK model of all my PID and communication controls of the system to get a feel for it before dumping time and money on the physical components.

So here's the story; Can anyone help?

Thanks

Haz-
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 03-21-2007, 10:39 PM
 
Join Date: Jun 2006
Location: usa
Posts: 76
aspenelm is on a distinguished road

My suggestion is to look at emc2 at linuxcnc.org. This software drives the parallel port and many other pci and isa motion cards. It takes your g-code instructions and can generate the move profiles, with accelerations and feeds, etc... You may want to look at the source code and documentation to understand how the parallel port is driven. Probably the common used setup for people here is to use the parallel port with step and dir, this is open loop though, 2 pins of the port are used for each axis and some pins are used for limit switches. Emc2 also has closed loop setups as well, but I am not familiar with them. In short, the gcode does not go straight to the parallel port, the control software generates the pulses or move profiles based on the gcode instructions and drives whatever output mechanism you use.
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 03-22-2007, 12:33 AM
 
Join Date: Jan 2006
Location: USA
Posts: 1,495
keebler303 is on a distinguished road

basically the loop is closed outside of the computer in most current systems. The controller does the PID work. The job is already done for you pretty well if you are just looking for a controller. If you want to do it for fun I would be interested in the matlab/simulink portion of it. I am in a controls class right now and am learning the ropes of simulink and feedback controls. I am really interested in interfacing actual hardware with simulink to make stuff run.

How do you plan to get around the non real-time nature of windows? can matlab run real-time?

Matt

Matt
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 03-22-2007, 04:54 PM
Haz Haz is offline
 
Join Date: Mar 2007
Location: USA
Posts: 2
Haz is on a distinguished road

Thanks for the replies.

I will take a look at the emc2 software and try to figure out the transfer function between G-code and hardware signals of motor control.
There has to be a definition which shows us how the G-code is interpreted into 3 axis motion. Because if I chose not to use the parallel port, I have no way of interfacing to my HW. I mean, if I figure out how the G-code translate into the 2 signal you mentioned (step and direction). If I get this, then the rest is just microcontroller implementation and a lot of SW writing
As for the model of the system, I am actually doing it for fun. I unfortunately do not own a cnc setup YET... I have seen there are some controllers out there which have the functionality of driving servos or stepper motors, but the cost is about $150-$250 per axis. I also noticed that the driver with the PID implemented (trimmable with some potentiometers) are even more expensive.
I figured if I can do it myself, I will probably spend this much on the whole thing (3-4 axis driver, external loads, stop switches, and probably the actual controller itself, not a parallel port)...of course, it will definetly not be a quick turn around projects, but I am in no hurry yet. Once I prove feasability with simulation, I will decide the implementation steps.
As I mentioned before, it is a project I have in mind. I will tinker with it and see where it takes me. But I will keep posting progress and road blocks if you are interested.
Simulink does support real time. There is a Hardware add on, mccDAQ with its matlab toolbox. It is basically a DAC and a ADC in 1, configurable through Matlab and Simulink do drive loads or read inputs. And the ability to use the simulink scope, and other components, makes it easier to debug.

Thanks for the feedback, I will try to keep my posting progress. I will get started on the stuff probably next week. At least the main block diagram.

Haz.
Tweet this Post!Share on Facebook
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is water based CNCadmin Safety Zone 44 10-15-2010 03:27 PM
Low cost Microcontroller development Board and Programmer , Breakout Boards ahmedrehan Product Announcements & Manufacturer News 5 11-23-2006 04:34 PM
Used CMM based DIY router? biomed_eng DIY-CNC Router Table Machines 1 10-16-2006 09:52 PM
Discrete transistors and AVR microcontroller DukerX Open Source Controller Boards 26 03-04-2006 08:30 AM
dos based cnc software flyingmike Computers and Networking 14 11-25-2005 02:29 PM




All times are GMT -5. The time now is 07:24 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