![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I am still new at this, so bear with me. I ordered the servo controller for my upcoming mill that I am building- It uses the parallel port (LPT) of the computer to receive information. Say, I wanted to write my own software to control XYZ of the mill I built. What commands, in what formatting is sent out the LTP port? I have never worked with a server controller before, so all this is new to me. Thanks- Andrew |
|
#3
| |||
| |||
| If you really want to write some motion control software to use with a full servo motor system you should look into EMC, study the souce code and see how they have done things. All available for the cost of the download. http://www.linuxcnc.org/ If all you want to do is simple step and direction output then you could look into TurboCNC the souce code only costs something like $60 and the jump you get over reinventing it all is more then worth that. http://www.dakeng.com/turbo.html As far as the controller you ordered, any quality hardware like that should come with some sample code one how to communicate with it. |
|
#4
| |||
| |||
| Your replies were informative. However, let me reword the question for what I am looking for- Lets say I am running Mach3 which communicates with a controller board by parallel cable and sends commands to it to tell it what to do with the three axis motors- What would these commands be and where could I find a whitepaper or discussion on this data? Thanks, Andrew |
|
#5
| |||
| |||
| Mach3 controls a motor with step and direction signals. Each axis will have a step pin and a direction pin. Each time the step pin is pulsed (lo-hi-lo) the drive moves the motor one step (or microstep) if its a stepper motor, or one encoder count if it is a servo motor. The direction pin simply controls whether the motor is going forward or reverse. For example: if you wanted a normal stepper motor to turn 1 revolution, and you had a full step drive, mach would need to send 200 pulses through the LPT port as a normal stepper is 200 full steps per revolution. There is no white paper needed for the process, its quite simple. The white papers come in when you have to translate a distance into a step sequence with acceleration and deceleration ramps, etc. If your drives take step/dir signals, it is almost a no brainer to hook it up to mach. Again if you tell us what drives you are using, the replies could be more helpful. Matt |
| Sponsored Links |
|
#6
| |||
| |||
| Matt, Many thanks my friend, that has been VERY helpful! I understand much better. Here is the controller I just bought: http://www.easy-cnc.com/web/download...3Axis(NEW).pdf Thanks, Andrew |
|
#7
| |||
| |||
| http://electronics-diy.com/stepper_motors.php this site uses 5 pins 4coil +ground. The example program is at the bottom but i couldn't find the source. I think he's asking how to code in say c++ or something to do the same thing or if there is any library of lpt/com port controls http://www.vclcomponents.com/C_C__/M..._car-info.html <-I found this just now it gives the source under more info maybe you could adapt it Is it an xyz table, gantry, or a drill on the end of an arm(that would be cool) |
|
#8
| |||
| |||
| Actually, I program in VB or VB.NET, but your tracking- The page on the stepper motors was very informative also. I am still trying to get down to the nitty gritty- On page 2 of the PDF I posted a link to, it shows X, Y and Z DIR and STEP. I am kind of needing to know more... Ill also try google later this evening. Thanks- Andrew |
|
#9
| |||
| |||
| I think you need to google "interfacing the parallel port". PIN 2-9 are data out pins which give a binary representation of a number between 0-255. If you output 0,(00000000) they will all be off and if you output 255(11111111) the will all be on. Output '3' (00000011), pin 2&3 will be high so you get 1 step of X in DirX. By changing this number you can do all kinds of things depending on what those pins are connected to. I've done alot of this in GW-Basic. Good luck. MM |
|
#10
| |||
| |||
| MM, thanks for the help! Yes, I can program the LTP port, I built a little par. interface for the Commodore-64 a long time ago. All it did was cut on LEDs but I remember what I did.I also found THIS page which appears extremely helpful in understanding WHAT I am supposed to send... PULSES! Not only what, but how- http://www.fpga4fun.com/CNC2.html It looked so good, I archived it here: http://rogertango.com/pdf/fpga4fun_c...er control.pdf I hope someone else finds it helpful also- Andrew (If interested, you can browse the index of: http://rogertango.com/pdf/ ) |
| Sponsored Links |
|
#11
| |||
| |||
| Excellent link. Exactly what you want to do. Keep pulsing(toggle between) (0)00000000 & (1)00000001 for X+ or (2)00000010 & (3)00000011 for X- (keeping pin 2(DirX) high) I've had to use FOR-NEXT loops in between to slow the computer down. You could always buy TurboCNC(excellent software for the price) and not re-invent anything but you did say something about 'nitty gritty'. MM |
|
#12
| |||
| |||
| Yup, Nitty Gritty is my middle two names. BTW, I just uploaded a _BUNCH_ of new PDFs in that directory you may want to take another peek... My learning curve is seriously coming up real quick with you guy's help and a little more understanding for a solid foundation! I have some ideas.... For one, a PCB specific plotter program for resist pens, Id like to write it all in VB... Import the image, do a few guides, save it in the program's own format for use later, and control the whole machine in one program. Well, its a concept anyway. It wont be elegant, but it should work. Cheers, Andrew |
![]() |
| 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 |
| Need Help!- How do I put in an SAE #6 port? | Driftwood | General Metalwork Discussion | 4 | 10-25-2008 02:10 PM |
| How do i add a USB Port to a TM-1? | JHamdan78 | Haas Mills | 1 | 08-05-2008 01:29 PM |
| Need Help!- port | jcochran | PlasmaCam | 2 | 03-28-2008 10:26 PM |
| USB port | fourperf | Haas Mills | 4 | 02-02-2008 06:00 PM |
| PNP LPT Port | studysession | Mach Software (ArtSoft software) | 15 | 12-29-2007 12:11 PM |