How to measure time difference between zero crossing of a sine wave and rise time of a pulse on a same graph?
I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
Cheers
Awais
Message Edited by awais.h on 03-30-2010 11:20 PM
Message Edited by awais.h on 03-30-2010 11:21 PM
Solved!
Go to Solution.
Hi
Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
Here is what I get using that code.
As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
Here is the the code modified.
As you can see, it wasn't that big of a modification and it still is your code.
I will keep trying.
Thanks for the help
Attachments:
FinalShockSpeed.vi 55 KB
Similar Messages
-
Disk Utility: Differences between "Zero Out Data" and "7-Pass Erase"?
I'm wondering if anyone knows if there's a significant difference between the "Zero Out Data" erase option in Disk Utility (specifically Disk Utility 10.5.5), and the "7-Pass Erase" and "35-Pass Erase" options in same software.
Here's why I'm asking: I have a co-worker with an iMac G5 20" 1.8GHz with 160GB internal hard drive. As a result of the power supply overheating a week ago due to dust, some hard drive problems resulted. I'm trying to assess whether these are 'soft' formatting problems that can be recovered from, or 'hard' problems requiring replacement of the hard drive and/or power supply.
Following the failure, I removed the dust and restored the iMac to servicable form. The power supply seems to be OK now. The next thing was to attempt to recover as much data as possible from the 160GB, as the last full backup was a week old. Carbon Copy Cloner, shell copy via 'sudo cp -p -R -v', Finder copy, and DiskWarrior recovery all met with problems. TechTool Pro identified a huge swatch of unreadable sectors during repeated surface scans. Unfortunately, these unreadable sectors were located midway in the OSX boot partition (an 80GB partition), and not in the other 80GB partition devoted to lower priority video data.
When I was satisfied I had backed up the data to the best of my abilities, I next set out to reformat the drive and see if the bad sectors could be eliminated or remapped out of existence. I did a "Zero Out Data" erasure in Disk Utility (with no errors during the erase), but TechTool Pro showed the bad sectors persisted in equal strength at the same location. I next executed a sixteen hour "7-Pass Erase" (again no errors, and confirming that it takes about an hour per 10GB). The next day when I ran TechTool pro, all of the sector errors had disappeared. I'm a bit perplexed as to why the "7-Pass Erase" seems to have recovered the use of the drive. Is it possible that there are simply thousands of bad sectors now remapped that I'm not seeing? [If so, how do I check for this?] TechTool Pro has not reported any S.M.A.R.T. issues to date on the drive. What am I to make of that?
There are some related threads I've checked into, but I'm not sure how to properly assess my situation based on this information:
<http://discussions.apple.com/thread.jspa?threadID=232007>
<http://discussions.apple.com/thread.jspa?threadID=138559>
<http://discussions.apple.com/thread.jspa?threadID=118455>
Since the iMac has three weeks left on it's one year warranty, and I've already moved the user to another machine temporarily, I'm thinking that the smart thing to so is to send it in to Apple to have them look at the power supply and hard drive. That way, when it returns, even if there is still a lingering hardware problem, at least it will be covered under warranty for another 90 days.
Any thoughts?
iMac G5 20" 1.8GHz Mac OS X (10.4.6) 1.25GB RAM, 160GB hard disk, SuperDriveHI, Bret.
The only differences between "Zero Out Data", "7-Pass Erase", and "35-Pass Erase" are the number of times a binary zero is written to every bit on the disk. "Zero Out Data" writes a binary zero once, whereas the 7- and 35-Pass options write a zero seven and 35 times, respectively.
Technically, one pass with Zero Out Data should be sufficient to map bad sectors out of service, a process also known as sparing. If a bad sector is encountered, it is both marked as "in use" in the directory's allocation table and added to the directory's "bad blocks file."
My understanding is that the Surface Scan of Tech Tool Pro should identify bad sectors every time it is run unless the bad sectors have been locked out by the drive controller of the ATA drive itself. This is because Surface Scan checks the entire surface of the disk.
What may have happened is that running "Zero Out Data" spared the bad blocks from a directory standpoint, but did not result in the drive's controller locking out those sectors for reasons detailed in the "Surface Scan" section of the Tech Tool Pro manual. However, the 7-Pass Erase may have resulted in the drive's controller locking out the bad sectors and why Surface Scan did not pick them up after such.
Given the problems you described, I concur with your plan to have Apple check the affected computer. You might also want to consider purchasing an AppleCare Protection Plan for that Mac: I recommend and buy these for all my Macs.
For some additional information on bad sectors, see the "Bad Sectors" section of my "Resolving Disk, Permission, and Cache Corruption" FAQ.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X
Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
I may receive some form of compensation, financial or otherwise, from my recommendation or link. -
I have used NI USB-6008 (DAQ) to sample a continous signal, after sampling I compared the amplitude of the resulted signal with a value. If the amplitude is greater than a specific value (threshold) then it can pass. Now I want to measure the time difference between the resulted samples. The samples look like spikes. (May be if I trigger a timer, then I can measuer the time difference, but I have not seen such a timer).
Thanks in advance,
SaraydinOops just occured to me that you are using a 6009 which is not very fast, 48ks/sec, this will not get you very much time resolution and you could have issues seeing much of a 50 us sample. Another approach is to use the counter but you would have to preprocess the spikes to generate a trigger for the counter.
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA -
How to measure time difference between two continous encoder pulse (PULSE A & PULSE B)
im trying to figure out the time difference between two square
wave pulse (PULSE A and PULSE B) from an encoder. I tried to modify many code but fail to capture thephase difference for each pulse. the
pulse only rise to 5V and fall to 0V like normal square wave pulse
can you and all of experts here help me out with this?
my problem
1) Encoder pulse are continous (pulse A and pulse B)
2) Square wave pulse have "0V" and "5V" please rapidly
if possible someone show me correct method , Im using LABVIEW 7.1 and Hardware NI SCOPE (PCI 5102)
your advice are highly appreciated
among my idea as in attachment , but I failed to get it
Attachments:
Need to Get this wave.JPG 34 KBHi Amirul,
Check the attached JPG file. i think this will be use full to you
Regards,
Santhosh M -
How to calculate the % of time difference between different state
Hi there,
The below query returns the follwoign outptut. I need to calculate the % of time period that a specific state ( state ex: open or closed or all report )exists.
I have to find the time difference between the 2 states . How could I do that ?
The first row shows null for the previous state . How could get actual previous state for the first row?
SELECT si.station_name,
vppstation.avi_control_state_code.STATE_SHORT_NAME,
ash.state_id ,
lag(ash.state_id) over (order by ash.STATE_EFF_DATE desc) previous_state,
TO_NUMBER(TO_CHAR(ash.state_eff_date, 'SSSSS')) "periods in sec",
TO_CHAR(ash.state_eff_date, 'dd-mon-yyyy hh24:mi:ss am') "Date"
from vppstation.avi_state_history ash
left outer join vppstation.avi_control_state_code
on ash.state_id = vppstation.avi_control_state_code.state_id
LEFT OUTER JOIN vpproadside.stations_installed si
ON ash.station_id = si.station_id
where ash.state_eff_date >= to_date('28/02/2010', 'dd/mm/yyyy')
and ash.state_eff_date <= to_date('03/03/2010', 'dd/mm/yyyy') ;
group by si.station_name
ash.state_id
order by ash.state_eff_date asc ;
STATION_NAME STATE_SHORT_NAME STATE_ID PREVIOUS_STATE periods in sec Date
IRDNCST02 Open 1 NULL 85166 01-mar-2010 23:39:26 pm
IRDNCST02 All Report 3 1 85159 01-mar-2010 23:39:19 pm
IRDNCMT01 Closed 2 3 81376 01-mar-2010 22:36:16 pm
IRDNCST02 Open 1 2 78723 01-mar-2010 21:52:03 pm
IRDNCST02 All Report 3 1 76023 01-mar-2010 21:07:03 pm
IRDNCMT01 Open 1 3 55922 01-mar-2010 15:32:02 pm
IRDNCMT01 Closed 2 1 54931 01-mar-2010 15:15:31 pm
IRDNCHA01 Closed 2 2 41291 01-mar-2010 11:28:11 am
IRDNCAS01 Open 1 2 38847 01-mar-2010 10:47:27 am
IRDNCAS01 All Report 3 1 37947 01-mar-2010 10:32:27 am
IRDNCST02 Open 1 3 35332 01-mar-2010 09:48:52 am
IRDNCST02 All Report 3 1 32632 01-mar-2010 09:03:52 am
IRDNCST02 Open 1 3 31502 01-mar-2010 08:45:02 am
IRDNCST02 All Report 3 1 28802 01-mar-2010 08:00:02 am
IRDNCHI01 Open 1 3 25368 01-mar-2010 07:02:48 am
IRDNCHI02 Open 1 1 23939 01-mar-2010 06:38:59 am
IRDNCMT01 Open 1 1 20696 01-mar-2010 05:44:56 am
IRDNCCH02 Open 1 1 13452 01-mar-2010 03:44:12 am
Edited by: Indhu Ram on Mar 11, 2010 1:34 PM
Edited by: Indhu Ram on Mar 11, 2010 2:20 PMIf you look at the table which is output of the given query , there is column called "STATE_ID" It shows the current state ie open or closed or all report.
The column 'PREVIOUS_STATE' shows the state before the current state. .In the table in 2nd row in previous_state column there is state_id = 1 (open)which is the state before 'all report state' -
How to calculate the Time difference between 2 dates
HI All,
I am using HR_hk_diff_btw_2_dates to calculate the employee service dates.
For that i am inputing his hire date and Term dates and Output format as '05' i am getting output perfectly....
But problem is whe i am inputting the employee hire date is Dec 1 2007 and Term date is
March 31 2009 It is coming as 1 year 3 months 31 days instead of 1 year 4 months directly .......How could we make it make last date also working day and get the O/p as 1 year 4 months ?Please Advice..
Regard
sas1. FM for difference betwwen two times:SCOV_TIME_DIFF
Import parameters Value
IM_DATE1 2008-01-01
IM_DATE2 2008-01-01
IM_TIME1 10:00:00
IM_TIME2 11:30:00
Export parameters Value
EX_DAYS 0
EX_TIME 01:30:00
2. SD_CALC_DURATION_FROM_DATETIME : Finds the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Finds the time difference between two date/time -
How to find the difference between 2 time values in Java
hi all,
i have 2 time values
String time1="6:20";
String time2="21:30"
How to find the difference between 2 times in Java?
pls help
thanx in advance....Calculating Java dates: Take the time to learn how to create and use dates
Working in Java time: Learn the basics of calculating elapsed time in Java
Formatting a Date Using a Custom Format
Parsing a Date Using a Custom Format -
Time difference between Mac & Windows
I have just successfully installed Windows XP SP2 using boot camp. But the clock in Mac and Windows are always different, for example, if i am running Mac and time is 4.00 p.m; then I restart in Windows, the time in Windows now is 8.00p.m. If then I changed time in Windows and restart again in Mac, the clock in Mac is 12.00p.m (4 hours late). I have tried several times but it stays the same. Is there anyone having the same problem as mine?
ah, 1 more small thing, when using Windows, which button in Mac keyboard is for printscreen? In the manual for Bootcamp, it is said that using fn+f11 but it doesn't work???autumn_fail:
For Print Screen try using Fn-Shift-F11 combination. Also read *[_This Article_|http://support.apple.com/kb/HT1220]*.
As far as your question on the Time difference between Windows and OSx, this is a known issue with Windows and OSx running on a mac. This has to do with how both Operating Systems set the time. One way to handle this is to run time preferences as soon as you log into OSx (after logging out of Windows). Its a pain nonetheless.
Please *[_Click Here_|http://discussions.apple.com/thread.jspa?messageID=7965906�]* for more information on this subject.
Axel F. -
Execution time difference between SELECT & UPDATE statement in JDBC Sender.
Hi Experts,
In my scenario, I have used the JDBC Sender Adapter with the SELECT and UPDATE statement.
Now the problem is in between the execution of Select and update statement, few more entries are coming in the same DB Table.
So result of this is updation take place for those entries which are not even picked up by the select statement.
Can we avoid this execution time difference between the SELECT & UPDATE statemet on JDBC Sender side???
Thanks & Regards
JageshHi
Use serializable option in additional parameters, now all new entries would also be updated. -
How to find outthe difference between the two serivce patch of Netweaver04s
Hi,
We have installed NetWeaver04s with sp13 patch. We want to upgrade this to latest patch avaiable on sap market place. I could see sp22 is the latest patch. I know all the procedure to download the patch. But before downloading I have to find out the difference between the latest patch available i.e. SP22 and the current patch installed i.e. SP13.
Could anybody guide me how to see the difference between any two patches avaiable on the SAP market place?
Let me know if you need more information on this.
--ChandanHi
For single patch info, if you click the INFO link in window from where you download the patch. You will get the information related to that patch.
eg
SAPJEE05_0-10003469.SCA SP05 for SAP J2EE Engine 7.00 0 Info 53976 14.12.2005
Try out this, can help you (some navigation required)
http://service.sap.com/sp-stack
Select your Product:
Select Source and Target Release and Componenets. Click Next
Navigate under "Additional Information"
eg:
SAP NetWeaver 7.0 (2004s) Support Package Stacks
can be found on the SAP NetWeaver 7.0 (2004s) Support Package Stacks Info-Pages for each available Support Package Stack
In the next window; again navigate further: you can find like this
New functionality available with the relevant SP Stack is described in Section "Release Notes" as part of the SAP Library. Please refer to SAP Help Portal -> SAP NetWeaver 7.0 -> Release Notes. Each scenario folder contains the new functionality available for each SP Stack.
eg.
http://help.sap.com/saphelp_nw04s/helpdata/en/5b/8c3842bb58f83ae10000000a1550b0/frameset.htm
This would give you information of changes in different releases. -
How to find the difference between Project costs & Cost center costs?
Hi all,
Can you please explain me ? What is project Cost & Cost center cost and which are the tables having those fields of project cost & cost center Costs? And how to find the difference between their costs ? And please give me the functional Idea about it?
Thanking you all in Advance...
Regards,
ChandruHi,
goto table COSP:
1) object-no. beginning with 'KS' refer to cost-centre
example: 'KSKOKA4711'
with KS, KOKA = controlling area and 4711 = cost centre
2) OBJNR beginning with 'PR' refer to projects / WBS-element
example PR00001234
Message was edited by: Andreas Mann -
Difference between zero and blank values
Is there a way for the system to determine the difference between zero and blank values. One can have a zero allowed for the 0 value to actualy be there in the KF but is there a way that a macro can be written by which we can use the differentiation between the zero ( a value) and blank (no value) in the KF
I have tried to look for an explanation on the service.sap.com and sdn but was not able to find anything.
Thanks in advanceThanks for your reply. You mentioned something about the "fixing" setting that could make the "0" displayed in the planning book. Could you elaborate?
Also, in the post from user "APO APO" on 5/8, the author seemed to indicate they could see the "0" in the planning book, as quoted below:
"I have already made the zero allowed arrangement for that in the planning area and can see the 0 values in the planning book but I am not being able to make the macro get the results."
I just want to find out if there is any way the user can visually distinguish b/w the "0" and blank values. If not, it'll be very confusing to the users. I understand the macros can distinguish b/w them.
Thanks in advance. -
How to get the difference between two HashMaps
i have two HashMaps
HashMap first = new HashMap<Integer,Object>();
HashMap second = new HashMap<Integer,Object>();
How to get the difference between one and two and put the result in the third
HashMap third = new HashMap<Integer,Object>();My bad, difference of course means removeAll():Map<Integer,Object> first = new HashMap<Integer,Object>();
Map<Integer,Object> second = new HashMap<Integer,Object>();
Map<Integer,Object> third = new HashMap<Integer, Object>(first);
third.keySet().removeAll(second.keySet());No loops needed. -
How to find out difference between IAS Oracle Home patches and 10.1.2 Oracl
How to find out difference between IAS Oracle Home patches and 10.1.2 Oracle Home patches.
I have read me document but i could not able to understand.
Please help meuser10721329 wrote:
How to find out difference between IAS Oracle Home patches and 10.1.2 Oracle Home patches.
I have read me document but i could not able to understand.
Please help meWhat docoument you are referring to?
If you source the application env file APPS<CONTEXT_NAME>.env file under $APPL_TOP directory then this will set ORACLE_HOME to 10.1.2
If you source the application env file <CONTEXT_NAME>.env file under $INST_TOP/ora/10.1.3 directory then this will set ORACLE_HOME to 10.1.3
Environment Settings
http://docs.oracle.com/cd/E18727_01/doc.121/e12841/T120505T120509.htm#F_92659x3Ax20H1x20Head1x3Ax20Environmentx20Settings
Thanks,
Hussein -
How to know if your mac is using the latest Haswell architecture processor or not? and how to know the difference between the new imac and the 2012/13 imac?
Sorry to reopen an old post, but I've just purchased a 2nd hand late-2013 iMac (or so thats what the seller said).
I'm always sceptical though, and just wanted to know if there is a way to check if my iMac is indeed the late-2013 model that included Haswell?
I've attached screenshots of the About This Mac section hoping it may help shed some light.
Thank you in advance for your help!
PS - I can't compare to the iMac specs link you posted above because its now showing the late-2014 models.
<Image Edited by Host to Remove Serial Number>
Maybe you are looking for
-
I've been thinking about adding a second hard drive. The problem is that I'm not sure which configuration would best fit my needs. Currently I have one 120GB Maxtor SATA drive which, after six months, is half full. This leads me to conclude that ev
-
I am thinking of changing from a PC to a Mac. Will I need to buy a new, Apple compatible, version of Lightroom, or can I upgrade to it, or can I get it free as I've paid for the PC version?
-
Files/images will not "open with" CS6?
Just in the last two or three weeks, I cannot right click and open images/documents with any of my CS6 products anymore. I have 2 folders: Program Files and Program Files (x86) on my Local Disk. Program Files does not have all the CS6 folders. Progr
-
MM-SUS Scenario - BP Creation from MM with external number
Hi Gurus, We are implementing MM-SUS scenario on landscape involving ECC 6.0 EHP5 and SRM 7.0 EHP1. In connection with Vendor transfer from ECC to SUS, We want to achieve that ECC vendor and SUS business partner (BP) have the same number (I E: vendor
-
Enabled Usage Rights turned off when form filled out in Acrobat vs Reader
I created a form in Acrobat Pro 9 and enabled the usage rights so the end user can save the form. Anyone who opens it and fills it in using Reader has no problem. However, if one user begins filling it in using Acrobat (so far only Std to my knowledg