[RESOLVED] control stepper motor via parallel port
hi,please help.how to control the stepper motor via parallel port??
current i want to control the stepper motor rotation via parallel port.
now the problem is i don't know how to start control the stepper motor rotation.
i have start the parallel port connect code as below:
Code:
Public Declare Function Inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal portaddress As Integer) As Integer
Public Declare Sub Out Lib "inpout32.dll" _
Alias "Out32" (ByVal portaddress As Integer, ByVal value As Integer)
Option Explicit
Dim value As Integer
Dim portaddress As Integer
Private Sub Cmdinputsignal_Click()
Text2.Text = Inp(portaddress)
End Sub
Private Sub Form_Load()
portaddress = &H378 ' LPT1
End Sub
Private Sub cmdoutputsignal_Click()
value = Text1.Text
Out portaddress, value
End Sub
please help.Thanks.
Re: control stepper motor via parallel port
I received your PM but as I've stated repeatedly, the parallel port is not my subject of expertise.
Re: control stepper motor via parallel port
I remember this homework project but I did it on the serial port. Still same logic.
Send your commands as binary which will get your desired pins to transmit a 1 or a 0.
Did you create a driver circuit for this yet? The ports off the motherboard are not high output enough to drive a stepper motor on their own and you will risk blowing your board without it.
Re: control stepper motor via parallel port
RobDog888:
hi,yes i already create the stepper motor driver.The problem now is i have no idea how to start the coding to control the stepper motor rotate left and right.:confused:
please help.thanks.
Re: control stepper motor via parallel port
Never done this kind of thing but see if this helps you...
http://www.codeproject.com/KB/vbscri...r_Control.aspx
Also if you type "Stepper" in the link below, you will get plenty of stuff to play around with...
http://www.labjack.com/forums/index.php?act=Search&f=
Hope this helps...
Re: control stepper motor via parallel port
I don't know what your level of understanding is, in regard to the stepper itself, so perhaps this will be of use to you.
http://www.imagesco.com/articles/picstepper/02.html
Re: control stepper motor via parallel port
CDRIVE:
hi,basically i'm able to rotate the stepper motor at the moment.
now the problem is how to control the stepper motor by send one pulse to stepper motor will rotate one step.:confused:
Re: control stepper motor via parallel port
Here's a thread in which the TS is controlling LEDs via the Parallel Port. The concept should be the same except you will need to toggle the desired pin only briefly.
http://www.martin2k.co.uk/forums/ind...showtopic=6234
Re: control stepper motor via parallel port
Did you also check the links that I gave you?
Re: control stepper motor via parallel port
VB Forums is, without a doubt, the finest VB forum in the entire world. However, you dabble in interfacing VB and your electronics projects. Therefore, I invite you to join All About Circuits Forum that will compliment your membership here at VB Forums but definitely not replace it. ;)
http://forum.allaboutcircuits.com/
They have a coding section also.
Re: control stepper motor via parallel port
cdrive,koolsid:
thanks for your information.:wave:
Re: control stepper motor via parallel port
CDRIVE,koolsid:
hi,thanks now i'm able to rotate the stepper motor.now i face another problem i want to get the input signal from parallel port pin 1 value to display at text3.text to do some validation,but i cannot the the signal input from pin1.
Text3.Text = Inp(&H37A)
If Text3.Text <> 255 Then
MsgBox (Text3.Text)
Exit Sub
End If
please help.thanks.
Re: control stepper motor via parallel port
Assuming that Inp(&H37A) is correct, try this to check if it is working...
vb Code:
If Val(Inp(&H37A)) <> 255 Then
MsgBox Val(Inp(&H37A))
Exit Sub
End If
Re: control stepper motor via parallel port
Re: [RESOLVED] control stepper motor via parallel port