Feedback node in LabVIEW

Hi everyone,
I am trying to simulate the second-order generalized-integral SOGI in LabVIEW and compare step by step with Simulink. The results are the same until I make two feedback loops by using feedback nodes. The graphs in LabVIEW show nothing. Can you give me some recommends for these iteration loop?
I attach SOGI and my simulation model for detail.
I really appreciate your nice help!
Best,
Tuan
Attachments:
SOGI_fig.png ‏96 KB
Implementation.png ‏11 KB

You need to initialize your feednode nodes to an array of the appropriate size to match your waveform length.
In LabVIEW, what happens if you have {1,2,3} - {0,2}?  The output array will be of length of the smallest of the arrays being subtracted.  So you will get {1,0}.  So what happens when you subtract an empty array?  You will have an empty array as your output.
Here's a quick edit of your code.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
TestPhase.vi ‏30 KB

Similar Messages

  • Feedback nodes in Error cluster

    Some time back I
    had posted a VI called Simple StateMachine template. Based on the
    comments from fellow members I have redone it and am attaching it
    herewith. ( LV7.1 + Win_XP Professional )
    If you just open it and check the block diagram, you will notice that
    LV has introduced a feedback node in the error cluster looping between
    DAQMx function Write Digital Output and Read Analog input. I am not
    sure why LV does this even though the two functions have no common
    reference or relevance between them.
    You can also try this : Just remove the data lines to the two Digital
    Out functions, and also the error cluster with Feedback node . Rewire
    the Error cluster but this time without the feedback node. And now if
    you try to connect the Digital Out data lines, you will find that the
    Data lines are drawn with feed back nodes !!
    I am sure LV is trying to tell me something - only that I don't understand what it is. Can some one  elaborate on this ?
    Thanks
    Raghunathan
    Message Edited by Raghunathan on 07-04-2005 08:29 PM
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.
    Attachments:
    PRP_Main.vi ‏288 KB

    You have an impossible loop in your code (Run it with execution highlighting to verify):
    Dig8-15 relies on data from the case structure.
    analog input 0-7 provides data into the big case structure
    This means that Dig8-15 cannot execute until the case has executed, but the case must wait for data from analog out. LabVIEW is smart enough to insert a feeback node such that AI0-7 gets the error from the previous interation. This is NOT a desirable situration. 
    Without the feedback node, yuor code is broken. AI0-7 cannnot run because it must wait for DO8-15 to execute. DO8-15 cannot execute because it must wait for AI0-7.
    You should:
    Uncheck the diagram option "Auto insert feedback nodes in cycles" to make sure to get broken wires so it is easier to find the problem.
    FIx your dataflow. Please make sure your wires flow left-to-right, it make errors like this less likely. You need to wire the error clusters in the order the subVIS execute.
    I hope this is clear enough, but please ask is you continue to have problems. Good luck!
    Message Edited by altenbach on 07-04-2005 07:18 PM
    LabVIEW Champion . Do more with less code and in less time .

  • Feedback node crashing bug

    I have came across a nasty bug that caused Labview 2010 SP1 (Runnnig Win 7 Ultimate x64 bit) to crash without any warning.
    To replicate the bug do the following:
    Add a numeric control and another indicator to the front panel
    Switch to block diagram and add a feed back node
    Connect the initializer terminal of the feed back node to the output of the control
    Now do ANY of the following to cause the bug:
    Press the run buttong (which is broken due to not connecting the input of the feed back node) it will turn to a normal run without displaying the error
    Do an extra action and undo it, the run button will turn from list error normal
    So far the Vi can be saved normally. Now connect the output of the feed back node to the indicator and try any of the followings:
    Save the VI
    Close the VI
    Create a new project and select to add the VI to the project
    This will cause Labview to crash without any notice!
    When you are at step 4, the bug is there but harmless. Once you combine it with step 5 (connect to indicator), the bug is active and cause crashing. I have attached a snapshot of how the Front panel/block diagram look like before saving (since it can't be saved). Notice how the run button is enabled although the input of the feedback node is not connected.
    I have tried to replicate the error on Labview 2009 but couldn't.
    Attachments:
    FBN Bug.jpg ‏56 KB

    Dear ªL¡
    Thank you for briging our attention to this issue.
    I replicated it on LabVIEW 2010 SP1 and confirmed, that in LabVIEW 2011 it has been fixed.
    Thanks again!
    Best regards,
    Mateusz Stokłosa
    Applications Engineer
    National Instruments

  • Clearing of Feedback Node

    Greetings,
    Is it possible for the Feedback Node to be cleared from our VI?
    So that the feedback node will not use the previous value for the next execution.
    My project is dealing with optics and motorized stages.
    After running it once, for about 1 degree, when we change the movement to 5 degrees,
    the programme will run 1 degree, then 5 degrees.
    Apparently, this is not what we desired.
    So please do assist me.
    Your help is much appreciated.

    Hi,
    Could you post the ocde you've already done?
    Do you know which behavior you expected?
    The behavior you're explaining seems to rely on commands you've done. Where is the problem?
    Olivier L. | Certified LabVIEW Developer

  • Feedback node global

    Were these just a fad? I stopped using them years ago because I heard they had performance problems. But I also heard that they were not intirely implemented correctly and NI was going to fix it.
    PaulG.
    "I enjoy talking to you. Your mind appeals to me. It resembles my own mind except that you happen to be insane." -- George Orwell
    Solved!
    Go to Solution.

    I remeber doing a test not long ago and found that the FBN was slightly slower than the SR for creating FGVs.  I'll have to test it again with the lastest LabVIEW version.  I do remember back in the 8.6 days of Darren stating the the FBNs were faster due to not needing the loop overhead.  So a lot of my FGVs use feedback nodes.  I think they make it cleaner.  Some I work with think the SR is easier to understand.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Feedback node from case structure

    checkLED.vi is my first rev of this. Then I realized I can incorporate the 345/348 selection into the case structure, which resulted in checkLED2.vi. However as soon as I did this, the feedback loop inserted itself. I don't understand why this happened and what it means. The string coming from the case structure is an INPUT to the two 34970 vis. There is no feedback going on here. If Labview sees this as feedback, why didn't it insert the feedback node in checkLED.vi?
    Attachments:
    checkLEDs.vi ‏23 KB
    checkLEDs2.vi ‏23 KB

    Look at the dataflow you have created by moving the strings into the case statement. The case statement requires data from the iteration terminal and from the VI in the sequence structure. The sequence structure requires data from the switch VI which in turn requires data from the case statement. This is a clear feedback situation that you did not have before.

  • Feedback Node error and NXT

    I'm trying to create a simple counter using a LabView 8.5 and the NXT.  I'm using a Feedback Node and it does not show an error while editing the VI.  When I try to download the VI to the NXT I get the following error.
    ERROR: An error occurred during parsing.  Node was unable to be parsed. ((Class: FeedbackNode) (VI:Teleop.vi))
    List of errors:
    ERROR: An error occurred during parsing.  Node was unable to be parsed.
    When I click on the error it highlights the feedback node (arrow pointing left).
    Sean

    I found the problem after reading this document:
    ftp://ftp.ni.com/evaluation/mindstorms/LabVIEW_for_NXT_Advanced_Programming_Guide.pdf
    Feedback nodes are not supported in a while loop.  But, you can convert it to a shift register and it will function.
    Sean

  • Feedback Node Crash

    I seem to have stumbled across a bug in LabVIEW 2010. I'm trying to create a subvi that loops FP read, with the FP refnum stored in a feedback node. Unfortunately every time i wire up the feedback node and try to save the vi, LabVIEW crashes. It also crashes if i try to run the vi. Fortunately it does so gracefully and my other vi's can be recovered, but does anyone know if there's a workaround to actually implement this?
    Related vi attached.
    LabVIEW 2010 (v 10.0f2), 32-bit running on Win XP
    Attachments:
    FP Read x measurements.vi ‏17 KB

    Does it give any error codes? I don't have your subVI. The main one is simple enough. Try recreating it from scratch. Sometimes VIs get corrupted or just go insane.
    =====================
    LabVIEW 2012

  • Feedback Node Initializer Being Ignored ?

    Hi
    I have a feedback node sat in a For Loop, the number of iterations is determined by an input array. The same input array is wired to the initializer terminal of the Feedback node.  The Feedback node delay is set to 3 and yet the output of the node only contains the first value of the array for the first 3 iterations. It's easier to show than describe.
    So I would expect the output Array to contain the values 3,1,0,0,1,2 yet it actually contains 3,3,3,0,1,2
    If I wire the scalar value 99 to the initializer then I get the expected 99,99,99,0,1,2
    What am I missing ?
    This is LabVIEW 2011 for MAC OS X
    Don't forget to give Kudo's for a good answer !
    LabVIEW Champion
    Certified LabVIEW Architect
    Certified TestStand Architect
    Solved!
    Go to Solution.
    Attachments:
    Feedback Node.vi ‏8 KB

    To expand on Swatts answer a bit more.  You are actually only initializing the feedback node with a single element because you have the array auto-indexing at the loop tunnel.
    If you fed the entire array into the For Loop and the initializer terminal, it would have worked the way you expected.
    Attachments:
    Feedback%20Node[1].png ‏6 KB

  • Feedback Node Bug?

    I came across an odd situation when using a Feedback Node where a established a delay of more than 1 iteration.  (LV2011)
    I have a waveform datatype.  I wanted to delay the waveform by an iteration of the loop before displaying in a graph, so I added a feedback node.
    Then I realized I wanted to delay it by a few more iterations, so I went into the properties and set the delay to be greater than 1.
    Because I had stale data in the feedback node after 1 run, I wanted to intialize the feedback node, so I right clicked on the initializer terminal and picked create constant.  An array of waveforms was created, and this broke the output of my feedback node since it was wired to a scalar waveform type.
    If I do not have a delay longer than 1, (more normal feedback node), then a scalar waveform is created and no problems.
    Interestingly, I tried the same thing with the more basic numeric datatype, an array was created in one case, a scalar in the other, but the array did not break the output of the feeback node.  I'm not exactly sure what an array into the intializer would mean for a long delay feedback node.  It might make sense that it allows you to create an array of different initial values for each step, and this link on the web help mentions that http://zone.ni.com/reference/en-XX/help/371361H-01/glang/feedback_node/.  But the help embedded in LabVIEW doesn't mention that.  (See attached image.)
    See attached snippet.
    Attachments:
    Example_VI_BD.png ‏33 KB
    Feedback Node Help.PNG ‏145 KB

    Ravens Fan wrote:
    The only other question I have is whether it is appropriate for an array of elements to be generated at the intializer rather than just an element.  A 1 item delay feedback node generates an element,  a 2 or more delay generates an array as default.  What is the difference in the feedback node that treats the creation of that constant differently if Z=1 vs. Z = 2 or more.  It is just a feedback node with a different delay.  While an array would make sense as a data for the initializer for multi-delay feedback nodes, it is just as valid to have a single element as the input if you want the same output to repeat.
    I say yes, it is appropriate to generate an array for a node with a delay > 1, especially given the connection to the unilateral Z transform.  However, you are under no obligation to provide an initial value for all values, you can put a single value into the array and it is equivalent to the scalar input.  You can even put two values in and the second will be repeated until the delay is reached.  With the SR you have to initialize all or none.
    Not everyone has my handy-dandy QD shortcut to convert scalars to arrays (why not?), but I still think it is easier to either live with single element arrays or rip the constant out of the array and rewire than it would be to create a scalar and then reach for the array container or build array.
    My 2c, I rarely increase the delay personally, but I do not do FPGA either.

  • Matrix in feedback node

    Hi, I'm currently using Labview 2013 and I am trying to place a matrix in a feedback node. It seems like I found a bug, because it does work for a feedback loop.
    I wanted to use a feedback node to prevent labview from calculating the same matrix every loop.
    Am I doing something wrong here? Or is this an issue with Labview?
    Attachments:
    Matrix feedback node bug.vi ‏9 KB

    Same issue in LV2011…
    More interesting side effects:
    Apart from visual glitches LabVIEW will create the wrong indicator when right-clicking the (apparently) scalar result wire of the left ADD node…
    Edit:
    The result of the snippet for two matrices of 2×2 "zero" elements is "2.16178E-314" when "x+y" indicator is connected to left ADD node. When adding zero with the right ADD node you receive "3.97926E-316". So adding zero (or creating data copies by adding other functions) will change the result…
    Looks like a compiler error to me…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Feedback node bug when upgrading to LabVIEW8.6.0?

    I'm using LabVIEW to develop a DSP (Digital Signal Processing) application, when upgrading my code from LabVIEW8.2.1 to LabVIEW8.6.0, some functions working properly in LabVIEW8.2.1 now give incorrect result after being upgraded to LabVIEW8.6.0. After debugging, I found that the feedback node in LabVIEW8.6.0 introduces abnormal Data Type Conversion, I solved it by replace the feedback node with a shift register, is this a bug?
    Here I attach screen shots of one of my VIs, in this VI I'm using feedback node to implement point-by-point digital filtering on input complex data, attached file"Code_LV82.PNG" shows its diagram in LabVIEW8.2.1, if I open the same VI in LabVIEW8.6.0, the initial terminal of feedback node is now visible and there are 2 extra auto Data Type Conversion (shown as red dots) at output branches of feedback node (in attached file "Code_LV86_Marked.PNG", refer to where the 2 blue arrows point to), and this VI functions improperly. In LabVIEW8.6.0 if I replace the feedback node with a shift register or give a constant "0+0i" to the initial terminal of feedback node, the 2 extra auto Data Type Conversion are gone and everything is ok.
    Here I also attach my VI (as attached "wt_2nd Order Low Pass Filter.vi " ), you can try if my problem could be replicated.
    Any suggestion is welcome, thanks in advance.
    Attachments:
    Code_LV82.PNG ‏27 KB
    Code_LV86_Marked.PNG ‏20 KB
    wt_2nd Order Low Pass Filter.vi ‏10 KB

    Hi,
    you can do the necassary changes in business and develop the BBP from Functional point of view and capture the same in change request for transport.
    For further information go to this link.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/erp6/
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/erp6/transactionsChangedinECC6.0
    BT
    Satish

  • Reset feedback node through button (Boolean)

    Hi all, 
             I am using feedback node, and I want this feedback node to be reinitialized whenever I a press button (means whenever my case strucutre goes false). I really don't know how to do that. I can reinitialize all of my values except "array size". Please find the VI attached. ( I'm beginner so I might be doing it in a very complicated way). One more thing I can't use shift register because I have to include this code in other VI and it will make things more complicated for me.
    I hope there will be a simple way to reinitialize feedback node using boolean button.
    Regards,
    Amna
    Attachments:
    RTB.vi ‏22 KB

    I would recommend to use a shift register instead. Here's a quick draft. Modify as needed.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    RTB_MODCA.vi ‏22 KB

  • Restting A Feedback Node

    Hello,
    In the attached VI the counter is not resetting. I am trying to reset it on every cycle of the outer loop.
    Message Edited by MCU on 03-16-2009 05:22 PM
    Attachments:
    feedback node reset.vi ‏7 KB
    feedback node reset.png ‏9 KB

    Is this what you are trying to do?  If not let us know.
    Message Edited by jmcbee on 03-16-2009 04:29 PM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Reset Counter.PNG ‏7 KB

  • Reset a feedback node within a loop

    Hi everyone,
    I am new user of LabVIEW and sometimes even the most simple task seems to be very difficult for me.
    What I am trying to do is this:
    1. Reading a signal (I am using the random generator in the example below).
    2. Display the signal on the screen (the Waveform Charts)
    3. When I press a button, a predefined number of signals should be saved to file.
    I have managed to both display the signal and save it to file, but I am unable to find a way to stop the file saving when enough signals have been saved.  I am now trying to count the signals saved using a Feedback Node.  This works fine the first time the button is pressed, but the next time the button is pressed, the Feedback Node continues from the last time, ie. it is only reset when the outer While-loop is run the first time.
    So my questions are:
    1. Is it possible to reset the Feedback Node when the Boolean variable as shown in the example changes from True to False?
    2. Is there a better way to save the data (and being able to display it to screen (and later using the data in the VI)).
    Best regards,
    Martin T. 
    Solved!
    Go to Solution.

    Yes you can using a simple 'Select' function:
    Ton
    Message Edited by TCPlomp on 29-10-2009 10:09 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Example_VI_BD.png ‏10 KB

Maybe you are looking for

  • Every time I open Firefox another page of Firefox opens that has adds. What can you do to help me fix this issue?

    When I boot up Firefox, my default web browser, Firefox appears and then it loads another page of Firefox that has adds. How can you help me with this issue?

  • Cannot run a servlet using Tomcat. Urgent

    I have a webapplication which uses some jsp's and servlets. The jsp pages work fine when I use http://hostname:8080/MyWebapp/Filename.jsp However, when I developed a java servlet and put the class file in WEB-INF/classes directory of my web applicati

  • ITunes purchases not showing up on new computer

    I recently switched to a new computer but none of my iTunes purchases are showing up in iTunes on my new computer. I thought I'd backed up everything but I guess it didn't work so now does that mean I have to repurchase all of my songs that are purch

  • Low Battery indicator issue

    When my battery became low on my blackberry 8330, the amber LED began to blink, indicating the battery needs to be charged.  I turned off the device but didn't charge it.  When I turned the device on several hours later, the amber LED blinked only fo

  • Enhancer in Eclipse IDE

    I was advised to add -tcl false flag to the kodo.enhance.JDOEnhancer. How do I add the same flag to the Eclipse IDE enhancer?