Jump to content

Tagging Binary Data for later parsing


Recommended Posts

Hello All,

 

I've created a state machine to automate the testing of some equipment.

 

I've given the user the option to stream data to disk using Text or Binary as the file format.

 

The recorded analog signals are converted and then written to disk  and once the program finishes a single test iteration I write "End of test # N" to the end of the data to "tag" it. Once all testing iterations are completed the large data file is then broken up into the individual testing runs by finding the "End of test # N".  The new individual test files are then overlayed onto an "end of testing" graph.

 

This process works great using when using Text files.

 

The trouble I am having is when I work with the Binary files.  I am running into a road block trying to figure out how to "tag" the data and parse it properly. I've tried writing a string to the file, I tried writing a constant such as the "Speed of light" constant. But I cant find the parsing point. 

 

I've attached the SubVI's where I do the writing, tagging, and parsing.

 

I realize that in the Read and Parse Text SubVI I delete row zero. I do this to remove the Date/Time from my text files before creating the graph.  I haven't updated this part of the SubVI for the Binary data as of yet.

 

If you have some good techniques that you employ to do this job I am all ears!  Also, if you have an critiques of my VI's I would love to hear them too.. I am still learning!

 

Thank you all :)

 

 

 

 

End_Of_Test_Tag_Write_SubVI.vi

Write To File_SubVI.vi

Read_and_Parse_Text_SubVI.vi

UserControl_TypeDef.ctl

System_Variables_TypeDef.ctl

Link to comment

Gday,

 

I would advise you to use the .tdms files. Then you can create a channel for each test write. It's stored as binary so it's small, and the read/writing of these files is great for streaming.

 

Something like this should work:

post-16778-0-21421200-1403049699_thumb.p

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.