LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using "files" in linux

Hi there,

Before I start this question, I have to confess, I am a Windows user, my Linux knowledge is limited. Our company is looking to move our apps to a Linux platform, and I am doing a little feasibility research.

We have some custom designed hardware, currently accessible via DLL on Windows.

One of our Linux gurus (and developer of our driver) told me that, in C, when I am trying to access hardware under linux, all I need to do is open a file stream to the hardware (for example /dev/tty0) and then use the standard file read/write operations. So my question is, does this function the same in LabVIEW, ie use the advanced file handling functions to open a path to a file (which is actually mapped via the driver to some device) and then just read/write data as necessary (which then, via the driver, passes the data to the hardware).

Or, would I use a shared object? I have to say I am a little confused now as I dont see how the stream method compares to the shared object method.

Any ideas?

Thanks
Neil

0 Kudos
Message 1 of 2
(2,512 Views)
Hi,
 
Looking at what you are saying, it shouldn't be a problem to just create a LabVIEW program that will just stream data to the "file".
I don't personally see a problem, all you need to do is make sure you have the correct file write functions.
Before you start, make sure you are using binary, ASCII file writes, weather you need to be telling the "file" the timing of each output point and how this will effect the reation of the card.
The same applies to reading the file, it is possible to read on the go. (You just need to use the EOF flag for each successful read) and from there you can (as long as you know the data type) convert the data to the appropriate numerical values for analysis.
 
I would therefore suggest that this is a feasable solution as ong as you are confident that all you need are file write and read functions to control the device.
 
Please post again if you reqire mnore information
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 2 of 2
(2,493 Views)