How to save data in a 4D array and make partial plots in real time?

Hi, this is a little complex, so bear with me...
I have a test system that tests a number of parts at the same time. The
experiment I do consists of measuring a number of properties of the
parts at various temperatures and voltages. I want to save all the
measured data in a 4-dimensional array. The indices represent,
respectively, temperature, voltage, part, property.
The way the experiment is done, I first do a loop in temperature, then
in voltage, then switch the part. At this point, I measure all the
properties for that condition and part and want to add them as a 1D
array to the 4D array.
At the same time, I want to make a multiple plot (on an XY graph) of
one selected property and part (using two pull-down selectors near the
XY graph) vs. voltage. (The reason I need to use an XY graph and not a
waveform graph, which would be easier, is that I do not have
equidistant steps in voltage, although all the voltage values I step
through are the same for all cases). The multiple plots are the data
sets at different temperatures. I would like to draw connection lines
between the points as a guide to the eye.
I also want the plot to be updated in the innermost for loop in real
time as the data are measured. I have a VI working using nested loops
as described above and passing the 4D array through shift registers,
starting with an array of the right dimensions initialized by zeroes. I
know in advance how many times all the loops have to be executed, and I
use the ReplaceArraySubset function to add the measured properties each
time. I then use IndexArray with the part and property index terminals
wired to extract the 2D array containing the data I want to plot. After
some transformation to combine these data with an array of the voltage
values in the form required to pass to the XYGraph control, I get my
plot.
The problem is: During program execution, when only partial data is
available, all the zero elements in the array do not allow the graph to
autoscale properly, and the lines between the points make little sense
when they jump to zero.
Here is how I think the problem could be solved:
1. Start with an empty array and have the array grow gradually as the
elements are measured. I tried to implement this using Insert Into
Array. Unfortunately, this VI is not as flexible as the Replace Array
Subset, and does not allow me to add a 1D array to a 4D array. One
other option would be to use the Build Array, but I could not figure
out if this is usable in this case.
2. The second option would be to extract only the already measured data
points from the 4D array and pass them to the graph
3. Keep track of the min. and max. values (only when they are different
from zero) and manually reset the graph Y axis scale each time.
Option 3 is doable, but more work for me.....
Option 2: I first tried to use Array Subset, but this always returns an
array of the same dimensionality of the input array. It seems to be
very difficult, but maybe not impossible, to make this work by using
Index Array first followed by Array Subset. Option 3 seems easier.
Ideally, I would like option 1, but I cannot figure out how to achieve
this.
Your help is appreciated, thanks in advance!
germ Remove "nospam" to reply

In article <[email protected]>,
chutla wrote:
> Greetings!
>
> You can use any of the 3D display vi's to show your "main" 3d
> data, and then use color to represent your fourth dimension. This can
> be accessed via the property node. You will have to set thresholds
> for each color you use, which is quite simple using the comparison
> functions. As far as the data is concerned, the fourth dimension will
> be just another vector (column) in your data file.
chutla, thanks for your post, but I don't want a 3D display of the
data....
> Also, check out
> the BUFFER examples for how to separate out "running" data in real
> time.
Not clear to me what you mean, but will c
heck the BUFFER examples.
> As far as autoscaling is concerned, you might have to disable
> it, or alternatively, you could force a couple of "dummy" points into
> your data which represent the absolute min/max you should encounter.
> Autoscaling should generally be regarded as a default mode, just to
> get things rolling, it should not be relied on too heavily for serious
> data acquisition. It's better to use well-conditioned data, or some
> other means, such as a logarithmic scale, to allow access to all your
> possible data points.
I love autoscaling, that's the way it should be.
germ Remove "nospam" to reply

Similar Messages

  • How to save data aquired with NI mydaq and save it in a data base using Labview?

    i have developped with labview an interface that can control automatic irrigation station using two sensors ( humidity sesonr and temperature sensor) so i want to save data aquired during a year in a data base so i can compare these results in the next year please help me to do that in my interface labview and thanks 
    Attachments:
    PFE.vi ‏223 KB

    There is a database toolkit for LabVIEW.  I don't think it is a free download however.  With the Data Manipulation toolkit, you can integrate with most databases that use the ODBC protocol.
    If you don;t need anything fancy, you can write the values out to file using the write/read spreadsheet VIs.  If the file is [COMMA] or [TAB] delimited, you can import it into your database with ease.
    Another approach is to format you output to a text file as SQL, and import the records that way.
    INSERT INTO TEMP_HUM_TBL (Temperature, Humidity, Txn_Date)
    VALUES (30, 95, 'Dec-24-2013');
    Machine Vision, Robotics, Embedded Systems, Surveillance
    www.movimed.com - Custom Imaging Solutions

  • Best way to acquire data from both serial port and D/A board in real time?

    In my experiment, I have 2 kinds of data: analog and digital. Now, I have to write a programme to acquire both data not only in real time but also in sychronicity. My colleague tried to write a program for this purpose. However, the digital part was failed. For example, the data length found from "data buffer" is correct in the first 10 seconds; however, the format became wrong later.
    Is it one program involved two different data acquisition methods? 

    Hi,
    You need to figure out when the serial port sample occured by some technique and then obtain the equivalent sample from the aquisition board, probably from a circular buffer. If you know the sample rate (pretty implicit really) you can 'cherry pick' the appropriate measurement from the buffer to be synchronus with the serial port measurement.

  • How to save data from JTable multiple rows and columns

    Hi Y_Not thanks for your help before...
    But what should I do if I want to get/save many data from many column and rows??

    i don't quite understand your (repeated) question. what is the problem with "multiple rows and columns". Y_NOT and i have shown you ways to access them.
    all you need are 2 loops: one around your number of rows and one around the number of columns or vice versa depending in which order you want to save things:
    for (int col = 0; col < data.size(); col++) {
        for (int row = 0 ; row < data[col].size(); row++) {
            // save your data
            saveData(data[col].getElementAt(row));
            // or use yourtable.getValueAt(row, col);
    }this is not a problem of Swing/Java but of simple algorithm...
    thomas

  • How to save data in ztable after editing in alv report

    how to save data in ztable after editing in alv report?

    Hi,
        Please find the attachment below.This may be usefull to you.
         [http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29]
    Regards,
    Ramakrishna Yella.

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • How to save data model design in pdf or any format..?

    how to save data model design in pdf or any format..?
    i ve created design but not able to save it any mage or pdf format

    File -> Print Diagram -> To PDF File

  • How to upload data from excel to SAP and options to be used

    How to upload data from excel to SAP and options to be used
    thank you,
    Regards,
    Jagrut Bharatkumar shukla

    Hi Jagrut,
        You can use gui_upload.
    chk the sample program mentioned below.
    REPORT ZFTP .
    DATA: BEGIN OF I_FILE OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE.
    DATA: BEGIN OF I_FILE2 OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE2.
    DATA: W_COUNT TYPE I.
    PARAMETERS: P_FILEN TYPE STRING,
    P_FILE2 TYPE STRING,
    P_NUM(4) TYPE N..
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILEN.
    PERFORM F_FILE_GET USING P_FILEN TEXT-G01.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
    PERFORM F_FILE_GET USING P_FILE2 TEXT-G01.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = P_FILEN
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = I_FILE
    IF SY-SUBRC <> 0.
    MESSAGE E024(Z1).
    ENDIF.
    LOOP AT I_FILE.
    W_COUNT = W_COUNT + 1.
    IF NOT W_COUNT > P_NUM.
    MOVE I_FILE TO I_FILE2.
    APPEND I_FILE2.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = P_FILE2
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = 'X'
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = I_FILE2
    FIELDNAMES =
    *& Form F_FILE_GET
    text
    -->P_P_FILEN text
    -->P_TEXT_G01 text
    FORM F_FILE_GET USING L_FILENA L_TEXT.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = ' '
    MASK = ',.,*.TXT.'
    MODE = 'O'
    TITLE = L_TEXT
    IMPORTING
    FILENAME = L_FILENA
    rc =
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward if helpful.
    Regards,
    Harini.S

  • How to store data from textfile to vector and delete a selected row.

    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)

    nemesisjava wrote:
    Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile.
    Do someone has an idea? :)What's the problem? What have you done so far? What failed?
    What you described should be pretty easy to do.

  • How to Reconcile Data Between SAP Source Systems and SAP NetWeaver BI

    Hi,
    I just read "How to Reconcile Data Between SAP Source Systems and SAP NetWeaver BI".  While I'm waiting for  more authorisation to r/3 to carry it out and test this functionality.
    I'd like to ask a question to anyone who has implemented this type solution.  On page 10 it talks about creating a view then setting up the datasource. The solution talks about runnig a query.  I suspect when we run a query I would run it for only a period(using variable) to reconcile.
    My question is this.  Will the datasource extractor on /r3 only select the period in our variable or will it do a full selection of the data which would then be passed to BW for filtering?
    Regards

    DEar Mark,
    There are several avenues where you can see and reconcile your data with source system, u can see data in by tcode RSA3 for a datasource, and compare the values with actual document posted into the R/3 system. Respective fuctional consultant canhelp you a lot to confirm the data.
    On BW side u can see the data in PSA and then check tranformations which subsequent change/update/reject data records based on the selective conditions.
    hope this helps.
    Kindly assign the points if it works.
    Revert back if u need futher help/information.

  • How to extract data from SAP 4.7 and upload data to SAP ECC 6.0

    Hi,
        How to extract data from SAP 4.7 and upload data to SAP ECC 6.0? Can i use BDC,BAPI,LSMW? Help me please.

    hi
    good
    both works not possible simultaneously.
    If you want to do it in two separate task than you can use the GUI_UPLOAD function module to fulfill your requirement.
    thanks
    mrutyun^

  • How to save .pdf file using office word and excel

    Can someone help me how to save .pdf files using office word and excel?  I reinstalled my adobe 7.0 pro in my new pc and before I was able to do it but with my old pc.

    For anything after Office 2003, you have to print to the Adobe PDF printer. If you installed AA 7 on OS newer than XP, you may have to do a workaround to get it to work. With later versions of WORD you can always use the MS plugin for creating PDFs.

  • How to save column widths in tag monitor and tag config editor?

    how to save column widths in tag monitor and tag config editor?

    The attached example may help.
    After launching the editor, I locate a reference to the front panel control named "Tag List".
    This is type cast as a multicolumn list box which then allows me to increment through all of the cells and set the widths as i go.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Set_Width2.vi ‏60 KB
    SET_WIDTH.JPG ‏94 KB

  • How test the date formats  M/d/yyyy and MM/dd/yyyy .

    how test the date formats M/d/yyyy and MM/dd/yyyy .format should accept 3/3/1982 and 03/03/1982 dates.
    please help me

    georgemc wrote:
    kajbj wrote:
    Spoiler: Reply #3 is actually the answer to your question.Also, Bruce Willis is a ghost, the Titanic sinks and Verbal is Keyzer Soze.Only one of those endings really surprised me.
    You should've heard me in that theatre when the Titanic struck that iceberg...

  • Have old MacBook Pro running tiger 10.4 want to save date to external hard drive and buy newer MacBook and still use same drive. Any suggestions, most  WD drives say nothing about os tiger 10.4.

    Have old MacBook Pro running tiger 10.4 want to save date to external hard drive and buy newer MacBook and still use same drive. Any suggestions, most  WD drives say nothing about os tiger 10.4. The OS compatibility  is much newer on the data.  Totally confused. Not a computer person.

    I haven't checked reviews recently but there's a difference between bare drives and drives with enclosures.  Western Digital made some of the most reliable drives last time I checked, though the enclosures weren't all that great.  It is convenient to get both in one package but I usually buy a highly rated enclosure and then put a highly rated drive in it myself.  OWC sells some good enclosures but if they put a so-so drive inside of it then the package is only as good as its weakest component.  If you get a package from them, ask them what drive is inside (some vendors have no idea what's inside  -  went to an Apple Store recently and they couldn't tell me what was inside some of their Apple brand enclosures).  My first thought if buying a new drive would be to buy a OWC enclosure with a WD drive, but chek around because I may be out of date.
    10 years ago Seagate was one of the best drives. Now they rate poorly in reviews.

Maybe you are looking for