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
nrp
CLA

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

Similar Messages

  • Open a PDF file in linux using java

    Hi..
    How can I open a PDF file in linux using java.
    I am able to open PDF in windows and mac using this code
    in Windows
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);
    in mac
    Runtime.getRuntime().exec("open " + path_of_PDF);
    But nothing is working with linux.
    Please help
    Thanks

    One thread is enough:
    http://forum.java.sun.com/thread.jspa?threadID=5267458

  • Open PDF file in linux using java

    Hi..
    How can I open a PDF file in linux using java.
    I am able to open PDF in windows and mac using this code
    in Windows
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);
    in mac
    Runtime.getRuntime().exec("open " + path_of_PDF);
    But nothing is working with linux.
    Please help
    Thanks

    appi wrote:
    Hi.. I found the JDIC binary files. There are different binaries for all the plateform. Is there any solution which is independent of plateform.Yes, and we already told you: Use JDK6, which has those libraries built into the standard class library.
    How can I use these binaries in my existing project. does it work, If I place them at same place where other .class files are kept.Read the documentation of the JDIC project. I'm sure they answer this question in their FAQ.

  • How do I create an FSDIAG file on Linux systems?

    QuestionHow do I create an FSDIAG file on Linux systems?
    AnswerTo create an FSDIAG file for the Linux Security product:
    Go to a working directory to which the fsdiag.tar.gz file will be created.
    Run the following command:
    # /opt/f-secure/fsav/bin/fsdiag
    Note: Any existing FSDIAG file will be overwritten.
    You will find the fsdiag.tar.gz file on the current working directory. Attach this file to your support request.
    To create an FSDIAG file for the Internet Gatekeeper (IGK) product:
    Create the diagnostic information file (diag.tar.gz) in the product install directory by running the following command:
    - IGK (Japanese 4.x): # cd /home/virusgw; make diag
    - IGK (English 4.x or English/Japanese 5.x): # cd /opt/f-secure/fsigk; make diag
    Note: Any existing FSDIAG file will be overwritten.
    Attach this file to your support request.
    Note that you can also create the diagnostic file by using the Web UI.

    An .srt is simply a plain text file with sequence numbers, time markers, and captions. You can use any text editor to make one. Follow the pattern:
    1
    00:00:00,500 --> 00:00:04,500
    So it was with my formal education
    as well.
    2
    00:00:04,600 --> 00:00:08,250
    Each weekday, while my father worked
    on his Sunday sermon...
    3
    00:00:08,300 --> 00:00:10,000
    I attended the school
    of the Reverend Maclean.
    The first number (e.g., 00:00:00,500) in each pair indicates when the caption starts. The second number (e.g., 00:00:04,500) in each pair indicates when the caption stops.
    If you're going to be captioning many videos, consider an application that merges a text editor and video preview window. Jubler (http://www.jubler.org/) is one.

  • Default filename for print to file in Linux

    Hi,
    I'm using print to file in Linux, and I'd like the default filename to be the page title. I couldn't find a config option for this. It retains the last file name I used, which is very problematic for me, as I can easily overwrite my last printed file by accident.
    I'd also like the printer to default to print to file. Is that possible? Not a big deal, but it would save me a click. :-)
    BTW, I've found that the print to file for PDFs is excellent. It often produces PDFs that half the size of other options I've tried. Thank you!
    Ari

    This is not solved as I do not know where to change the default directory.

  • Trying to use 10G for linux

    Two Problems
    1. I downloaded 10 for linux,
    used gunzip
    Now I am at ship.db.cpio
    I ran cpio -idmv ship.db.cpio
    The command never stoped, what did I do wrong ???
    Next problem
    The 10G for linux state:
    I need to change on my linux computer,
    sysctl.conf, pam.d/login, limits.conf, profile
    There all read only files,
    What do I need to do ????
    I am using Red hat linux EP. rev 3 newest one.

    1. Use cpio -idmv <ship.db.cpio
    sysctl.conf, pam.d/login, limits.conf, profileThese are system files : you have to login as root to modify them, or su - root if you are already connected as another user.

  • Java class write file in Linux related to locale setting?

    Hi all,
    I have encoding problem, I need to write database data with UTF-8 into file in Linux, the data included Chinese characters and English, and send file to other machines.
    My question is does it affect the UTF-8 data if the Linux machine does not have character set for Chinese encoding and just use OutputStreamWriter to send the file to other machines?
    The Linux locale is "C"
    In other machines, I only read the Chinese character using putty.
    Can any one tell me how to solve it?

    My question is does it affect the UTF-8 data if the Linux machine does
    not have character set for Chinese encoding and just use
    OutputStreamWriter to send the file to other machines?Until data is displayed to the screen by the Linux computer, it does not matter whether it can display Chinese characters.
    Additionally, the mixed Chinese-English data sounds like a potential encoding problem - unless you have an encoding that matches the data.

  • Problem in opening pdf file in linux

    how can i open a pdf file in linux(openSuse)..i can open .doc, .xls, .pdf in windows using the code.. its working fine..
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);like that i want to open in linux...
    i would be very grateful to you and i need help..plz
    plz............
    Thanks in Advance....

    I've used code like
    File path=new File("/home/RichHelp.pdf");                Runtime.getRuntime().exec("Desktop.getDesktop().open()"+path);i'm getting these errors
    java.io.IOException: Cannot run program "Desktop.getDesktop().open()/home/RichHelp.pdf": java.io.IOException: error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:328)
    at richwoods.MasterScreen.actionPerformed(MasterScreen.java:795)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
    at java.lang.ProcessImpl.start(ProcessImpl.java:65)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
    ... 31 more

  • FRM-10043 Cannot open file in LINUX

    FRM-10043: Cannot open file.
    I have created a form sucessfully in windows.It works fine.
    Now i have to use it in LINUX. So i copied the fmb file into the Linux
    where the default test.fmx is placed.
    Now i executed the below query and i got the result cannot open file.
    [orabif@br bin]$ sh frmcmp_batch.sh userid=CNT/CNT@cmt
    compile_all=yes module_type=form module=logonfile.fmb
    Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)
    Forms 10.1 (Form Compiler): Release - Production
    Copyright (c) 1982, 2005, Oracle.
    All rights reserved.
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE 10.1.0.4.0 Production
    FRM-10043: Cannot open file.
    Form not created
    Plz help me to solve this problem.
    *I know that there is no need to compile OLB files. but my forms shows error that
    FRM-18108 Failed to Load objects.
    when i use Frmcmp.sh GUI the form is compiled succesffully if there is no OLB attached with it.
    It gives Fr-18108 when OLB is attached with he form
    A timely help is needed...
    Thanx in advance..
    with cheers
    sprity....

    sprity,
    Did you copy the .OLB file(s) to your LINUX server also? If not, you will need to copy them as well as your forms 'Inherit' the shared objects from the .olb's so they have to be present in the FORMS_PATH on the server when you compile your .fmb's. If you did copy them, first make sure they were copied via Binary Mode and if so, then I would refer you back to Grant's post and suggest you make sure the files were copied via 'Binary' mode to the LINUX server. Rather than Copy and Paste the files, you may want to FTP from a command prompt or a FTP Program so you can ensure the files are moved to the LINUX server in Binary mode.
    Craig...

  • "java.io.IOException: Too many open files"  in LinuX

    Hi Developers,
    * I am continiously running and processing more than 2000 XML files by using SAX and DOM.....
    * My process is as follows,
    - Converting the XML file as Document object by DOM....
    - And that DOM will be used while creating log file report, that log file will be created after executing all XML files..
    * After processing approx 1000 files, it throws *"java.io.IOException: Too many open files" in LinuX system* ....
    * I have googled more and more in all sites including sun forum also, but they are telling only to increase the system config by ULIMIT in linux....If i increase that its executing well without exception........
    * My question is, Is it possible to do it by JAVA code itself or any other VM arguments like -Xms512m and -Xmx512m.....
    * Please let me know , if you have any idea.....
    Thanks And Regards,
    JavaImran

    Doh! I forgot to post my little code sample...
    package forums.crap;
    import java.io.*;
    import java.util.*;
    public class TooManyFileHandles
      private static final int HOW_MANY = 8*1024;
      public static void main(String[] args) {
        List<PrintWriter> writers = new ArrayList<PrintWriter>(HOW_MANY);
        try {
          try {
            for (int i=1; i<=HOW_MANY; i++ ) {
              writers.add(new PrintWriter("file"+i+".txt"));
          } finally {
            for (PrintWriter w : writers) {
              if(w!=null)w.close();
        } catch (Exception e) {
          e.printStackTrace();
    }... and the problem still isn't OOME ;-)
    Cheers. Keith.

  • Configure ODBC to access a CSV file on Linux for access from BI Server

    How to configure an ODBC connection to a CSV file on Linux for access from the BI Server Repository physical layer
    I am migrating a working windows OBIEE installation to Linux and can not seem to connect to csv files on Linux (from th BI server also running on the same Linux machine).
    I am using SUse Linux Enterprise server / 10 (Slash 10) standard odbc drivers
    My odbc ini file entries are:
    [ODBC]
    Trace=0
    TraceFile=odbctrace.out
    TraceDll=/app/oracle/product/10.1.3/OracleBI/odbc/lib/odbctrac.so
    InstallDir=/app/oracle/product/10.1.3/OracleBI/odbc
    UseCursorLib=0
    IANAAppCodePage=4
    [ODBC Data Sources]
    AnalyticsWeb=Oracle BI Server
    Cluster=Oracle BI Server
    SSL_Sample=Oracle BI Server
    idcbicsvfiles=Odbc Text driver
    [idcbicsvfiles]
    Description = Odbc Text driver
    Driver = Odbc Text driver
    Directory = /data/oracle/OracleBIData/idc
    #ReadOnly = No
    #CaseSensitive = No
    #Catalog = No
    ColumnSeperator = ,
    #Trace = 1
    #Tracefile =/data/oracle/OracleBIData/odbctrace.txt
    #Username      = oracle
    #Password      = ''
    [AnalyticsWeb]
    Driver=/app/oracle/product/10.1.3/OracleBI/server/Bin/libnqsodbc.so
    Description=Oracle BI Server
    ServerMachine=local
    Repository=
    Catalog=
    UID=
    PWD=
    Port=9703
    The csv files I want to use are in the directory /data/oracle/OracleBIData/idc to which I have set up a working and checked connection ([idcbicsvfiles]) on the linux machine itself.
    The error message I get when I select view data in the physcial layer is:
    [NQODBC][SQL_STATE: HY000][nQSError: 10058] A general error has occurred.
    [nQSError: 43093] An error occurred while processing the EXECUTE PHYSICAL statement.
    [nQSError: 16023] The ODBC function has returned ans error. The database may not be available, or the network may be down.
    Please can anybody give me a clue on how to get this working e.g. a working odbc.ini file from your own installation (and/or a tip for the odbc driver choice/configuration)
    P.S. I know this is not supported by Oracle but can not imagine, that nobody is using this.

    Hi,
    Chekc this...Re: Is there ODBC driver for excel flat file in Unix Box
    Re: OBIEE to use a CSV file as a data source on Linux
    Regards,
    Srikanth
    Edited by: Srikanth Mandadi on Oct 8, 2010 2:50 AM

  • EPS-file: How to preserve resource fork when moving file to Linux

    Hi!
    We have a following problem on our DAM system:
    When saving an EPS-file from Photoshop CS2 on 10.4 with Machintosh preview we can´t transfer the file to Linux DAM system without losing the preview picture. Apparently this is because the PICT preview file is in resource fork of the file and Linux doesn´t understand anything about those.
    The problem occurs only with Freehand MX when using these un-"resource forked" files. Then using EPS with TIFF-preview we get a black background if cut path is used in the image so that´s not a proper solution.
    Can ANYONE point me a possible solution: how can I transfer Macintosh files on Linux without losing resource forks??
      Mac OS X (10.4.8)  

    Control-click on the file and choose the Create
    Archive of "blah" item in the menu that pops up.
    This creates a file called "blah.zip", which has
    been compressed in such a way that it can be safely
    stored on non-Mac systems. When it is de-archived
    on another Mac OS X system (by double-clicking it),
    the file should be intact. (Note that third-party
    apps for decoding zip files may not properly restore
    the resource fork, as the Mac's archive function
    creates a zip archive with the resource contents
    stored in a special way, which other unzip utilities
    will just read as another file (or folder, don't
    recall which).
    Thanks but I should have been more precise:
    What I meant was that is there any tool for Linux to handle resource forks without archiving/compressing the file?
    Our DAM generates preview image for the EPS automatically so it can´t be inside compressed file.

  • Printing issues using acroread on linux vs acroread on hpux

    We have an installation on HPUX 11i of Oracle financial apps.
    The application generates a PDF doc which has to be printed .
    on HPUX we then use acroread to convert the PDF to postscript, and send it out the hp lp utility to a windows print server, then to a Lexmark T632 printer. This process essentially works correctly.
    The same application has been ported to linux, and generates a virtually identical pdf file on linux. Using the same version of acroread on linux we generate postscript output and send through cups using the same process.
    On the linux run, this results in the top line of the page being truncated and the offset of the page being wrong (it shifts left relative to the hpux case)
    Since these are cheques this is a critical error. Using acroread with the shrink option on linux results in the MICR font on the cheque failing tests.
    I've retrieved a ppd file from Lexmark for the t632, and the behaviour continues.
    Further diagnosis included comparing the output postscript files from hpux and linux, and I noted that the postscript file generated on hpux refers to a pdfasc.prc where the postscript file generated on linux does not have this data in it.
    Falling back to cups pdf2ps also results in truncating the top line (cheque number) and the left shift, both with and without the lexmark ppd.
    Acrobat reader version is 5.10 and 5.11 on hpux.
    Can anyone comment on where this pdfasc.prc data are coming from and how can I get it in the linux world?
    *footnote* we have noted that the original document format tool may not be entirely correct as it appears we have no margin definitions in the template. This issue will be fixed but this is now a production system and this set of changes will take time.

    Originally installed on the linux boxes was acrobat 7
    This version resulted in some truly wild print results.
    I am going to retry since the tests under acrobat 7 were conducted by
    different staff.
    My question stands. Where does the reference to pdfsasc.prc come from on hpux?
    If I take the postscript output generated on the hpux box and push it through cups on the linux box I get expected results.

  • Dataload error using MaxL on LINUX

    Hi All,
    I'm using Essbase 11.1.2.1 & working on ASO cube. I'm trying to load the data using Maxl on LINUX.
    This is the following error: essmsh error: End of File breaks the Statement.
    any ideas.......
    Thanks,

    rasch wrote:
    Hi,
    I am using DAQmx-base (C library) on Linux with a USB-6009 device. When I am acquiring data
    using DAQmxBaseReadAnalogF64() (the code is based on the example contAcquireNChan.c)
    everything works, but when I am using DAQmxBaseReadBinaryI16() the following error
    happens:
    DAQmxBase Error: Value passed to the Task/Channels In control is invalid.
    Everything is the same just the ...AnalogF64 is replaced by the ...BinaryI16 function call
    (of course the buffer used for storing the data was also changed from float64 to in16).
    Does anyone know what settings (or missing settings) result in this error?
    Every explanation or pointer to some documentation is welcome. I already checked the
    C reference HTML documentation coming with DAQmx-base without success.
    Thanks
    Raphael
    From the ReadMe file for DAQmx Base on Macintosh OS X:
    NI USB-9211
    *Analog Input
    -Multi-channel, multi-sample read (scaled)
    -Multi-channel, single sample read (scaled)
    NI USB-9215
    *Analog Input
    -Multi-channel, multi-sample read (scaled)
    -Multi-channel, single sample read (scaled)
    NI USB-6008/9
    *Analog Input
    -Digital start triggering
    -Multi-channel, multi-sample read (scaled)
    -Multi-channel, single sample read (scaled)
    Raw input simply isn't supported for the USB devices. I would guess that the situation for Linux is the same, since DAQmx Base is based on Labview code in order to achieve cross-platform portability. See the thread
    http://forums.ni.com/ni/board/message?board.id=250&message.id=11873
    and, for a slightly different problem:
    http://forums.ni.com/ni/board/message?board.id=250&message.id=11963
    Be sure to read down to where there is a message indicating that support for USB devices is planned for NI-DAQmx. Of course, that won't help on Macintosh and Linux.
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • How to use jdeveloper with linux?

    how to use jdeveloper with linux?
    Hello, i've download jdeveloper, and i have java1.4 installed. But i can't run jdeveloper i have jdev.exe and jdev but when i put /usr/local/jdev/bin/jdev a have a message like file not found. I don't know what to do.
    Help please!!!
    Ori.

    You need to go to the directory where you unzipped JDeveloper, for example:
    cd opt/jdev/jdevj2eebase1013/jdev/bin
    Once there, do this:
    chmod +x jdev
    chmod +x ojc
    Now you can try this:
    nohup ./jdev &
    or simply
    ./jev
    I usually create a soft link in ~/bin

Maybe you are looking for

  • Is there a way to reset the printer (laserjet pro 300 color mfp)

    So I've had alllllll sorts of problems with my all-in-one.  Often when I try to scan, it won't work, saying that it can't find the printer.  Same when trying to print.  I figured it was some sort of connectivity issue.  I connect via my wifi network.

  • How to include external javascript file in an html

    hello i've an html file placed in apache/webapps/test folder this html file includes an external javascript file placed at same level i'm includind the file as <script src="file1.js"></script>but the file does not gets included but when the sam folde

  • Can's see who is in the CC line in Mail

    Just recently I can now longer see who is in the CC line of incoming mail unless I scroll over the field. This is when an individual message is open. I can't seem to find anything in view or preferences that changes this.  Any hints?

  • How to switch display to use only AMD graphic card on Lenovo G470

    Hi, seems like there are 2 graphic cards on my Lenovo G470, 1 internal & 1 AMD HD6370. Does anyone knows how to change the option so the laptop always use only AMD graphic card? Thanks!

  • OAS Custom Help For Web-Enabled Forms

    Anyone had experience implementing a customized help system into Web-Enabled Forms running on OAS. Regular Oracle Forms can display a help system using a specialized Oracle Form D2KHMain.fmx or using WinHelp with the library D2KWhelp.pll. Will either