Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

(RhetTbull) Re: Re: homemade data acquisition

by RhetTbull (Curate)
on Dec 18, 2001 at 07:35 UTC ( #132775=note: print w/ replies, xml ) Need Help??


in reply to Re: homemade data acquisition
in thread homemade data acquisition

As cacharbe mentioned, using a serial port is definitely the easiest and most portable solution. However, it is possible to talk to other devices with perl but requires more elbow grease. I worked on a similar project where I used the serial port to collect data (I was collecting directly from a Tektronix scope with RS232 out) but needed to use the parallel port to control some devices. As a result I created a Win32::RawIO module that let me talk to the parallel port. It did require creating a kernel level device driver (yuck!) but it works well. I'm working on cleaning it up for CPAN as time permits (it's only been tested in one app and isn't very robust and the pod is, well, there is no pod...) As a bonus the module comes with peek() and poke() routines that work on physical memory address which could lead to some really interesting obfus and other dark magic :-) Of course, my module only works on Win32 and as soon as someone needs to run the app on linux or something else I'll be writing a new device driver...

The serial port is definitely the best supported and what I would probably use but there are times when it's much nicer to be able to read or write 8 bits at a time or when you don't have a spare serial port.


Comment on (RhetTbull) Re: Re: homemade data acquisition
Select or Download Code
Re: (RhetTbull) Re: Re: homemade data acquisition
by cacharbe (Curate) on Dec 18, 2001 at 09:21 UTC
    My comment about kernel level programming was in reference to data acquisition products by companies like Keithly metrabyte, Computer Boards Incorporated, IOTech, National Instruments, etc, who produce plug-in acquisition boards. These lead you to reading documents like this (although IOTech has a Parallel Port or PCMCIA solution module that will do on the order of 1 million samples per second aggregate, but it streams to ram, YMMV). The drivers for this one were particularly interesting.

    I'd be interested to see some of the IO Work that you've done in Win32::RawIO. I was looking at a site earlier that had a large section on USB development for linux (though nothing specific to data acquisition)...The possibilities are endless.

    C-.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://132775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-08-20 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (124 votes), past polls