Main VI stops when using control references.

Hi, This is my first question on this forum. I've created an engine simulation VI which uses control references. The main VI has a data acquistion loop and control references. The control references link to another VI that runs an equation loop which continuously calculates engine speed base on data collected in the main VI. The control references work but the main VI data is collected and updated only once when the main VI starts. If I remove the control references from the main VI the daq loop runs fine. Thanks in advance for your help.
Mike

Joe,
Thanks for the response. I do not load the subvi dynamically. I have attached a similar vi to show what I'm trying to accomplish. The DAQ vi reads the input and calculates the power. The power is sent to the "engine momentum sub" vi where the speed, as a function of time, is generated and sent back to the DAQ vi. I created the sub vi to clean up and isolate the DAQ vi from the subvi. I wanted the sub vi to run at a certain speed (by adjusting the wait time)and not affect the DAQ vi. If you input a value of 10 into the DAQ vi and then start it you will see the speed ramp up to 100. While the DAQ vi is running, I need to be able to change the input which would cause the power to change and in turn change the speed. I thought the control r
eferences were the way to go. In my real DAQ vi, I have many more inputs, all which do not update after the first reading. I considered putting the DAQ functions in another subvi and reading the outputs through control references but that seemed too cumbersome.
Thanks again,
Mike
Attachments:
DAQ.vi ‏27 KB
Engine_Momentum_Sub.vi ‏33 KB

Similar Messages

  • How do get an indicator to appear when using control references

    Hi, can anyone help with the following?
    I've just managed to resolve the problem of getting indicators of a sub VI to appear on the front panel of my main VI and remain active. This was done by using control references. Basically, I created a reference for the control on the front panel of the main VI. I then dragged the reference in the block diagram of the main VI to the front panel of the subVI to obtain a Control Refnum. Then in the block diagram of the subVI I created a property node and linked the indicator and control refnum to it. Then I wired the subVI's connector pane to the control refnums in the subVi front panel. Finally, I copied the subVI icon into the mainVI block diagram
    and wired the references to the relevent renum terminals of the subVI connector pane. However, I'm still having a problem with one of the indicators, which I've called 'time limit reached?'. When the VI has reached the end of the run this indicator in the subVI changes from the word 'No' (surrounded by a red box) to 'Yes' (surrounded by a green box). In the sub VI this was done by using a comparison function and linking the visible property node to the 'time limit reached?' true/false boolean. I would like the same to happen on the front panel of my main VI. In this case where should I put my property node and control refnum? I'm unable to link a control refnum to the current visible property node. When I create a visible property node which can be joined to a control refnum then I don't have the option to link it to the true/false boolean. Any suggestions? I have written a small VI which demonstrates the problem if need be.
    Thanks, Adrian
    [email protected]

    I would suggest to use a customized boolean instead of making it visible/invisible, just take a boolean, change boolean text from TRUE/FALSE to YES/NO and change also diferent cases colors, this way, you don't need to play with property nodes. If this can't be done for any reason, using a local / global variable is the only solution that comes to my mind.
    Hope this helps

  • Performance issues using control references in Analog control loop?

    My main vi of a tensile tester control application calls a number of sub-vi's, including a analog control loop which controls the test. The control loop must update some boolean and digital indicators and respond to user input on the front panel of the main vi during a test.
    To simplify my main vi, I moved the control loop code into a sub-vi, and used control references to access the controls and indicators on the front panel. However, this has dramatically affected my loop performance, and the loop can no longer keep up with the acquisition speed.
    Do control references always cause such a slowdown? Is there anything that I can do besides moving the code back into the main vi?
    Thank You,
    David Creech

    I have had the same problem. I have discovered other funny things about references also; some kind of memory management (or mismamagement?) is taking place behind the scenes.
    Regardless, you can often do away with the references by passing the initial state of a control or indicator into the subvi, changing it inside, and passing the altered state back to the caller. Once back in the caller you update the front panel control or indicator by using a local variable.
    One thing to watch out for if using this scenario is the dreaded race condition; this can be avoided using a state machine. Check out
    http://www.advmeas.com/goodies/statemachine.html
    for a good example. It is a shame that references behave in this way; it limits thier usefulness.
    Perhaps someo
    ne else will point out a way to utilize them more sucessfully?

  • "Index: 0, Size: 0" error when using lexical references

    I got "Index: 0, Size: 0" when using lexical references in data template. Can any body tell me what happen? The detail error is:
    [042308_084608187][][EXCEPTION] java.lang.IndexOutOfBoundsException: Index: 0, S
    ize: 0
    at com.sun.java.util.collections.ArrayList.RangeCheck(ArrayList.java:492
    at com.sun.java.util.collections.ArrayList.get(ArrayList.java:306)
    at oracle.apps.xdo.dataengine.DataTemplateParser.getParentDataSource(Dat
    aTemplateParser.java:1802)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:329
    at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:2
    84)
    at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:271)
    at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:213)
    at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:252)
    at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProc
    essor.java:390)
    at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.ja
    va:355)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.callDataP
    rocessor(AdvancedQueryBoundValue11.java:212)
    at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.getValue(
    AdvancedQueryBoundValue11.java:101)
    at oracle.apps.xdo.servlet.ReportContextImplV11.getReportXMLData(ReportC
    ontextImplV11.java:399)
    at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:143)

    Here is the data template, the lexical reference is &where_clause, thanks.
    <dataTemplate name="Tamplate" dataSourceRef="dmdb" defaultPackage="RRBY_PKG">
         <properties>
              <property name="debug_mode" value="on"/>
         </properties>
         <parameters>
                   <parameter name="BUName" dataType="character"/>
              <parameter name="StartDate" dataType="date"/>
              <parameter name="EndDate" dataType="date"/>
         </parameters>
    <dataTrigger name="beforeReport" source="RRBY_PKG.dynamic_where(BUName =&gt; :BUName)"/>
         <dataQuery>
         <sqlstatement name="GroupByAgent">
                   <![CDATA[SELECT
      NVL(businessunit.name, 'Unassigned') UNITNAME,
      queue.name QUEUENAME,
      NVL2(businessunit.name, 'Unassigned', businessunit.name || ': ' || queue.name) FULLQUEUENAME,
      COUNT(queueEvent.requestNumber) REQNUM
    FROM((((queueevent queueevent
    INNER JOIN assignment assignment ON queueevent.assignmentkey = assignment.assignmentkey)
    INNER JOIN datedim datedim ON queueevent.datekey = datedim.datekey)
    INNER JOIN businessunit businessunit ON queueevent.businessunitkey = businessunit.businessunitkey)
    INNER JOIN queue queue ON queueevent.forwardedqueuekey = queue.queuekey)
    INNER JOIN timedim timedim ON queueevent.timekey = timedim.timekey
    WHERE dateDim.FULLDATE >= TO_DATE(:StartDate, 'yyyy-mm-dd')
    AND BW_COMMON_DATEADD('s', timeDim.SECONDOFDAY, BW_COMMON_DATEADD('s', queueEvent.EVENTDURATION, dateDim.FULLDATE)) > TO_DATE(:StartDate, 'yyyy-mm-dd')
    AND BW_COMMON_DATEADD('s', timeDim.SECONDOFDAY, BW_COMMON_DATEADD('s', queueEvent.EVENTDURATION, dateDim.FULLDATE)) &lt; TO_DATE(:EndDate, 'yyyy-mm-dd') AND &where_clause
    group by businessunit.name, queue.name]]>
              </sqlstatement>
         </dataQuery>
    </dataTemplate>

  • Using control reference with a Sub-vi over a TCP VI Server connection

    I tried to use a Call by Reference Node to run a sub-vi on a remote PC through a TCP VI Server. An output of the sub-vi is connected to an indicator in the main vi using a control reference.
    The sub-vi started on the remote PC, but the information from the sub-vi was not passed to the control reference in the main vi. However, if I change the client name to the host PC, ie. running the server and client vi on the same machine, the code works as planned. I wonder if control reference is not suppose to work over a TCP VI Server connection?
    Any suggestion would be very much appreciated.
    Regards,
    Calvin Tsang
    Attachments:
    main_vi.vi ‏29 KB
    sub_vi.vi ‏20 KB

    Thank Jean-Pierre for pointing out that Refnums are local to an application and so control reference doesn't work between different applications on separate machines.
    In addition to the method shown in Jean-Pierre's example vi, I found that the use of "invoke method: GET control value" and "invoke method: SET control value" can produce similar results. See the attached files for an example. In this example, the indicator on the local vi is used to monitor the progress of the remote vi and the local control is used to stop the remote vi. So the data synchronisation between the two vi is not important here.
    However, you may notice the indicator "current counter" in main1_vi.vi doesn't properly interpret the binary string from "invoke method: GET control
    value", can someone shed some light on this, please?
    Calv
    Attachments:
    main1_vi.vi ‏48 KB
    sub1_vi.vi ‏13 KB

  • AC Power stops when using s-video output

    This only happens when using the s-video output. It usually takes about an hour before the ac power adapter stops working then the powerbook switches to battery power.
    For all other times when not using the video output, it would work normally [ i could leave the ac power plugged in for weeks without this problem occuring ].
    Is there a way to fix this when using the s-video output.
    Powerbook G4 1.33 GHz   Mac OS X (10.4.6)  

    If you know someone with another 65W power adapter I would try using it to see if it does the same thing. If it doesn't then you know to buy a new power adapter.

  • Sustain won't stop when using Logic's Plugins

    I have a CME VX80 and using it with Logic 9.01. I'm getting the sustain staying on all the time once I press the pedal. If I change the polarity then the sustain stops when I press the pedal.
    This seems to happen only with Logic's virtual Instruments. If I use external plug-ins like Ivory Piano the sustain works correctly. If I use Korg's M1/T1 virtual intruments, the pedal works correctly.
    Any suggestions as to why this is happening? Any resolutions?

    It was the pedal itself. I bought a new M-audio pedal and everything is fine now.
    Message was edited by: micdim

  • IPod Classic skipping/stopping when using Infiniti M37 factory installed dock

    We have 2 Infiniti M37s and when I use my iPod Classic in either one, songs will skip/stop during play (happens randomly and not with the same song each time and the frequency differs, too) and then resume, though all songs play without skipping/stopping when I use my Bose headset (not in the car!).  It happens on all road surface types and, thinking it may have been the cable, have used 3 different cables to connect from the car dock to my iPod.  Same problems.  I had a Toyota before and never had this problem with with the same iPod.  Help?!!!  Thanks.

    This most likely won't completely solve your problem and you might've already tried it, but try restarting your iPod. It might just need a rest! To do this, press the Menu and center button on your iPod until it turns black and then restarts itself. (You'll know it's restarting when you see the apple come up on the screen.)

  • Ejb-link is still required when using local references?

    Hi!
    In BEA's link (http://e-docs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html#1114738) there is the following comment for weblogic-ejb-jar.xml element 'jndi-name':
    "Assigning a JNDI name to a bean is not recommended. Global JNDI names generate heavy multicast traffic during clustered server startup. See Using EJB Links for the better practice."
    Since we're using local references (local-jndi-name) to access our ejbs instead of remote references, is this still recommendation still pertinent?
    Thanks
    Christianne

    It is enough if you add the ejb-ref & ejb-link in the session bean. The
    session will look up relative to java:comp/env
    The following doc shows an example of accessing an ejb from a web app using
    ejb-link.
    http://e-docs.bea.com/wls/docs81/webapp/components.html#146848
    --Sathish
    <Christianne Carvalho> wrote in message news:[email protected]..
    I'm not getting very well how the ejb-link is used. In my case I have
    entity beans that are referenced in session beans.
    In my entity beans I have the following XDoclet tag.
    * @ejb.bean
    * name="ProductDescription"
    * display-name="ProductDescription"
    * jndi-name="ejb/ProductDescription"
    * local-jndi-name="ejb/ProductDescriptionLocal"
    * view-type="local"
    * type="CMP"
    In my session bean I'm currently getting the reference for the entity bean
    using the following code:
    productDescriptionLocalHome=(ProductDescriptionLocalHome)
    lookupLocalHome(ProductDescriptionLocalHome.JNDI_NAME);
    If I add the following XDoclet tag to my session bean, in ejb-jar.xml a
    <ejb-link> is created inside <ejb-local_ref> tag.
    * @ejb.ejb-ref ejb-name="ProductDescription" view-type="local"
    Considering the info above:
    1) In the entity bean, is there any extra tag to define the ejb-link or is
    the ejb-link only defined in the session bean?
    2) Re session bean, only adding the @ejb-ref xdoclet tag is enough for
    using the ejb-link or do I also have to change my lookup? If I do, what do
    I have to search for in the lookup?
    Thanks!

  • Main vi stops when subvi appears

    Hello,
    In my main vi I have a lot of thing happening in it, one of them is giving signals to a USB relay device which I connected with DAQ Assistent.
    This relay is currently working on time pulses of 3 and 6 seconds. 3 off, and 6 on.
    It works fine when I use buttons or other things in my vi, but when I press a button to show graphs in a subvi the relay device stops working.
    The subvi with the graphs are now on my screen and only until I close that subvi, the relay starts working again.
    I changed the properties of the subvi:
    Window appearance - Dialog (instead of custom)
    Is there a way to make sure the relay keeps working, it's quite important...

    After looking into your code, i do not understand why you didnt split up the code initially into two loops. I marked the piece of code you can easily export. You just have to take care about passing the time-intervall between the loops. But this is easy.
    Easiest: If the delay does not change, just get it infront of both loops and pass it to them
    Simple: Use a locale variable. Just take care that ONLY ONE loops writes on this variable.
    Ellegant: Use a functional global variable (also known as LV-2-style variable).
    hope this helps,
    NorbertMessage Edited by Norbert B on 09-17-2007 04:53 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    SplitUp.PNG ‏16 KB

  • Using Control Reference to change subVI control - sub VI also called using a container

    Hello
    I am in need to update a control inside a sub VI that is also called inside a container in the main VI.
    Please see the project attached.
    My goal is simple -
    Change the "Main VI calling sub VI-Container.vi " panel's "FGV state"
    once the state changes, it needs to be propagated to the sub VI that is called within the container
    The sub VI's (sub VI called is "Check Time FGV.vi")  "FGV state" also needs to change when the main front panel's control
    How do I accomplish this ? just a FYI - the sub VI being called is at "C:\Projects\User Examples\Check Time with FGV\Check Time FGV.vi"
    Also my stop button functionality is broken, not sure why.
    Thanks for your help.
    Attachments:
    Check Time.lvproj ‏6 KB

    OK you have a few problems.  Lets address the Stop button first:
    Add a value change event for the stop button and put the stop button in that case.  Wire the button out of the event structure to the conditional terminal of the while loop.  WHAT IS HAPPENING:  You press "Stop" but the event structure is still waiting for an event so the loop never iterates.  Get rid of the wait.  the CPU will not be hogged unless you are generating events at warp speed.  No user can generate events that fast! so the loop will not be greedy.  The event structure does wait for an event it does not poll for them by running contineously.
    Now your subpanel.  You do know that the FGV runs once when you invoke the run method on it right?  You can change the contol value all you want but the vi won't do anything about it because the vi is not running.  And even if the vi WAS running changing the value of a control that is read once (outside the loop) would not cause the value on the wire inside the loop to change at all.  Does that clear up some of why what you are attempting will not work like that?
    Jeff

  • BB Curve 9300 stop when using internet access

    Hi,
    When i use internet access (for example) the phone stop although the battery is OK. To switch it on, i must remove the battery for a few minuts. Or i must plug the phone on the sector and then it works ok.
    I have changed the battery. I have already the same problem. I asked support to Orange but i bought the phone 18 months ago so there's no more warranty. They said that blackberry warranty is 1 more year after the one year Orange warranty.
    Can you solve my problem please ??

    Hi Serge34400,
    Welcome to the Support Community!
    To rule out any possible software issue that may be causing this, try to back up your data using the BlackBerry® Desktop Software and perform a clean reload of your BlackBerry® Device Software.
    For further instructions, please see the following KB articles.
    For Windows®: "How to perform a clean reload of the BlackBerry Device Software for Windows" http://bbry.lv/GI9beY
    For Mac: "Perform a clean reload of BlackBerry smartphone application software using BlackBerry Desktop Software on a Mac computer" http://bbry.lv/J0UN1U
    Hope this helps.
    -FS
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.
    Click Solution? for posts that have solved your issue(s)!

  • When using control talk the right earbud from my iphone makes a noise

    when I use the Control talk feature of my iPhone 4S the right eaphone makes a buzz noise and then the tone to start talking. when i am listening to music both earphones work fine. I think it's a software problem but I don't know if any other users are experiencing the same. and how to fix it.

    Hi Thisslowgt,
    If you are having issues with your iPhone making unexpected sound signals, you may want to try some things to troubleshoot.
    First, quit all running applications and test again -
    iOS: Force an app to close
    Next, I would try restarting the iPhone -
    Turn your iOS device off and on (restart) and reset
    If the issue is still present, you may want to restore the iPhone as a new device -
    iOS: How to back up your data and set up your device as a new device
    Thanks for using Apple Support Communities.
    Best,
    Brett L  

  • Avoiding applet main window resizing when using browser zoom?

    Hello, I haven a applet embedded into a jsp page into an APPLET tag, with a fixed height and width, same values as the JPanel has on the applet with all the elements inside of it, my problem is, that if I use the browser zoom, the JPanel respects width and height but JApplet window does not, and increases until I stop zooming the site, I'd like to avoid this, I already tried by setting these parameters on the init function on the JApplet class:
    this.setSize(593, 468);
    this.setMaximumSize(new Dimension(593,468));
    this.setMinimumSize(new Dimension(593,468));
    this.setBounds(0, 0, 593, 468);
    this.setPreferredSize(new Dimension(593,468));
    But it does not work, is there something like a this.setResizable(false) for the JApplet class? I understand that JApplet is a subclass of JFrame isn't? please, any idea would be highly appreciated, have a nice day!!

    saman0suke wrote:
    So far I have the layout as NULL,Java doesn't have a NULL. Presumably you have a null layout. Don't do that/ Learn how to use layout managers and maybe you won't have a problem with the container being resized.
    db

  • Multple page not coming correctly when using "Control Levels"

    Hi,
    There is a situation wherein "Control Levels" is required to be used. However, the output is not as expected. Some of the problems with this are
    1. Some of the data is being lost
    2. Some pages are blank
    3. The data is overlapping/overwriting on the footer section
    and others issues..
    Has anybody come across similar issues? If yes, could you suggest a solution
    Thanks in Advance.
    Thanks,
    Jayant

    Having raised this message with OSS, we got to know that the issue was with the generated XML file. The line is BOLD needs to be added between the lines as shown below.
    <template xmlns:xliff="urn:oasis:names:tc:xliff:document:1.1" xmlns="http://www.xfa.org/schema/xfa-template/2.4/">
       <?layout streamLineLayout 1?>
      <subform layout="tb" locale="fr_CH" name="data">
    Not sure of the real purpose of this. But it works

Maybe you are looking for

  • IOS 6.1.3 WIFI button disable problem on iPhone4S - It is definitely a BUG

    Hi Apple Fans I have a full house of Apple products from iPhone -> iPAD -> iPod -> Mac -> AirPort, and I am suffering from WIFI button disable problem after upgrade to iOS 6.1.3, without any clue after calling Apple Support, factory reset and reload

  • Call forwarding to wrong number

    I have call forwarding set to forward calls to my cell phone. In the past few days three or four calls have been transferred instead to my home phone, which is a big nuisance, because I'm in the US at the moment and, because of the time difference, t

  • ViFindRsrc is have a problem with three or more crates

    I have customer who has 4 crates of VXI hardware and in each of the crates it has 1394 VXI Control.  When he runs our client software with three crates or more, viFindRsrc command will give him a error code VI_ERROR_RSRC_NFOUND. The DLL that is being

  • Can we  export the bdcrecording   testing to  development  system?

    Hi  guys, Can we export the bdc recording  file  testing system to development system? can we use that file in development system ? Thanks  in advance . Moderator message: please try finding out yourself first. Edited by: Thomas Zloch on Nov 9, 2010

  • CR11 Report Viewer not compatible with MFC10.0

    I upgraded to the Visual Studio 2010 (from 2008) last week. After the upgrade I recompiled all my applications and everything worked as expected except for the CR11 Report Viewer. The latest MFC version (10.0) causes an "Unhandled Exception at xxxxx