10-23-2016 08:21 AM
Hi everyone
I have made a VI where the intention was that the user would be able to chose what channel to log from but this way the data is stored in seperate log files. If I choose for example to activate logging on temperature and pressure I want it to save to one file instead of two seperate. How can I accomplish this?
Greetings
DP
Solved! Go to Solution.
10-23-2016 12:08 PM
Some hints:
10-23-2016 12:19 PM
Hey Blokk
I am looking at this example:https://decibel.ni.com/content/docs/DOC-2431
Are you thinking something like this?
Greetings
DP
10-23-2016 12:23 PM
@DP123 wrote:Hey Blokk
I am looking at this example:https://decibel.ni.com/content/docs/DOC-2431
Are you thinking something like this?
Greetings
DP
Yes. Of course you need to modify it.
10-23-2016 12:33 PM
Ah great will try to work out how it exactly works. I just do not see how I will be able to have the same options when it comes to choosing which channels I want to log on and which channels I do not want to log. Could you give me a bit more clues :D?
Greetings
DP
10-23-2016 12:40 PM
You can pre specify the channels you want to log, and store their "index" in an array. In the logging loop you just use a for loop to get the required indexes. Then you can chose the channel index of a tdms file. Try to put together something, I can help tomorrow or others will also give hints...
10-23-2016 01:07 PM
I will try to make something till tomorrow and then we can take it from there:).
If somebody else got some hints / tips you are more than welcome to share your thoughts. Thanks!
Greetings
DP
10-23-2016 03:56 PM
Unless you need to save the file in a format other than TDMS, I suggest that you use the built in DAQmx functions for logging. No separate loops are needed and much easier to program.
See modified example attached.
Cheers,
mcduff
10-23-2016 04:03 PM
@mcduff wrote:Unless you need to save the file in a format other than TDMS, I suggest that you use the built in DAQmx functions for logging. No separate loops are needed and much easier to program.
See modified example attached.
Cheers,
mcduff
As I understood, the OP wants different rates for the channels, so the built in tdms is not a go. Hmm, or could it work? I have to see tomorrow, whether a tdms will record with the different rates...?
10-23-2016 04:05 PM
Maybe I should have read the post more carefully, sorry, but I think it will record the incoming task as it is defined. Not sure about the number of samples per file, if they have different rates.
mcduff