Hello,
This is expected - we use the write trace VI's to simulate the behavior of a shared variable (tag) whose value is logged. If our logging process was stopped, a trace break would be entered in the database to show that at this time data was no longer being logged continuously. By closing the trace, this signals to the database to insert a trace break at this time to show that no more data is to be expected until the trace is re-opened. The trace break is stored in the database as a single NaN (not a number) value, so it should have only a small impact on the size of your database.
If you have an application that will need to frequently write to a trace, you could open the trace outside your loop, put all of the write operations inside the loop, and after the logging process is complete, close out the trace. This would more closely reflect the normal operation of a logged shared variable and only insert a trace break when the entire process has completed.
Cheers,
Matt Pollock
National Instruments