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

Similar Messages

  • 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

  • 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

  • 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 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

  • Passing XML into JSP Variable

    I want to do the following
    <%
    response.setContentType("text.xsl");
    String something = ""+<xsl:value-of select='@id' />+"";
    %>
    But seems like the xsl doesn't render
    Can someone point me in he right directions

    What is the name of this variable?
    Record
    XML_F52E2B61-18A1-11D1-B105-00805F49916B
    1
    <pie><slice title="Group1" pull_out="false">5</slice><slice title="Group2" pull_out="false">19</slice><slice title="Group3" pull_out="false">3</slice><slice title="Group4" pull_out="true">93</slice></pie>
    What is the line of code the generated this error?
    Complex cannot be converted into simple variable
    Properly combine the variable with the function call and all should be good.

  • Passing data into BOX of a script

    Hi ,
    I have designed one script and in that i have created a BOX .
    In print the BOX is displaying . I want to pass some data ( some variable )into that BOX . How can i do that .
    Regards
    Sarmistha

    Hi,
    You can achive it by giving dynamically in SE71 screen.
    eg:
    ADDRESS
    /: BOX FRAME '10' TW
    /: ADDRESS
    /: TITLE &ITAB-ANRED&
    /: NAME &ITAB-NAME1&
    /: STREET &ITAB-STRAS&
    /: POBOX &ITAB-PFACH&
    /: CITY &ITAB-ORT01&
    /: POSTCODE &ITAB-PSTLZ&
    /: COUNTRY &ITAB-LAND1&
    /: REGION &ITAB-REGIO&
    /: FROMCOUNTRY &ITAB-LAND1&
    /: ENDADDRESS
    FOOTER
    /* footer
    /: INCLUDE ZS_TEXT OBJECT TEXT ID ST LANGUAGE EN
    /: BOX FRAME '10' TW
    /: DEFINE &V_NAME1& = 'PRINT PROGRAM'
    /: DEFINE &V_NAME2& = ' '
    /: PERFORM SUB_NAME IN PROGRAM ZS_SCRIPT04
    /: USING &V_NAME1&
    /: CHANGING &V_NAME2&
    /: ENDPERFORM
    P2 &V_NAME2&
    THIS IS <C1>&ITAB-KUNNR&</> INFORMATION
    GRAPH1
    /: BITMAP 'ENJOY' OBJECT GRAPHICS ID BMAP TYPE BCOL
    MAIN
    /* THIS IS CUSTOMER INFORMATION
    /: BOX FRAME '10' TW
    /: TOP
    ,,SALES DOCUMENT,,CREATION DATE,,DOCUMENT TYPE,,NETVALUE RATE
    /: ENDTOP
    Element ITEM DATA
    /: BOX XPOS '16.0' CH WIDTH '0' CH HEIGHT '50.0' LN FRAME '10' TW
    /: BOX XPOS '30.0' CH WIDTH '0' CH HEIGHT '50.0' LN FRAME '10' TW
    /: BOX XPOS '44.0' CH WIDTH '0' CH HEIGHT '50.0' LN FRAME '10' TW
    ,,&ITAB-VBELN&,,&ITAB-ERDAT&,,&ITAB-AUART&,,&ITAB-NETWR&
    Thanks and regards,
    Sarada

  • 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

  • HFM to pass data into Essbase

    Hi
    One of my clients requirment is to pass the data from HFM into Essbase after doing teh journal entries. Is EIS the only way or is there a better way of synchronizing HFM and Essbase together. Also, if EIS is included with teh license deal with Essbase and HFM

    HFM has the internal feature to eliminate at a common parent point, so that sales data remains at lower levels.
    If you use pre Sys9 HFM and Essbase, without any ELT tools, how can you replicate HFM elimination feature inside essbase using HFM base data?
    Does a calc shell exist to traverse ragged hierarchies to do the same elimination in essbase?

  • Pass data from a variable to another page

    Hi,
    I have a "select one choice" field from a page. I want to pass the data from that field to another page.
    Any ideas on how to do it?
    Thanks!

    drag and drop a list form data control onto your page as SOC.
    In the value change event get value like, valueChangeEvent.getNewValue()
                                            <af:selectOneChoice value="#{bindings.Return.inputValue}"
                                                                label="Plan:"
                                                                autoSubmit="true"
                                                                unselectedLabel="Please select a value
                                                                id="soc1"
                                                                valueChangeListener="#{MyBean.planValueChangeEvent}">
                                                 <af:forEach items="#{bindings.Return.items}"
                                                             var="pln">
                                                      <af:selectItem label="#{pln.label}"
                                                                     value="#{pln.value}" id="si3"/>
                                                 </af:forEach>
                                            </af:selectOneChoice>

  • Pass Data Into Second View Controller

    *My Setup:*
    I have a tab-bar program; I'm currently focusing on one tab, which has a nav controller
    The root controller works as expected. In one of the table view selection methods (didSelectAccessoryButtonAtIndex, or something similar), I initialize one of my classes, which is a subclass of UIViewController with an alloc and custom init. Then I use the pushViewController to push an instance of that class onto the view stack.
    *My Issue:*
    I can't figure out how to pass the data from my first level controller to the second. I'm using a custom init method, which is an instance method because I have to pass an instance of a view controller to the pushViewController method. The data isn't getting to the second level controller, as verified by some NSLogs.
    *Pseudo code:*
    FirstViewController.m:
    -(void)accessoryButtonPressedAtSomeIndex {
    SecondViewController *svc = [[SecondViewController alloc] initWithString:@"Some string"];
    pushViewController: svc
    SecondViewController.m:
    @synthesize string;
    -(id)initWithString:(NSString *)someString {
    self.string = someString;
    NSLog (@"string = %@", someString);
    return self;
    The NSLog returns NULL.
    Obviously some of the code isn't valid, but I don't remember the exact methods. I can post the real code if necessary, but there are a lot of "dependencies" between files. Everything else (pertaining to this problem, although there are some other bugs in my app that I'd appreciate help on too) works. Any suggestions?

    Hello musicwind95
    Two suggestions :
    1) Didn't you forget to do
    if (self = [super init] )
    return self;
    in an init method ?
    Otherwise there is nothing to handle your string
    2) Put a breakpoint and trace ..

  • 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

  • Trouble passing Dates into stored procecure

    I have a J2EE (WebLogic) application that uses the jDriver to talk to a 9i database (mostly invoking stored procs). Most of the time they work fine, but I have one case in particular that has intermittent problems accepting Date objects.
    The stored proc in question accepts 5 IN parameters (NUMBER, DATE, DATE, DATE, NUMBER) and returns one OUT param (VARCHAR). In the Java code, I have 2 Integer and 3 Date objects that I am setting on a CallableStatement to invoke the stored proc.
    String SQL_TEMPLATE = "{? = call my_pkg.UPDATE_DATES(?,?,?,?,?)}";
    statement = connection.prepareCall(SQL_TEMPLATE);
    statement.setInt(2, int1);
    statement.setDate(3, date1);
    statement.setDate(4, date2);
    statement.setDate(5, date3);
    statement.setInt(6, int1);
    statement.registerOutParameter(1, Types.VARCHAR);
    As you can see, at no time am I converting between Date and String. However, sometimes when this code runs and executes the CallableStatement I get the following error:
    "literal does not match format string"
    I've done a lot of googling and from what I can tell that error should only come up if I was trying to use Strings and convert them to Dates.
    The worst part is that this is not consistent. Sometimes it works fine, other times it fails. And when it fails it will continue to fail. Unless I give null for the Date objects, in which case it always seems to work.
    I've tried it on different machines and by rebuilding/restarting the app numerous times - for example the most recent tests I did this morning it was working fine the first try, then I just bounced the app server (not Oracle) and then it started throwing the errors again. On a coworker's machine, the app works flawlessly every time (talking to the same DB instance); on another machine it worked at first, then exhibited the problem, but now works flawlessly every time.
    I've tried moving to the thin driver which seems to alleviate this problem, but for various reasons that is not a real option at this time - I need to figure out what is wrong using the jDriver (OCI).
    Does anyone have any insight as to what the problem could be? I'm desperate and willing to try just about anything at this point.
    TIA,
    Eric

    Some new information that sheds a little bit of light:
    I was able to narrow down the usage pattern that creates the problem. I start the app. The first save always works, regardless of which of the three Dates are non-null. After that, subsequent saves that only use non-null values for the same parameters as the first save will work. But if I try to use a real Date where I had originally saved a null, I get the error. If I restart the app, it starts over again.
    For example:
    A) Start app.
    B) Save the form with Date1 and Date2 set, Date3 is null.
    C) Go back and try to save the form again, this time with Date1 set, Date2 null, and Date3 set - ERROR.
    D) Save the form again, this time going back to Date1 and Date2 set, Date3 is null - success.
    I can repeat step D again and again with success. But step C will continue to fail (and other ones like it where I am trying to set a Date where I oringally set a null) until I restart the app.
    Reminder: I am using WebLogic's jDriver (their own custom Type-2 JDBC driver that relies on the Oracle OCI client installed on the local machine)

  • Passing Data to Module Variables

    I have a button that calls a function that sets the url of a
    ModuleLoader control. Immediately after setting the url, the
    function attempts to set a couple of variables in the module. I'm
    getting the common null error effectively tells me that those
    variables don't exist, which means it's attempting to set the
    variables before the module has finished loading. I need a way
    around this. Can I trigger a function in the main application, from
    the module? If so, I can use initialize from the module.
    Suggestions??

    Hi,
    As you are aware the I_T_PARAMETER table takes name value pair as input. The following is the parameters u need to use for variables and Filters.
    Name                             Value
    VAR_NAME_1                Variable Name
    VAR_VALUE_1               Variable Value
    FILTER_IOBJNM_1          Info Object Key to Filter
    FILTER_VALUE_1           Value to Filter
    Hope this helps
    Thanks
    Sundar

  • Passing data into SRM

    Hi
    We have a scenario where we are using the SRM business package in EP 6.0 and we have a requirement to pre-polupate a basic data field ( PO Type ) for the basic data screen in the Shop iView.
    We want to send this data from the Portal , possibly using a webdynpro application.Has anyone done something like this before ? Any ideas ?
    Regards,
    Muinul

    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

Maybe you are looking for