LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems with reset of serial monitor

I'm using a serial monitor vi that I found on this pages.I use it in a functions test where I need to extract data from a serial string, this works fine. The problem is that in the second execution the string from the first run is stored in the serial monitor vi,I belive this may be due to a shift register, but I'm not sure.

I'm really a novice at this so all answers are appreciated.
0 Kudos
Message 1 of 7
(3,091 Views)
A shift register will remember the last value if you don't quit LabVIEW between the first and second run, so, you can even quit LabVIEW between runs or initialize the shift register with an empty constant wired to it.
Hope this helps
0 Kudos
Message 2 of 7
(3,091 Views)
This is the serial vi
0 Kudos
Message 3 of 7
(3,091 Views)
I only have LV 5.0 so i can't check this vi. If you attach a 5.0 version (save as previous version) i can take a look, else... wait somebody else to answer.
Good luck
0 Kudos
Message 4 of 7
(3,091 Views)
I am not familiar with this VI's function. But to help you out, here is your VI converted to LabVIEW version 5. After looking at the VI, however, I think what Gorka said is the clue here. Your inner shift register (where the strings are concatenated) is never initialized. It remembers the value from the previous run. /Mikael
0 Kudos
Message 5 of 7
(3,091 Views)
As i suspected, you have to initialize your shift register, but if you don't want to reinitialize it everytime, you can place a shift register in the outer loop, initialize it with a empty string, pass this shift to the inner one, and take the string indicator to the outer loop. This way, it will be initialized when program is.
Hope this helps
0 Kudos
Message 6 of 7
(3,091 Views)
Solved my problem...... thank you very much.......
0 Kudos
Message 7 of 7
(3,091 Views)