HP4284A Frequency Sweep with frequency points read from a tab delimited excel or lvm file

Hello,
I am using a HP4284A, and have downloaded the file here. However, I cannot figure out what format of file it takes as input: I understand this should be a .lvm tab delineated value file, but in what order is the data? If someone could provide an explanation, or an example data file, I'd greatly appreciate that.
Thanks.
Ps. I know the linked article says that 'The frequency points are as defined for the oscillator in the HP4284A user manual.', bit I have been through the manual from end to end, and I can't find anything of the sort. The closest I've been able to find is the codgin for remote access, but that isn't very relevant as Labview and the coding (C++, I believe) used are very different.
Solved!
Go to Solution.

Sure. I wound up adding some additional features to it, though, badly. It's perfectly functional but badly coded (veteran users please don't laugh); I could probably optimize it now, having learned more, but I'm too lazy to. There's a writeup, too.
Attachments:
HP4284A Frequency and voltage sweep.vi ‏288 KB
Program writeup.docx ‏12 KB

Similar Messages

  • How to populate column titles for y values when using Write to Measurement File Express VI with a tab delimited text-based .lvm file?

    The .lvm file generated by the Write to Measurement File Express VI includes column heading titles for the y values, but they are a default value of "untitled".  See attached example of a sample file when opened in Excel, the values in question are highlighted.  Is there a way to specify the column titles when the file is written?
    This is a similar question to this posting, which received a work around response to use the Write to Spreadsheet File.vi, rather than a solution when using this VI.
    Message Edited by Hightop Raven on 05-02-2007 03:37 PM
    Attachments:
    column_titles.gif ‏13 KB

    Sorry for the late reply.  I was out of the office Friday.
    You can do it, but the code can get rather ugly.  Under the hood, the dynamic data type (the dark blue wire) is an array of waveforms.  In your case, the scalar values you convert to a dynamic data type are being converted to an array of waveforms, each waveform having one element.  You have two options.
    Explicitly convert your scalars to one-element waveforms (t0=0, dt=1) and add the title before conversion to a dynamic data type.
    Convert your dynamic data type to an array of waveforms and loop through them to add the column labels.  The conversion blocks are in the Signal Manipulation Express palette.
    I would recommend 2, since it is the easiest to add.  It is also the easiest to run only on the first iteration.  Just put a case selector around the loop, wire the selection to the While loop iterator, and set the case containing the label code to 0.  The default case simply passes through the dynamic data.
    My apologies for not including a screen shot.  I am in the process of upgrading my machine and can't run LabVIEW.  If you need one, let me know and I can post one tomorrow.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Import text into a form from a tab delimited file using an action

    Good evening.
    I am using Adobe Acrobat XI Pro
    I have been working all weekend so far on this, and have tried many options.
    What I am wanting is to import a line of data from an excel file into a form, save the file with a name drived from the form fields, close the new file, then go back to the original file, import a line of data, and so on and so on.
    I had all of this working in livecyle with a tool, but now that we are going to Windows 8 and Microsoft Office 2013, the driver that I need to load the excel file into the form is not available--so now I have to redo the forms in Adobe and import using a tab delimited file.
    I would like to do this with an action.
    Thus far, I have the following.
    **Credit goes to George Johnson who helped me with the script to save the file using field names a few months ago**
    To start, I have a folder level script
    mySaveAs = app.trustPropagatorFunction(function(doc,path)
    app.beginPriv();
    var myDoc = event.target;
    myDoc.saveAs(path);
    app.endPriv();
    myTrustedSpecialTaskFunc = app.trustedFunction(function(doc,path)
    //privileged and/or non-privileged code above
    app.beginPriv();
    mySaveAs(doc, path);
    app.endPriv
    //Privileged and/or non-privileged code below
    For the Action, I start with the Form file loaded
    Then I execute a javascript to import the text into the file.
    this.importTextData("/c/data/clerical.txt");
    The next step is to save the file using field names as part of the file name
    --credit goes to George Johnson who assisted me with this on a similar project a few months ago.
    //Get the Field Value
    var fn=getField("Last").valueAsString + "-" + getField("First").valueAsString;
    //Specify the folder
    var fldr = "/c/data/";
    //Determine the full path
    var fp=fldr + fn + ".pdf";
    //save the file
    myTrustedSpecialTaskFunc(this, fp);
    That is as far as I have gotten. 
    What I want to do now is load the original form file, import the next line into the form, save the file, repeat.
    If anyone could assist me, I would greatly appreciate it.
    **note  I had to type this from my I-pad because I kept getting kicked off the internet from my computer.  I hope my code is typed correctly.

    George
    Thank you so much for your response.
    Yes--there are multiple lines in the data file--it will vary from month to month.  It looks like from what you are saying is that I need to do the global variable since it will constantly change, and then increment it as it goes through the text file.  When it reaches the end, then it will stop.
    I looked at the following links--but this is from Adobe 9 API--I don't know if things have changed with XI--especially since 9 used batch processing and XI has actions.
    Count PDF Files
    http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/ wwhelp.htm?href=JS_API_AcroJS.88.1.html
    Global counter
    http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/ wwhelp.htm?href=JS_API_AcroJS.88.1.html
    I am not exactly sure how to include this in my code.
    If you could point me in the right direction, I would appreciate it.

  • Acquire data from a tab delimited file using a popup dialog object on a stamp

    I am trying to import data from a tab delimited file using a popup dialog object on a stamp.  I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
    My problem is understanding how to bring the data into the dialog object from the file.
    I don't want to plagiarize his book--so am electing at this time not to show my code.  The  script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
    I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down.  When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
    I have searched the forums, and also the JavaScript reference.  There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
    Any help would be greatly appreciated!  i have been trying to work on this for several months now.

    Karl
    Thank you for getting back with me!
    In answer to your questions:
    1. Your trusted function is not a trusted function. Did you put this
    function into a folder level script so that it will get executed at system
    startup?--
         yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
    C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
    2. The script cannot find your tab delimited data file, or it cannot
    extract the data. Did you add the data file in the correct location? The
    location from the script in the book would be c:\mydata\Contacts.txt
    Yes--the file is in the same path as the book.
    Below is my code that references the file.
    var cPath = "/c/mydata/Contacts.txt";
    the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
    Also,  the name and email address need to be separated by one Tab character.
    They are. 
    3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
    My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
    So, check that you are not getting any errors in the JavaScript console
    (Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
    location
    When I run in the java script console--and I just run the script on the stamp,
    it says
    TypeError: event.source is null
    17:Console:Exec
    undefined
    When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed.  When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
    Thank you
    Message was edited by: tdjohnson7700

  • Program to upload data from a tab-delimited file ...

    I have to upload data from a tab-delimited file with following fields into database table(ZCBU) with same fields:
    CBU (parent)
    KUNNR (child)
    ERDAT (effective from)
    MANDT (client)
    SFID (salesforce ID)
    AEDAT (effective to)
    AENAM (assigned by).
    This file can be of type PC(txt) or UNIX.
    plz tell me how to do this in both type of files

    Hi,
    DATA: bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
    DATA: xfile TYPE string.
    DATA: BEGIN OF itab OCCURS 0,
            empno TYPE zmemp-empno,
            name  TYPE zmemp-first_name,
            last  TYPE zmemp-last_name,
            comp  TYPE zmemp-comp,
            place TYPE zmemp-place,
            END OF itab.
    PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Form to get the file path of legacy data stored on presentation server
      PERFORM get_file_path.
    START-OF-SELECTION.
      MOVE p_file TO xfile.
    to get the data from excel sheet data into an internal table
      PERFORM get_data.
      LOOP AT itab .
        REFRESH bdcdata.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9001'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9001_EMPNO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=CREA'.
        PERFORM bdc_field       USING 'S9001_EMPNO'
                                      itab-empno.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9002_PLACE'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'S9002_EMPNO'
                                      itab-empno.
        PERFORM bdc_field       USING 'S9002_FIRST_NAME'
                                      itab-name.
        PERFORM bdc_field       USING 'S9002_LAST_NAME'
                                      itab-last.
        PERFORM bdc_field       USING 'S9002_COMP'
                                      itab-comp.
        PERFORM bdc_field       USING 'S9002_PLACE'
                                      itab-place.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9001'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9001_EMPNO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BACK'.
        CALL TRANSACTION 'ZMEMP'
        USING bdcdata
        UPDATE 'A'
        MODE   'N'.
      ENDLOOP.
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  get_file_path
    FORM get_file_path .
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          file_name = p_file.
    ENDFORM.                    " get_file_path
    *&      Form  get_data
    FORM get_data .
      DATA : lines1 TYPE i.
      MOVE p_file TO xfile.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = xfile
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab.
      DESCRIBE TABLE itab LINES lines1.
      WRITE : / lines1 , 'REcords uploaded' .
    ENDFORM.                    " get_data
    Regards,
    Nihar Swain,

  • Trouble importing contacts from a tab-delimited file into Contacts on 10.9.5

    I am having Trouble importing contacts from a tab-delimited file into Contacts on MacBook Pro, OS 10.9.5, Intel 2.4 GHz Core 2 Duo., 400GB drive, 4GB memory DDR3
    So far I have:
    - Followed closely the help screen in Contacts app
    - Modified my source document meticulously - first in MS Word, then copied and tweaked in Apple's "Text Edit" app
    - The problem arises when I go to access the document for import.  Specifically, the target document, and all others in that file, are "greyed out" and thus can't be "opened" to facilitate the import process
    - Tried changing the extension of the document name to ".txt", ".rtf", and ".rtd". No change or improvement.
    - Searched Apple.com/help and found nothing relevant
    Can anyone offer some advice or tell me what I may be overlooking in this process?
    Any help will be greatly appreciated!
    Thanks,
    <Email Edited By Host>

    Hi Rammohan,
    Thanks for the effort!
    But I don't need to use GUI upload because my functionality does not require to fetch data from presentation server.
    Moreover, the split command advised by you contains separate fields...f1, f2, f3... and I cannot use it because I have 164 fields.  I will have to split into 164 fields and assign the values back to 164 fields in the work area/header line.
    Moreover I have about 10 such work areas.  so the effort would be ten times the above effort! I want to avoid this! Please help!
    I would be very grateful if you could provide an alternative solution.
    Thanks once again,
    Best Regards,
    Vinod.V

  • Frequency sweep with peak frequency

    Hi guys, I need some help here. I´m using a NI 9215 to do a frequency sweep from 30 to 90 Hz.
    So far so good. Now I need a resulting resonance frequency at highest voltage.
    I tried a max peak frequency VI but couldn´t get it to work.
    Any idea what to do?
    mfg, Andi
    ok, here is my sweep.vi for better understanding
    Message Edited by andinew on 08-11-2009 04:14 AM
    Attachments:
    sweep.vi ‏216 KB
    create_log_frequencies.vi ‏15 KB

    Hi Andi,
    one thought first off: looking at your "create_log_frequencies.vi", I realized that it generates linear frequency hops, not logarithmic ones...
    But on to your question: to find the frequency with the highest amplitude (this will be your resonace, I guess), you will have to look at the entire signal - your "sweep.vi" code iterates the measurement and interpretation five times per second, independantly of the speed of the sine sweep.
    My advice would be to generate one waveform containing the whole sweep run, and writing this sweep block for block with a constant sample rate onto the output. You could then read back the response with blocks of the same size as your output, do the single tone measurement on this block and store the resulting frequency and amplitude in an array preserved trough a shift register or simply into two auto-indexing tunnels. The latter is okay as you don't need a "while loop" in the measurement loop (you know how long the analog output loop runs - why not use this information to configure a "for loop").
    After your analog input "for loop" has finished, search your amplitude array for the maximum - then use the found element's index to index the frequencies array and return the corresponding resonance frequency.
    A good starting point could be the example I wrote a couple of month ago: it runs continuously the same "sweep" (you'd have to adjust the waveform, I know) and reads back the stimulus and the response (wire the output to your probe and parallely to ai0, your response signal will be connected to ai1). You can then insert tone measurements etc.  at the marked section...
    When trying to open the example, you will be prompted to find a VI called "_Get Terminal Name....vi" - you can find this VI at the following location: C:\Programme\National Instruments\LabVIEW 8.5\examples\DAQmx\_Utility\_Utility.llb
    As an afterthought: the "phase difference" you are calculating between every other sample of the analog measurement array is a bit confusing: if oyu need the phase difference between the original signal and the stimulus response, you will need to wire the stimulus to a second input and compare the phases of the two separate signals...
    Best regards,
    Sebastian
    Message Edited by SFK on 08-12-2009 04:12 PM
    Attachments:
    Multi-Function-Synch AI-AO mit Signalgeneration.vi ‏91 KB

  • When using the LabVIEW Simulation Module, how can I start a frequency sweep with the Simulation Chirp signal generation VI at an arbitrary time after the simulation initial time?

    I'm using the Simulation Loop on LV RT when interacting with some hardware (i.e. all I/O is happening in the Sim loop). I'm going to conduct a frequency sweep test on the hardware and want to use the Simulation Chirp function. However, there is no way (that I can see) to trigger the Chirp to start at some event (i.e. I click a boolean on the front panel and enter a case statement). The Chirp is tied to the global time of the Simulation loop and so are it's input parameters. Is there a way to make it relative to some time at which an event happens?

    Craig,
    Your solution will 'cut' the beginning of the signal and only show the signal afterwards.
    To control when the chirp should start, the best option is to use the Chirp Pattern.vi ( in the Signal Generation palette) and use a Lookup table to control when to feed the time. The shipping example (in LabVIEW 2013) shows how to code using a lookup table.
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Chirp.vi
    Then, to start from a toggled boolean, look at the example:
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Step.vi
    and Here is the example in 2013 (in attachment):
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
    Attachments:
    SimEx Chirp with Delay.vi ‏241 KB

  • Reading in a tab delimited file

    I have the following table in oracle 9i:
    arc_book
    arc_id, arc_title, arc_publisher, arc_release_date
    And a tab delimited file called smc_book. Here is how the smc_book tab delimited file looks like:
    smc_id smc_title smc_publisher smc_release_date
    1234 "Beautiful Wonder" "Wrox Books" 1/1/1999
    2356 "Master PL/SQL" "OReilly Media" 6/5/2004
    5432 "Harry Potter and Goblet of Fire" "Simon & Shuster" 2/4/2001
    What I want to do is create a lookup table where I matchup the records that are the same book in the smc_book file and arc_book table.
    So the lookup table would look like:
    lookup
    smc_id, arc_id, arc_title, arc_publisher
    When I read in the smc_book file I don't want to re-add books that have already been added to the lookup table.
    Also when I am matching up the books in the smc_book file and arc table I want to make sure it gets all similar book titles that have the same publisher and release date because the book title, publisher are not exactly the same in both table. For example with data:
    smc_book file:
    smc_id smc_title smc_publisher smc_release_date
    1234 "Beautiful Wonder" "Wrox Books" 1/1/1999
    2356 "Master PL/SQL" "OReilly Media" 6/5/2004
    5432 "Harry Potter and Goblet of Fire" "Simon & Shuster" 2/4/2001
    arc_book table:
    arc_id arc_title arc_publisher arc_release_date
    1245 "Wonder, Beautiful" "Wrox" 1/1/1999
    1244 "The PL-SQL, Master" "Media, OReilly" 6/5/2004
    4352 "Golbet of Fire, Harry Potter" "Simon and Shuster" 2/4/2001
    So I want to match up "Beautiful Wonder" in the smc_book file with "Wonder, Beautiful" in the arc_book table even though the title and publisher data is not exact.
    I would really appreciate it if someone could help me out.
    Thanks
    Robert

    well you can use sql loader utility to load the data in your file in some temp table and use that temp table as a base for your comparisons,
    other way around is to use external tables
    sql loader:
    http://www.orafaq.com/faqloadr.htm
    http://www.oreilly.com/catalog/orsqlloader/chapter/ch01.html
    external tables
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153251

  • Frequency sweep with DAQmx

    The following is the setup :
    LV7.1 + PCI_6229 + WIN_XP
    For controlling the drive rpm of a servo motor, I need to generate a range of frequencies from 60 to 2500 at 10 Hz intervals.
    With the DAQmx polymorphic VI,  "CO Pulse Freq" , I can generate  a particular frequency.
    But if I have to change it on the fly how do I do it ? Like ideally if
    there was a property node for the polymorphic VI (!) , I could easily
    do it. But it does not have one such node for frequency and hence the
    query.
    Having started the frequency generation at a default value, I would
    like to alter it programmatically without having to stop the VI and
    reload the fresh frequency.
    Any suggestions welcome.
    Thanks
    Raghunathan
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    Hello SG_ENGINEER,
    So that is possible, but it is a completely different approach than that mentioned above.  You would have to use a continuous analog output program and change the output waveform.  Check out the attached example.  I modified a shipping example to do an analog output and increment the frequency of the output waveform. 
    -Alan A.
    Attachments:
    Continuous_Analog_Out_Update_Sinewave.vi ‏100 KB

  • Frequency sweep with vb6 and measurement studio

    hello! i hope you can help me with my problem
    im using:
    -PCI-MIO-16E-4 Daq-Card (at the moment, later i will get the PCI-6115 Daq-Card)
    -Visual Basic 6.0 with Measurement Studio
    my Problem: i want to stimulate a mechanical system with sine-waveforms of differernt frequencies, because i want to measure the resonance frequency of the mechanical system.  For that i want the Daq-Card to output a sine waveform, the frequency should be swept from one frequency to an other frequency (i think the real values dont matter at the moment). The Problem is that the sine-waveform must not be interrupted  when you change the frequency, because this would disturb the movement of the mechanical system.
    I allready tried (without Measurement Studio) to use the fifo buffer (regeneration of thewaveform in the fifo) to be independent of the delays caused by the pc-system, but when i change the updaterate (change of the frequency) of the DAC there is again a dependence on the pc-system and the waveform goes to zero Volts for a while.
    And i also tried to use the Chirp-Function (CWDSP.Chirp) of the measurement Studio, but with this function i have the problem, that i cant define how long the DAQ-Card outputs the actual frequency.
    greetings A.Herman

    Hello SG_ENGINEER,
    So that is possible, but it is a completely different approach than that mentioned above.  You would have to use a continuous analog output program and change the output waveform.  Check out the attached example.  I modified a shipping example to do an analog output and increment the frequency of the output waveform. 
    -Alan A.
    Attachments:
    Continuous_Analog_Out_Update_Sinewave.vi ‏100 KB

  • How to remove noisy data points read from a text file

    Reading data measurements taken in from a txt file.  How do I get rid of noise aside from going into the text file and deciding point by point what to delete.

    Well going in point by point and deleting is certainly one way of going about it. Of course that would defeat the entire purpose of having this great programming enviroment that is capable of doing that kind of thing for us.
    Is your text file small enough to upload? Obviously you know what the criteria are for judging whether or not a data point is acceptable so it should be simple enough to program. Give us a bit more information and I can assure you there will be a race between LabVIEW experts to see who can post the cleanest, simplest, and fastest piece of code that will do what you need. My wager is on altenbach, but there are a few others here that are almost as impressive.

  • How do you populate a page item in apex with a value read from excel

    Dear All
    I am working on application where I am uploading a csv file in oracle apex. I then need to access a value in Cell B2 of the csv file and populate a page item called
    :P2100_AUTHORISATION_ID with this value. Many of the examples I have found upload the data using v_data-array into a table but I don't need to do that I just need to get the value from the csv file and then display additional information about the file allowing the user to either or continue or cancel the request to upload. I am running into a small problem that I can't explain and wondered if anyone had any ideas.
    Here is the code I am using to try and populate and item called :P2100_AUTHORISATION_ID but when I poulate the item the value is always 0. But if I replace the line :P2100_AUTHORISATION_ID:= v_data_array(2) with a raise_application_error(-20001,v_data_array(2)); The correct value is displayed in the eror. Any Help would be appreciate and I apologise in advance if this akes no sense at all:-)
    declare
    --variables needed to read excel data from flow files
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len number := 1;
    v_line VARCHAR2 (32767) := NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows number;
    v_sr_no number := 1;
    begin
    --------------------------------------get file info from www_flow_files
    select blob_content into v_blob_data from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    --Read and convert binary to char
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(p_bl_wd_data_entry.hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities </span>
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data </span>
    v_data_array := wwv_flow_utilities.string_to_table (v_line);
    --get filename from wwv_flow_files
    select filename into :P2100_FILE_NAME from wwv_flow_files where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    :P2100_AUTHORISATION_ID:= v_data_array(2);
    -- Clear out
    -- v_line := NULL;
    --v_sr_no := v_sr_no + 1;
    END IF;
    END LOOP;
    end;
    Best Regards
    Lynn

    Hi Joel
    Continuing on from my last question, there was something else I want to ask if you dont mind.
    Now that I have the v_data_array(2) value in a page item I would like to use as an input value to a procedure to return some information I need displayed on the page. To do this I need to convert it to a number but when I try to so this I get the following error
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    When I use the wwv_flow.debug that you told me about it is outputting a value '4851 ' so it look like there may be some sort of asii character causing a problem. I have tried using trim(v_data_array(2)) and ascii(v_data_array(2)) but nothing seems to work.
    Would you know how to convert a v_data_array value to a number? At the moment I am attemting to do it withiin the same code I attached in my earlier post but I have replaced the assignment of :P2100_AUTHORISATION_ID with the code below where P_BL_WD_DATA_ENTRY.getauthid is the procedure returning the values I need.
    :P2100_AUTHORISATION_ID:= P_BL_WD_DATA_ENTRY.getauthid(to_number(v_data_array(2)));
    Thanks
    Lynn

  • Big probelm dealing with arrays to read from instrument

    Hi All,
    I have been struggling with this issue for weeks now and hope someone from this forum can help me out. I am trying to read data from a phmeter via the rs232 of my computer. I am reading using the  basic VISA read and write code and have configured my Serial configuration to terminate read at a Line Feed(\n). I am using the code provided in my attachement to parse the data to read only the ph number using the string functions search and replace, etc.
    As the phnumber I get displays only for a fraction of a second (when my instrument tranmits data ie every 5 seconds) using just this string function, I have added a case statement to look for strings>0 to display the data (ph number) till the next update. I have shown this in my snippet too. This works fine but I am getting a bunch of 0's on the output array when my case is false. 
    I have inialized the array with dimension size 0 too and then used the build array function to append all the new data to my existing array using a while loop with shift registers, but the appended array I get has every ph number output with 7 other 0's. I guess the build array function allows 8 element arrays to be formed with every transmision, or maybe the way I am parsing the data is incorrect. I am pretty new to Labview so don't know what I am doing wrong.
    Conversely, in order to work around this issue I have tried adding 8 elements of my appended array at a time to see if I can generate one real ph number with every transmission, but don' know how to do this either. I need to get an array of elements with all the different non-zero ph numbers to do a running average and min/max function but have contacted many people who could not help me come up with a suitable solution to this problem.
    I am looking forward to all suggestions to make my code work best. I'm sorry I could not attach the entire code as its proprietary information.
    Thanks a lot!
    Solved!
    Go to Solution.
    Attachments:
    snippet.PNG ‏31 KB

    Thanks for your suggestions Smercurio and Dennis Knight. How do I configure the VISA read to read only when data is available ie being sent by my instrument? I was looking into the Read Status function but I thought that is for GPIB only. Is there any other case statement I can write to do this efficiently? 
    Please see the cleaned up version of my code in the attachment. I need to average samples (MEAN)collected every minute, as well as check the min and max values received per minute. Currently the mean includes all the 0 elements I am getting in my array which is why I am trying to get rid of them.
    Also with the append array function which was suggested to me by an NI engineer, my ph number in the case statement updates after a significant time lag. This is the other issue I am fighting with. Initially I was not using the appended array as I did not have a need to do the averaging and my code was updating pretty fast.
    In the event that the array being put out has the seven 0's by nature, is there a way to add up 8 elements of the appeneded array at a time (since most are 0's) and build another array again. I know this is unnecessary processing if I can just configure the read to read with every data transmission.
    Thanks again.. and I look forward to speaking to you and others on this issue.
    Attachments:
    code for ni chat.vi ‏98 KB

  • Cue points read from asnd files.

    hello one and all,
    it seems to me that asnd is a good loseless file format for soundbooth, and since that the case, shouldn't flash natively read not only the audio stream from an asnd but also its cue points, since they are also obviously stored in the asnd file also because soundbooth stores and retrieves that information from the asnd.   i mean it would be good from embedded audio within flash and a lot easier then exporting to flv or xml.
    can't this feature be built into cs5?
    thanx, lucas

    Use File IO>>Advanced File Functions>>Set File Position.vi from the functions palette to set the position of the file as required. 
    I am curious as to why you would want to read the file multiple times; If the data in the file is not changing, it is more efficient for you to read it once.
    Also, there is no device called a DAQ.  DAQ drivers (NI-DAQmx is the latest version) are used to run a variety of data acquisition devices.  Whether you can output your waveform at your required resolution and speed depends on what kind of data acquisition device you have.  Regarding your question about data format, most boards accept data in a variety of forms.  Even if your particular form is not supported, conversion is pretty easy.  We need more details about the format of your data and the type of device you have to better answer this question.
    S G
    Certified LabVIEW Architect, Certified TestStand Developer, Certified Professional Instructor

Maybe you are looking for