LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Autonomating Functions

Solved!
Go to solution

I am trying to set up a "write" function (inside of a case structure) when a boolean is set to true to write certain values, however, I cannot get it to work properly. The first problem that I am getting is that labview automatically inserts feedback nodes. Another problem that I am getting is that the function writes the previous series of data points instead of the newest ones (this happens with and without the feedback nodes). I left the case structure in question unwired in the attachment. Any ideas? (The Background of this program is for the automation of a Lakeshore 331 Temp controller. I am running various case structures off of a single boolean indicator called "Temp Stabilized." When this flag lights as true, a for loop runs through a csv that provides the data for this "write" function that I am having trouble with. I want this auto write to write the data to the temp controller when the newest data comes from the csv file.) I attached the program and the csv file that I am using.

 

Thanks,

 

Matt

Download All
0 Kudos
Message 1 of 4
(2,170 Views)

Well a simple diagram cleanup shows why you are getting the feedback nodes automatically inserted.

 

Follow the data flow...

 

You really need to break this down into discrete steps and consider a state machine architecture.

 

I have also attached my simple state machine example to give you a starting point.

 

BTW: I also have an "action engine" vi that I use to determine temperature stabilization if you are intrested 

 

========================
=== Engineer Ambiguously ===
========================
Download All
0 Kudos
Message 2 of 4
(2,144 Views)

You can turn off the auto-insert feedback node option in the options menu.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 4
(2,137 Views)
Solution
Accepted by MattEntner

The reason you are getting feedback nodes is because you are plugging the output of something into the input of the same logic. It's like using x to solve for y, but x is determined by what y is. You need to know Y BEFORE you can solve for X so labview is trying to fix this problem by adding feedback nodes.

 

Specifically you have an indexed number feeding out of the top for loop being used to set the Time Target on the elapsed time VI, and using the Time has Elapsed? boolean to determine how many iterations to run the for loop from before.

 

Here's the simplest example of what you're doing.

Feedback node.PNG

 

You need to look up shift registers and how they work. Any data that you want to save from iteration to iteration of the loop for logic put on a shift register.

0 Kudos
Message 4 of 4
(2,120 Views)