07-08-2016 12:56 PM - edited 07-08-2016 12:58 PM
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
Solved! Go to Solution.
07-08-2016 01:00 PM
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!
07-08-2016 01:10 PM
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
07-08-2016 01:42 PM
The simplest solution would be to only write to the chart when you actually recieve data.
07-08-2016 01:42 PM - edited 07-08-2016 01:43 PM
Here's a quick example. If an error occurs, use the old value from the FN, else use the new data string.
07-08-2016 02:04 PM
Alten, thanks for the reply! Works great!