LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display serial communication continuously similar to how HyperTherminal works?

Solved!
Go to solution

I need help on this

 

I am trying to read serial data and display the data that I am receiving continuously.

Right now, I can receive all the data but I only get one line at a time and does not save the previous data so the past information disappears

 

Essentially, I am trying to save the past data as it displays the new data so I can scroll up to review the past data similar to how HyperTerminal does it.

 

0 Kudos
Message 1 of 11
(4,066 Views)
Solution
Accepted by topic author Sr Test Engineer

You need a shift register and concatenate strings. Like this: (You can resize the Received Data indicator then right click and make the verticle scrollbar visible.

Capture.PNG

=====================
LabVIEW 2012


0 Kudos
Message 2 of 11
(4,062 Views)

Thanks

 

This works perfectly!

0 Kudos
Message 3 of 11
(4,057 Views)

You are welcome. You can also do this with a feedback node. Shift registers are good when you need to share the data between multiple cases of a case structure. But if you only need the data in one case you can use a feedback node. With a shift register you would have to wire the structure tunnels through in all the unused cases.

 

Using a feedback node would look like this:

 

Capture.PNG

=====================
LabVIEW 2012


Message 4 of 11
(4,053 Views)

You may want to check out this old example: https://decibel.ni.com/content/docs/DOC-3066

0 Kudos
Message 5 of 11
(4,049 Views)

I will try this too since at the moment it is only one case

 

I am slowly developing a VI to test an article in the thermal chamber so this "serial data issue" was a hump I needed to get over

It would be nice if the data would scroll showing the latest on top, but that is only cosmetics at this point

 

So thank alot for getting me over this hump

 

On another issue, I would like to search this serial data for a word and if that word is found, a led is turned on

 

Any ideas?

0 Kudos
Message 6 of 11
(4,045 Views)

@Sr Test Engineer wrote:

I will try this too since at the moment it is only one case

 

I am slowly developing a VI to test an article in the thermal chamber so this "serial data issue" was a hump I needed to get over

It would be nice if the data would scroll showing the latest on top, but that is only cosmetics at this point


Reverse the order of the Concatenate Strings inputs.

 


On another issue, I would like to search this serial data for a word and if that word is found, a led is turned on

 

Any ideas?


Match Pattern. Then check if the index is greater than or equal to zero.

 

 

Pretty basic questions. Have you done any of the LabVIEW tutorials. To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. There are also several Technical Resources. You can also take the online courses for free.

0 Kudos
Message 7 of 11
(4,042 Views)

That hyperterm example is really old so don't take any program architecture advice from it. I looked at the file properties and it was last modified in July of 2002 and it really does show it's age. I think that back then there were no flat sequence structures. That's no excuse because case structures and shift registers have been around for over tweny years. Smiley Happy

 

To look for a string you can use the match pattern function

 

Capture.PNG

=====================
LabVIEW 2012


0 Kudos
Message 8 of 11
(4,040 Views)

This works exactly as I wanted

 

Thanks alot for the help

 

 

To one of the replies, yes I am new at programming with Labview. I took a course at a local college in January to get me started but there is lots more to learn.

I will go through the material suggested plus, I am slated to take more advanced courses which will come available in September. I just need to prove to the supervisor that labview can control equipment.

 

Eventually, I will get good at programming

 

Sometimes little problems are huge problems for beginners

 

0 Kudos
Message 9 of 11
(4,031 Views)

@Steve Chandler wrote:

That hyperterm example is really old so don't take any program architecture advice from it. I looked at the file properties and it was last modified in July of 2002 and it really does show it's age. I think that back then there were no flat sequence structures. That's no excuse because case structures and shift registers have been around for over tweny years. Smiley Happy


Hadn't looked at that example in a long time and had forgotten at the way it was coded. Well, there's alternate versions, such as this: https://decibel.ni.com/content/docs/DOC-16284.

0 Kudos
Message 10 of 11
(4,024 Views)