03-23-2020 01:55 PM
03-23-2020 02:13 PM
@labview99 wrote:
I know that I can modify one element of the array using replaceArraysubset, but how do I access to this array if it is one control that I have used in the subVI
I have told you multiple times that you need to move the code from your subvi into your state machine. You have multiple states in that subvi, generally represented by the frames of that flat sequence structure. Move those into your state machine and then it should be apparent how to do what you want.
03-24-2020 11:40 AM
So you are telling me, that I have to divide my subVI into several subVIs to later access them from my state machine?
But what I want to modify is an input meter, so even if I divide it into another subvi I can´t access it.
03-24-2020 11:44 AM
But what I have to modify is not in that array of positions.It is a much longer array that appears in the subvi.
Best regards
03-24-2020 11:53 AM
You still fail to understand the concept of a state machine.You have multiple states locked up inside that massive subvi. If you need to change that subvi at some point during the process then you need to have a state in your state machine designed so that the value can be changed. If you'll condense that code you can easily fit each state into a reasonably sized state machine and can do this without having to create a subvi at all. You're backing yourself into a corner by trying to put the entire code inside that subvi. Make a proper state machine!
03-24-2020 11:59 AM
So, maybe, I could put the long array of the subVi in another Vi, only the array, so I could make a new state in the machine and put the new Vi with the array. Like this I could access and change or write what I want in the array at any time?
03-24-2020 12:16 PM
@labview99 wrote:
So, maybe, I could put the long array of the subVi in another Vi, only the array, so I could make a new state in the machine and put the new Vi with the array. Like this I could access and change or write what I want in the array at any time?
Or you could move everything into the main like a proper state machine.
03-24-2020 12:30 PM - edited 03-24-2020 12:34 PM
I know that there are some wires that are not connected but is only to know if I divide it okey the subVi and the states
Thank you
03-24-2020 12:40 PM
Well, since you did not include the subvis it is hard to know for sure. That's not how I would do it as I believe there were several states inside that subvi. I would break it down further so that there aren't long waits in which you cannot stop the program.
03-24-2020 12:49 PM - edited 03-24-2020 12:53 PM
Now, my problem is that in the "Error" state, I would have to change a value of the array that I send in the subVi called "data to set" and I don´t know how to do to change this array value