10-25-2009 07:42 AM
here's a 7-segment counter with JK flip flops. the main vi is the counter.vi . In the front panel you'll see 4 ff in a row. these ff are made of subvis rs.vi + untitled(3) +untitled (4). i will attach it too. i know how a JK ff works in theory but here i get lost a bit.
can someone help me understand how the JK ff is made of? how do all the sub vi's work and combine together to make it work?
10-25-2009 07:44 AM
10-27-2009 04:05 AM
Hello Paoksal,
If we take a look at Untitled 3 we can see that this is simply a J-K flip-flop (made up of two RS flip-flops). In fact, the front panel of Untitled 3 (the J-K flip-flop) includes a great picture which denotes this (I attached a screen shot for reference).
What the J-K.vi VI is doing is simply looping this JK flip-flop (note the feedback nodes which simply act as a shift register and store the previous iterations value). Are these VIs being used with FPGA? This seems like the most common use case for something like this.
Then the top level (Counter) is taking all those VIs which are constantly updating and using those values to update the display (using 7segment.vi).
One thing I would highly recommend if you ever need to find out what a VI is doing is to use the context help (ctrl+h then hover on anything), highlight execution (which slows down execution of the VI so you can follow it), and probes. You can find out more about these techniques in the LabVIEW help under Debugging>>Techniques (when viewed indexed).
10-27-2009 10:06 AM
10-28-2009 09:33 AM
I HAVE ANOTHER QUESTION PLEASE IF YOU HAVE THE TIME TO HAVE A LOOK AT IT! WHAT DO THE BOOLEAN AND BOOLEAN2 DO IN THE RS FF ???? . ALSO I SEE THE INPUTS IN JK--> BOOLEAN2,BOOLEAN 3,BOOLEAN 4 AND BOOLEAN 5!! THE JK FF ISTHIS RIGHT? WHY DO I HAVE MORE INPUTS???? I HOPE YOU UNDERSTAND THE QUESTION CAUSE MY ENGLISH ARE NOT THAT GOOD. THANKS IN ADVANCE
10-28-2009 07:18 PM
Hi Paoksal,
I don't know what those extra booleans are for, you would have to speak with whoever provided you with this VI, I'm not sure what functionality they were originally intended for.
If you have someone explain what this diagram means it should clear up all your questions (found on the front panel of untitled3):