LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write Data [Channel] Replacing Data instead of Appending

Hey Guys,

 

Apologies if this is really straightforward but I can't seem to figure out why the write data block isnt appending data on the tdms file, instead its simply overwriting the last value of temperature in the file, so that only the last temperature value can be viewed.

 

 

 

Heres a screenshot of the tdms document, having only the last value of temperature aquired in it

 

tdms.jpg

 

 

 

 

 

and the block diagram, the stuff in red is the part writing it to a file and is definitley set to append data.

 

fileIO.jpg

 

 

I thought it may be due to the fact its in the while loop, using write to measurement file works and its also inside the while loop (I dont wish to use it as it can't set as customisable properties).

 

I would really appreciate any help on the matter, I'm rather new to Labview.

 

Thanks,

Pete

0 Kudos
Message 1 of 8
(3,909 Views)

Check the help for the

Write Data Express VI

 

Measured data channel Contains the following options:
  • Show terminals for data channel—Displays terminals for Signal, append/replace (append data values), and index on the block diagram.
  • Append/replace data values—Contains the following options:
    • Append—Appends new values to the end of existing values.
    • Replace—Replaces all existing values with new values.
    • Replace at index—Replaces values at the index you wire to index on the block diagram.
Omar
0 Kudos
Message 2 of 8
(3,900 Views)

Hi,

 

Thanks for your response, but do you have any idea why its doing what it is? I'm already using the append function with your suggested VI, however it seems to be having the effect of a replace function, i.e. replacing the exisiting data value instead of producing a list of data. The image below shows the selected function as being append.

 

When using the Write to Measurement file it works fine and produces and list of data.

 

Thanks for your help and suggestions.

 

Pete

 

 

append.png

0 Kudos
Message 3 of 8
(3,877 Views)

Hi Pete,

 

Could you please also check the 'Overwrite options' in Open Data Storage ? If it's set to 'create or replace', the TDMS file will be created and written one row data in each iteration.

 

Also a suggestion regarding Open/Close file, you might want to move Open/Close outside the loop if possible to improve performance.

 

Hope this helps,

Mavis

0 Kudos
Message 4 of 8
(3,859 Views)

Hi Pete,

 

I think you should have to use a Sift Register on the while loop and concatenate the values you are getting from the signal generator and then wiring it to the write to excel terminal..

untitled.GIF

 

i dont have the Report generation tool kit.. so i showed it like this.. try this.. I think this may work..:)

 

Regards,


Nitz.. 

(Kudos are always welcome;))

Message 5 of 8
(3,848 Views)

Hey Pete,

 

I have written a simple VI which will show you how to use the lower level functions, rather than those express VI's that your using you have any questions about the functions that are being used please feel free to ask. I have set the group name as the date and channel name is strain, I've then just fed in random data. I have saved it to 2009 if you require it as an earlier version please let me know.

Regards

Andrew George @ NI UK
0 Kudos
Message 6 of 8
(3,839 Views)

Nitzy, what concatination module are you using there? I can only find a "concatinate string" module.

Nitzy, what concatination module are you using there? I can only find a "concatinate string" module.

 

 

 

0 Kudos
Message 7 of 8
(3,818 Views)

Hi,

 

you can simply use a build array function for this purpose.. right click the function on the block diagram you will get the option "concatenate inputs ".

 

Regards,

 

Nitz...

(kudos are always welcome;)) 

0 Kudos
Message 8 of 8
(3,802 Views)