Corey_C Posted June 13, 2014 Report Share Posted June 13, 2014 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 Quote Link to comment
AlexA Posted June 18, 2014 Report Share Posted June 18, 2014 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: Quote Link to comment
Corey_C Posted June 29, 2014 Author Report Share Posted June 29, 2014 Hello Alex,Sorry I took awhile to reply, I went under the knife.Thank you for taking the time to provide a suggestion and the screen shot of code.Thank you,-Corey Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.