Parallel port stepper motor
Hi All,
I followed the instructions on this link
http://zone.ni.com/devzone/conceptd.nsf/webmain/72C6FC6CE4AD4D1386256B1800794596,
in an attempt to drive a stepper motor. I used the VISA method and grounded pins 12 and 13 and tried to obtained some output with no success... Is there any other pins that I should take care of other than the data pins 2-9 and pins 12,13. I am using a mulitmeter to measure the voltage of the output data pins. I also tried the register method by using the outport.vi but also without any success. Both vis I written does not give me any errors. I tested the parallel port on a printer and it seem to be working fine. Perhaps I had missed out something? An early thanks for anyone who could enlighten me on parallel
port output.
Hello;
You don't need to worry about any other pins than the ones you described. The best way to trouble shoot that is by using a Scope to catch the output line of the parallel port and to have a really simple VI just writting a high level state on that line.
Regards
Filipe A.
Applications Engineer
National Instruments
Similar Messages
-
Driving stepper motor via parallel port
Hi everybody,
I want to drive a stepper motor via the parallel port. The problem is to
create a constant frequency on a digital line of the port. I tried to do
so with a While-Loop with a certain delay, but the frequency varys due
to occurrences like mouse-movement (due to the call-ups of interrupts I
think).
Any Ideas?
Regards
Martin
Attachments:
Martin.Eis.vcf 1 KBHow about a simple NE555 timer circuit to externally create the constant
frequency, then use a bit in the parallel port to enable and disable the
NE555 circuit? You could probably go to Radio Shack and pick up the
components for less than $10.
Jim
Martin Eis wrote in message
news:[email protected]..
> Hi everybody,
>
> I want to drive a stepper motor via the parallel port. The problem is to
> create a constant frequency on a digital line of the port. I tried to do
> so with a While-Loop with a certain delay, but the frequency varys due
> to occurrences like mouse-movement (due to the call-ups of interrupts I
> think).
>
> Any Ideas?
>
> Regards
> Martin
> -
I'm using a compumotor S6 drive and I was wondering if I could somehow use Labview to program the parallel port to send the required step and forward backward signal to the controller and motor. All I need it to do is go back and forth at a user defined rate. Considering I know very little about Labview this is a daunting task indeed.
Hello Tiano!
I found an example on the www.ni.com website named "Reading from the Bi-directional Parallel Port."
Here is the link: http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CBA4C111EE034080020E74861&p_node=DZ52058&p_submitted=N&p_rank=&p_answer=&p_source=External
Hope this and the other documents help you along your way!
BB_Phil -
I am trying to use the parallel port on a win xp machine to send data a@ up to a 3k rate. This is for the the purpose of driving a stepper motor. I have tried the port.out vi and placed this vi in a loop and it on a scope it looks like I am limited to a a 200hz rate. What am I doing wrong??? Can labview do this or is it too slow ???
Thankssnook wrote:
> what is the data throughput in labview. I want to use the parallel as
> acheap digital i/o to drive a stepper motor.
>
> I am trying to use the parallel port on a win xp machine to send data
> a@ up to a 3k rate. This is for the the purpose of driving a stepper
> motor. I have tried the port.out vi and placed this vi in a loop and
> it on a scope it looks like I am limited to a a 200hz rate. What am I
> doing wrong??? Can labview do this or is it too slow ???
Basically the way the Port I/O VIs are implemented they call through a
device driver for each port access. This slows down the maximum port
accesses to something like 1000 times per second depending on the speed
of your CPU.
There is a way to do it faster but that is a little more trick
y. The
idea is to use a device driver to enable particular port addresses to be
accessed directly from the application level instead of always going
through the kernel.
I have written such a VI library and accompagning DLL and device driver
and made it available on OpenG. It is not yet part of the standard
binary distribution packets so you will have to get it from the CVS
repository.
Go to:
http://cvs.sourceforge.net/viewcvs.py/opengtoolkit/portIO/built/portio/
and download all the files in there including the ones in the
subdirectory "ogportio.llb" and if you like "docs"
If you want the nitty gritty technical details you can also look at
http://cvs.sourceforge.net/viewcvs.py/*checkout*/opengtoolkit/portIO/c_source/Description.htm?rev=1.5
On my 866 MHz Pentium mobile I can increase the number of port accesses
in this way from 440 ms for 4000 read byte port accesses (100us ms per
access) to 20 ms for the same number of read accesses (5 us per access).
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Servo motor using parallel port
Hello,
I have a XY mirror scan Servo motor used for optical scanning experiment.
The question I have is:
I already have a program to control stepper motor via parallel port. Can I use the same to control servo motor ?
Or is the SERVO motor concept different to that of a STEPPER motor ...
Thank you
Abhilash S Nair
Research Assistant @ Photonic Devices and Systems lab
[ LabView professional Development System - Version 11.0 - 32-bit ]
LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]You will need a DAQ card that can generate the voltage needed to send a command signal to the 671. The 671 will need to be tuned to the 6880 with whatever sized mirror is attached. (If you bought the galvo and servo driver as a package it should already be tuned.)
CTI systems take in an analog command from -10 to +10 Volts. Almost all the NI DAQ cards (and many other brands) output +/- 10 Volts so that will be easy.
Then you will need to decide how to scan your target. A ramp pattern or triangle wave is the usual choice for scanning objects so you need to generate that in LabVIEW code along with the code that will read your sensor. This should be done simultaneously but you really don't need a very expensive DAQ card to accomplish that. Look on the NI website for options in your price range and do some research...
Is your system one axis (one 6880 and one 671)? If so you will scan a raster (ramp or triangle) to measure a single line of light intensity, move the stage a tiny distance and scan another line. When you put all the lines together into a 2D image you will have a representation of one face of your object. Many people use a rotary stage to spin the object while scanning to assemble a 3D model of the object. This is a bit more complex of course.
Using LabVIEW: 7.1.1, 8.5.1 & 2013 -
Could you help me to control a DC motor with the parallel port and windows 2000?
I have labview 5.1 and i want to control my application throught the internet
I would recommend upgrading to LabVIEW 7.0 for a couple of reasons. First, LabVIEW 6.1 introduced remote front panels which allows you to control a VI through a web browser. Setting up remote front panels is very simple and that alone is worth the upgrade. As far a using the parallel port you can use VISA to send/receive commands via the parellel port if you are using a motor controller with a parellel interface. If you are talking about using the port on a bit level to control the motor, LabVIEW 7.0 ships which an example of how to do basic digital input output with the parallel port.
Regards,
JR A.
Application Engineer
National Instruments -
Parallel Port (Mac OS 9)?
I am putting together an electronic circuit for controlling a stepper motor. The board includes an option for a parallel port as typically found on older PCs.
Is there a product available that would give me a parallel port on my G4 tower that I could then program? I am familiar with writing Firewire and older serial port drivers and feel comfortable writing code. All I need is the hardware and an associated software library for accessing the port.
Please note that I am using Mac OS 9.2.2. I have no tools or desire to write for X.
GaryHi Gary, look for an old USB to Parallel adapter that's Mac compatible.
Here's one...
http://www.antarespro.com/890523-item-LINK_DEPOT-USB-DB25--899744001363-USB-DB25+DataTransfer.aspx?sgd=330d319d318d313d316 -
Parallel Port address out of range for output.vi
Hi all,
I know people have had this question before, but I don't seem to follow the responses.
Basically, I have a Parallel Port connected through a PCI slot with the address BCC8, and I've been trying to talk to a stepper motor using output.vi, but as far as I can tell the address input is limited to I16 values. Is there away to get around this?
HannHi Hann,
What forum postings have you been researching before posting? We need more information about your application, perhaps posting your code would be helping in resolving your issue. Are you using a particular LabVIEW toolkit like the LabVIEW Motion Control Tools or are you using VISA Read and Write functions?Where are you getting the output.vi? What version of LabVIEW are you using.
Joshua B.
National Instruments
NI Services
NI Support Resources
NI Training Resources -
Usb to parallel port converter
Hello all
I am having usb to 36 pin parallel port converter and i try to communicate with that to run a stepper motor.
how can i communicate with that.? I plan to use visa function for that, what are all the pins i have to be grounded. (Can i use visa write funtion for that?)
i have read in forums for IEEE1284 standard i have to ground pin 11 and pin 12.
And i dont know one more thing, in max i can see only COM ports without any problem and i cannot see any usb port in that.
Is COM port and usb port are same.?This may make things more difficult. You can try if outport to the port addresses hex378 or hex278 works, but probably it doesn't. You may try to find out if your device has a different port address.
A PCMCIA parallel port normally works like a standard one. with the 378 or 278 port address.
Cheers
Edgar -
I am trying to control a OMHT23-400 stepper motor through a 3540M motor drive using a Moschip PCI Parallel Port. I created a program to send alternatilng pulses to the motor and rotate it a desired amount of degrees. The address of the stepper motor in my computer is I/O Range BD00-BD07. The same program worked in another computer who's parallel port address was I/O Range 0378-037F. I dont know why the program is working in the first computer and the same program wont work in this one. Thank you for your help.
PS: the program that i wrote is attached below.
Guillermo Naranjo
Physics/Space Science
Florida Institute of Technology
Phone: 768 537 6392
e-mail: [email protected]
Solved!
Go to Solution.
Attachments:
Rotation of Camera2.vi 17 KBDear Gant88,
first download and unpack accesshw.zip as instructed (you can also unpack it to the directory where your .vi files for this projet are, thugh this is not good practice).
I attached my write_port and my read_from_port. (LV 7.1)
In my case I wanted to write (or read) 32 bit integer from the port, for this purpose I am writing (or reading) three (data, status, control) bytes at different locations. You will figure out.
Take care not to have any printer installed (in win xp) on parallel port, because windows will do some check-ups on printer from time to time. This will interfere with your program.
Try and let me know.
regards.
Bojan
Attachments:
write_to_port.vi 28 KB
read_from_port.vi 32 KB -
i need to be able to write to the parallel port on a desktop computer
to control a stepper motor. I need to be able to write logic high and
low
at certain pins that go to a stepper motor driver. The writing to the
port needs to be done so many times, or so many steps that are entered
into the interface. Pins7 is the clock that that starts the stepper
motor control in the stepper motor driver. Also, pins 9 and 10 need
to be driven low or high to tell driver wether half or full step and counter clockwise or clockwise.
Basically i need to know how to set up my parallel port on my labtop in labView 7.1?
I want to be able to use the write to digital I/O.vi to send the proper
binary or hex value of an index array to the parallel port
to drive the motor driver.Hi exavier,
Look here maybe someone else hase asked.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
Stepper motor input pulse problem
Hello
I've purchased 4 autonics a41k-m599 model 5-phase stepper motors and 4 MD5-MF14 model drivers. I want to pulse the drivers via parallel port with c++. Now I have some serious problem, first I can't get a higher speed than 666 pps (1500 microseconds interval), second and more important when I send pulse to driver I see motors rotate smoothly but in some moments (and not regularly) they produce some small pauses which result in some small shakes or vibrations. Here I send you a scrap of my c++ code:
// ten cycle
for(int iLoop = 0; iLoop < 10; iLoop++) {
// 500 step to complete a cycle (each step is 0.72 degree)
for(int j = 0; j < 500; j++) {
outp(LPT1, HIGH); // send HIGH to CW through LPT1
outp(LPT1, LOW); // send LOW to CW through LPT1
DelayMicroSleep(1500); // delay 1500 microseconds as pulse interval
Here's a picture of my driver's time chart and input pulse specifications:
http://lh4.ggpht.com/_sFND_wFW_Qo/SttpJRzLpKI/AAAAAAAACGA/uRNWYH519dU/s800/StepperMotorTimeChartPuls...
So now what could be the problem?Should you not have a delay between sending the high and low pulse? Otherwise the pulse will happen very quickly.
// ten cycle
for(int iLoop = 0; iLoop < 10; iLoop++) {
// 500 step to complete a cycle (each step is 0.72 degree)
for(int j = 0; j < 500; j++) {
outp(LPT1, HIGH); // send HIGH to CW through LPT1
DelayMicroSleep(hightime);
outp(LPT1, LOW); // send LOW to CW through LPT1
DelayMicroSleep(1500); // delay 1500 microseconds as pulse interval
nrp
CLA -
Problems with Parallel Port on Reboot
Hi,
I use labview to drive my stepper motor connected to the parallel port
on my Win98 machine. The motor takes a step for every clock pulse sent
out on a particular pin on the port.
Although my problem is not directly related to labview, I was hoping to
get a solution. Every time I reboot my computer (at least once a day,
it seems) the computer sends a series of clock pulses to the port,
moving my motor several hundred steps. I cannot tell if it's a regular
series of pulses or just random noise.
Is there a way to disable the lpt port or otherwise prevent spurious
noise being sent out to my motor when rebooting my machine? Or when
labview is not running?
Thanks,
ScotWindows likes to check for plug-n-play devices when it boots up. You may want to set up a relay/interlock gating system that only allows pulses to reach the motor driver when one digital line is high and another other digital line is low.
-Jim -
Using BNC2110 DAQ In Order to Control Stepper Motor
So basically my goal here is to use LabView to control the direction and the steps of the stepper motor.
I have BNC 2110 (connected to PC), Lin Engineering's 4218M-54P-04 Stepper Motor, and Lin Engineering's R701 Stepper Motor Driver.
The specification documentations are attached.
I know that the driver and the stepper motor are compatible.
Is it possible to control the motor through Labview(PC) < - -> BNC2110 < - -> R701 Driver < - -> Stepper Motor, without the motor's own controller?
An example of a controller for this particular motor would be on this website.
I would much appreciate your support.
Thank you.
Attachments:
4LeadBipolarSteppingDriver-linengineering--4218m-54p-04.pdf 652 KB
DriverR701.pdf 379 KBHi jhprks,
It would appear that the stepper motor controller that you list communicates via RS-232 or RS-485. You can make serial calls in LabVIEW using the Serial or VISA commands. It could be something to look into.
Further, we do have a multitude of ways to accomplish this with our hardware; here are a few resources to take a look at, with the first being an example of how to do this with a multifunction DAQ device:
Using Software Timed Digital IO to control a stepper motor with DAQmx:
http://decibel.ni.com/content/docs/DOC-6385
Stepper motor control via Parallel port:
http://zone.ni.com/devzone/cda/epd/p/id/3611
High Performance Stepper/Servo control:
http://sine.ni.com/nips/cds/view/p/lang/en/nid/10026
Stepper Motor Theory of Operation:
http://zone.ni.com/devzone/cda/ph/p/id/248
Stepper motor Drives:
http://sine.ni.com/nips/cds/view/p/lang/en/nid/3308
Adam
Academic Product Manager
National Intruments -
Stepper Motor with Linear Stage (Position Control and Data Acquisition)
Hey All,
So.. I've attached a stepper motor to a linear stage and so far it's working pretty well. Using a stepper motor driver from Pololu, I've simplified the control of the motor by just using output pulses from the counter output of a PXI-6143. I've tested the motor using the Pulse Train examples in LabVIEW and all is working well.
My goal now is to allow the user to collect data from a pressure sensor, attached to the linear stage, every X number of steps. From what I can tell so far, and please correct me if I'm wrong, the motor step movement is synchronised with the pulse train input. That is to say, if I give the motor a 200 step pulse train, the pulse train ouput is completed at the exact time the motor has moved 200 steps. From this, I've created a VI that moves the motor X steps, aquires the data point, and then repeats this process for the required amount of data points. The problem with this is that the motor movement is not continuous; it stops for a split second to take the data point.
How can I have labview ouput a pulse train of say 1000 steps and record a data point every 50 steps?
Two ideas that came to mind were:
1. Use the counter input port on the card to count the pulses being sent to the motor.
2. Use an encoder connected to the motor shaft.
I wanted to stay away from theses ideas though since they require resources from the DAQ card.
Thanks,
RyanHi Ryan,
Just to cover all the bases, what version of LabVIEW are you using and can you attach your VI? Initially your ideas sound like they should work, do you expect to be nearly maxing out the DAQ?
Thank you,
Deborah Y.
LabVIEW Real-Time Product Marketing Manager
Certified LabVIEW Architect
National Instruments
Maybe you are looking for
-
In Store Customer Service Complaint
On 10/19/2014 I went into the Verizon store located in Royal Oak Michigan on Woodward Ave. with my friend to get a new plan started, once inside we were assisted with an associate named Jamal. We had come in knowing we wanted to activate a Samsung No
-
I have the firefox icon on the tool bar at the bottom. When I click on it, another one appears so now there are 2. I wanted to update my firefox but, when I try to run the install I get a box that says that I need to close firefox in order to install
-
Clean Lion install, keeping Time Machine history?
I have a 2011 unibody MBP, and have been gathering kludge on it for some time, and on previous machines (2007 MBP, 2004 Powerbook) whose data I've migrated over using the Migration Assitant. I'd like to, at some point soon, do a fresh install of Lion
-
Have to keep resetting hub 3.0
I have had infinity since the 8th of march the problem is I have to keep unplugging and resetting my home hub 3.0 I get speeds of about 30mb through ethernet connection and about 20mb wireless about 24 hours after I reset the hub my wireless keeps dr
-
YouTube Chromeless Player ceases to enlarge up to Full Screen width in Full Screen mode
Hello all! I tested my skin for YouTube Chromeless player, and seems it worked properly. All graphic elements, including TLFTextFields, are stored in external SWF, all the AS3 code - in loading SWF. I use ProLoader class to load SWF. However, when I