LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

uninitialize shift register

Hallo,
I would like to ask a question about the uninitialize shift register. I would like to use a uninitialize shift register in a subvi in order to pass data between subsequent calls of the subvi.
The problem is that the data i would like to pass is a 2D array.
The labview seems not to accept 2D array data type in uninitialized shift register.
Can someone please help me?
thank you.
0 Kudos
Message 1 of 9
(2,799 Views)
Hi achille,
what do you mean? It works great.
 
 
Mike


Message Edited by MikeS81 on 06-06-2008 12:06 PM
0 Kudos
Message 2 of 9
(2,797 Views)
Thank you for your answer.
if you do not use the 2d array in the while loop but a 2d array is coming from the left shift register use then initialize a new small array and then put it in a larger one and then connect the output to the right shift register there is a problem.
0 Kudos
Message 3 of 9
(2,789 Views)

Hi achille,

i can´t see it. Can you upload your example?

Mike



Message Edited by MikeS81 on 06-06-2008 12:39 PM
0 Kudos
Message 4 of 9
(2,785 Views)
Is a small block diagram just made to see what i mean
if in my block diagram just delete the 2d array that is connected to the left shift register so as to be un initialized then the array automatically is converted to 1d array. just try it. it doesn't look to keep the 2d data type
0 Kudos
Message 5 of 9
(2,777 Views)

Hi achille,

ok, but where is the problem, it shows only that the "insert into array" function don´t dictate the array size. Smiley Happy Where do you need it? One solution is to insert a case structure inside the while loop. Insert your code into the true case and an array constant into the false case. Connect a true to your case structure and you have what you want. But remember use a boolean control or a shiftregister value! If you connect a constant, then labview know that this case will never be execute.

Mike



Message Edited by MikeS81 on 06-06-2008 01:01 PM
0 Kudos
Message 6 of 9
(2,771 Views)
Thank you MIke. I haven't thought such a solution. I was thinking that other was the mistake for not accepting a 2d array.
Thank you. I will do it according to your suggestion.
0 Kudos
Message 7 of 9
(2,764 Views)

Another option is to use the First Call? vi under Synchronization.  It will return a True if this is the first time this VI is called in memory, and a false otherwise.  Then, in your True case, you can initalize the register in the while loop, and in the false you can do everything else.

 



Message Edited by JeffOverton on 06-06-2008 07:51 AM
0 Kudos
Message 8 of 9
(2,755 Views)
Are you familiar with Action Engine(s) and Functional Global Variables?
 
Do a search of Action Engine, you may discover more about what you want to accomplish. 😉
 
RayR
Message 9 of 9
(2,749 Views)