Hi to all,
I have created a vi that i could save the string data in a spreadsheet file. However i want know how can i merge this same csv file to be used to save acquiring data, i have attached a vi to this.
and also the acquiring data is displayed in a another vi how can i merge the two vi's and then i save the both the data in a same .csv file? for example if i was using a daqmx to acquire a voltage signal from ni daq 6008 and the acquiring data will be saved in a csv file and merged into csv file with string data output
Thanks in advance,
1. I highly recommend you learn to use an Event Structure.
2. You have a race condition in there where you will be using an old path value. Use wires instead of local variables whenever possible.
3. I also recommend you learn to use the Format Into String function. It can accept many inputs and makes creating your strings a lot easier.
So it looks like this VI is writing the header data and then you will have DAQ data coming in later. So for that, I recommend looking into the Producer/Consumer design pattern. The idea is your DAQ loop can run independently of the logging loop. The data is passed from the DAQ loop to the logging loop via a Queue. So what I am picturing is you use the low level File IO functions to open the file, write the header data, then enter the logging loop. In the loop, read the data from the queue, use Array To Spreadsheet String to convert the data into a string format, and write to the file. When the loop is complete, close the file.
it seems quite enough idea to get the things but i need you say once again to go through this, can you explain me in step by step?
Hi cross rulz,
I've created a vi to display a voltage values and it was created in a way to display the values after prompt user window is opened so that they could enter the user details and the acquired data is saved using TDMS file, but after stopping it was not displaying the acquired values in a TDMS file viewer and also when i was trying to open the MS excel also not displaying the acquired data, i just want to know how to clear this bug?, share some ideas with me.
sorry dinesh, but so many things are wrong, i wanted to list them, but i stopped,
because any listing would be invalidated by proper design
you should really start working through the tutorials.
Since you are logging to a TDMS file, I highly recommend you just use the DAQmx Configure Logging to let DAQmx log the data for you. It will be a lot simpler.
If you don't want to do it that way for one reason or another, you really should be using a Producer/Consumer to log your data as you acquire it. This would eliminate the need for ever growing arrays.
And you also need a way to stop your VIs without generating an error.
And why i cannot acquire the data in a next task in state machine architecture bcoz i acquired data in a acquire data task and in the write to TDMS file task the acquired data is not displaying, can you explain me what i did wrong here?
And why i cannot acquire the data in a next task in state machine architecture bcoz i acquired data in a acquire data task and in the write to TDMS file task the acquired data is not displaying,
Are you talking about DAQmx tasks - or do you talk about states of your state machine?
can you explain me what i did wrong here?
Well, your "data" in the cluster is set to integer while you want to handle float data.
What's the point of formatting integer data to 6 decimal digits?
Why do you write measurement data formatted as strings to your TDMS file?
You don't clean up your VI but yet expect us to analyze this VI?
Why don't you wire your cluster to the subVI ("Promp user")? Would be much easier then wiring seven (7) individual wires into and another 7 out of the subVI…
can i have a 2013 version of that? and i need to know, why i can't get the acquired data in a write TDMS task in state machine?, so that i can learn tht not to do in future.