![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| DIY-CNC Router Table Machines Discuss the building of home-made CNC Router tables here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hi, Does anyone know which kind of data I need to send to the parallel port in order to run the motors. I would like to control my machine via C, Labview or Matlab. Today i'm using Mach 3 limited version (500 lines). Amir |
|
#2
| |||
| |||
| That's such a vastly wide open question its hard to know where to start. Here are a few counter questions;
There are a whole range of plugins and tools for labview and matlab to control motors. Have you looked at any of these? Why aren't they any good for your needs? Assuming you have a good answer for all of those and still want to code your own driver software, it won't be trivial. I trust you've got a reasonable amount of programming experience! |
|
#3
| |||
| |||
I have experience with programing and I am using Keling kit (KL4030 driver with C10 breakout board). I do agree that I need to know the protocol. I didn't say that Labview or Matlab plugins are not enough however I'm willing to learn the subject. Amir |
|
#4
| |||
| |||
| I would seriouesly recommend investigating motor control plugins. I assume that you have some particular purpose in mind for this project, and by using ready made tools you will probably save yourself weeks of time spent coding and debugging; weeks that you might have otherwise spent making your system produce useful output. The Keling C10 is just a 'dumb' breakout board, providing buffered (but not isolated) access to external hardware via screw terminals. All you'd need to do to drive steppers, for example, would be to send appropriate values to the pins wired to the stepper driver; you don't need to learn any complex protocol, which is fortunate. You'd greatly benefit from having access to an oscilloscope here so you can see if your system is generating stable pulse trains, etc. Under windows vista and later, direct control of hardware canot easily be done from software. You may need to write a custom driver using the Windows Driver Development Kit, which is generally agreed to be exceedingly unpleasant to use even by Microsoft developers. Under XP you may be able to use a library called inpout32 to controll the parallel port. This may work under vista as well, but it will be awkward. It is unlikely to work well (or perhaps at all) under 64 bit operating systems. You'd then have to write a plugin for labview or matlab, something I know nothing about, and use that to communicate with your driver software. Due to the requirements of generating a steady pulse train to drive steppers for most purposes, you may find you need to run your control software in a separate thread or process to prevent processing in the host software (matlab or labiew) from delaying the pulse generation loop. You would need to be familiar with asynchronous programming techniques in order to do this, which are also non-trivial (though easier than writing drivers, in my experience). |
|
#5
| |||
| |||
I generally agree with you. I'm also trying to arrange oscilloscope to study the signals I generate. Amir |
| Sponsored Links |
|
#6
| |||
| |||
| Hi, today i've the same problem that "spaltiel" suffered a year ago. im using matlab. software is completed... my programme can read autocad file and stores the information of all three axis in three arrays(x y & z). ive made whole graphical user interface as well as my driver's programe is complete at proteus. i can run the motors by atmega16 programmed in c language(vmlab). now how m i gonna do it via parallel port using matlab... ill be very kind if anyone helps me out. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AC Drives control multiple motors | Mcyoda | General Electronics Discussion | 3 | 06-06-2009 09:13 PM |
| Newbie- STEPPER MOTORS AND CONTROL | WWWOODMAN | CNC Wood Router Project Log | 12 | 02-23-2009 08:07 AM |
| Need Help!- CLIFTON PRECISION + MATLAB/SIMULINK +ADVANTECH + GECKODRIVE | raiden86 | Servo Motors and Drives | 1 | 09-09-2008 05:18 AM |
| How to control 5 motors? x+y+z+z1+a? | Faber.sum | General Electronics Discussion | 1 | 05-05-2006 09:45 AM |
| Control four stepper motors in unison? | Wes LeMarr | Stepper Motors and Drives | 1 | 02-28-2006 09:11 PM |