04-20-2021 09:43 AM - edited 04-20-2021 10:33 AM
I am struggeling to find the correct way of structuring my string in order to properly display it in a live table and in an excel table. How it is currently looking can be seen in the pictures. How the string looks like before entering the tables can also be seen in the picture.
The goal is to have the time in the first section, then the number, the unit and so on. The next part should be in a new row.
Edit: whole Blockdiagramm added
How it currently looks:
Frontpanel
Excel
What it should look like:
04-20-2021 10:12 AM
Please attach your actual VI instead of some truncated pictures with wires flowing in all directions.
Where is the data coming from? What is the structure of the incoming string?
A table is just a 2D array of strings, so if it should be built-up row by row, you need to accumulate the data in a shift register.
Your file IO will not happen until the loop ends. What triggers that?
04-20-2021 10:15 AM
04-20-2021 10:28 AM
The incoming string looks like:
Time Number Unit
Number Unit
Number Unit
Number Unit
Or as seen in the picture of the frontpanel, the indicator shows the string in the small grey rectangle
04-20-2021 10:31 AM - edited 04-20-2021 11:04 AM
@Tilto123 wrote:
The incoming string looks like:
Time Number Unit
Number Unit
Number Unit
Number Unit
Or as seen in the picture of the frontpanel, the indicator shows the string in the small grey rectangle
You will not get reasonable help by showing pictures of text. We cannot see the delimiters and other hidden characters. We cannot see your program architecture if you show disconnected code fragments.
Instead of concatenating all strings, then converting that ever-growing string into a table, just parse each new part and built it into a 2D array for the table. Much more efficient! Only the table data should be in a shift register. Why is there so much duplicate code?
Doesn't your string have a termination character? "Bytes at port" is probably not the best tool here.
Again, attach your VI and make sure a typical string is included as diagram constant or control default value.
04-21-2021 02:00 PM
Sadly i was not able to answer as i was limited to 2 posts in 24 hours. I am getting a string looking as follows. That string should be written into a Live table/excel table while the \s is used to determine what should be written into a single field.
14:24:18.20\s+000.07\sbar\s\s\s\s\s\s\s\s\s\s\s\s+0023.6\s\B0C\s\s\s\s\s\s\s\s\s\s\s\s-000.04\sN\s\s\s\s\s\s\s\s\s\s\s\s-000.03\sN
The goal is to get rid of the multiple \s and only have a single \s instead after the time, each number and each Unit.
By "attach your VI" u mean uploading the actual file or is the screenshot fine?
Sorry, english isnt my first language
04-21-2021 02:10 PM - edited 04-21-2021 02:11 PM
Hi Tilto,
@Tilto123 wrote:
The goal is to get rid of the multiple \s and only have a single \s instead after the time, each number and each Unit.
See this:
@Tilto123 wrote:
By "attach your VI" u mean uploading the actual file or is the screenshot fine?
What do you think is more helpful?
Would you enjoy of downloading my VI or do you enjoy looking at that image I included in this post?
(Would you bring a photo of your car to the garage when you want your car to be repaired?)
04-21-2021 08:52 PM - edited 04-22-2021 03:39 PM
@GerdW wrote:
(Would you bring a photo of your car to the garage when you want your car to be repaired?)
Sometime the car problem can be fully identified from a picture 😄 (... same for certain LabVIEW diagrams!)
04-22-2021 12:31 AM - edited 04-22-2021 12:32 AM
In this specific case I would call the garbage disposal and ask for a new car! 😉
(I hope that isn't one of those T**** cars with big electrochemical energy storage called battery inside that fireball…)
Btw.: Crosspost warning (same question in German LabVIEW forum)
01-07-2022 12:32 PM