rscott9399 Posted May 16, 2019 Report Share Posted May 16, 2019 Having trouble initializing a flip flop VI i wrote It starts up in whatever state it wants. How can i force a particular state? Its just an SR latch Thanks in advance Quote Link to comment
infinitenothing Posted May 16, 2019 Report Share Posted May 16, 2019 Initialization behavior is well defined in the settings of the feedback node. https://zone.ni.com/reference/en-XX/help/371361L-01/lvconcepts/block_diagram_feedback/ I'm not sure what you mean by force. Are you trying to make it into a d latch? Quote Link to comment
rscott9399 Posted May 16, 2019 Author Report Share Posted May 16, 2019 Hi there, Thanks So when i wrote the VI i notices it automatically populated a feedback node If i tried to delete it , i could not compile. So the feedback node is my answer but need to understand how to use it. I know my Q output to initialize to false and my Q not to be high I will read the link you sent me. Thank you Quote Link to comment
rscott9399 Posted May 16, 2019 Author Report Share Posted May 16, 2019 (edited) My only other issue is, I am triggering my Latch reset with a falling edge trigger. The clock that is running the latch is only running at the speed of a while loop. It is causing me to miss the falling edge sometimes. Do you have any suggestions Thanks Setting the Feedback node like this to false did not work I need to find a way to guarantee it Edited May 16, 2019 by rscott9399 Quote Link to comment
infinitenothing Posted May 17, 2019 Report Share Posted May 17, 2019 If you don't want to use a feedback node, another option is using a local variable (see example below) It sounds like you're trying to process losslessly. If that's the case, you usually need some sort of buffer. In this example, I use the event queue as my buffer. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.