LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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 ???

Thanks
0 Kudos
Message 1 of 5
(3,399 Views)
Hi,

Parallel ports are inherently very slow. It looks like a hardware limitation that you cannot achive 3K data rate. You might want to check out ni.com for an inexpensive Data Acquisition board.

Regards,
Ankita A.
National Instruments
0 Kudos
Message 2 of 5
(3,399 Views)
snook 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  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 5
(3,399 Views)
"Ankita A." wrote in message news:<50650000000500000092B30100-1079395200000@exchange.ni.com>...
> Hi,
>
> Parallel ports are inherently very slow.

Parallel ports can be very fast depending on the mode and the software
running them. See:
http://www.sxlist.com/techref/ubicom/lib/io/epp-ag.htm for an example
that easily gets into the MBps using EPP mode

http://www.sxlist.com/techref/ubicom/sxoscope/index.htm

http://www.sxlist.com/techref/io/parallel/1284/eppmode.htm The effect
is that by using the EPP protocol for data transfer, a system can
achieve transfer rates from 500K to 2M bytes per second.

Now, Labview probably doesn't support that mode, but other programs
can (have) been written which do.
0 Kudos
Message 4 of 5
(3,399 Views)
James Newton wrote:

> Now, Labview probably doesn't support that mode, but other programs
> can (have) been written which do.

Well, EPP mode is a certain way of setting up the parallel port
registers and using them then. Using Port IO functions you do not use
EPP mode or any other mode at all although you could basically try to
implement EPP mode yourself by accessing the port registers in the
appropriate way but by trying to do that from application level instead
of in a device driver you do limit the maximum speed already. EPP mode
is only really achievable if you also use interrupts and that is just
simply a big NO NO from application level.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 5
(3,399 Views)