LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create the global static variable in Vi?

Solved!
Go to solution

Hi 

 

I am trying to concatenation received String over TCP IP through sub VI. Sub Vi(DecodePakcet.vi) is call whenever the Data is available in to Queue. 

So, I would like save the concatenate string for next call of DecodePakcet.vi. I found the on Labview help Shift register is used as static variable. But I think it is work as local static variable (scope withing while loop).

I am trying to use global static variable or similar thing in Labview.
For Example.

1) TCP/IP receive 4 bytes "ABCD".

2) "ABCD" is store into Queue and en queue in another while loop.  

3) On second while loop I am calling DecodePakcet.vi.
4) DecodePakcet.vi. is take string, and concatenate received string with previous received String, if previously, there is not any string receive then it is just store for future purpose. 
5) Now another string is received over TCP/IP, which is "EFGH".

6) repeat steps from 2,3,4

 

The end result will be something like  "ABCDEFGH".

 

In reality, I am trying to decode Packet, which is received over TCP/IP.

    



   

Download All
0 Kudos
Message 1 of 5
(2,811 Views)
Solution
Accepted by topic author Y@sh001

If you would put the loop and  shift register into an action engine, it is no longer local to one particular loop of the caller.

Message 2 of 5
(2,771 Views)

Thank you for response.  

0 Kudos
Message 3 of 5
(2,769 Views)
Solution
Accepted by topic author Y@sh001

Thank you 

0 Kudos
Message 4 of 5
(2,728 Views)

Y@sh001 wrote:


Start reading here ... 😄

Message 5 of 5
(2,706 Views)