Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

control of the motors (input data)

Posted on 1998-04-03
2
Medium Priority
?
206 Views
Last Modified: 2010-04-06
How can I make a box, or window... which will be control the motion of
 the motors which are connected for the parallel port, I mean, in that box or window
I will send the information to move the motors as the number of steps I want to move
them,or the number of degrees that the motors move.....
thanks
Juan
 


0
Comment
Question by:guerra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
inter earned 0 total points
ID: 1361261
The simplest way to that is :

1 - Add two buttons to your form as Button1and Button2
2 - Button1.Caption := 'Step By', Button2.Caption := 'Step Degrees'
3 - On Button1Click
     StepBy := StrToInt(InputBox('Enter steps to move the motor','','2'));
4 - On Button2Click
     StepBy := StrToInt(InputBox('Enter degrees to move the motor','','30'));

More user friendly way is to use TTrackBar component in Win95(or Win32 tab if you use Delphi 3.0+):
1 - Just place 2 tractbar components to your form. One for steping by steps and other for steping by Degrees(or radians)
2 - OR place two SpinEdit controls to do the same

Regards,
Igor
0
 

Author Comment

by:guerra
ID: 1361262
Hi
Thanx for the help, I think that the Ttrackbar is a  good solution, but I don't know to
put them in the form, the procedure which I need, etc... if one of them is for the
stepping by degrees, how can i do that, in the trackbar i define the number of degrees, e.g.  from 0 to 360 in intervals of five degrees and how can I send this information to the
motor which is connected in the parallel port for the pin D0 and D1..., the pin D0 is for the
direction of the motor (clockwise and ccw) and the D1 is for the clock of the motor..
If you have any advice to this, please help me
Many thanks
Guerra
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question