Save data to array(dele​te two previous wrong threads, please )

Sorry ,I have put two same threads in this board by wrong operation, please delete for me.Thanks.
Hi, I want to save a series of data to an array in the
following prosedure: The first data come (index of array
= 0), save the data to a(0), then the second data come,
array index +1,  save the data to a(1),...... I have write a
vi, but it doesn't work
Attachments:
save data to array.vi ‏11 KB

trinigh,
I'm not sure I get your point and only have LabVIEW 7.1, so could you just post an image of your diagram.
If what you want is to build (not save) an array, you should use the "build array" function in a loop, like this...
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Attachments:
Untitled12.vi ‏37 KB

Similar Messages

  • Save data to array

    帖子被trinight在02-19-2006 07:14 AM时编辑过了
    Attachments:
    save data to array.vi ‏11 KB

    Hi, K C.  In another post I got some examples. In my case , I have a data source which outputs two numbers at a time(like 8.2 9.6), then after a fixed time interval, it outputs another two numbers...... I want to keep these numbers in a two demention array. I attach a example(add to array.JPG) from someone(in another post you can find the details) which has a fault , that is if two same number come along, it can only save one to the array. I attach another image of vi which I made myself(add to array[1].JPG), which has a fault too, I didn't know why, wish you can help me. Tomorrow I will go out for several days. So I cann't reply in the following days.
    Attachments:
    add to array.JPG ‏34 KB
    add to array[1].JPG ‏62 KB

  • How to save data (DBL array) in a excel file

    Ok, I am new into Labview.  This question may seem easy for you guys, but for me, it is quite a challenge.  I have current coming out of a loop.  When the program stop, I would like to be able to save it as well as the time when it has been taking and the average current in a excel file.  When my labview code stops, how do I do to get a  pop up window which ask me where and what name to save it to? How do I get so that on the top of each column, it says : current (Amp)    Time (ms)   Average Current (amp)?
    thank you very much,

    Hello,
    We love to see people catch the LabVIEW spirit and anything we can do to help
    you through the initial learning process is our pleasure.
    As KC suggested saving the file as a .csv is a good idea,
    you can also save it as a txt file and open it with Excel specifying a delimiter
    for the columns.
    There is a really good example you can find in the LabVIEW
    example finder if you search for the keyword ‘file’, the example is called “Write
    to Text File.vi”. They use a Get date/time String to record the time when data
    is acquired.
    I have attached a simple Write to File picture of a VI that
    takes a random number and writes it to a file. When I run the VI, a popup asks
    me what I want to call the file. The first part writes the heathers on the
    columns and inside of the for loop I save the data. Underneath the block diagram
    is a picture of the output file when I specify the number of samples to be five.
    If you want your file to be on a very specific format, you
    can create a template file, read it in LabVIEW, and then add your data to it
    and save it to a new file.
    Hope this can get you started with your program.
    There are a lot of good tutorials online on how to
    get started using LabVIEW. Here is the link to a three hour
    introduction course:
    http://zone.ni.com/devzone/learningcenter.nsf/03f7c60f17aad210862567a90054a26c/60c2782788a811c986256cd50001a0a6?OpenDocument&node=200067_us
    We are also comming out with LabVIEW 8 in November and we have a program called LabVIEW Standard Service Program
    (SSP) that allows you to get automatic upgrades and updates. Please let
    me know if you are interested in knowing more about it.
    Good luck,
    Tica Taveras
    Applications Engineer
    National Instruments
    Attachments:
    SaveData.bmp ‏1475 KB

  • PDF form created in Idesign CS6 won't save data when filled out

    Why can't users save data in fillable PDF form created in IndesignCS6
    Hi
    Please help I've tried every forum and tried everything you are my only hope  ive created a Interative PDF form In indesign cs6 and when my clients fill it out it doesn't save the data, also ive put it online and again the same and the submit button doesnt work, ive tried the advanced save in Acrobat and still the same what am i doing wrong GUTTED

    I designed in InDesign, exported as Interactive PDF, opened in Pro, saved with extended options.
    I have both Pro XI and the most recent version of Reader. (Mac os x)
    I actually used a template to design the form. Would this somehow be causing an issue??
    Here's a link to the form-- (website is still being developed.)
    http://media.wix.com/ugd/258c13_937630036a284d0ebfcccd8aa9169cf2.pdf
    I've uploaded to the new website, and to Box, and the issue remains the same.
    Thanks for your help!

  • How concatenate date and array to write in excel?

    Hello
    I have a problem to concatenate a date array and numeric array. can you help me?
    I want save Measurement of a sensor with save time in an excel (row 1 column1 save date and row 1 coulmn : save sensor data). but I cant save these two value seperatly(my clocks cant do it). now, I want concatenate them at first and then save them. is it possible?
    Best Regards
    Solved!
    Go to Solution.
    Attachments:
    concatenate.jpg ‏82 KB

    Try the attached.  You'll understand it as soon as you see it.  If not, shout.
    Attachments:
    write_to_file.vi ‏8 KB

  • How to save data in 4-bit mode instead of U8

    Hi
    I use LabVIEW to acquire and save data through the counter timer PCI6602.
    My signals are really low so the data can be expressed in 4-bits (0-15).
    I have used the conversion to U8 and write them using "Write Binary Files"
    So this uses 1 byte for each data point but I would like to reduce it to 4bit (half byte) for each data point.
    Can anyone help me with this?
    I am attaching my program for reference 
    Solved!
    Go to Solution.
    Attachments:
    DAQ-longvector1.vi ‏64 KB

    Here's some easy code how to do it.
    Note that this code assumes that the data is 4bit (0..15). If any of the upper 4 bit are set, you've got problems, of course
    See if this makes sense. Good luck.
    This example uses a single 1D array. You would eliminate the decimate/interleave and just use the two arrays.
    A small comment to your code. There are a few weird constructs, but the use of two "split array" operations to take a simple derivative seems overkill. This made a honorary mention in the Rube Goldberg Hall of Fame.
    Message Edited by altenbach on 12-04-2008 05:18 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    8bitTo4bit.png ‏18 KB

  • How can i save the output array of the invoke node "commands values" into a specific file

    I must save the setup of vi commands'. I use an invoke node called "command value" wich give me an array with the name of the specific command and his value. How can i save this array into a specific file to load it later if o need. Must i change the array format?
    Thank you

    Hi,
    I have attached two VIs.
    The first one "Ecriture fichier tableau" (writer) permits to collect all control's values in an array (dbl) and to save it as .bin file. You had to convert variant type into dbl type. (You can do the same with string type if you wish. You will save datas as .txt file for example)
    The second VI "Lecture tableau fichier" (reader) permits to retrieve all the datas you saved in the file.
    I think this responds to your question.
    Regards,
    Attachments:
    Control values.zip ‏26 KB

  • Save Data in ALV Report .

    Hello,
    Given below is my code
    *& Report  ZALV_TEST_SA                                                *
    REPORT  ZALV_TEST_SA NO STANDARD PAGE HEADING.
    *----------------------TYPE POOL OF ALV--------------------------------*
    TYPE-POOLS: SLIS.
    *----------------------DATABASE TABLES---------------------------------*
    TABLES: ZFLIGHTM_SA, ZFLIGHT_AVAIL_SA.
    *-------------DATA DECLARATION-----------------------------------------*
    DATA: BEGIN OF ITAB OCCURS 0,
             ZFLIGHT_ID TYPE ZFLIGHT_ID,
             ZCITY_FROM TYPE ZCITY_FROM,
             ZCITY_TO TYPE ZCITY_TO,
             ZDEP_DATE TYPE DATS,
             ZTIME TYPE TIMS,
             ZPRICE TYPE ZPRICE,
             ZNUM_OF_PSNGRS(3) TYPE N,
             ZAVAIL_SEATS(3) TYPE N,
          END OF ITAB.
    DATA: BEGIN OF ITABM OCCURS 0,
             MANDT TYPE MANDT,
             ZFLIGHT_ID TYPE ZFLIGHT_ID,
             ZCITY_FROM TYPE ZCITY_FROM,
             ZCITY_TO TYPE ZCITY_TO,
             ZTIME TYPE TIMS,
             ZPRICE TYPE ZPRICE,
          END OF ITABM.
    DATA: BEGIN OF ITAB_AVAIL OCCURS 0,
             MANDT TYPE MANDT,
             ZFLIGHT_ID TYPE ZFLIGHT_ID,
             ZDEP_DATE TYPE DATS,
             ZNUM_OF_PSNGRS(3) TYPE N,
             ZAVAIL_SEATS(3) TYPE N,
          END OF ITAB_AVAIL.
    DATA: WA_ITAB LIKE LINE OF ITAB,
          WA_ITABM LIKE LINE OF ITABM,
          WA_ITAB_AVAIL LIKE LINE OF ITAB_AVAIL.
    DATA: L_REPID LIKE SY-REPID,
          L_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          L_LAYOUT TYPE SLIS_LAYOUT_ALV,
          L_EVENTS TYPE SLIS_T_EVENT.
    DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    *----------------SELECTION SCREEN SELECT-OPTIONS-----------------------*
    SELECT-OPTIONS S_CITY FOR ZFLIGHTM_SA-ZCITY_FROM NO INTERVALS.
    SELECT-OPTIONS D_CITY FOR ZFLIGHTM_SA-ZCITY_TO NO INTERVALS.
    SELECT-OPTIONS D_DATE FOR ZFLIGHT_AVAIL_SA-ZDEP_DATE NO INTERVALS.
    *----------------------SELECTION OF DATA-------------------------------*
    PERFORM SELECT_DATA.
    *----------------SETTING DATA IN TABLE FOR FIELD CATALOG---------------*
    PERFORM CALL_FIELDCAT_MERGE.
    *----------CALLING FUNCTION FOR DISPLAYING REPORT----------------------*
    PERFORM DISPLAY_TABLE.
    *----------------------AT SELECTION SCREEN EVENT-----------------------*
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'STORE'.
           PERFORM SAVE_DATA.
        WHEN 'PREVIOUS'.
           LEAVE TO SCREEN 0.
        WHEN OTHERS.
      ENDCASE.
    *------------------------------FORMS-----------------------------------*
    *&      Form  SELECT_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM SELECT_DATA .
      SELECT A~ZFLIGHT_ID    ZCITY_FROM
             ZCITY_TO        ZDEP_DATE
             ZTIME           ZPRICE
             ZNUM_OF_PSNGRS  ZAVAIL_SEATS
         FROM ZFLIGHTM_SA AS A INNER JOIN ZFLIGHT_AVAIL_SA AS B
            ON A~ZFLIGHT_ID = B~ZFLIGHT_ID
             INTO CORRESPONDING FIELDS OF TABLE ITAB
                WHERE A~ZCITY_FROM IN S_CITY
                  AND A~ZCITY_TO IN D_CITY
                  AND B~ZDEP_DATE IN D_DATE.
      L_REPID = SY-REPID.
    ENDFORM.                    " SELECT_DATA
    *&      Form  CALL_FIELDCAT_MERGE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM CALL_FIELDCAT_MERGE .
    *  CLEAR WA_FIELDCAT.
    *  WA_FIELDCAT-TABNAME       = ITAB.
    *  WA_FIELDCAT-FIELDNAME     = 'ZFLIGHT_ID'.
    *  WA_FIELDCAT-KEY           = 'X'.     "sets key field
    *  APPEND WA_FIELDCAT TO  L_FIELDCAT.
    *  WA_FIELDCAT-TABNAME       = ITAB.
    *  WA_FIELDCAT-FIELDNAME     = 'ZPRICE'.
    * WA_FIELDCAT-KEY           = 'X'.     "sets key field
    *  APPEND WA_FIELDCAT TO  L_FIELDCAT.
    *  WA_FIELDCAT-TABNAME       = ITAB.
    *  WA_FIELDCAT-FIELDNAME     = 'ZAVAIL_SEATS'.
    *  WA_FIELDCAT-KEY           = 'X'.     "sets key field
    *  APPEND WA_FIELDCAT TO  L_FIELDCAT.
    *--------------CALLING FUNCTION FOR FIELD CATALOG----------------------*
      CLEAR L_FIELDCAT.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
         I_PROGRAM_NAME               = L_REPID
         I_INTERNAL_TABNAME           = 'ITAB'
    *       I_STRUCTURE_NAME             = 'WA_ITAB'
    *       I_CLIENT_NEVER_DISPLAY       = 'X'
         I_INCLNAME                   = 'ZALV_TEST_SA'
         I_BYPASSING_BUFFER           = 'X'
    *       I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = L_FIELDCAT
    *     EXCEPTIONS
    *       INCONSISTENT_INTERFACE       = 1
    *       PROGRAM_ERROR                = 2
    *       OTHERS                       = 3
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *--------------EDITING FIELDS IN FIELD CATALOG ------------------------*
      LOOP AT L_FIELDCAT INTO WA_FIELDCAT.
        CASE WA_FIELDCAT-FIELDNAME.
             WHEN 'ZFLIGHT_ID'.
               WA_FIELDCAT-COL_POS = '1'.
    *          WA_FIELDCAT-text_fieldname = 'Flight ID'.
               WA_FIELDCAT-KEY = '3'.
               WA_FIELDCAT-JUST = 'L'.
               WA_FIELDCAT-NO_ZERO = 'X'.
               WA_FIELDCAT-EMPHASIZE = 'X'.
               WA_FIELDCAT-SELTEXT_L = 'Flight ID'. "40 char long field name
               WA_FIELDCAT-SELTEXT_M = 'Flight ID'. "20 char long field name
               WA_FIELDCAT-SELTEXT_S = 'Flight ID'. "10 char long field name
             WHEN 'ZCITY_FROM' .
               WA_FIELDCAT-NO_OUT = 'X'.
             WHEN 'ZCITY_TO' .
               WA_FIELDCAT-NO_OUT = 'X'.
             WHEN 'ZDEP_DATE' .
               WA_FIELDCAT-NO_OUT = 'X'.
             WHEN 'ZTIME' .
               WA_FIELDCAT-NO_OUT = 'X'.
             WHEN 'ZPRICE' .
               WA_FIELDCAT-COL_POS = '2'.
    *          WA_FIELDCAT-text_fieldname = 'Flight ID'.
               WA_FIELDCAT-KEY = '4'.
               WA_FIELDCAT-JUST = 'L'.
               WA_FIELDCAT-NO_ZERO = 'X'.
    *          WA_FIELDCAT-EMPHASIze = 'X'.
               WA_FIELDCAT-SELTEXT_L = 'Price'. "40 char long field name
               WA_FIELDCAT-SELTEXT_M = 'Price'. "20 char long field name
               WA_FIELDCAT-SELTEXT_S = 'Price'. "10 char long field name
               WA_FIELDCAT-EDIT = 'X'.
             WHEN 'ZNUM_OF_PSNGRS' .
               WA_FIELDCAT-NO_OUT = 'X'.
             WHEN 'ZAVAIL_SEATS' .
               WA_FIELDCAT-COL_POS = '3'.
    *          WA_FIELDCAT-text_fieldname = 'Flight ID'.
               WA_FIELDCAT-KEY = '4'.
               WA_FIELDCAT-JUST = 'L'.
               WA_FIELDCAT-NO_ZERO = 'X'.
    *          WA_FIELDCAT-EMPHASIze = 'X'.
               WA_FIELDCAT-SELTEXT_L = 'Available Seats'.
               "40 char long field
               WA_FIELDCAT-SELTEXT_M = 'Available Seats'.
               "20 char long field
               WA_FIELDCAT-SELTEXT_S = 'Seats'. "10 char long field name
               WA_FIELDCAT-EDIT = 'X'.
             WHEN OTHERS.
               WA_FIELDCAT-NO_OUT = 'X'.
        ENDCASE.
    MODIFY L_FIELDCAT FROM WA_FIELDCAT.
      ENDLOOP.
    ENDFORM.                    " CALL_FIELDCAT_MERGE
    *&      Form  USER_COMMAND_ALV_SA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM USER_COMMAND_ALV_SA USING I_UCOMM LIKE SY-UCOMM
                            IS_SELFIELD TYPE SLIS_SELFIELD.
    *****form frm_usercommand using r_ucomm like sy-ucomm
    *****rs_selfield type slis_selfield.
    ****CASE I_UCOMM.
    CASE sy-ucomm.
        WHEN 'STORE'.
           PERFORM SAVE_DATA ON COMMIT.
        WHEN 'PREVIOUS'.
           LEAVE TO SCREEN 0.
        WHEN OTHERS.
    ENDCASE.
    ENDFORM.                    "USER_COMMAND_ALV_SA
    *&      Form  DISPLAY_TABLE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISPLAY_TABLE .
    *  L_FIELDCAT-input = 'X'.
    *  L_FIELDCAT-edit = 'X'.
    *  L_LAYOUT-Edit = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
    I_CALLBACK_PROGRAM                = L_REPID " report id
    I_CALLBACK_PF_STATUS_SET          = 'ZALV_TEST_SA' " to set pf-status
    I_CALLBACK_USER_COMMAND           = 'USER_COMMAND_ALV_SA' " to handle
                                                              " user command
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  = ''
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         = L_LAYOUT
    IT_FIELDCAT                       = L_FIELDCAT " for field catalog
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    IT_EVENTS                         = L_EVENTS "internal table with
                                                               " user events
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    *  IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
       TABLES
        T_OUTTAB                          = ITAB "internal table with
                                                                   " records
       EXCEPTIONS
        PROGRAM_ERROR                     = 1
       OTHERS                             = 2
    *********  IF SY-SUBRC <> 0.
    ********** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **********         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *********  ENDIF.
    ENDFORM.                    " DISPLAY_TABLE
    *-------------------------SET PF-STATUS--------------------------------*
    *&      Form  ZALV_TEST_SA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM  ZALV_TEST_SA USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'ZALV_TEST_SA' .
    ENDFORM.                    "ZALV_TEST_SA
    *&      Form  SAVE_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM SAVE_DATA.
      LOOP AT ITAB INTO WA_ITAB.
    ****HIDE:WA_ITAB-ZFLIGHT_ID,      WA_ITAB-ZCITY_FROM,
    ****WA_ITAB-ZCITY_TO,        WA_ITAB-ZTIME,
    ****WA_ITAB-ZDEP_DATE,       WA_ITAB-ZNUM_OF_PSNGRS,
    ****WA_ITAB-ZAVAIL_SEATS.
        CLEAR: WA_ITABM,WA_ITAB_AVAIL.
        WA_ITABM-ZFLIGHT_ID          = WA_ITAB-ZFLIGHT_ID.
        WA_ITABM-ZCITY_FROM          = WA_ITAB-ZCITY_FROM.
        WA_ITABM-ZCITY_TO            = WA_ITAB-ZCITY_TO.
        WA_ITABM-ZTIME               = WA_ITAB-ZTIME.
        WA_ITABM-ZPRICE              = WA_ITAB-ZPRICE.
        WA_ITAB_AVAIL-ZDEP_DATE      = WA_ITAB-ZDEP_DATE.
        WA_ITAB_AVAIL-ZNUM_OF_PSNGRS = WA_ITAB-ZNUM_OF_PSNGRS.
        WA_ITAB_AVAIL-ZAVAIL_SEATS   = WA_ITAB-ZAVAIL_SEATS.
        APPEND WA_ITABM TO ITABM.
        APPEND WA_ITAB_AVAIL TO ITAB_AVAIL.
      ENDLOOP.
      MODIFY ZFLIGHTM_SA FROM TABLE ITABM.
      MODIFY ZFLIGHT_AVAIL_SA FROM TABLE ITAB_AVAIL.
      COMMIT WORK.
    ENDFORM.                    " SAVE_DATA
    I want to edit a field--the price and save the changes. I have assigned a button STORE for this. But my data is not getting saved.
    I searched the forum and wrote the code accordingly. I even referred the stored programs. Still I am not getting the output. Please help.
    Regards,
    Smruthi.
    Edited by: Smruthi Acharya on Feb 10, 2009 3:31 PM
    Edited by: Julius Bussche on Feb 10, 2009 12:16 PM
    Please use code tags

    Hi,
    You must have taken some function code for that STORE button (say you have taken it as   MODIFY )
    Use this code, it will modify the code in internal table from alv.
    I have tried it, n its working:-
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
    *     I_CALLBACK_TOP_OF_PAGE            = ' '
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
    *     I_STRUCTURE_NAME                  =
    *     I_BACKGROUND_ID                   = ' '
    *     I_GRID_TITLE                      =
    *     I_GRID_SETTINGS                   =
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS                 =
         it_sort                           = it_sort        " sort info
    *     IT_FILTER                         =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
    *     i_save                            = 'A'
    *     is_variant                        = wa_variant     " variant name
    *     IT_EVENTS                         =
    *     IT_EVENT_EXIT                     =
    *     IS_PRINT                          =
    *     IS_REPREP_ID                      =
    *     I_SCREEN_START_COLUMN             = 0
    *     I_SCREEN_START_LINE               = 0
    *     I_SCREEN_END_COLUMN               = 0
    *     I_SCREEN_END_LINE                 = 0
    *     I_HTML_HEIGHT_TOP                 = 0
    *     I_HTML_HEIGHT_END                 = 0
    *     IT_ALV_GRAPHICS                   =
    *     IT_HYPERLINK                      =
    *     IT_ADD_FIELDCAT                   =
    *     IT_EXCEPT_QINFO                   =
    *     IR_SALV_FULLSCREEN_ADAPTER        =
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER           =
    *     ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it_final      " internal table
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
    * when the function code is MODIFY (STORE button) then save data
        WHEN 'MODIFY'.
    * to reflect the data changed into internal table
          DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
          IF ref_grid IS INITIAL.
            CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
              IMPORTING
                e_grid = ref_grid.
          ENDIF.
          IF NOT ref_grid IS INITIAL.
            CALL METHOD ref_grid->check_changed_data.
          ENDIF.
    " at this point your data in internal table is changed
    * refresh the ALV Grid output from internal table
          l_selfield-refresh = c_check.
    ENDFORM.                    "USER_COMMAND
    Hope this helps you.
    Regards,
    Tarun

  • I would like to know how i can save an byte array to a mat file format (matlab file format '*.mat') within to use the matlab API

    So, I search the binary matlab file format('*.mat').

    Title:
    Moving Data Between MATLAB® and LabVIEW
    Problem: 
    How can I share data between LabVIEW and the MATLAB environment?
    Solution: 
    MATLAB users can move data between the
    MATLAB environment and LabVIEW, you have several options. Prior to
    LabVIEW 5.1, the only way to transfer data between these two
    environments was to use the Save and Load functions. Those are discussed herein.
    Beginning
    in LabVIEW 8.0, MathScipt was introduced. MathScript is an integrated
    part of LabVIEW that you can use to combine intuitive graphical
    dataflow programming with math-oriented textual programming. See the
    attached links below for more information on MathScript.
    Beginning
    in LabVIEW 5.1, the MATLAB script node was introduced into the LabVIEW
    programming environment. The MATLAB script node makes ActiveX calls to
    the MATLAB software from within LabVIEW. This requires that both MATLAB
    be installed on the same machine and that a valid license is obtained.
    More information on the MATLAB script node can be found in the attached
    KB's.
    For all versions of LabVIEW, this data transfer can be
    performed by saving the data in a file using the MATLAB software and
    reading it directly from LabVIEW, or vice versa. In the MATLAB
    environment, the command "save" allows you to save the data in
    binary format (*.mat) or ASCII format. You also have an option of
    saving it in ASCII format using a tab delimiter between data points and
    the command "load" allows you to read in the data.
    ASCII Format
    Complete the following steps to import or export data between LabVIEW and the MATLAB environment using an ASCII file format.
    From the MATLAB environment to LabVIEW
    To save a vector or a matrix X in tab-delimited ASCII format, enter the following in the command window or m-script file in the MATLAB environment:
    >>SAVE filename X -ascii -double -tabs
    This creates a file named filename containing data X in tab-delimited ASCII format.
    Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Functions»File I/O palette.
    From LabVIEW to the MATLAB environment
    To export a matrix X from LabVIEW to the MATLAB environment, first save the data in ASCII format in LabVIEW using the Write To Spreadsheet File VI on the Functions » File I/O palette.
    Enter the following in the command window of the MATLAB environment, or in the m-script file:
    >> LOAD filename
    This reads the data into the MATLAB environment.
    Binary Format
    Complete the following steps to import or export data between LabVIEW and the MATLAB environment.
    From the MATLAB environment to LabVIEW
    As mentioned above, LabVIEW does not save multiple variables to one
    data with extra manipulation, and will not be discussed here.
    Therefore, the only way of sending the data from the MATLAB environment
    to LabVIEW without tampering with the MAT binary file structure is
    using the ASCII format. Also, please bear in mind that you need to have
    one file for one variable.
    From LabVIEW to the MATLAB environment
    Because
    the MATLAB software saves data in its own binary format, the "MAT"
    file, binary LabVIEW data must be converted to this format prior to
    transferring the data. The attached examples can be used to save
    LabVIEW data in the MATLAB software format. The convenience of the .MAT
    file format is that more than one variable can be saved in the same
    file. The example shows saving seven variables to .MAT format; the
    example can be modified for any number of variables.
    Once this data is saved from LabVIEW, it can be read into the MATLAB environment, using the following command:
    >>LOAD filename
    The Who
    command can then be used to display all the seven variable names, and
    you can display the content of them by entering the variable names at
    the command prompt as usual.
    MATLAB® is a
    registered trademark of The MathWorks, Inc. Other product and company
    names listed are trademarks and trade names of their respective
    companies.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

  • Two previous questions may not have been as clear as I would have liked. I recently upgraded my MacBook 2008 (10.5.8) to Snow Leopard (10.6.8). With the updates came iTunes 11.1.1 and Quicktime 7.6.6. I am still using Garageband 2008 and iPhoto 2008. When

    Two previous questions may not have been as clear as I would have liked. I recently upgraded my MacBook 2008 (10.5.8) to Snow Leopard (10.6.8). With the updates came iTunes 11.1.1 and Quicktime 7.6.6. I am still using Garageband 2008 and iPhoto 2008. When I create music in Garageband I usually adjust the volume and save it. Even now when I share the Garageband created files with iTunes 11.1.1, the volime I previously set in Garageband is retained. However, when I use the music to create a slide show in iPhoto 2008 and export to Quicktime 7.6.6, the volume level I previously set is lost and seems to default to a low level. The problem seems to be either in the slide show export from iPhoto 2008 to Quicktime 7.6.6 or in Quicktime itself. Is there a work around, so that I can retain the volume level I had previously set in Garageband, a volume level that seems to transfer without problem to the new iTunes. But then iPhoto 2008 (slide show) possibly or Quicktime 7.6.6 do not cooperate. Before I did the upgrade to Snow Leopard, the new iTunes and Quicktime I had no problems with the set volume being retained in the old Quicktime. The reason I need control over the volume is that all these music files are uploaded to YouTube.

    Two previous questions may not have been as clear as I would have liked. I recently upgraded my MacBook 2008 (10.5.8) to Snow Leopard (10.6.8). With the updates came iTunes 11.1.1 and Quicktime 7.6.6. I am still using Garageband 2008 and iPhoto 2008. When I create music in Garageband I usually adjust the volume and save it. Even now when I share the Garageband created files with iTunes 11.1.1, the volime I previously set in Garageband is retained. However, when I use the music to create a slide show in iPhoto 2008 and export to Quicktime 7.6.6, the volume level I previously set is lost and seems to default to a low level. The problem seems to be either in the slide show export from iPhoto 2008 to Quicktime 7.6.6 or in Quicktime itself. Is there a work around, so that I can retain the volume level I had previously set in Garageband, a volume level that seems to transfer without problem to the new iTunes. But then iPhoto 2008 (slide show) possibly or Quicktime 7.6.6 do not cooperate. Before I did the upgrade to Snow Leopard, the new iTunes and Quicktime I had no problems with the set volume being retained in the old Quicktime. The reason I need control over the volume is that all these music files are uploaded to YouTube.

  • Unable to back up external hard drive via Time Machine.  Says no room but has back ups from two previous Mac notebooks on it.  Tried deleting them and now can't do anything.  Any ideas?

    Unable to back up external hard drive via Time Machine.  Says no room but has back ups from two previous Mac notebooks on it.  Tried deleting them and now can't do anything.  Any ideas?

    As john noted, eventually that external is probably not going to be big enough, but it certainly is for now. The HD just needs enough capacity to cover the amount of data on your internal HD, not the internal HD's total capacity.
    Format/partition the external as follows and you should be set to go:
    1. Connect the external HD to the MBP.
    2. Open Disk Utility on the MBP.
    3. Select the external HD in the left pane.
    4. Click on the Erase tab.
    5. Choose the Format: Mac OS Extended (Journaled).
    NOTE: if you want to zero the HD (which I always think is a good idea, but does take time), click on Security Options, click the button for Zero Out Data, click OK. The larger the HD, the longer this will take, in some cases several hours.
    6. Click on Erase and wait for the entire process to finish.
    7. Click the Partition tab.
    8. Click on Volume Scheme: and choose the number of partitions (just one in this situation).
    9. Click on the Options button (located underneath the Volume Scheme pane) and select GUID.
    10. Click Apply.
    11. Quit Disk Utility.
    Backup your internal to the external. What application are you using to backup with? I highly recommend both SuperDuper! and CarbonCopyCloner.

  • Writing data from array to file

    May i know how to write string from a array into a file.
    I have use string tokenizer to extract every line from a file using readline and use stringtokenizer to spilt the line using tab delimiter for processing.
    But if i want to write data from array to file with tab as a delimiter and how to go to the next line. How do i do that. Below is the task and i have state a simple example on a array i have and the file output that i want.
    Pls advice.. Thanks
    eg of a array
    array[0] = Data
    array[1] = One
    array[2] = Data
    array[3] = Two
    array[4] = Final
    array[5] = Data
    From the above array, i want to write to a file so that it will appear something as below
    Eg textfile.txt
    Data One
    Data Two
    Final Data
    PLs attached a simple code as a example as i am only begining to start useing the IO feature in java. Thanks

    Really thanks for your help,
    but u are mentioning that i have already know the number of countters in advance , that is to say the 2 * counters.
    But is there a way to solve this problem which i mean if i dun know the number of predefined counters. Maybe i should say, there is more than 2 counters and in another situation, the counters will only be defined during runtime. Actually the solution u give will work nicely with 2 counters. but wat if the counter is more than 4, i wll have to concatenate the string a lot of time. so is there any solution around this problem. That why i am wandering if tere is any solution to write to the file when the counters can be only determined in runtime
    Pls advice on the above with a code samples if possible.

  • Diadem Does not save data to neither portal nor file

    I tried to acquire data from DAQ USB-6289 and save data to portal or file in DIADem DAC, but failed to get any data in portal, and no file was created, and no error was promptEd. But when I open a example file with saving function, it works fine. I'm sure there isn't any problem about the script since it is a very simple one. Do you have any suggestions?
    Thanks a lot.
    Jing

    Hi Jing -
    Since you said you're building your scheme based off of an example, I'm going to assume you've already included a Save Data or Save Data with Trigger block in your DAC scheme.  This is mandatory if you want to use Data Storage with either of the two following techniques.
    If you're running your DAC scheme programmatically, are you using the SchemeMeasTest() command, or the SchemeMeasStart() command?  If you want your DAC scheme to be run with Data Storage (Data Portal or File) enabled, you'll need to use the SchemeMeasStart() command.  The other command merely runs the scheme with visualization only (as a test).
    If you're running your DAC scheme interactively, are you pressing the Start Display button or the Start Measurement button (see below)?  These two buttons are the interactive versions of the aforementioned programmatic commands.  If you want to test your visualization without Data Storage, use the Start Display button.  If you want data to be saved to either the Data Portal or File, use the Start Measurement button.  
    Let me know if this still doesn't help.
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • How to save a 4D Array in a File and load it later on?

    Hello,
    I am trying to save a 4D Array (Array[4000] [3] [20] [5]) of UINT in a File. I can do it through "write in binary File". But then I can´t load it. I know I can transform my Array down to 1D Array of 1.200.000 Elements (4000*3*20*5) of UINT. When I load it, I have to transform it back (with a lot of "for-looping") back to 4D. But is there an easier way of doing that?
    I was not able to find a solution in this forum - I am sorry if I made a new thread if there is already a solution in this forum.
    Best regards
    LabVIEW 2011
    Solved!
    Go to Solution.

    As Lynn said, there should be no extra code required.
    When writing, make sure that "prepend size" is true (true is default) and when reading, wire an empty 4D array of the correct representation to the "data type" input.
    (I also assume that your LabVIEW version is not extremely ancient)
    LabVIEW Champion . Do more with less code and in less time .

  • How can you save data to a spreadsheet and use different worksheets in the spreadsheet?

    I am trying to save data to a spreadsheet.
    Each set of test data needs to be saved under a different worksheet. Is this possible and how can I do it?

    As the example that Dennis pointed out, this can be done using activeX. In addition to that example I have another that demonstrates how to create a new workbook with multiple worksheets and save data to each of them. I hope that between the two you can get an idea of what to do.
    Brian
    Attachments:
    xlexample.vi ‏66 KB

Maybe you are looking for

  • I can't open add ons. mac 10.5.8.

    Applications/Firefox.app/Contents/MacOS/components/nsExtensionManager.js:623 in English This is what I get when I try to uninstall persona add ons. I can't open add ons even in safe boot. This started when I used a Corvette persona.

  • ESS Training Event and management

    Hi, I have deployed ESS. I don't find Training Tab on our ESS screen and i found that the tab is attached separately . Can anyone explain in details about this...! Regards Vijay

  • Can No longer Scan

    My HP 2575 All in one printer will no longer scan any documents. I just up-graded to Leopard, anit it worked fine up until now. Can anyone help me with this situation??   Thanks in advance.

  • Problem when use clientListener on inputText  in table with arrowUp key

    Hello all, My problem is related to the thread {thread:id=2305768} On a af:table I have one af:inputText with af:clientListener, the type of the clientListener is keyDown. I already use it to get the tab key in order to change the focus on the next l

  • How much does it cost to replace an LCD screen on an iPad that is not covered by warranty?

    I recently discovered pressure cracks on my iPad. It must have happened when I placed my iPad in a bag with my textbooks. I am wondering what the cost is to replace the screen on an iPad or if I should invest in a new one.