Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Set timer to control DC motor in vb6.0

Status
Not open for further replies.

saathis

Member level 1
Member level 1
Joined
Dec 11, 2010
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,601
Hello im using DC motor with parallel port for open door system..... anyone know how to set timer to control speed of DC motor. Please be refer scenario below:

Open Button:
D1 goes high then set timer to rotate forward while control it speed for few seconds

Close Button:
D1 goes low then set timer to rotate backward while control it speed for few seconds

However to set D1 high & D2 low is done.... but i don't knw how to program timer to control DC motor... any vb6 expert can help me???? Image0684.jpgImage0685.jpg
 

Hey Saathis, it seems you are very new to vb6 , am i right , in one blog you asked about parallel port programming also ,anyway,
seems you are having
1. Ur pc parallel port
2. Parallel port is connected to a analogous variac
and 3. the controlled variac output is to your motor directly .
Am I right Saathish. If it is then you should know what are the bit patterns available for step voltage increase and step voltage decrease for your stepper motor.
Then it's simple to implement in vb6, add "inpout32.dll" in your application and simply use
PortState% = vbInp(PortAddress%)
PortNum% = PortState% + OutNum%
vbOut PortAddress%, PortNum%
for your application.
The details for adding the dll and using that is already explained in your parallel port programming message.
Wish you best of luck and i know you will be able to do it by your own...:)
Regards,
Saubhik
 
sure saubhik as your bless i il do by own bt since im new 2 vb6 as you say...

for ur in4m i hv no parallel port in my laptop so i hv 2 use USB to parallel 25 pin female to connect the circuit..... im do knw wht mean by analogous variac.... wht te process is when click button D1 goes high thn timer control DC motor to rotate forward thn D2 goes low then set timer to rotate backward while control it speed for few seconds..... if u knw guide me more...
 

Hi,
First thing if u r using stepper motor... u r having fixed input pattern for step voltage changes,
if you want to continue with the same voltage for a limited time use a timer ,(but don't expect vb is going to give you a Real time output,if it is not tht critical , forget tht simply use it) and make the output high as long as the timer is running, and at timer timeout , change your pattern according to your need.... and
Second thing timer is readily available in your component explorer window inside vb, and make it singleshot and put the interval value (as you require - the data expected inside the timer is in msecs).
Now you are on with your pattern and timer .... :)
For any query regarding timer in vb checkout the page -
Understanding the timer control | Visual Basic 6 (VB6)
basic sample is given here....may be it will be of little helpful to you.....:)
 
s bro i plan use 12V fixed input.... k bro thnks alot i il follow wht u say thnks alot again....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top