Jump to content

RS flip-flop


Natu

Recommended Posts

QUOTE(Natu @ Jan 19 2008, 01:41 PM)

Creating a flip-flop involves a clock and logic gates. The information on these is redily available. For an RS flip-flop, a good gate diagram is at http://www.play-hookey.com/digital/rs_nand_flip-flop.html

I've attached an implementation of an RS flip-flop based on the site. You'll still need a clocking source. Note that the flip-flop has to see both edges of the clock before it fully changes state with this implementation. Also attached a second (simpler?) implementation that clocks on the falling edge of the CLK signal.

Link to comment

QUOTE(Natu @ Jan 19 2008, 01:41 PM)

Natu,

I see that this is the first time you have used the LAVA forums. Welcome.

It would be worth your while to read the LAVA guidelines:

http://wiki.lavag.org/Forum_Guidelines

In particular note the section on Homework Hustlers. These forums are a regular stop for students wishing to get solutions to academic problems without expending the effort to do the work themselves. Their questions often look like the question you have posted. In the guuidelines there is a link to an article on how to ask a good question in an online forum.

I actually have a vi (that could be used similarly to the AND, OR, NOR primitives) which functions as an RS flipflop. However, in putting it together I realized that it is not a very good thing to want. Essentially, Q' follows R, and Q follows S. [ http://thalia.spec.gmu.edu/~pparis/classes...01/node115.html ] When the inputs are TT orr FF the states returned are undefined and no change. This means that an RS flipflop is esentially trivial as a LabView function. So why would a person want such a thing?

So if you could explain the real problem you are trying to solve with LabVIEW, then perhaps we can help you. It is very likely that there a better way to do what an RS flipflop does in LabVIEW-which expalins why there is no such function in LabVIEW.

Finally, it is always better to have tried to work it out on your own some of the problem and show this work to the LAVA members.

National Instruments provides so much helpful information in the program help, and online that these are always a good places to look for information.

M

Link to comment

Mross and Tim_S

First of all thanks for prompt response from your side. since i am going to make one operator training simulator (OTS) for power plant, based on the labview. To implement the logic for pump, valve etc. I need very much this set reset Flip-Flop. And I have already made one set reset Flip-Flop attached here. But problem is that I can used that saved set reset Flip-Flop only once. If I will use second time this same set reset Flip-Flop by copy and paste method then both will work together, but not independently. I have made same as a SubVI but problem still same I can not use more than one place. That's why I was asking a method by which I can use self made set reset Flip-Flop any number of time independently same way as we are using other function palette elements like AND, OR, NOT gates.

Link to comment

QUOTE(Natu @ Jan 20 2008, 05:39 AM)

Mross and Tim_S

First of all thanks for prompt response from your side. since i am going to make one operator training simulator (OTS) for power plant, based on the labview. To implement the logic for pump, valve etc. I need very much this set reset Flip-Flop. And I have already made one set reset Flip-Flop attached here. But problem is that I can used that saved set reset Flip-Flop only once. If I will use second time this same set reset Flip-Flop by copy and paste method then both will work together, but not independently. I have made same as a SubVI but problem still same I can not use more than one place. That's why I was asking a method by which I can use self made set reset Flip-Flop any number of time independently same way as we are using other function palette elements like AND, OR, NOT gates.

Mike... I'll remember that students use this board in the future.

Natu... If you open up the VI properties and go to the Execution category, I think you'll find what you need. By default, one copy of a LabVIEW VI exists no matter where it is placed in a program. This is desirable for most cases. However, there are cases such as what you're describing, where you want one copy of the VI to exist per use in your application. In LabVIEW this has been called "Reentrant execution".

Link to comment

QUOTE(Tim_S @ Jan 20 2008, 07:20 PM)

Mike... I'll remember that students use this board in the future.

Natu... If you open up the VI properties and go to the Execution category, I think you'll find what you need. By default, one copy of a LabVIEW VI exists no matter where it is placed in a program. This is desirable for most cases. However, there are cases such as what you're describing, where you want one copy of the VI to exist per use in your application. In LabVIEW this has been called "Reentrant execution".

Thanks I got it. Now it is working. It took 3 days.

Link to comment

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.

×
×
  • Create New...

Important Information

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