LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.bin File Format

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.

0 Kudos
Message 11 of 17
(1,287 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 17
(1,285 Views)

Ahh this now makes sense. Thanks guys.

 

I believe that my script is now running correctly

 

0 Kudos
Message 13 of 17
(1,283 Views)

Now unfortunately I am having trouble resetting my graph everytime I start a new sample. Would I do this by initializing a property node?

0 Kudos
Message 14 of 17
(1,281 Views)

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.

0 Kudos
Message 15 of 17
(1,279 Views)

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?

0 Kudos
Message 16 of 17
(1,276 Views)

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/

0 Kudos
Message 17 of 17
(1,252 Views)