To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI will replace a record in your data log with a new record.
Description
You cannot write a record to any position except for the end of a Datalog. Using the "Set Datalog Position" function will only affect the "Read Datalog" function. In order to replace a single record within a Datalog, you must read all records from your Datalog, replace your record in the read data, delete all records on disk, and then write your modified records to the Datalog again.
The example program and its supporting type definitions are contained in the attached library file. You must modify the "Datalog.ctl" type definition to reflect your unique record structure for this subVI to work correctly! This will allow you to connect your record to the subVI terminals correctly. It will also modify the "DatalogRefnum.ctl" type definition such that the refnum you connect to the subVI from your other datalog functions will work correctly. You do not need to modify the "DatalogRefnum.ctl" type definition at all.
Requirements
LabVIEW Base Development System.
Steps to Implement or Execute Code
1. Load the attached VI "Replace Datalog LV 2012 - NI Verified" as a subVI.
2. Run as a SubVI
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.