FPGA code only works on alternate executions

Hi,
I have some code I wrote for FPGA which, by itself, works fine. I tried to use "Open FPGA VI Reference" as part of a previous (non-FPGA based) VI. However, I find that the full code only works on alternate executions. I thought this may be because the FPGA VI is not being reset properly. However, I have used "Close FPGA VI Reference" and chose "Close and Reset" and the problem remains.
Any help is appreciated,
Thanks.

Hi Gary,
I hope you are doing well today! What version of LabVIEW FPGA are you using? When you say you are doing 'alternate executions', what exactly do you mean? Do you run your host VI, stop it and then run it again? Have you tried just using Close instead of resetting the FPGA VI? Also, what are you using the reference for? What are you invoking? It would, also, be better if you post a screenshot of your VI.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies

Similar Messages

  • Code only works in first frame

    Hello,
    I have several buttons, and when each one is mouse clicked by
    the user, text appears in a dynamic text box. I want to have the
    text appear in a different color for each of the buttons. However,
    it is only working in the first frame, and not in subsequent
    frames. All of the buttons have instance names in every frame (in
    fact, they are named the same in frame 1, frame 2, etc. . .--but
    that doesn't seem to be the problem??) Below is my code. Any
    suggestions? Thanks!

    Found the answer. The code defining the variable:
    var my_color:Color = new Color(textBox);
    must only be on the first frame. The rest of the code must be
    on all the frames.

  • My delphi code only works in DAQ driver 6.6 but not in upper version. Why?

    Hi,
    I'm using delphi 6 to program my application. My code was working fine if I'm using DAQ driver 6.6. Now I want to update my driver, but my code doesn't work. It doesn't work for another version of driver, except 6.6. My program will crash if not using 6.6. I'm not using ActiveX controls to communicate with the card. I'm using dll instead. I wonder is it some functions in 6.6 no longer exist in upper version. My code is in the attachment. Thank you
    Attachments:
    DAQInterface.pas ‏39 KB

    Hello;
    That is probably the case there. One thing you can do to double check if that is actually the problem is to probe each NI-DAQ function and see which one is giving you the error.
    Then, you can open the NI-DAQ on line help and search for the function you used on your code. If you can't find it, that means the new version of the driver doesn't support that function anymore.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Code only works if I add Extra character

    Hi, so there's a bit of code I use to keep a running list of pages I need to print (puts it in a textbox), solely depending on if certain boxes are checked... Say I have 3 checkboxs, and each represents a certain page or pages to be printed...  If select each of those checkboxes, pagesToPrint (a textbox) will be populated with 9-11, 15-40, 43 of the PDF (I made up the page numbers).  If I unselect one of those checkboxes, I need the value to be removed from pagesToPrint.  So pagesToPrint should read something like 9-11, 15-40.
    The code I'm posting below WORKS, except that I have an issue having the text to remove itself from pagesToPrint when the input is just a single number AND when it's the first item in the box... Example: "43" won't remove from pagesToPrint when I unselect the textbox txt1; but if I changed it to "43 " (added space at the end), "43-44" or "43a" all would work.  So if the box read 43, 9-11, 15-40 (the integer only being first) then the 43 wouldn't remove if the corresponding checkbox were unselected.... If it were populated with 9-11, 15-40, 43 (the range being first) then the 43 would remove if the corresponding checkbox were unselected
    Why is that??
    // script start - Trying to debug a removal issue on txt1 when integer lacks a space, symbol, or letter
    //get the button
    var btn = this.getField("txt1");
    //app.alert("value = "+btn.value);
    // this variable would change for each check box to the pages you want printed.
    var pagesToPrint = "43";
    //check value of checkbox
    if(btn.value=="Yes") {
      var action = "add";
    else
      var action = "";
    updatepagesToPrint(pagesToPrint, action);
    function updatepagesToPrint(pagesToPrint, action) {
      //app.alert(pagesToPrint + " :: " + action);
      // get the text field
      var printField = this.getField("pagesToPrint");
      if(action=="add")
      // check if the field is empty
      if ( printField.value == "" || printField.value == " ")
          printField.value = pagesToPrint;
      else
          // as printField has a value, add the new pages to the end of the value
          printField.value = printField.value + ", " + pagesToPrint;
      else
      printField.value = printField.value.replace(pagesToPrint+", ", "");
      printField.value = printField.value.replace(pagesToPrint, "");
      printField.value = printField.value.replace(/^,|^, |, $|,$/, "");
    // script end

    http://s000.tinyupload.com/?file_id=07374325820103346475
    Try to check and uncheck DI change request FIRST.... It stays, when it should delete... Any other order it works.  It must be "89a" or "89-110" or "89 " to work.
    If you check the boxes in any other order, it works perfectly.

  • Code only works after a page reload in firefox 3

    I'm using Flash CS3, exporting for flash player 9 and having
    troubles with the code below only in Firefox 3 (flash player 9 or
    10)
    In IE 6 & 7, all works OK.
    The code below should show small thumbnails of images. It
    does work on everything I tested except firefox 3. What is weird is
    that if I empty my cache and load the page online, it does not show
    any thumbnails or sometimes only one. However, if i reload the page
    without emptying my cache, it will then work perfectly.
    Here is my code (AS2 and XML)
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <xmldata>
    <pic thumb="gallery/thumb_001.jpg"
    image="gallery/001.jpg"></pic>
    <pic thumb="gallery/thumb_01.jpg"
    image="gallery/01.jpg"></pic>
    <pic thumb="gallery/thumb_002.jpg"
    image="gallery/002.jpg"></pic>
    <pic thumb="gallery/thumb_003.jpg"
    image="gallery/003.jpg"></pic>
    <pic thumb="gallery/thumb_004.jpg"
    image="gallery/004.jpg"></pic>
    <pic thumb="gallery/thumb_04.jpg"
    image="gallery/04.jpg"></pic>
    <pic thumb="gallery/thumb_005.jpg"
    image="gallery/005.jpg"></pic>
    <pic thumb="gallery/thumb_006.jpg"
    image="gallery/006.jpg"></pic>
    <pic thumb="gallery/thumb_007.jpg"
    image="gallery/007.jpg"></pic>
    <pic thumb="gallery/thumb_08.jpg"
    image="gallery/08.jpg"></pic>
    <pic thumb="gallery/thumb_09.jpg"
    image="gallery/09.jpg"></pic>
    <pic thumb="gallery/thumb_10.jpg"
    image="gallery/10.jpg"></pic>
    <pic thumb="gallery/thumb_11.jpg"
    image="gallery/11.jpg"></pic>
    <pic thumb="gallery/thumb_12.jpg"
    image="gallery/12.jpg"></pic>
    <pic thumb="gallery/thumb_013.jpg"
    image="gallery/013.jpg"></pic>
    <pic thumb="gallery/thumb_15.jpg"
    image="gallery/15.jpg"></pic>
    <pic thumb="gallery/thumb_16.jpg"
    image="gallery/16.jpg"></pic>
    <pic thumb="gallery/thumb_17.jpg"
    image="gallery/17.jpg"></pic>
    <pic thumb="gallery/thumb_18.jpg"
    image="gallery/18.jpg"></pic>
    <pic thumb="gallery/thumb_19.jpg"
    image="gallery/19.jpg"></pic>
    <pic thumb="gallery/thumb_20.jpg"
    image="gallery/20.jpg"></pic>
    </xmldata>
    In the following code, the variable prefix is the base path
    to the client web site ie.
    http://www.somedomain.com/somefolder/

    Try the '''''reset''''' described here: <br />
    http://kb.mozillazine.org/Problems_printing_web_pages#Reset_printer

  • Why is my code only working sometimes?

    This code is supposed to find the sum of the digits in the number 2^1000. However, it returns a decimal that is way off. And, for some reason, if 2^15 or 2^4 or other smaller exponents are used, the code works perfectly. Why is it taking exception with 1000 as an exponent??
    public double TwoToTheThousand() { //Adds all the digits together of the number 2^1000
    double tens = 10.0;
    double sum = 0.0;
    double num = Math.pow(2, 1000);
    double temp = Math.pow(2, 1000);
    for(double a = 0; a > -1; a++) {
    if(tens/10 > num)
    return sum;
    sum += ((num % tens)/(tens/10.0));
    num -= (temp%tens);
    temp = num;
    tens*=10.0;
    return -1.0;
    }

    Are you sure that Double can hold such a huge number?
    I don't think so...
    Edited by: sadrayan on Oct 7, 2008 7:46 AM

  • Code only working second time round

    Hi all,
    got a weird one here and hoping someone can help me.
    Scenario is this...got some dynamically created textareas on
    the screen and details of each are stored in a datagrid. The user
    can select one from the datagrid (dg_elements) and then change
    certain params for it, namely xy coords, height, width, alpha
    background colour, border colour and border style. Each param is
    taken from various components on the stage, textinput,
    colorpickers, comboboxes etc
    I've a button called but_apply which has this listener...
    but_apply_lnr=new Object()
    but_apply_lnr.click=function()
    // the instance name of the textarea is stored in
    dg_elements.selectedItem.element_name
    inst = eval(dg_elements.selectedItem.element_name)
    inst._x = Number(elex.text)+40
    inst._y = Number(eley.text)+90
    inst.setSize(Number(elew.text),Number(eleh.text))
    inst.depthChild0._alpha=alpharange.value
    inst.backgroundColor=backcol.selectedItem
    inst.borderColor=bordercol.selectedItem
    inst.borderStyle=borderstyle.selectedItem.label
    but_apply.addEventListener("click",but_apply_lnr)
    So, if I amend the x,y, height width or alpha and click
    but_apply then the textarea updates accordingly...however, if I
    change the borderstyle, bordercolour or background colour then
    these don't change...UNTIL I click it a second time when everything
    works!?
    So for example I could change the alpha and the width and the
    backgroundcolor and first time round the alpha and width will
    change, then second time around the bgcolour will update ?!
    Why!???? I thought an updateAfterEvent() may help, but it
    made no difference.
    Can anyone help please!
    Thanks
    Phil

    The UIObject Class is the base class for all V2 Components.
    It adds functionality but also hides the MovieClip Class by
    defining an API that is not tied to the timeline. As a result there
    are often two properties or methods - one from the MovieClip class
    and one from the UIObject Class that can be used.
    With the second click there apparantly is a reference to the
    normal text field (Text Area Component is a wrapper for the normal
    text field).

  • Fpga VIs only works on specific computers

      Hi,
    i have some fpga VIs and i want to distribute them. But, also, i have to protect my VIs, in case my customers tend to distribute them after they got my VIs, too.
    how can i protect my VIs from distribution by third hands? i have seen some examples about reading MAC adress, HD serial or CPU serial. Is that possible to check these serial numbers through FPGA environment ?
     What is your suggestions ?

    Hi, I believe this toolkit might be answer. If you think this is too much, perhaps other security measures such as password protection or removing the block diagram might be more appropriate, as mentioned here. Plus, I found this post that might give you more ideas. I hope this helps
    Alejandro | Academic Program Engineer | National Instruments

  • Hide "more" button in a list view, only works for first item in the list

    I have the following code in a list view that outputs several dozen items in a web app.  The code only works for the first item, how can I make it loop through and execute the test for each item in the list view?  The {tag_hide more button} is a checkmark field that yields a numeric 1" if checked otherwise yields a numeric "0".
    <div id="more-option">
            <p class="right"><a href="{tag_itemurl_nolink}" class="btn btn-small btn-very-subtle">More &rarr;</a></p>
          </div>
          <div class="more-selection" style="display: none;">{tag_hide more button}</div>
          <script>
    if ($(".more-selection").text() == "1") {
        $("#more-option").hide();
    </script>

    What's the URL for the site where you are using this?  Offhand, it looks like it should work with your first example so you are either placing the script before those elements are loaded or you might try wrapping your current javascript inside the:
    $(document).ready(function() {
    --- your existing javascript here
    This make sure the code runs once all the html is loaded on the page.  Without seeing a URL and debugging with the js console in Chrome I can't give you a solid answer.
    But, I do know that you can probably do this with a lot less markup.  Once we figure out what the actual problem is I have a better solution mocked up for you on jsfiddle.
    When looking at my HTML code on jsfiddle, please realize I setup some dummy HTML and removed your tags and added actual values which would be output by your tags.  The main thing I did was remove the whole div.more-selection and instead, added a "data-is-selected" attribute on your div.more-option element.  Then, in my javascript for each div.my-option element on the page, we loop through them, find the value of that data attribute and hide that div if it's less than 1 (or 0).
    Here's the fiddle for you to look at:  http://jsfiddle.net/thetrickster/Mfmdu/
    You'll see in the end result that only two divs show up, both of those divs have data-is-selected="1".
    You can try pasting the javascript code near the closing </body> tag on your page and make sure to wrap my js inside a <script> tag, obviously.  My way is neater on the markup side.  If you can't get it to work it's likely a jquery conflict issue.  My version is using the $(document).ready() method to make sure all the code is loaded before it runs.
    Best,
    Chris

  • I have programmed my Iphone to automatically connect to confcalls (dialing the nbr, pausing, dialing the PIN code). Works fine from the Iphone as such. When I connect my Iphone in Bluetooth to my car, only the phone

    I have programmed my Iphone to automatically connect to confcalls (dialing the nbr, pausing, dialing the PIN code).
    Works fine from the Iphone as such.
    When I connect my Iphone in Bluetooth to the voice-driven system in my car (Mercedes C), only the phone number appears to be transmitted. Entering a conference call number via the Iphone while driving is not a good idea.
    How can I fix this ?

    That *****.  I sell electronics on ebay.  Before listing them, i have to test and clean them. I have worked with microsoft Zune, you could sync via wireless through the network to your host computer. 
    i was hoping Apple would add that feature or the ability to connect to my computer via WiFi or Bluetooth and sync it wirelessly...   It would be sweet to have the bluetooth and wireless opened up so you can do more than just  connect to headphones or a headset... 
    I upgraded to the iPhone 4 this past december, i am on replacement # 2 or my 3rd iPhone 4...  I was hoping for some upgrades in quality.  Also being left handed, it seemed to drop many calls and give me very poor reception.  i added a Griffin Elan Form Graphie case that covers all but the front, top button, bottom speakers and volume control buttons and the call and reception quality has improved.  But I sure would have loved to see some improvements in the quality and function of the phone...
    Thanks for your input, i really appreciate your replies... 

  • Region Monitoring iOS 7 : didEnterRegion method is not calling when app is killed by user or by OS in iOS 7 only. It is working fine when it is in background. and the same code is working fine with iOS 6 for both app in suspended mode and background mode.

    Region Monitoring iOS 7 : didEnterRegion method is not calling when app is killed by user or by OS in iOS 7 only. It is working fine when it is in background. and the same code is working fine with iOS 6 for both app in suspended mode and background mode. What changes I have to made to work great in iOS 7 also.

    I rewrote code for debugging purpose and tried to catch error using GetLastError();  method,
    but it only printed 0. Below is code snippet; I think Create() throw an exception
    and code goes to catch block. 
    LONG ConnectTS(CString strIP, UINT n_Port)
    try{
              ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
              if(!Create())
    // Exception Line
    n_Err = GetLastError();
    return NET_INIT;
    catch(...)
                       DWORD errorCode = GetLastError();
                       CString errorMessage
                       errorMessage.Format("%lu",errorCode);
                       ErrorLog (0, 0, "Image
    System", (LPTSTR)(LPCTSTR)errorMessage);
                       return  IS_ERR_WINDOWS;
    Output: -
    ConnectTS is calling Create [is going to call]
    Image System
    0

  • I have a Adobe Creative Cloud's code, this is alphanumeric, but the registry only works with numeric codes ¿where i can use my code?.

    Hi, i have a problem with my Adobe Creative Cloud's code, this is alphanumeric, but the registry only works with numeric codes ¿where i can use my code? is a year-long Creative Cloud subscription.

    You most likely have a redemption code... especially if you did not buy direct from Adobe
    Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html
    -or https://forums.adobe.com/thread/1572504

  • How to make the same code that works only?

    how to make the same code that works only?
    code:
    Form2.Close = Me.Enabled = true
    effect such as this code

    I have this code:
    Public Class Form1
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    Form2.Show()
    Me.Enabled = False
    End Sub
    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    Form3.Show()
    Me.Enabled = False
    End Sub
    End Class
    he wants to after closing Form2 and Form3 unblocked the whole form1
    it means that:
    when I click the button, displays the himself form2 and blocks himself form1" and after closing Form2 , unlocks himself Form1"
    the same with Form3

  • URL Request will only work in IE?? Please look at this AS3 code.

    The targets only work and will go to the specified page in my ie browser. Does anyone have a fix for this. Code below.
    // Consumer URLs
    loughErneMC.loughErneURLBtn.addEventListener(MouseEvent.CLICK, goSite1);
    function goSite1(evt:MouseEvent):void {
    navigateToURL(new URLRequest("https://gc.synxis.com/rez.aspx?brand=PV&adult=1&step=1&hotel=27070&shell=PV&chain=10237&te mplate=www.preferredhotelgroup.com&guestEmail=PV&promo=MKTIRL&locale=en-US&avcurrency=USD"));
    dromoMC.dromoUrlBtn.addEventListener(MouseEvent.CLICK, goSite2);
    function goSite2(evt:MouseEvent):void {
    navigateToURL(new URLRequest("https://gc.synxis.com/rez.aspx?brand=PV&adult=1&step=1&hotel=26882&shell=PV&chain=10237&te mplate=www.preferredhotelgroup.com&guestEmail=PV&promo=MKTIRL&locale=en-US&avcurrency=USD"));
    castlemartyrMC.castlemartyrURLBtn.addEventListener(MouseEvent.CLICK, goSite3);
    function goSite3(evt:MouseEvent):void {
    navigateToURL(new URLRequest("https://gc.synxis.com/rez.aspx?brand=PV&adult=1&step=1&hotel=26854&shell=PV&chain=10237&te mplate=www.preferredhotelgroup.com&guestEmail=PV&promo=MKTIRL&locale=en-US&avcurrency=USD"));
    heritageMC.heritageURLBtn.addEventListener(MouseEvent.CLICK, goSite4);
    function goSite4(evt:MouseEvent):void {
    navigateToURL(new URLRequest("https://gc.synxis.com/rez.aspx?brand=PV&adult=1&step=1&hotel=27223&shell=PV&chain=10237&te mplate=www.preferredhotelgroup.com&guestEmail=PV&promo=MKTIRL&locale=en-US&avcurrency=USD"));

    I would think this is a security issue.
    You would need to add the swf file to the trusted file list
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    When the file is available through a http link, this problem will not be visible. The above setting needs to be done when you are running the htm/swf from a local drive.
    Hope this helps.
    Karthik
    p.s. If this post was helpful, please mark the thread as answered

  • Wireless sync only works when I unlock phone. Is there a way to tell itunes my phones unlock code?

    Wireless sync only works when I unlock phone. Is there a way to tell itunes my phones unlock code? Itunes tries to sync all night and posts 50 unknown errors. I unlock the phone and it syncs. I dont want my phone sitting around without a lock code but with wireless sync I cant find a place to tell itunes my code so it can sync? Any help is appreciated... Ray O

    I have the same problem. I am forced to have a PIN set on my devices because I use my corporate exchange email and sync over wi-fi initially fails until I manually unlock the phone/ipad.  #ckuan needs to read the words wiritten.  We know how it's supposed to work but it won't start until you enter the PIN. Until then I get error messages saying either it cannot find the phone or explicitly telling me I need to unlock it.

Maybe you are looking for

  • Can a Mac become an Airplay target?

    I'd like to stream from an iTunes app running on one computer in my household to another Mac. But instead of using that Mac to use the Library via Home Sharing, I'd like the Mac to become just a set of speakers. Can I somehow?

  • Moving a number from account to prepaid

    I have a specific situation when I need to keep the same number on a phone, but with my current AT&T Next plan it makes no sense to keep it in my family account. I turns out that it is tricky, since I have combined billing and don't want to lose it.

  • SQL 2000 instance connection problem

    Hi, I am trying to connect to a SQL Server 2000 database serer having an instance. host name is DP and instance name is DP. So, i was giving in the weblogic server 5.1 properties file for connectionpool property as DP\DP by using the weblogic's drive

  • "Analyze and Fix" issue

    Hi all, I'm trying to salvage some footage that was shot in poor lighting conditions. It was shot continuously (one take) to a card on an HD JVC camera, which breaks the footage into approximately 14 minutes chunks. The lighting was constant througho

  • ESS Record Working Time BAPI name?

    Hi ,          Can anyone tell me the BAPI name used in standard ESS- Record working time. Many thanks Rizwan