LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

crosscorrelation time delay question

Hi!

 

I have a project, where i work with 2 microphones, and i want to calculate the time delay between the two signals. I had made a simple method for it, but it's a bit bad...

So now i  try it with crosscorrelation, but i can't get a correct time-format...i had made the correlation correct, i have just some problem with the time format...

If i convert the time format into string with %<digit>, then i always becom 0...

Here is my vi, can somebody help me?

 kamera2pozLV82.JPG

0 Kudos
Message 1 of 2
(2,584 Views)

I took a peek- your problem is with the format string on the timestamp to string functions.  Your format strings are "%5u" and "%S"  the %5u returns a string that represents 5 digits of fractional seconds, the %S converts only the whole number of seconds

 

FROM the help-
for format timestamp to string

..." Time format codes include the following:

%a (abbreviated weekday name),

%b (abbreviated month name),

%c (locale-specific date/time),

%d (day of month),

%H (hour, 24-hour clock),

%I (hour, 12-hour clock),

%m (month number),

%M (minute),

%p (a.m./p.m. flag),

%S (second), %x

(locale-specific date),

%X (locale-specific time),

%y (year within century),

%Y (year including century),

%<digit>u (fractional seconds with <digit> precision).

 

So, How do you want to display the time information?  If you want 1 January 1900 12:00:00.000AM to display as "1/1/1900 12:00:00.0am" your format string should be "%d/%m/%Y\s%I:%M:%S%1u\s%p"  (ESCAPE CODES DISPLAYED)

 

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(2,573 Views)