Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling robots with VB

Status
Not open for further replies.

luisg

Mechanical
Mar 7, 2003
3
0
0
US
My projects includes a controller, sensor switches, valve, grips and
steppers motor. I am wondering how to write program in visual basic
(using .DLL to controll paralel port in c language) to move the
stepper without loosing step. I heard that pulse are not sent
properly in a windows enviroment and that is why most CNC programs
are writen in DOS or linux to prevent this but I need to run my
applications in a windows enviroment so my question is how can the
pulse or signal can be send properly or rechecked to the parallel
port (in windows enviroment) so stepper motors can run smoothly without loosing steps?

luis..
 
Replies continue below

Recommended for you

I know a little about vb but not enough to answer effectively. I wish to do similar to you but in another field. Would it not be possible to produce an output to a DOS emulated window and then send the output to the parallel port? Just a thought.

All the best.
 
I think the trick here is to utilize an external controller/processor other than the Host PC. The problem is in the windows environment that it is a multi-tasking environment and it is difficult to Sieze control away from windows to focus on a time critical task (like sending pulses to a stepper controller). Unfortunately windows will interrupt this task with what it deams to be more important (like a looking at a mouse click or opening an explorer page). I know that there are real time kernals used by SCADA companies like Wonderware and Intellution, but they are expensive and kind of defeat your purpose.

What I would suggest is go out and get an external controller. If you are looking for Cheap, get a Automation Direct PLC with a High Speed Counter. If you are looking for really cheap, get one used on E-bay or at a second hand place like D&S Engineered Products. With an external controller like this, your VB program just communicates to the Controller a move command and waits for it to complete. I know many VB programmers that have been very successful with this approach.

Good Luck!
 
I feel that using seperate controller will be more cheaper and accurate.I have done a similar project where I have controlled four steeper motors of a Gantry type robot with Philips microcontroller using philips ISP software
 
i have positioned 3 DC-motors under windows. The only thing you need is controllers who's take care of the position and the movement figure. Then you send an ascii code. The controller take care off the movement and will respond with a ascii code " i'm there".So you can do the next movement.

 
i have some experience to do this kind of project and i never use a PC/Win do control the solution. I sugest you to use the PC only as HMI and for control use special board on PC or stand-alone or a small PLC.

You can use micro plc from Omron, AB, Scheneider, SIEMENS or SAIA for that.

if you send me the amount of signal i can help you to choice that.

 
Hi,

The using external MCU is most efficient way (in my opinion) but if you are not comfortable with the MCU and
don't have money to get commercial one. Then try 2 PCs to solve this kind of application. One is to run Windows Application and the other runs DOS then build a communication program between them. Data exchanged via parallel ports. But using this way you have less control
data line.

The way to run DOS emulation on top of the Windows doesn't work well because the sampling rate for each task that Windows check on each task is still limited to 10ms (i think).

Hope it would help.

PS: Please give some suggestion if my idea is not correct. Many thx :)
 
Status
Not open for further replies.
Back
Top