Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

use reference trigger for cyclic recording data

Solved!
Go to solution

Hi, Jim:

 

I already use the feature 'Use next available name'. It ONLY works when I stop the whole program! I've also tried all the other options available but none of them working for my purpose. For example, the case structure only allow one file to be recording the 'enable' periods' data but not in several files format.

 

If you still remember what I am trying to do, I need recording each cycle as ONE file within the run, which means each cycle file closed without interrupting the whole LV's running.

 

So, would the 'Write to measurement file' VI be able to do that? If the answer is 'No', then, are there some ways to close the file given the whole program is still running?

 

 

Regards

HW

0 Kudos
Message 11 of 27
(4,692 Views)

Hi HW,


One thing you could do is to write to a series of tdms files with the timestamp as the file name.  I have attached an example that will show you how to do this.  If you want to read tdms files, you can use the Read from Measurement File.vi or you can use the Read TDMS File.vi in the Example Finder.  You can find the Example Finder at Help >> Find Examples. Once the Example Finder opens, search for TDMS and you should be able to find the Read TDMS example. 

Regards,
Jim Schwartz
0 Kudos
Message 12 of 27
(4,683 Views)

Hi, Jim:

 

It seems that we're going to be on the right track now. I can use my trigger signals to replace the TF input (see my attached VI).

 

However, I found the problem - Err118 with TDMS Open.vi, indicating that the supplied folder path does not exit. I check your original VI which has the same problem.

 

To my understanding, the sample shows a specified path plus would create a new timestamp file each time when the condition is true, resulting in a series of files.

 

Would there be something wrong with the 'Build Path.vi'? Please feel free to edit my attached VI.

 

 

Regards

HW

0 Kudos
Message 13 of 27
(4,678 Views)
Solution
Accepted by topic author HW_Autodesk

Hi HW,

 

I wasn't able to reproduce this.  Make sure that you select the correct folder.  Take a look at the following screenshot:

 

tdms_folder.JPG

 

Make sure that you select the current folder for the TDMS write.

Regards,
Jim Schwartz
0 Kudos
Message 14 of 27
(4,672 Views)

Hi, Jim:

 

Fantastic, it's working properly. I also downloaded the TDM_excel_add_in to open the file in Excel.

 

Just one more question - in your sample, there is an 'implicit' time column to show the starting time however it only shows the channel data without implicit time in my recording file.

 

I tried 'TMD Importer Configuration' but it seems I already choose all the available properties. How can I have the implicit time in my TDM files?

 

 

Cheers

HW

0 Kudos
Message 15 of 27
(4,666 Views)

Hi HW,

 

I'm not sure if I understand what you are asking.  Could you post a copy of the TDMS files so I can compare the headers?  This may be an issue with the type of data being fed in.  Mine is dynamic data (which is the output from the express VIs) and your data is waveform type.  

Regards,
Jim Schwartz
0 Kudos
Message 16 of 27
(4,649 Views)

Hi, Jim:

 

I got problems to attach the file .tdms or .xlsx so what I can do is to show you the png file to illustrate.

 

Hope that will make it clear enough - my recorded data only got two channels's data WITHOUT 'implicit' time.

 

 

Cheers

HW

0 Kudos
Message 17 of 27
(4,633 Views)

Hi HW,

 

I have verified the behavior.  It appears that there is a difference between the simulate signal and the actual DAQmx VIs.  This should be ok, however, as you have the starting time and dt which you can get your time information from.

Regards,
Jim Schwartz
0 Kudos
Message 18 of 27
(4,615 Views)

Hi, Jim:

 

Thanks for your help. I've polled one signal for the whole cycle - from 'start' to 'stop'; and realized the process to record each cycle file during the continuous run.

 

Two things I am still try to get: 1) Implicit time. Will there be an internal or external clock signal I can use to record together with my data channels?

 

2) How can I count the trigger signal at the same time, which can be used as the reference cycle no. for my files? I got conflicting message saying 'can't use physical channel for virtual channel input' when I used the counter edge from DAQmx Create Channel - CI Cnt Edges. What I need is just a counted no. from my digital triggerring signal which I can add to my file name instead of time string.

 

Your assistance is highly appreciated!

 

Best Regards

HW

0 Kudos
Message 19 of 27
(4,584 Views)

Hi HW,

 

If I understand correctly, you want to count the number of files saved?  You can see below for a way to count the number of times you are saving a file.

As for getting implicit time, do you just want a column to show the elapsed time since the beginning of the acquisition? Or are you worried that this is not going to display properly? 

 

number of files saved.JPG

Regards,
Jim Schwartz
0 Kudos
Message 20 of 27
(4,550 Views)