From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Register To Register Transfer

Solved!
Go to solution
I'm working on making a program to simulate a computer.  However, I've only just started and I'm running into a problem.  I've created two instances, CPU.vi and flip flop.vi.  When I add one flip flop.vi into the CPU as a subVI, everything works perfectly.  But when I go to add multiple instances of that same UI, they seem to take up the same dataspace and all do the same thing.  Please take a look at the attached VI's to see if you can figure out what I did wrong.
Download All
0 Kudos
Message 1 of 7
(2,892 Views)
Solution
Accepted by topic author Nicholas Rogw
You need to go into File/ VI Properties / Execution and make your subVI reentrant.
Message 2 of 7
(2,887 Views)

for Flip-flop

 

VI properties >>> Execution >>> Reentrant excution

 

will create a unique instance for each occurnce of Flip-flop.

 

As you have it now, it is reentrant so all instances are shared.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 7
(2,884 Views)
Thank you both very much for your answer.  That was indeed the problem.    And for the quick response.  
0 Kudos
Message 4 of 7
(2,882 Views)

Once upon a time I had some free time on my hands (like I do now).  Just for the fun of it, I created some flip-flop vi's.  You may be interested in them.  I have a clock input with mine.  Also, I used shift registers instead of feedback loops, because I personally don't like the look and feel of feedback loops.  See the attached zip file.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 7
(2,863 Views)

I just wanted to mention that I've just finished the program to do register to register transfer thanks to your help.  It works flawlessly.  :3  If you'd like to take a look at it, it's in the attachments. Please comment on it and tell me where I can make improvements.

 

Register to Register Transfer is the VI with the actual interface to be used. 

 

One question I do have though, that may be better asked elsewhere, did I set up the transfers right?  I mean, I feel like there are way to many OR gates in there.  But that's the only way I know of to prevent the backflow of electricity.   And as far as the feedback loops go, I didn't intentionally put those there.  Is there a way for me to turn that feature off?

0 Kudos
Message 6 of 7
(2,838 Views)

Nicholas Rogw wrote:

.   And as far as the feedback loops go, I didn't intentionally put those there.  Is there a way for me to turn that feature off?


You must have the Automatically Insert Feedback Loops option turned on.  Go to the tools menu - Options.  I think its under Block Diagram.  Look for this option and uncheck the checkbox.  Then restart Labview.  You will have to use shift registers to feedback the data.  In my opinion, feedback loops are hard to understand, hard to follow.  Shift registers make the code a lot more readable to me.  I'm sure there are some who would disagree.  To each his own.

 

- tbob

Inventor of the WORM Global
Message 7 of 7
(2,803 Views)