Dynamically passing data into a running while loop from a DAQ assist. in an ouside while loop

Hello,  I'm currently a student working on a senior project and I'm trying to do a state machine that will turn off and turn on a compressor depending on time and coprocessor failure. 
In the run state, wich is #1 on the case structure box I placed the DAQ assist.  Which takes in data from an accelerometer.  If the accelerometer's value is above the limit four times it will end the loop or if the time runs out it will end the loop. 
The problem I am having is that i need to run four compressors.   I was thinking about having four case structures all within the outside loop, but I can only have the DAQ assist in one location.  This means that I now have to move the DAQ assist out of the run loop or run all four compressors in the one case structure.  If i remove the DAQ assist.  I can only get it take in data once when the loop starts and never again.  I understand why, but is there a way to dynamically pass data froma  DAQ assist.  into a running loop? 
Also on a side note, i can't find a tutorial on how to really create a state machine using Enums.  Does any one know where to find this. 
I have attached my curent program.
Thank you for your help,
Ryan
Attachments:
TEST STAND STATE MACHINE 2-28-07.vi ‏288 KB

in labview choose file->new... then pick standard state machine and there are instructions.
you can create a custom control and either use an enum, text ring or menu ring.  Edit the values and then save the control and drop into your vi and you can wire this to your case structure
- James
Using LV 2012 on Windows 7 64 bit

Similar Messages

  • Javascript Question - How to Insert a Dynamic/Current Date into the Footer of a Scanned Document

    Hi!
    I am looking for help in finding a Javascript that would allow the insertion of a dynamic/current date into the footer of a scanned document at the time the document is printed.
    I am currently using Adobe Acrobat Professional 8.0 at my work and there has arisen a need to have a dynamic/current date in the footer on scanned documents when they are printed out on different days by different people.
    I am new to the Forum and I am also very new to Javascript and what this entails.
    Thank you in advance for your help and input!
    Tracy

    this.addWatermarkFromText({
    cText: util.printd("mmmm dd, yyyy", new Date()),
    nTextAlign: app.constants.align.right,
    nHorizAlign: app.constants.align.right,
    nVertAlign: app.constants.align.bottom,
    nHorizValue: -72, nVertValue: 72
    Will insert the current Monday/Day/Year as a text watermark at the bottom of every page of a document, 1 inch up and 1 inch in from the right corner.

  • Exporting data into multiple tabs of Excel from OA Framework Page.

    Hii,
    I have a requirement like exporting data into multiple tabs of Excel from OA Framework.
    Like One Quarter Data should be in one Excel Sheet, and the Second Quarter data should go into other Excel Sheet, like wise ...
    I have tried searching forums, and developers guide, But couldn't find any correct answer on this. If its there on developers guide can somebody point me exactly where it is located.
    If someone can help me through this or can guide me through any document in this. It would be really helpful.
    Thanks
    Prakash.

    I guess, tabs are not supported in XML publisher as well.
    I would be worth checking at with BI publisher forum.
    --Prasanna                                                                                                                                                                                                                                                               

  • Dynamically fetaching data into PL/SQL tables help

    Hi,
    I am develioping a PL/SQL procedure in which I am creatig 24 PL/SQL tables of the same type.
    But while inserting data in them I need to use the table names dynamically i.e., the Execute immediate used to put the data into the tables would remain same just I need that for each and every run of for loop for that Execute immediate statement, it should use different table name.
    Please see sample code below:
    col_name varchar2(20);
    Type RA_TABLE is table of CALL_DETAIL_EXCEPTION.IC_CIRCT_GR_CD%TYPE
    index by binary_integer;
    MY_RA1 RA_TABLE;
    MY_RA2 RA_TABLE;
    MY_RA3 RA_TABLE;
    MY_RA4 RA_TABLE;
    BEGIN
    for idx in 1..cnt_interval Loop
    Col_name := 'MY_RA'||idx;
    query1:='select Trunk_info bulk collect INTO MY_RA'|| idx ||' from dbl.vw_cgi v where not exists (select 1 from dbl.varun f
    where f.ic_circt_gr_cd= v.TRUNK_INFO and f.call_gmt_dnect_dt_time between
    to_date('''||stime||''',''yyyymmddhh24miss'') and to_date('''||etime||''',''yyyymmddhh24miss''))';
    Now when I execute this code, it gives me an error for query1 saying that it is unimplemented feature in Oracle.
    It is not able to pick up that dynamic table name.
    Please help!

    user9315951 wrote:
    I am develioping a PL/SQL procedure in which I am creatig 24 PL/SQL tables of the same type.All wrong. This is NOT how one treats data in PL/SQL.
    There is NO such concept as PL/SQL "+tables+". You are in fact defining associative arrays and not using these as associative arrays, but as normal arrays. Your code can consume vast amounts of server memory as private process memory. Your code CAN crash the Oracle database server (yes, I have seen this multiple times - even in production).
    Your code is flawed. Your approach is flawed.
    I suggest that you take several steps back, gain some understanding of fundamental Oracle concepts, about what does scale and perform in PL/SQL and SQL, and then apply these concepts and principles.

  • How to pass date into a sp?

    Hi,
    Could anybody know how to pass a parameter of type date into a
    sp? Below are something I tried:
    1.
    create or replace package empTest AS
         PRAGMA SERIALLY_REUSABLE;
         TYPE curType IS REF CURSOR;
         function Details (
              hd date)
              RETURN curType;
    END;
    CREATE OR REPLACE PACKAGE BODY empTest AS
         PRAGMA SERIALLY_REUSABLE;
    function Details (
              hd date)
              RETURN curType IS
              sum_cv curType;
         err_num NUMBER;
         err_msg     VARCHAR2(200);
         sql_statement VARCHAR2(3000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE(hd);
         sql_statement :=' SELECT * from emp where hiredate <
    to_date(''hd'', ''Dd-Mon-YY'') ';
    DBMS_OUTPUT.PUT_LINE(sql_statement );
         OPEN sum_cv FOR sql_statement ;
         IF NOT sum_cv%ISOPEN THEN
              OPEN sum_cv FOR sql_statement;
         END IF;
         RETURN sum_cv;
    END Details ;
    END;
    RUN      EXEC      :CV := empTest.Details('10-DEC-01');
    ORA-01858: a non-numeric character was found where a numeric was
    expected
    2. sql_statement :=' SELECT * from emp where hiredate <
    to_date(hd) ';
    Run in the same way:
    ORA-00904: invalid column name
    3. sql_statement :=' SELECT * from emp where hiredate < to_date
    (''hd'') ';
    Run in the same way:
    ORA-01858: a non-numeric character was found where a numeric was
    expected
    Thanks

    Use the call syntax ...
    empTest.Details(to_date('10-DEC-01','DD-MON-RR'));
    .. or better yet ...
    empTest.Details(to_date('10-DEC-2001','DD-MON-YYYY'));
    As you are passing a date you do not need to use the to_date function in the cursor SQL statement.

  • Passing Data into Subreport

    Hello,
    I am using Crystal 10. I am wondering if it is possible to pass data from a report into a subreport for calculations.
    Thank you.

    Hi Sabian,
    You can pull sub report information and use in main report, while getting the data from sub report to main please take care of the following :
    --Your sub report should be placed above your calculations in main report. ie. after processing of your sub report only you get data into your main report.
    --While writing formulas in sub report or in main report you will have to use Whileprintingrecords; to get get data into your shared variables. Eg:
    Whileprintingrecords;
    shared numbervar x;
    x:=x+fieldvalue;
    --When you create a formula in sub report it should be plced on your sub report, use the same variable name while creating a formula in main report.
    Make sure that the shared variable which you are calling in the main report should be in the below section of the sub report. If you want to pass the sub report to the main report in the same section then insert section below the sub report
    Hope this helps
    Regards,
    Shweta

  • Passing data into a variable

    Hi, 
    All I want to do is pass numerical data into a variable, and then access it later. 
    Specifically, I use the Read Vector Space Position VI to find the X and Y positions of my motors. When I press a button, I want the X and Y position at that moment to be saved, so that I can access this information later.
    I would like to do this in a subVI.
    I have read tutorials on functional global variables, but so far they have been quite confusing. Specifically I do not know how to place/use uninitialized shift registers. 
    If someone could create a simple example code, that would be extremely helpful. I am using Labview 2011.
    Thanks

    Action Engine <- must read nugget
    If you don't understand shift registers...
    3 Hour Introduction
    6 Hour Introduction
    LabVEW Basics
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Dynamically insert data into PDF possible?

    This is the scenario and I am hoping someone can advise whether it is possible.
    We want to create a PDF fillable form. However there are a few fields that we want to be read only but to injected before the user downloads the PDF.
    e.g.
    There is a PDF form called contact details. Only registered users can download this form. So what we are trying to achieve here is when the user logs on and downloads this PDF, server side we want to inject their details into this form so that it is read only.
    In the lifestyle IDE there is a XML tab where I can see it drives the PDF.
    Is there like a tool of some sort where I can dynamically update the XML source and regenerate the PDF?
    Thanks

    Thanks sandeep for your quick reply.
    My req is
    Step 1:- invoke a webservice call and get the data from a website and store it into a table in xml format(CLOB column in a table)
    Step 2 :- Pick the xml data from table inserted by step1 and derive all the element values from xml data usning some xml functions
    2.1 go to configuration table(in this table we are storing the table name for each type of webservice call) and get the destination table name.
    2.3 insert the data into destination table.
    so our interface process is designed to serve for multiple interface webservice calls.it is not for a particular data.
    so in future if someone else want to download some other data then they need to add the configuration data into config tables and should be able to achieve the data download into tables.
    so step 1 and step 2 should be a coomon packages.
    i am involved in 2nd package where pick the xml data and insert into a table(destination table form config tablke)
    Thanks Ram

  • Passing data into event

    Simple Question: I have text controls that I wish to take values from when a button is pressed. Using Events, how do I get values and store them...

    Are the values needed in any other portion of the program other than when the button is pressed? If not, you could place the controls within the event structure so that their values are only read when the button controlling the event structure is read. Note, though, that if the values are passed from the event structure to other portions of the program you need to determine the best approach for passing data when the button is not pressed (perhaps passing through a value from the last event).
    In the event that the controls are needed in other parts of the program separate from the event structure you can use local variables to read the current value of the controls.
    I hope this helps.
    John

  • Set data into Model Node on Navigating from a View

    Hi Gurus,
    Need your assistance with an issue that I am facing.
    I am developing an ESS application and it has two perspectives.
    1st Perspective contains - View1 and NavView
    2nd Perspectice contains - View2 and NavView
    I have created a dynamic ValueNode in View1 and on navigating to View2, I want the data in the ValueNode to be updated into a ModelNode.
    The problem I am facing is,
    1. I have the <b>actionOnNavigation</b> in the <b>NavView</b> whereas my data is in the <b>View1</b>.
    I tried setting the data into ModelNode in the <i>wdDoExit</i> of <b>View1</b>, but it doesnt help.
    I have the <i>Life_Span</i> property set to "<i>WHEN_VISIBLE</i>", but still, dont think the wdDoExit() of <b>View1</b> is being called.
    Any suggestions on how/ where I can set the data into my ModelNode?
    Thanks in advance.
    Anjana R.
    Message was edited by:
            Anjana Raghav

    Hi Gurus,
    Any idea on this question?
    I would like to know where I can set my data into the ModelNode before Navigating away from that view? <i>The data is in a dynamic context.</i>
    I can't write it on the onAction() method, coz action is defined in another view.
    Any suggestions? Is it a flaw in the design?
    Thanks in advance
    Anjana R.

  • How to properly read data from one DAQ-assistant and write simultaneously with another DAQ-assistant (which is inside a loop)

    Hello.
    I'm a newbie working on my Master's thesis conserning a project that is based on old G-code made by another newbie so bear with me.
    I need to create a sequance of output controls. For this I'm using a for loop that eventually creates two triangular ramps during a period of 90 seconds. I've confirmed that this function works properly by measuring the actual output of the DAQ-decice (NI USB 6353).
    The problem is the following: During this controll-cycle I need to simultanously collect data from the same DAQ-device. At this point there is only one DAQ-assistant output-block in the main loop of the program and all the signals are derived from it to where they are needed.There is a case-structure (the bottom case structure in the picture) that contains the functions needed to collect the data during the test cycle. However these two actions, outputting data and inputting data, are not synchronized in any way which may be the reason why I get the 200279 error or alternatively the 200284 error during the test cycle. I've tried changing the sample rate, buffer size and the timeout time as adviced but nothing seems to help.
    What would be the simplest way to solve this problem?
    Help is greatly appreciated!
    Attachments:
    problem.jpg ‏206 KB

    Thanks for quick reply.
    However, I did try it (see the picture) but I still have a problem: I only get 100 samples / channel during the test sequence (all from the first seconds of the sequence) in total even though I've set the data aqcuiring DAQ-assistant as "continous" and "samples to read = 95k" and rate is 1000Hz.
    Edit.
    And lastly, I have trouble adding this "extra" DAQ-assistant to the vi. because I get an error about a resource (The 6353) being reserved, even though I connected a false constant to the "STOP" -input of the main DAQ-assistant.
    Attachments:
    is_this_what_you_meant.jpg ‏212 KB

  • DAQ Assistant with multichannels causing Simulation Loop slow?

    Hi, another LabView newbie here.
    I have in a Real Time Target (NI 9132)  a Control & Simulation Loop with DAQ Assistant block inside, whose signals are fed into a Discrete State Space block. The discrete state space model has 1 second time step. I have set the Simulation Loop parameters so that it executes every 1 second as well (see Fig. A below). *sorry for the big white gap under the figures..
    The DAQ assistant acquisition mode is set as "1 Sampe (On Demand)".
    However, when I run the VI, the plot seemed to be updated much slower than 1 second rate. To confirm this, I put an "Elapsed Time" block inside the Simulation Loop. The "elapsed time" shows the actual time in seconds while the simulation plot show slower time (see Fig. B below).
    I tried to isolate the problem by removing the block one by one. Finally, I found out that this problem was caused by (at least) the DAQ Assistant which acquires multichannels data of NI 9214. When I remove some channels and leave one or two channels, the VI runs at the actual time (see Fig. C below). But when I added more channels reading, it became slower again. 
    Here is the snippet of the block diagram (after all other blocks were removed):
    What am I doing wrong here? I'm going to use all of NI 9214 channels so how not to have similar problem like this?
    I look forward to hearing any relevant comments from the members. Thanks in advance.
    Tian

    Hi Tian,
    why do you need a Sim loop anyway?
    - When it comes to speed you shouldn't use the DAQAssistent. Use basic DAQmx functions…
    - Use parallel running loops for each task. Put DAQmx functions in their own loop, running in parallel to your Sim loop…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How do I pass data into a sub vi?

    Hi, I'm trying to pass an integer value into a sub vi that displays this value on a tank indicator. I've connected the tank indicator in the sub vi to one of the terminals but in the calling vi it seems to see the terminal as an output not an input. I can't find any way of selecting whether the terminal is an input or an output. How do I change the terminal to an input?
    I'm using LabView7.0 Express on a Mac.
    Hope you can help.
    Dave G.

    In the attached VI, the user enters a start run value, and that value iterates when the attached device, a Lab Jack, detects the leading edge of a 5 V square wave. There's also an elapsed time function. On its own, the VI executes as intended, but when implemented as a sub VI, indicators wired to the appropriate nodes on the icon in a while loop do not update with execution (i.e. elapsed time, run, and start program numeric indicators don't continually update.) However, when I look at the front panel of the sub VI, the indicator values are continually updated. I've read the help documents about refnum, references, and property nodes; how do I implement these tools to display continually updated values generated by the sub VI in the front panel of a VI?
    Attachments:
    GPIC Simulation 5.zip ‏40 KB

  • Getting error message when passing data into table: Primary Key

    Getting an error in a process that is feeding the invoice creation in SAP, violation of PRIMARY KEY constraint 'INV1_Primary', cannot insert duplicate key in object 'INV1'. I assume this is due to duplicate key values being passed into the table INV1, however I get this error even when I am passing unique record combinations of the key fields docentry and linenum. This is on 2005A SP01.
    Thanks

    Hi Peter,
    Could you provide a code sample of the routine that is causing the error please?
    It sounds like a data corruption issue (though it could possibly be a bug in the DI API). I recommend you speak to SAP support. There is a utility that can validate the document numbering but you'll need to speak to SAP support before you run this as it can have other negative effects, depending on the state of your data. They may ask for a copy of your database to test.
    Kind Regards,
    Owen

  • How to download dynamic table data into CSV format

    Hi,
    I have data in dynamic table <it_data>, and I want to download that into CSV format.
    so I tried to use FM SAP_CONVERT_TO_CSV_FORMAT but how to use this FM with dynamic table?
    here <it_data> type standard table, we can pass this to I_TAB_SAP_DATA. but problem is with changing parameter. (TRUXS_T_TEXT_DATA), what type of table it should be?
    and one more thing is <it_data> structure is also dynamic , depending on input the structure of <it_data> may vary.
    Regards,
    Mrunal

    Hi,
    check this one may be help full to u...........
    *Use FM SAP_CONVERT_TO_CSV_FORMAT and pass a Delimiter and ITAB. This
    returns an Ouput_String
    Convert Internal Table to ; delimited format
    There is a filename parameter on this FM but I don't think it's used
    call function 'SAP_CONVERT_TO_CSV_FORMAT'
    exporting
    i_field_seperator = Delimiter "default ';'
    i_filename = Filename
    tables
    i_tab_sap_data = ITAB
    changing
    i_tab_converted_data = Ouput_String
    exceptions
    conversion_failed = 1
    others = 2.
    Regard's
    SHAIK.

Maybe you are looking for