Jump to content
Sign in to follow this  
rscott9399

Initializing a variable once on the RT side of a RIO

Recommended Posts

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 

 

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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

 

Latch.png

Edited by rscott9399

Share this post


Link to post
Share on other sites

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.

 

RS Latch Local.png

RS Latch Event.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.