10-08-2021 01:38 AM
Hello Everyone,
I want to display Events in my Log Buffer String apart from the data. For Example, I want to show:
1) If the connection is established with the port, it should display CONNECTION ESTABLISHED with a timestamp.
2) Change of Event Should be displayed as well.
3) If any Error occurred, display ERROR OCCURED and so on.
I have attached the image of my front panel for reference. Please do help me in case anyone has any ideas on how it can be done.
Vielen Danke!
Solved! Go to Solution.
11-03-2021 05:17 AM
Would really appreciate if someone can at least give some clue on how to proceed at it.
11-06-2021 03:57 PM - edited 11-06-2021 03:58 PM
Without seeing your code there is not much we can tell you besides update your indicator/log string as necessary.
I did something similar in my last application. The underlying architecture is a State Machine and I log/display with a timestamp every state as that state is entered.
12-23-2021 02:59 AM
Hello,
I am able to solve the majority of the issue, but when I save my data to a text file I need to give a Timestamp for every value, and when I do that in a text file I am getting values like 3723091663.334 instead of Date and Time.
Could anyone please help me with this issue?
12-23-2021 09:18 AM
If you plug that number into the Seconds to Date/Time function you will see the actual time stamp. The number 3723091663.344 is the number of seconds since LabVIEWs' epoch.
12-23-2021 11:19 AM - edited 12-23-2021 11:50 AM
@GovBob wrote:
If you plug that number into the Seconds to Date/Time function you will see the actual time stamp. The number 3723091663.344 is the number of seconds since LabVIEWs' epoch.
"To Time Stamp" does this too
Excel and most popular spreadsheet programs understand the raw (floating point) timestamp.
You can change the format in Excel pretty easy
12-23-2021 05:56 PM
@ChikuSK wrote:
Hello,
I am able to solve the majority of the issue, but when I save my data to a text file I need to give a Timestamp for every value, and when I do that in a text file I am getting values like 3723091663.334 instead of Date and Time.
Could anyone please help me with this issue?
That is the underlying value of the timestamp. Others have shown you how to convert back to a timestamp, but assuming you want your text file to be human readable without being read back into another program, use either Get Date/Time String or Format Date/Time String to convert from a timestamp to a string.
For example:
01-06-2022 03:09 AM
Hi, Thank you. It worked to show on the front panel but I am not able to convert it to a array to give to build array function. As rest of the values writing to text file are in array.
Can you please tell me how can I convert this timestamp string to array so that i can give it to build array function
Thanks
01-06-2022 04:26 PM
@ChikuSK wrote:
Hi, Thank you. It worked to show on the front panel but I am not able to convert it to a array to give to build array function. As rest of the values writing to text file are in array.
Can you please tell me how can I convert this timestamp string to array so that i can give it to build array function
Thanks
It would be helpful if you could share some example code that explains what you are trying to do. I'm afraid I don't quite understand the question.
The rest of the values are in an array of what type?
Simply running to a build array function will convert the string into an array of string with one entry. You can build an array of strings just as any other data type.
If you have a numeric array, it's (slightly) more complicated. You can't just add a string to a numeric array.