From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shift register to replace local variables

Solved!
Go to solution

Hi

I am looking for a way to do a scrolling text on a boolean LED. Currently, i am using local variable to do the scrolling action (refer code, the rightmost For Loop). However, using this method requires more CPU power, and also prone to several other error. Therefore, can anyone help me to replace the local variables with shift register? If possible, do not change the other Loop. Thank you.

-the scrolling action need to be continous

-use the attached config. file

-can test with any message text

 

Download All
0 Kudos
Message 1 of 3
(2,949 Views)
Solution
Accepted by topic author fiqri27

Why do you think you need so many loops???

 

Try this, maybe it can give you some ideas... 😄

 

(Look at the buffer allocations. My 2D boolean array operates at constant size and completely in-place. Not only were you constantly reading and writing from/to local variables, you were also constantly growing and shrinking the array size. This is very ineffiicient. I did not see the purpose of your outer while loop or your first FOR loop. None of your shift registers made much sense. You probably want to close the configuration file (not shown in my modification)).

 

 

Message 2 of 3
(2,924 Views)

Wow !!

I never thought it going to be that simple. 😮

Well, I am new to LabVIEW, with only basic programming background. I only got 1 week of self-study before I had to make this VI (with lot of online reference).  

Thank you very much for your help. I really appreciate it !
 

0 Kudos
Message 3 of 3
(2,914 Views)