LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error messages

Hi 99,

 

you already know how to modify values in this array as you do for velocity and position. So what is the problem to modify another element of the same array?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 91 of 143
(1,320 Views)

@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.

0 Kudos
Message 92 of 143
(1,313 Views)

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.

0 Kudos
Message 93 of 143
(1,280 Views)

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

0 Kudos
Message 94 of 143
(1,279 Views)

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!

0 Kudos
Message 95 of 143
(1,273 Views)

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?

0 Kudos
Message 96 of 143
(1,270 Views)

@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.

0 Kudos
Message 97 of 143
(1,266 Views)

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

0 Kudos
Message 98 of 143
(1,260 Views)

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.

 

0 Kudos
Message 99 of 143
(1,252 Views)

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

Download All
0 Kudos
Message 100 of 143
(1,249 Views)