DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Time stamp issue with latch

Solved!
Go to solution

Hello,

 

I am filtering raw data then looking for the max/min of three channels, which is output to a file.  The time stamp I want is from the first channel's max/min, but I want the actual max / min of the other two channels within a 100 samples of the first channel's max/min and not just the corresponding values of the first channel's max/min timestamp (we have some inertia information in our setup that we are trying to capture on these other two channels). 

 

To do this, I am using a Max/Min module for the three channels, with an additional TTL output on the first channel, that is run through a Sample Trigger module, and then the Latch module.  This allows me to capture the Max/Min values for all three channels and output to one data file, when I have properly specified the hysteresis values in the Max/Min module, and specified the Sample Trigger to look for fewer than 100 samples and trigger at the start of the event.

 

However, I am not getting the correct time stamp for the max/min of the first channel in my output file, it appears to be the time stamp of the data block in which this max/min occurs (the time stamp precedes the correct time stamp by 100 to 300 milliseconds).  How do I get the correct time stamp for this task? 

 

I am using Windows XP Pro SP3, DasyLab 9.0.2 basic (yes, we'll be upgrading, but not this week 😉 .  See attached worksheet for details. 



This avatar was scraped from an instance of good public spending: http://apod.nasa.gov
0 Kudos
Message 1 of 11
(7,105 Views)

Can you give me an idea of what the data looks like?

 

Or post the data file? You can private message it to me, if you like.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 11
(7,101 Views)

Certainly, here's an ASCII version.  See attached for a 30 second file.  Thanks

 

DASYLab - V 9.00.02

Worksheet name: (unknown)

Recording Date : 6/15/2012, 12:36:32 PM

Block Length : 512

Delta : 0.001 sec.

Number of Channels : 3

Measurement Time[hh:mm:ss];Write 0 [V];Write 1 [V];Write 2 [V];

00:00:00.000;-0.42;-0.00;1.50;

00:00:00.001;-0.42;-0.00;1.84;

00:00:00.002;-0.88;-0.01;4.60;

00:00:00.003;0.04;-0.01;5.29;

00:00:00.004;-1.33;-0.01;-1.94;

00:00:00.005;0.96;-0.00;-9.51;

00:00:00.006;0.04;-0.00;-14.33;

00:00:00.007;-0.42;-0.00;-19.15;

00:00:00.008;1.88;-0.01;-17.77;

00:00:00.009;1.42;-0.01;-15.71;

00:00:00.010;-1.79;-0.01;-7.79;

00:00:00.011;0.50;-0.00;-2.29;

00:00:00.012;-0.42;-0.00;2.19;



This avatar was scraped from an instance of good public spending: http://apod.nasa.gov
0 Kudos
Message 3 of 11
(7,097 Views)

I think that was easier than I expected.

 

Change the sample trigger.... 

 

PrintScreen-0013.jpg

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 4 of 11
(7,095 Views)

Thanks CJ,

 

I'm not quite getting what I hope for with that technique. There are duplicate values on the second two channels, as in this sample output:

 

 

Measurement Time[hh:mm:ss] Write 0 [V] Write 1 [V] Write 2 [V]
0:00:17.920 -1676.74 -1.55 433.6
0:00:19.456 -31.76 -0.05 6.03
0:00:20.480 -1454.81 -0.05 6.03
0:00:22.016 -105.79 -0.09 8.73
0:00:23.040 -1510.28 -0.09 394.19
0:00:24.576 -78.56 -0.09 10.93
0:00:25.600 -1506.58 -0.09 379.6

 

 

To illustrate my original question further, I broke this max/min task into 3 separate files and converged them below with the original max/min output, plus the 3 additional max/min outputs.  Note that the max/min values are correct for all channels, but the time stamps don't correspond to the first channel as I expected.

 

Number of Channels : 3     Number of Channels : 1 Number of Channels : 1 Number of Channels : 1
Measurement Time[hh:mm:ss] Write 0 [V] Write 1 [V] Write 2 [V] Measurement Time[hh:mm:ss] Write 0 [V] Measurement Time[hh:mm:ss] Write 0 [V] Measurement Time[hh:mm:ss] Write 0 [V]
0:00:17.920 -1676.74 -1.55 433.6 00:18.226 -1676.74 00:18.274 -1.55 00:18.254 433.6
0:00:19.456 -31.76 -0.05 6.03 00:19.566 -31.76 00:19.635 -0.05 00:19.662 6.03
0:00:20.480 -1454.81 -1.38 380.8 00:20.855 -1454.81 00:20.851 -1.38 00:20.844 380.8
0:00:22.016 -105.79 -0.09 8.73 00:22.100 -105.79 00:22.106 -0.09 00:22.100 8.73

 

Is the latch approach invalid for keeping the time stamp correct?



This avatar was scraped from an instance of good public spending: http://apod.nasa.gov
0 Kudos
Message 5 of 11
(7,089 Views)

Can you post or private message the raw data file, the DDF file that you are reading? 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 6 of 11
(7,086 Views)

Hi CJ,

 

The file is far bigger than I can send.  In looking into the Latch help file, it appears that it is designed to take the block time of the control channel.  I was trying to avoid having to write a data file from each channel to arrive at Max/Min values for the data set and merge them later, but this appears to be the most reliable way to accomplish the task. 



This avatar was scraped from an instance of good public spending: http://apod.nasa.gov
0 Kudos
Message 7 of 11
(7,079 Views)

Let me restate the problem....

 

When you encounter the first min/max, then you want to search for a min/max on the other two channels, within 100 samples or so. Correct?

 

If I simulate it, it looks like this, where the last three channels are the min/max value, at their correct time stamps. I used the Min/Max TTL and the Sample trigger module to define an area of 100 samples, then used the Relay to replace all values out of the area with zero. The resultant signal may be what you want to do the next two min/max values in.

 

Now.... what timestamp do you want on them? The first, the second, the third? 

 

PrintScreen-0022.jpg

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 8 of 11
(7,076 Views)

Ah, that's a neat way to go about it.  I want the timestamp from the first channel.



This avatar was scraped from an instance of good public spending: http://apod.nasa.gov
0 Kudos
Message 9 of 11
(7,069 Views)
Solution
Accepted by topic author qzerror

Here's an example with a Generator.

 

Use the *.DSA file to open in V9. I'm not 100 certain that it will retain all of the settings, but it's a good start. The *.DSB file is DASYLab 12.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 10 of 11
(7,063 Views)