|
-
Aug 3rd, 2009, 03:03 AM
#1
Thread Starter
Fanatic Member
[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.
-
Aug 3rd, 2009, 07:30 AM
#2
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.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Aug 3rd, 2009, 03:15 PM
#3
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 3rd, 2009, 10:14 PM
#4
Thread Starter
Fanatic Member
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.
please help.thanks.
-
Aug 4th, 2009, 02:13 AM
#5
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...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 4th, 2009, 07:17 AM
#6
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
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Aug 5th, 2009, 03:19 AM
#7
Thread Starter
Fanatic Member
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.
-
Aug 5th, 2009, 08:58 AM
#8
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
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Aug 5th, 2009, 01:41 PM
#9
Re: control stepper motor via parallel port
Did you also check the links that I gave you?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 5th, 2009, 03:35 PM
#10
-
Aug 5th, 2009, 07:41 PM
#11
Thread Starter
Fanatic Member
Re: control stepper motor via parallel port
cdrive,koolsid:
thanks for your information.
-
Aug 6th, 2009, 08:45 AM
#12
Thread Starter
Fanatic Member
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.
-
Aug 6th, 2009, 03:21 PM
#13
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
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 6th, 2009, 10:01 PM
#14
Thread Starter
Fanatic Member
Re: control stepper motor via parallel port
-
Aug 7th, 2009, 01:58 AM
#15
Re: [RESOLVED] control stepper motor via parallel port
Glad it worked
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|