07-13-2016 05:59 PM
What if the number going into the case structure is not 0, 1, or 2? Yes, you can confirm through inspection that it won't happen, but the compiler can't determine that, so it needs to know what to do in the unlikely case that you feed some other number into that case structure. You can assign the value "default" to a new case, or add it to one of your existing cases.
07-13-2016 06:02 PM
Since you are using a numeric for your case selection, you have to have a case for every possible number that can be represented by that integer type. An alternative is to use an Enum. This will also make your code easier to read since you will see text in the case structure and constants instead of just numbers. And be sure to make that enum a type def so that if updates all copies when you have to add elements to the enum.
07-13-2016 06:07 PM
Ahh this now makes sense. Thanks guys.
I believe that my script is now running correctly
07-13-2016 06:12 PM
Now unfortunately I am having trouble resetting my graph everytime I start a new sample. Would I do this by initializing a property node?
07-13-2016 06:18 PM
Yes, wire an empty value to a property node for the History Data property of the chart. You had that in an earlier version of your code. The data type that you need to wire to the property node changes when the data type of the chart changes, and you changed the chart from a waveform to an array when you changed the data type coming out of the DAQmx Read.
07-13-2016 06:39 PM
Thank you, my script is now running correctly. Are there any specific options within the TDMS files that I should know about in order to import them in other languages?
07-14-2016 08:39 AM
It's up to the developer to structure the TDMS file the way they want. There isn't a right or wrong answer, but knowing how you intend on consuming the file, may help in determining the structure you want to choose. You've probably already seen this but this is a good place to start.
http://www.ni.com/white-paper/3727/en/
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord