I have an issue writing boolean values to a TDMS file. I have 6 buttons on the front panel in an array. I want the boolean values of each button to be written in a column of its own using TDMS write at a frequency I specify. I've tried using a producer/consumer architecture but to no avail. I'm not sure how to proceed. The data that is written in the TDMS file is one column long and full of boolean values that doesn't make any sense.
We don't know how to help you proceed either.
You are having issues with TDMS Write and how the data looks in the file. But you attach a small screen shot of a small portion of your code consisting of just a DAQmx Write which is not in any way connected to the problem with TDMS files you describe.
Ah sorry, didn't realize my other pictures didn't send. The picture of the DAQmx Write is my boolean controls (which are just switches) and the TDMS write is my logging function. The TDMS Write is also writing data from a DAQmx Read function. I want to add 6 more columns to that TDMS file with the position (0,1) of the switches. I also have a picture of the TDMS file (called data). In that picture I want to add 6 more columns that log my boolean values.. I hope I was able to explain clearly.
I don't see the connection between the booleans and the writing of TDMS waveforms.
I guess I didn't explicitly state it. But you should send a VI so we can see the code. You've sent more pictures, but they are just small segments of other parts of the block diagram. With pictures, we can't run, poke at the code, look at the unseen cases of case structures, ......
I may have explained incorrectly. I want to log the position of my buttons (which are valve controls) so that I can tell when they are ON/OFF in my data. All my data is being logged in a TDMS file and I would like my button status to also be logged in the same file. That way I can tell, while looking at the data, at what time my valves were ON/OFF. Hope that made some sense.
Put a small wait statement in your Digital Output loop. No need to have that loop spin as fast as possible updating the valves.
I don't see where you are trying to send any digital data to the TDMS Write Loop.
I would probably put the digital output and the analog inputs into the same loop. Combine the data there before sending on to the data logging loop through the queue.
I've never had a reason to send boolean values to TDMS before, so I don't know how you structure it and how it looks in the file. You might have to experiment with that in a small program to work out the details and combine the data as needed in the acquisition loop.
Tried for ages, I just can't seem to get it to work. The VI writes the boolean array data in one column, instead of spread across multiple columns. It's frustrating because it's writing the correct values of the array, just that it is all in one column so it's very hard to read.