11-29-2023 04:09 AM
Hi all, I have a question about saving date in LabView. For HIL testing, I have to save the date in .csv file or .txt file. My scenario is based on recording the current time and date when it falls below a certain voltage. Where do I mistake? Any feedback will help me a lot.
11-29-2023 04:22 AM
Hi ikeser,
ilkerksr35@gmail.com wrote:
Hi all, I have a question about saving date in LabView. For HIL testing, I have to save the date in .csv file or .txt file. My scenario is based on recording the current time and date when it falls below a certain voltage. Where do I mistake? Any feedback will help me a lot.
11-29-2023 05:06 AM
There are a few things missing and wrong.
This is not the function you need. Try to read the help to understand what it does.
Try to avoid the big blue blocks and blue wires when possible.
Try this and see if you like it.
11-29-2023 08:31 AM
Thanks for your feedback. I aimed two analog input's values to compare with constant value. If analog input's values are less than constant value, save the date in to the .txt or .xlsx file. Actually I send wrong pictures to you. Sorry about that. My system are shown below:
11-29-2023 09:04 AM
11-29-2023 09:21 AM
Yeah, I have notice yet. Thank you. I have created .xlsx file but data wasn't saved. How can I fix this issue?
11-29-2023 09:35 AM
ilkerksr35@gmail.com wrote:
Yeah, I have notice yet. Thank you. I have created .xlsx file but data wasn't saved. How can I fix this issue?
Refer to my previous answer.
To start fixing the issue, don't use express VI. Use "Write to Text File".
11-30-2023 08:58 PM
I don't understand your question. The Time functions in LabVIEW can certainly tell you the time as monitored by your PC (which, in principle, could have its clock synchronized with a Time Standard) reported to the nearest second (and even fractions of a second). NI provides a number of functions to acquire Time and express it in a variety of format to suit your needs. So precisely what do you need?
Bob Schor
12-02-2023 02:03 PM
Actually I want to use in real time project, but it doesn't work in real time project. My diagram is shown below.
When I run, calendar does not see the true history. Also, file doesn't occur. How can I solve these problems?
12-02-2023 10:36 PM
Now we are getting somewhere (because you are supplying necessary information). If you use "Get Date/Time in Seconds" on a PC, it uses the Windows clock (which gets synchronized as to the Date and Time by functions buried in Windows (the OS) and in the PC hardware (like a battery that keeps a "clock" ticking even when you turn the power off on the PC).
Real-Time OS's don't usually have this functionality. The Controller in the PXI probably has a "clock", but (a) might not have a battery to keep the clock running when power is cut off, and (b) doesn't have the sophistication to "search the Web for a Time Server to set Date and Time on startup" (actually, I'm not sure that Windows will "auto-set" itself, though it does know about Standard vs Daylight Saving time).
Once the PXI is powered up (and kept powered up), you can use MAX to set its date and time. It is also possible when the PXI is powered up and running connected to a PC that can serve as a "Time Standard" for the PC to "set" the PXI's clock (using, of course, the time retrieved from "Get Date/Time" in (Host) LabVIEW.
Bob Schor