How do I extract Data from a 1D Waveform into individual channels to be used for calculatio​ns on a live data page

Hello All,
I am a fairly new user to Labview and am currently creating a program that: monitors sensor inputs from various CompactDAQ modules (9213, 9217), does error checking, then uses the data in some final calculations, such as averaging etc.  I have put together a small piece of code that includes the main functions that I am trying to accomplish.  Right now I am fairly comfortable with getting the channels set up and assigned, then passing this data into a while loop that continually pulls data from these sensors.  
I have the calculations vi complete and the channel inputs UI complete, now I am working on the reading and data manipulation side of things.  The 1D Waveform that is coming out of read function is being broken up into the components that I am interested in (String Name and Y data).  It then pass this information out of the loop through a queue which passes it along to the parallel loop below which will perform the error checking and the averaging calculations.  There are some things that complicate this. I have shown 2 sensors in my example, but in the actual program, there can be up to 400 inputs.  The issue is that not all these sensors will be used on every test that the software is used for.  To use the inputs in the test VI as an example:  If I am trying to average these 2 inputs to create a common value, but then on one test, sensor 2 is not there, it needs to recognize this and not use this in the averaging function.  
So to get right down to it, I want to create something that can look through the clusters of data from the 1D Waveform, determine what these values are, then do the necessary functions to those numbers once they are identified, then pass them onto the Calculations VI where it then displays the usable information for the user.  I think I am having an issue with determing how to sort as everything I have thought of makes me think there has to be an easier way.
Has anyone encountered this?  Does my explaination of what I am trying to do make sense?  Let me know and I can clarify.
Solved!
Go to Solution.
Attachments:
Channel Testing.vi ‏43 KB

As far as functionality goes, I don't see anything wrong. when it comes to efficiency you need to keep some general pointers in mind. These issues which I'm bringing up will not affect your code currently since your array sizes are small but can start creating memory fragmentaion and slow down the software if your array sizes are much larger and the software runs for a long period of time.
1. Try not to use Build Array. Each time you use a built array labview creates a copy in the memory. Try to initilized your arrays and replace the subsets.
2. as much as you can try not index arrays or unbundle cluster multiple times. try to perform as many tasks as possbile in one shot. (this was evident in your second loop)
Besides that it's looking good. 
I made a few modifications to your code and attached it. I wanted to give you a different take on it as it relates to being able to control the inputs and outputs programitically, if you had a look up table. I didn't make the same modifications to your second loop but I can guide you through what needs to be done if you would like to move in this direction. Again your original code is well done for someone who is new to labview so don't feel like you need to follow the new VI design. Just try to remove the build array and multiple indexing as a good programming habbit.
www.movimed.com - Custom Imaging Solutions
Attachments:
Channel Testing.vi ‏41 KB

Similar Messages

  • Load data from a staging table into an actual table by using flag value

    I am in need of a quick and dirty pl/sql code to read the staging table "STG_TABLE, row by row and load data into a PROD_TABLE. The load should fail entirely, that is a rollback should occur when there an error occurs during record inserting into a production table using a flag value of Y as successful completion and N as a failure.
    Any suggestions?

    Hi,
    It sounds as if you want something like:
    BEGIN
        :ok_flag := 'N';
        INSERT INTO  prod_table (col1, col2, ...)
         SELECT               col1, col2, ...
         FROM     stg_table;
        :ok_flag := 'Y';
    END;ROLLBACK happens automatically in the event of an error.
    Instead of a bind variable for ok_flag, you could use some other kind of variable defined outside the scope of this PL/SQL code.
    Edited by: Frank Kulash on Jun 5, 2012 10:47 PM

  • Looking for a solution or service to export data from a dynamic form into a database

    As the title of this discussion states, I'm looking for a solution or service to export data from a dynamic form into a database to be used for reporting. Creating the dynamic form is not a problem, it's getting it into a database that's more of a nuisance. A dynamic form is needed in order to provide skip logic, hide/reveal, and other similar dynamic features.
    The database hasn't been created, so just looking for the easiest, more effective and dependable solution. The key is being able to run reports off the data later.

    So i set up 2 residential grade routers to test this out. Seems to be working okayish. I believe with directional antenae routers I should achieve what I need.
    As for security I configured each device separately. I set them so only allow the MAC address of the other through wireless. This seems to be the best system for me. Once they are connected even if a MAC is spoofed of the other router it drops automatically because they are always connected. My wired devices get plugged in and recieve an IP from my main network.
    There more testing to be done, but it seems to be working.
    Thanks for your input and suggestions guys. I will be marking this topic as answered.

  • How to select the data from a Maintainance View into an internal table

    Hi All,
    Can anybody tell me how to select the data from a Maintainance View into an internal table.
    Thanks,
    srinivas.

    HI,
    You can not retrieve data from A mentenance view.
    For detail check this link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    Regards,
    Anirban

  • How can I extract image from complex (multycoloured0 background?

    How can I extract image from complex (multycoloured) shot?

    I would say either using the pen tool or the quick mask tool but without seeing how complex the image/background is I can't give you a complete answer...?
    Can you post the image?

  • Get the data  from excel and insert into the database

    I want to read the data from excel file, get the data from excel and insert into the database.

    You can use the Apache POI HSSF API to read data from Excel files and you can use the Sun JDBC API to insert data in database.
    This has nothing to do with JSP/JSTL.

  • How to extract data from xml and insert into Oracle table

    Hi,
    I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
    There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
    I need to extract the values of these columns and insert into the table
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>

    Re: Insert from XML to relational table
    http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta=

  • How do i extract year from a variable???

    Hi all,
    I want to extract year from a parameter.
    I tried the following, i'm getting errors.
    When I executed the below code,
    SELECT TO_CHAR(:X_PRM_YR_END_DT,'YYYY') FROM dual;
    I got the following error.
    ORA-01722:invalid number
    When I executed the below code,
    SELECT TO_DATE(:X_PRM_YR_END_DT,'YYYY') FROM dual;
    SELECT to_char(TO_DATE(:X_PRM_YR_END_DT,'YYYY')) FROM dual;
    I got the following error.
    ORA-01830: date format end before converting entire input string
    When I executed the below code,
      SELECT extract(YEAR FROM :X_PRM_YR_END_DT) FROM dual;
      SELECT extract(YEAR FROM 1/11/2013) FROM dual;
    I got the following error.
    ORA-30076: invalid extract field for extract source
    How do i extract year from a variable???
    Help me plz
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.

    Try This,
    select TO_CHAR(to_date('01/01/1980','dd/mm/yyyy'),'YYYY') FROM dual;

  • How fetch data from a view(which is located in different server) using Oracle APEX webservices

    Hi,
    I have a requirement to fetch the view data from client instance(which is different server) to another instance lets say Development instance
    Requirement:
    Need to get the Apps View data from the Desired EBS instance(which is accessible online) using webservices,and display it in the Oracle Apex Development Instance.
    Kindly provide your inputs how to achieve this.
    Thanks in advance
    keerty

    Are you getting an error? The way you have it set up, you can have an error and it will never be displayed. Put and error control on your front panel and see what it gives you. Also, shared variables in a project can be useful. Look at some examples for that.

  • How to read data from an internal table into a real table?

    Hello experts,
    I'm relatively new to ABAP and I'm trying to figure out how to read data from an internal table into a table that I created.  I'm trying to use the RRW3_GET_QUERY_VIEW_DATA function module to read data from a multiprovider.  I'm trying to read data from the e_cell_data and e_axis_data tables into a table that I've already created.  Please see code below.
    TABLES MULTITAB.
    DATA:
      query_name TYPE RSZCOMPID,
      s_cubename TYPE RSINFOPROV,
      t_cell_data TYPE RRWS_T_CELL,
      t_axis_data TYPE RRWS_THX_AXIS_DATA,
      t_axis_info TYPE RRWS_THX_AXIS_INFO,
      wa_t_cell_data like line of t_cell_data,
      wa_t_axis_data like line of t_axis_data,
      w_corp_tab like line of t_cell_data.
    s_cubename = 'CORP_MPO1'.
    query_name = 'Z_corp_test'.
        CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
           EXPORTING
             i_infoprovider           = s_cubename
             i_query                  = query_name
            i_t_parameter            = query_string_tab
           IMPORTING
             e_cell_data              = t_cell_data
             e_axis_data              = t_axis_data
             e_axis_info              = t_axis_info.
    If anyone has any information to help me, I would greatly appreciate it.  Thanks.

    Hi,
    <li>Once you call the function module RRW3_GET_QUERY_VIEW_DATA, lets say data is available in the corresponding tables e_cell_data e_axis_data which you have mentioned.
    <li>Modify your internal table defined for other purpose, with data from e_cell_data e_axis_data like below.
    LOOP AT t_cell_data INTO wa_t_cell_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_cell_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    LOOP AT t_axis_data INTO wa_t_axis_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_axis_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    Thanks
    Venkat.O

  • HT201250 I had to replace the hard drive in my old MacBook. I replaced it. Installed OSX10.6. Then using the system software I reinstalled data from my Time Machine backup. On completion it asked for my password. It is not accepted. I am locked out how I

    I had to replace the hard drive in my old MacBook. I replaced it. Installed OSX10.6. Then using the system software I reinstalled data from my Time Machine backup. On completion it asked for my password. It is not accepted. I am locked out how I overcome this?
    I was already using 10.7. But only had the disc for 10.6.

    Sorry I am new to this. Am I in the right area? I am using my iPhone to make contact. I am worried.

  • How to transfer data from macbook pro to an external hard drive, im using (WD 1TB 3.0) ???. I cannot copy anything from my mac to it not a single file.

    how to transfer data from macbook pro to an external hard drive, im using (WD 1TB 3.0) ???. I cannot copy anything from my mac to it not a single file.

    ok - since you'll be sharing it with a PC - connect it to your windows pc - then format from there - instead of NTFS format - choose exFAT.
    or, you can read the link below on how to do it in dos mode.
    http://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-can-i-forma t-external-drive-in-exfat-not-in/0f6bf19a-19d6-4470-ae05-53ddf26bb476?msgId=1860 eae3-3488-4eea-8326-f87b89d9851b
    once you've formatted it - you can now use it in both your macbook and windows computer.

  • How can I import data from a csv file into databse using utl_file?

    Hi,
    I have two machines (os is windows and database is oracle 10g) that are not connected to each other and both are having the same database schema but data is all different.
    Now on one machine, I want to take dump of all the tables into csv files. e.g. if my table name is test then the exported file is test.csv and if the table name is sample then csv file name is sample.csv and so on.
    Now I want to import the data from these csv files into the tables on second machine. if I've 50 such csv files, then data should be written to 50 tables.
    I am new to this. Could anyone please let me know how can I import data back into tables. i can't use sqlloader as I've to satisfy a few conditions while loading the data into tables. I am stuck and not able to proceed.
    Please let me know how can I do this.
    Thanks,
    Shilpi

    Why you want to export into .csv file.Why not export/import? What is your oracle version?
    Read http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php
    Regards
    Biju

  • How to use for all entires clause while fetching data from archived tables

    How to use for all entires clause while fetching data from archived tables using the FM
    /PBS/SELECT_INTO_TABLE' .
    I need to fetch data from an Archived table for all the entries in an internal table.
    Kindly provide some inputs for the same.
    thanks n Regards
    Ramesh

    Hi Ramesh,
    I have a query regarding accessing archived data through PBS.
    I have archived SAP FI data ( Object FI_DOCUMNT) using SAP standard process through TCODE : SARA.
    Now please tell me can I acees this archived data through the PBS add on FM : '/PBS/SELECT_INTO_TABLE'.
    Do I need to do something else to access data archived through SAP standard process ot not ? If yes, then please tell me as I am not able to get the data using the above FM.
    The call to the above FM is as follows :
    CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
      EXPORTING
        archiv           = 'CFI'
        OPTION           = ''
        tabname          = 'BKPF'
        SCHL1_NAME       = 'BELNR'
        SCHL1_VON        =  belnr-low
        SCHL1_BIS        =  belnr-low
        SCHL2_NAME       = 'GJAHR'
        SCHL2_VON        =  GJAHR-LOW
        SCHL2_BIS        =  GJAHR-LOW
        SCHL3_NAME       =  'BUKRS'
        SCHL3_VON        =  bukrs-low
        SCHL3_BIS        =  bukrs-low
      SCHL4_NAME       =
      SCHL4_VON        =
      SCHL4_BIS        =
        CLR_ITAB         = 'X'
      MAX_ZAHL         =
      tables
        i_tabelle        =  t_bkpf
      SCHL1_IN         =
      SCHL2_IN         =
      SCHL3_IN         =
      SCHL4_IN         =
    EXCEPTIONS
       EOF              = 1
       OTHERS           = 2
       OTHERS           = 3
    It gives me the following error :
    Index for table not supported ! BKPF BELNR.
    Please help ASAP.
    Thnaks and Regards
    Gurpreet Singh

  • How do I extract email from a form and send the PDF to that user?

    How do I extract email from a form and send the PDF to that user?

    here you can add email to send to, CC, Subject, and body message
    var oDoc = event.target;
                        oDoc.mailDoc({
                                                                bUI: false,
                                                                cTo: "Agency Contact Email",
                                                                cCC: "",
                                                                cSubject: "Write your title here,
                                                                cMsg: "Dear" + AgencyContact + "(" + AgencyContactEmail + ")\nThe student, " + FirstName + " " + LastName + " has applied to work at your agency. Please confirm they can work here blah blah blah.......\n\nThanks.\n\nrespectuflly,\n\nme"

Maybe you are looking for

  • Organizing rolls from iPhoto, in Aperture

    I recently got the trial Aperture and imported my iPhoto film rolls. I have all my rolls organized by date of the roll. I have moved pictures between rolls to group them. This way it is sort of like an album. In Aperture you can organize pictures by

  • Object variable or with block variable not set- while trying to submit data

    Hi Gurus, Could you share me the solution to resolve the issue? I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule. I am working on SAP BPC 7.5 NW and using MS Excel 2007. I ca

  • How to enable "Billing Document- Issue Output To- Issue output to" in VF03

    Plz let me know how to Enable "Billing Document --> Issue Output To --> Issue output to" in the VF03 transaction (2nd screen). After entering the billing doc no. n then pressing enter items will be displayed. Then in the menu bar under "Billing Docum

  • Extracting text (UTF8 and UTF16) from the SWF file format

    Hello. Just wondering if this newsgroup is the right one to talk about the 'open' SWF file format. I'm looking for a utility to pull out the text strings inside of a SWF file (both UTF8 and UTF16). The file format is open-sourced, so I guess that I c

  • Mac OS X booting... Won't boot

    This afternoon I installed the new security update on my MacBook and restarted it as usual, but when booting again it got stuck in the phase where the screen is blue and there's the box saying: Mac OS X booting.. and the blue bar runs. I tried to swi