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: 

Write to DBL previous values

Solved!
Go to solution

Hello,

 

I am working with LabVIEW 2013. I am receiving strings from a robot and parsing the data and plotting the actual position vs commanded position. When the robot encounters and error, it sends LV and error message. All the string parsing is done in the same place, so the graph will just plot all 0's when it receives an error.

 

I have it such that when it detects an error message, it will turn a boolean on. What I need to do now, is to have it write the previous known values for the "actual position" instead of setting them to 0's. Is this possible?

 

Attached is a snippet of my code. I am receiving this string 4 times a second.

 

Thanks,

SM

0 Kudos
Message 1 of 6
(3,445 Views)

Use a feedback node to retain the previous string. In the case structure, you would use the previous value whenever the error occurs, but wire the new value across if there is no error. Where is the data in the "cluster" coming from?

 

Please attach an actual VI instead of a picture!

0 Kudos
Message 2 of 6
(3,438 Views)

AltenBach, thanks for the reply! The cluster is just a control on the front panel that is literally just 3 integer controls that are clustered together.

 

Where am I supposed to place the feed back node and what ties into where?

 

Thanks,

SM

0 Kudos
Message 3 of 6
(3,431 Views)

The simplest solution would be to only write to the chart when you actually recieve data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(3,414 Views)
Solution
Accepted by topic author Sman29

Here's a quick example. If an error occurs, use the old value from the FN, else use the new data string.

 

 

0 Kudos
Message 5 of 6
(3,413 Views)

Alten, thanks for the reply! Works great!

0 Kudos
Message 6 of 6
(3,396 Views)