LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File open / write / search dates

For example, I'd like save in file:
red dog 123456
blue bird 456798
yellow cat 147258

After, I'll need search: what animal is blue? and the number is...?

How can i write dates in file? And can I search this dates?

I have LabView package Base.
Thanks.
0 Kudos
Message 1 of 2
(2,696 Views)
Hello Carlos,

try the "Array to spreadsheet string/spreadsheet string to array" vi's. Use them to write excel-like tables. You have to convert your data to strings (for writing) and back to numbers (when reading).
For searching an array you may use "Search 1D array". It will give you an index to the element. When you collect all items from other rows (or columns) you will get the full "data cluster".
To write dates to your datafile you have to convert them to a convenient format. You may use Labview-internal functions (time in seconds since 1.1.1904 as number) or use "Format Date/Time string" with your preferred setting to create a date string. Just include them in your data array as an additional column. For searching see above.

If it will be a bigger project
it could be helpful to ask someone for advise on databases...

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,696 Views)