09-07-2026 12:25 AM
I used the array to replace the subset vi, but I found that one piece of data was missing. I don't know where the problem lies. Does anyone know? Thank you for your guidance.Could you please help me write a demo?
Solved! Go to Solution.
09-07-2026 02:30 AM
I haven't looked at your code closely, but I can say that the value you write into the indicator is the value that you have before the last Replace Array Subset function. I'm guessing that's your issue.
It would be useful to learn about LabVIEW's debugging tools, so you can debug things like this yourself. At the basic level, these are things like breakpoints, probes and execution highlighting. Logging is also useful for some things.
My own preference for debugging is usually to start with the symptom (the table not displaying your desired value, in this case) and then work backwards from that. In this case, that means that you find where the table has a value written to it and look at what value that is and where it came from and then start working backwards to see where something went wrong.
It's probably also useful to point out that you have race conditions. There is no dependency between writing to the A-D indicators and reading from them, so the order is undetermined and in theory, that could also be your issue. It's better to use wires instead of variables if you can to avoid the option of race conditions.
09-07-2026 01:35 PM - edited 09-07-2026 03:05 PM
Your picture shows a gigantic pile of unnecessary local variables. Once you get rid of all those locals and use wires instead, you can then also remove the sequence structure. Also get rid of all that duplicate code. Why do you think you need to calculate the result of "D x A + B + 2" twice in a row? The result will not change!
As has been mentioned, there are a lot of potential race conditions, for example there is no guarantee that any of the locals are only read AFTER their terminal is updated.
As always, we won't debug images. For example, we cannot tell the array size of your diagram constants. What are the array sizes before the loops? Are the ones inside the loop all the same size?
Feel free to attach your VI (do a "save for previous" 2020 or below before attaching). Without it, our help is limited.
09-08-2026 02:08 AM
I uploaded the vi.
09-08-2026 03:28 AM - edited 09-08-2026 03:32 AM
09-08-2026 10:13 AM - edited 09-08-2026 10:16 AM
The reason your last number is missing is because you connected the indicator before the last replacement operation. the indicator belongs after!
Here's what I would do.
Personally, I would probably write the header strings once. I assume that in the real code you will write many more row later, so that should go into a second loop stack.
09-08-2026 10:48 AM - edited 09-08-2026 10:49 AM
@altenbach wrote:
Personally, I would probably write the header strings once. I assume that in the real code you will write many more row later, so that should go into a second loop stack.
Here's how that could look like. Of course you need to correctly insert your measurement values and settings in the right place.