08-02-2011 10:04 AM
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.
Solved! Go to Solution.
08-02-2011 10:17 AM
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.
08-02-2011 10:23 AM
Thanks
This works perfectly!
08-02-2011 10:31 AM
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:
08-02-2011 10:36 AM
You may want to check out this old example: https://decibel.ni.com/content/docs/DOC-3066
08-02-2011 10:45 AM
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?
08-02-2011 10:51 AM
@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.
08-02-2011 10:54 AM - edited 08-02-2011 10:55 AM
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. ![]()
To look for a string you can use the match pattern function
08-02-2011 11:12 AM
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
08-02-2011 11:22 AM
@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.
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.