Read-Write ABF-Files

Hello!I wish to write the program allowing to read and write abf files. For this purpose on a site http://www.moleculardevices.com/home.html has downloaded library dll - Axabffio32.dll. The problem following - how with Call Library Function Node to describe function ABF_ReadOpen:
#include "abffiles.h"BOOL ABF_ReadOpen( char *szFileName, int *phFile, UINT uFlags,ABFFileHeader *pFH, UINT *puMaxSamples,DWORD *pdwMaxEpi, int *pnError );Opens an existing ABF data file for reading. Reads the acquisition parameters from the file header into the passed ABFFileHeader structure.Parameter szFileName Name of data file to open. phFile Pointer to ABF file handle of this file. uFlags Flag to indicate whether file is parameter file or not. pFH Pointer to acquisition parameters read from data file. puMaxSamples Pointer to requested size of data blocks to be returned. pdwMaxEpi Pointer to number of sweeps that exist in the data file. pnError Address of error return code. May be NULL.
The ABF_ReadOpen function opens the data file szFileName, allocates an ABF file handle for it and assigns this number to *phFile. Data is read from the file header into *pFH. If ABF_PARAMFILE is set in uFlags then no further processing is performed, otherwise internal buffers are allocated in preparation for file reading.For ABF_GAPFREEFILE and ABF_VARLENEVENTS files, *puMaxSamples is passed in as a requested maximum size of the blocks of data returned by the ABF_ReadMultiplex and ABF_ReadChannel routines. For all modes, the actual value that will be used is returned in this location.For Event Detected modes, on calling ABF_ReadOpen, the parameter pdwMaxEpi points to a the maximum number of sweeps to read from the file. If it is zero the maximum will be 8192 sweeps, depending on RAM availability. The total number of data blocks of the size returned in *puMaxSamples is returned in *pdwMaxEpi.
I try do it as
int8_t ABF_ReadOpen(CStr *szFileName, int16_t *phFile, uint16_t uFlags, int32_t *pFH, uint16_t *puMaxSamples, int32_t *pdwMaxEpi, int16_t *pnError );
But it's not working.
Thanks. 

Hello!I wish to make record abf-files, therefore variants of the program which has sent srikrishnaNF me do not arrange.I have decided not to work with dll, and have found as is written abf a file as bytes. As it is told in the description the data are written in a format "as multiplexed two-byte binary integers". What does it mean? I have written the program which reads out on two bytes from a file and translates them in type single, but I do not find numbers which are written in a file (read this value with OriginLab).
Attachments:
Search value.vi ‏101 KB
ABF Structure.JPG ‏158 KB
Data Structure.JPG ‏142 KB

Similar Messages

  • Read/Write Jar files?

    This is really a newbie question, but since there's a forum specifically for jar questions I figured it was better to start here and move it to the newbie section if y'all deem it appropriate.
    I have written a desktop application using Java 1.4.1 class libraries and intend the application to run on multiple platforms including Mac OS X, Windows XP and Linux. The application works standalone (not yet jarred) on the machine it was developed on, but now it's time to begin figuring out the distribution method.
    Right now, the application reads several files from a flat text-file database, allows the user to peruse and display the information in a variety of ways, and gives the user a method to add to the flat-file database as needed. The file is about a megabyte and is excerpted into memory at initialization, then not referred to again unless the user writes additional data. When the user generates new data, write traffic to the file is fairly light, maybe 2-3kbytes per session.
    I searched the forums for the best way to handle read/write data files for distribution and so far I haven't found anything that seems relevant, but surely the question must have been asked and answered before - maybe I'm using the wrong keywords?
    Anyway, I have three basic questions:
    1) Can I both read and write a file that's enclosed in a jar file? Or are files read-only once "jarred"?
    2) Assuming I can both read and write a file within my jar file, is reading and rewriting within the jar so inefficient as to make that a non-preferred approach?
    3) How do other folks who have a local read/write datafile in a desktop application deal with distribution? Keep the read/write datafile within the jar? Make a copy of it outside the first time the application is run and always read/write the copy outside the jar? Or some other strategy?
    Thanks for any suggestions you can give a newbie at the Java game.
    Jon

    Thanks, that was pretty much what I suspected.
    I have several data files and configuration files for this project, so I was trying to make the distribution as clean as possible. At least some of the config information can be hidden in Preferences, but I was struggling with the data files. I'll include the data files in my jar, then unpack them to the user's directory when launched the first time and work with them thereafter in the user's directory.
    Enjoy the Dukes!
    Jon

  • Why can't I open read/write rules file?

    I have followed the Cookbook XML tutorial exactly as prescribed, even down to using all the examples from the 'Completed' folder, but when I try to perform any procedure such as generating a EDD or reading an XML instance (the ColorDoc.xml example) I get the following in the log file:
    Could not open the read/write rules file
    (App\ChapterReadWriteRules)
    Make sure you have read access to the file and that
    the file is not already in use.
    Using XP and Framemaker 7.
    Its a real blocker this proble. Have tries unsetting the XP Read-only folder property on all the folders in the heirarchy but XP won't let me do that. Very grateful if anyone could help me over this problem.

    What is the path you mentioned the structapps.fm file for read/write rules
    It should be full file path for read/write rules(including extension of file). Otherwise there is possibility of throwing the error you mentioned.
    Would it be possible to paste your XML application defined in your structapps.fm file??
    Thanks
    Basav

  • How to to read/write GIf files (not animated)

    Hi,
         Is there a labview vi(s) that will read a gif file and display it and also that will wirte it? I am interested in non animated gifs.
         Louis

    Ben wrote:
    Well before Mike got carried away in this thread the answer to those questions was "NO".
    But if you check that thread you will see that Mike has already done half of the work (reading a gif).
    There is limited functionality for writing a GIFin LabVIEW, look in vi.lib\picture\gif.llb\Write GIF File.vi
    Message Edited by Phillip Brooks on 10-09-2008 04:24 PM
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How can I read/write data files (text file) from PL/SQL Script

    I had an oracle forms pl/sql program to read/write a data file (text file). When this code is run on a command line as a PL/SQL script using the SQL*Plus I am getting an error:
    -- sample.sql
    DECLARE
      vLocation                 VARCHAR2(50)  := 'r:\';
      vFilename                 VARCHAR2(100) := 'sample.dat';
      vTio                   TEXT_IO.FILE_TYPE;
      vLinebuf               VARCHAR2(2000);
      vRownum               NUMBER        := 0;
      -- use array to store data FROM each line of the text file     
      TYPE           array_type IS VARRAY(15) OF VARCHAR2(100);
      vColumn      array_type := array_type('');
      PROCEDURE prc_open_file(p_filename IN VARCHAR, p_access IN VARCHAR2) is
      BEGIN
        vTio := TEXT_IO.FOPEN(vLocation||p_filename,p_access);
      EXCEPTION
        WHEN OTHERS then
          --  raise_application_error(-20000,'Unable to open '||p_filename);
          message(sqlerrm);pause;
      END;
      PROCEDURE prc_close_file is
      BEGIN
        IF TEXT_IO.IS_OPEN(vTio) then
           TEXT_IO.FCLOSE(vTio);
        END IF;
      END;
    BEGIN
      --extend AND initialize the array to 4 columns
      vColumn.EXTEND(4,1);
      prc_open_file(vFilename,'r');
      LOOP
          LTEXT_IO.GET_LINE(vTio,vLinebuf);
          vColumn(1)  := SUBSTR(vLineBuf, 1, 3);
          vColumn(2)  := SUBSTR(vLineBuf, 5, 8);
          vColumn(3)  := SUBSTR(vLineBuf,10,14);     
          Insert Into MySampleTable
          Values
            (vColumn(1), vColumn(2), vColumn(3));
          EXIT WHEN vLinebuf IS NULL;
       END LOOP;
       prc_close_file;
    END;
    SQL> @c:\myworkspace\sql\scripts\sample.sql;
    PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declaredIt works on the oracle forms but not on the SQL*Plus. Is there an alternative method using a PL/SQL script? A simple sample would help. Thanks.

    Did you ever noticed the search box at the right side of the forum?
    A quick search (limited to this years entries) brought up this thread for example
    Re: UTL_FILE Examples

  • Lion server file sharing issue with windows API read/write ini file (GetPrivateProfileString)

    Hello,
    I try to config lion server as file server for a windows application we use at work. All other computers are windows 7 or XP, lion server is the only mac. I choose lion server because it's size, quality and personal love of apple products.
    10.7.2 lion server's samba file sharing works almost perfectly with all my windows machines, I can copy, delete, modify any text files or office files without any issue, but the most important windows application for my business doesn't work with samba file sharing. After some digging, I found it is because windows program can't read or write INI file stored on lion share. Windows API GetPrivateProfileString always returns empty if the INI file is store on lion share.
    You can download a small application for read/write windows INI file from codeproject.com to test this problem:
    http://www.codeproject.com/KB/files/ini.aspx
    I can open/edit the in file using any text editor without any problem. The only problem is with those windows APIs. ACL is turned on for my lion share and assigned "delete" rights to samba users.
    I install samba3 on the same server; it works perfectly with windows API. My windows program also works. Looks like there is something wrong with lion server's sambax.
    I'd prefer to use built-in samba even I have samba3 working. Built-in samba is very immature right now, but considered how young it is, I will give apple some time to make it mature.
    Does anyone have same issue or knows how to fix it?
    Thanks,
    Michael.

    All the memory is fine. The server rarely if ever goes down when there are only around 10-12 users connected. When there are 20+ users connected and working heavily it goes down often. When I say working heavily, I mean they are transferring huge files to the SAN (100GB+), sometimes 5 at a time per user, and there are a bunch of others who are reading large video files at a minimum of 220MB/sec from the SAN.
    Though this worked on Snow Leopard without any issues, Lion just doesn't seem to be able to handle it. The odd thing is, on Snow Leopard there was only a single 1GB ethernet connection to a NAS system, whereas with Lion we have a much more powerful machine with a 6-port 10GB ethernet card and a 4 lane 8GB fiber card to a true SAN. You would think that the newer scenario with Lion would handle far more users with ease.
    So far, very disappointing with regards to Lion's file serving performance.

  • Read/Write App Files Under Limited User Account

    Hi All,
    My desktop app is intended for Windows only. I'm writing files to the hard disk to store app specific configuration.
    The applications main data source is a ZIp file that consists several XML files. The user can store this ZIP anywehre they like and the application will extract the necessary files to a temp dir so that it can read in data.
    When logged into a PC as either an Administrator or Power User, I am able to read write my config files and extract XML files from the ZIP with no problem.
    When logged in as a user with "limited" access, I can only read and write the config files. But when I go to extract any XML files from the ZIP, it seem to get denied due to insufficient permissions.
    The working directory for storeing all these files is: C:\Documents and Settings\<USER NAME>\Application Data\<MY APP>\
    Don't users with limited access have full read/write permissions to their own home directory?
    If not, what can be done to give them full read write access? Is there perhaps some other location I should be using?
    Also, would code signing from some place like Verisign do any good?
    I'm targeting Windows 2000/XP.
    Thanks in advance.
    Regards,
    Jim

    You can also access the user folder through the registry:
         public static final String APP_DATA_FOLDER_CMD = REG_QUERY_UTIL
              + "\"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\"
              + "Explorer\\Shell Folders\" /v AppData";
          * Gets the current user Application Data folder path defined in the
          * registry.
          * @return The current user Application Data folder path.
         public static String getCurrentUserAppDataFolderPath()
              return queryREG_SZ(APP_DATA_FOLDER_CMD);
          * Performs the query in the registry for the specified value type.
          * @param queryString The query to be performed.
          * @param valueType The value type.
          * @return The value data for the specified value name in the registry.
         public static String queryREG_SZ(String queryString, String valueType)
              try
                   Process process = Runtime.getRuntime().exec(queryString);
                   StreamReader reader = new StreamReader(process.getInputStream());
                   reader.start();
                   process.waitFor();
                   reader.join();
                   String result = reader.getResult();
                   int p = result.indexOf("REG_SZ");
                   if (p == -1)
                        return null;
                   return result.substring(p + valueType.length()).trim();
              catch (Exception e)
                   return null;
         }This will get you the user directory from the registry. However, my issue is
    that the value returned was:
    C:\Documents and Settings\<USER NAME>\Application Data
    Which is great, but that folder didn't exists on my computer. I cannot find
    any documentation to say why it would be there. Except I had no Application
    Data folders under any user. I have XP.
    So when running the program on one computer, I had no valid folder to write
    to and it wouldn't let me create it. Said the <USER NAME> folder could not
    be written to. canWrite() returned false and the directory could not be
    created.
    On another computer, I had the Application Data folder, the canWrite()
    returned false, yet I was able to create a folder and file inside.
    I checked the default <ALL USERS> directory and the Application Data folder
    did not exist there.
    I don't understand how I am supposed to work around it...
    If the folder doesn't exist, I need to be able to create it, whether it's in the
    <ALL USER> or <USER NAME> folder.
    I guess I am counting on the canWrite() to be accurate. Yet it appears that
    I cannot rely on the canWrite() since a false was returned. I wrote!!
    So confused ... need to be able to write to this folder on any computer...
    Help!!

  • Unable to read/write Windows files on mac anymore

    Today, out of much extreme panick as of a false alarm, i had installed MacFUSE, an application used so you can read and write windows files on your mac side. What i didn't know is that i already had NTFS-3G, one which could already do that. I uninstalled MacFUSE instantly (removed pane from system preferences), now i still can't see windows mounted on my mac desktop. When i boot up, i get an error; below. If i choose to manually mount it from the disk utility i get the same error. I'm not sure where to post this type of stuff since it's not really apple related but it's worth a shot.

    I've had that same issue with NTFS-3G and Fuse. I ended up getting Paragon NTFS for Mac. Its about 20 bucks, but it works great. IMHO, this is a feature Apple should build into OS X especially since they have a feature such as Boot Camp

  • Read&write Excel file using java

    Hi everybody,
    I have an assignment about methods that read and write an excel file using java (Eclipse SDK), so if anyone know about that please post the solution as soon as possible.
    Thanks
    Sendbad

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=read+write+excel&subCat=siteforumid%3Ajava31&site=dev&dftab=siteforumid%3Ajava31&chooseCat=javaall&col=developer-forums

  • Read/Write text files in LabVIEW

    We have developed an instrument control and data acquisition system for a mass spectrometer using LabVIEW FPGA. Currently we have 6 counters on the FPGA, counting for 1 second intervals and transferring data to the host using a FIFO. 
    The data, as a local variable, is used in several different parallel loops on the host. One of these is coded to write the data to a text file. Unfortunately everything we have tried has failed. It is proving impossible using either the write to file VI provided with labVIEW, or to use the Open file, write and close file utilities. Each attempt has failed. Yet when running a dummy code we can write to files. The dummy code consists of 6 random number generators running in one loop and the write to file VI in a second loop. The random numbers are transferred across the loops as local variables.
    Can anyone offer any advice as to what we might be doing wrong. We're beginning to feel as though we are banging our heads against a brick wall and getting very frustrated.
    Many thanks in advance for any suggestions.

    Hi Paul,
    you neither say, what is failing nor do you show any code... How should we help then?
    "impossible using ... the write to file VI"
    Well, usually they work just fine.
    "Each attempt has failed."
    In which way? Error number given? Did you use the debuging tools, like probing, breakpoints and highlighting?
    "as local variables."
    It seems you're not properly do program "real" LabVIEW code
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Read / Write Excel file using package dbms_util and util_files

    hi,
    i am beginner to this so please elaborate the answer more concisely

    there's a ton of reading on this subject on google my friend.
    http://www.google.co.uk/search?hl=en&source=hp&biw=954&bih=517&q=plsql+read+write+excel&btnG=Google+Search&aq=f&aqi=&aql=&oq=plsql+read+write+excel
    and check the forum faq, there's a topic on excel in here:
    SQL and PL/SQL FAQ
    Edited by: smon on Mar 2, 2011 3:39 AM

  • Read/write external file  from remote location

    hi all,
    due to more concern about storage, we are storing some pdf/doc/jpg files in remote location, we need to write/read that files without storing in the database,
    the files would be external file. is there any procedure to do so,
    thanks in advance
    pa1

    sachinpawan wrote:
    hi all,
    due to more concern about storage, we are storing some pdf/doc/jpg files in remote location, we need to write/read that files without storing in the database,
    the files would be external file. is there any procedure to do so,
    thanks in advance
    pa1The database can only deal with files that reside on disk that is mounted to the OS that is hosting the database.

  • Possible to read/ write word files using Java?

    I'm planning to write a Java application that can read an MS word document, extract something (including mathematics equations created with the equation editor) from the document and write it to another word document.
    Is it possible to do this?
    Can anyone give me some idea?
    Any idea is much appreciated :)

    I think I may have misunderstood your question, but in case I didn't and you find this helpful, following is the code to read a word doc, replace certain strings, then write it out as a new doc.
    import java.io.*;
    public class Copy {
         public static String endResult;
         public static void main(String[] args) {
              String oldAuthor = "Samuel Foote";
              String newAuthor = "New Author";
              String oldDate = "1720-1777";
              String newDate = "1975 -- ";
          try {
              File inputFile = new File("C:\\document.doc");
              BufferedReader input = null;
              input = new BufferedReader(new FileReader(inputFile));
              StringBuffer contents = new StringBuffer();
              String line = null;
              while ((line = input.readLine()) != null){
                   contents.append(line);
                   contents.append(System.getProperty("line.separator"));          
              String text = contents.toString();
    //     Replace the author and the dates
              Copy y = new Copy();
              y.replace(text, oldAuthor, newAuthor);
              text = endResult;
              y.replace(text, oldDate, newDate);
    //     Copy the new, improved text to another file     //
              Copy z = new Copy();
              z.finalReplace(text);
              input.close();
         catch (FileNotFoundException ex) {
              ex.printStackTrace();
         catch (IOException ex){
              ex.printStackTrace();
         String replace(String text, String oldSubstring, String newSubstring) {
    //          Search the text for a string, then replace it //
              int fromIndex = 0;
              int e = 0;
              StringBuffer sb = new StringBuffer();
              while ((e = text.indexOf(oldSubstring, fromIndex)) >= 0) {
                   sb.append(text.substring(fromIndex, e));
                   sb.append(newSubstring);
                   fromIndex = e + oldSubstring.length();
              sb.append(text.substring(fromIndex));
              endResult = sb.toString();
              System.out.println("final string = " + sb);
              return sb.toString();
         String finalReplace (String args) throws IOException {
    //          Move the altered text to a new file  //
              File outputFile = new File("C:\\copied document.doc");
              FileWriter out = new FileWriter(outputFile);
              Writer output = null;
              try {
                   output = new BufferedWriter(new FileWriter(outputFile));
                   output.write(endResult);
              finally {
                   if (output != null) output.close();
                 return endResult;

  • Read & write lvm files

    Hi All,
    I am plotting one parameter against two parameters on XY Graph. I need to send this graph along with 4 numerics & 1 string data captured during the testing for printing. So I just thought of saving this as LVM file into a location & filename of my choice & read back for printing after the testing is over.
    XY Graph requires cluster of 2 elements(one is X array, one is Y array) for plotting. I tried writing only graph part alone to lvm file by builiding an array. But when I tried to read back this, it is not either reporting any error or showing the graph on the indicator.
    Hope someone can suggest me how to do.
    Thanks
    Kousy

    Hi,
    I am sending my vi, LV 7.1 version. Hoping helps me out how to use write & read lvm express vis.
    Regards,
    Kousy
    Attachments:
    WriteNReadlvm.vi ‏183 KB

  • How to read/write .CSV file into CLOB column in a table of Oracle 10g

    I have a requirement which is nothing but a table has two column
    create table emp_data (empid number, report clob)
    Here REPORT column is CLOB data type which used to load the data from the .csv file.
    The requirement here is
    1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
    2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
    eg: empid report_field1 report_field2
    1 x y
    Any help would be appreciated.

    If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
    It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
    To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
    declare
        lt_report_clob CLOB;
        l_max_line_length integer := 1024;   -- set as high as the longest line in your file
        l_infile UTL_FILE.file_type;
        l_buffer varchar2(1024);
        l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
        l_filename varchar2(200) := 'my_file_name.csv';   -- get this from somewhere
    begin
       -- open the file; we assume an Oracle directory has already been created
        l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
        -- initialise the empty clob
        dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
        loop
          begin
             utl_file.get_line(l_infile, l_buffer);
             dbms_lob.append(lt_report_clob, l_buffer);
          exception
             when no_data_found then
                 exit;
          end;
        end loop;
        insert into report_table (emp_id, report)
        values (l_emp_id, lt_report_clob);
        -- free the temporary lob
        dbms_lob.freetemporary(lt_report_clob);
       -- close the file
       UTL_FILE.fclose(l_infile);
    end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
    There is at least one other possibility:
    - you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
    That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
    HTH
    Regards Nigel
    Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file...

Maybe you are looking for

  • Questions on BPS BAPI calls and PDF forms

    I will need to create a button on a BPS form and that button is supposed to call a BAPI.  One of the buttons will create a PDF of the form (using the contents of the form) and print said form to a 'default' printer.  The issue is that not all cFolder

  • BPM 12c: How to connect bpm composer to the svn not with the integrated one

    Hi, I want to connect bpm composer with the our svn hosting on different server not the one which comes integrated to bpm suite (PAM). Regards, Anshul

  • How can I test  a  Worflow process

    Hi, I am using the workflow builder to create my process diagram. The diagram design was succesfully validated. Then I tested the process using the web page wfa , I found the process, specified all requiered values and when I reviewed the Process Lis

  • Automatic "Write Keyword Tags and Properties Info To Photo"?

    I have PSE8 and one of the reasons I stopped using it was because I had to periodically do a manual "Write Keyword Tags and Properties Info to Photo" so that all the metadata stays with my photos and isn't bound to just the PSE database.  This was ve

  • Why BC4J PS_TXN table , sometime may occur data  lock situation ?

    My appliation be develop in Jdev 10.1.2 with BC4J/JSP solution, but in production environment sometime when the application user request is heavy will occur the PS_TXN data lock situation and caused the application be hang and no any other user can a