Record time of zero crossing

I am trying to record the time for zero crossing in order to get the phase angle and inevitably get the power facto . soi was trying out a few ideas to  see if this is achievable and i came up with this . can someone tell me where i am wrong . or what to do  get the right values .. 
Solved!
Go to Solution.
Attachments:
zero crossing in waveform.vi ‏17 KB
Zero Crossing.PNG ‏21 KB

1. You need to pass the waveform into the Get Waveform Time Array.
2. No need to wire up the N on the FOR loop since you are using Autoindexing tunnels.
3. The Conditional Indexing tunnel is your friend here.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
zero crossing in waveform_BD.png ‏20 KB

Similar Messages

  • 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

  • Zero crossing, "Triggering" and XY-Graphs

    I'm trying to measure the electrical hysteresis of a sample.  The way in which I do this is by measuring two voltages within a circuit, sending them to my DAQ, and then plotting them in an XY-Graph to view the shape of the curve.  I can somewhat see the hysteresis, but II need to measure the "zero-crossings"; that is to say, the value of one function, when the other is 0, and vice versa.  So when V1 = 0, I want to know what V2 is, and when V2 = 0, I want to know what V1 is.  Seems simple enough, and I have included my VI.
    First I tried the ZeroCrossingPtbyPt, along witha Relay, which never seemed to trigger properly.
    Second, I tried using Trigger and Gate, but that seems to give inflated values.
    This VI can be tested by removing the DAQ assitant and replacing it with two "Generate Signal"(s),  with the same frequency, different amplitudes, and a small phase difference, and this will produce a similar effect without the real signals.
    Next, I am sending the raw voltage signals into a Waveform Graph.  However, it is impossible to get the traces to stay "still" on the graph.  In other words, if this were a real oscilloscope, there would be a "triggering" problem, and if the trigger were set to the proper value, the oscilloscope would be able to track the waveform without it jittering left to right in time.  Any ideas on this?  I've tried to change just about everything in the Waveform Graph with no difference.  Do I need to send in some other signal to get the graph to follow the waveform properly?  This is really important because it will tell me if my sample rate is good enough to capture the signal (a sine wave at 1 kHz).
     Finally, the hysteresis curve on the XY Graph seems to cover many cycles (periods) of the waveform, but I want it to cover only 1 cycle at a time, so it isn't so sketchy-looking.  It's very boxy as well.  So in short, the number of points it is plotting is fine, but it is not plotting them quickly enough, since I'd like all of the points it plots to be over a single period of the waveform.
    Please help!  Thanks in advance.
    Attachments:
    hysteresis.vi ‏176 KB

    As it turns out, the issue was that I was not collecting enough samples at a high enough sample rate from the DAQ.  This is why it worked with "Generate Signals" and did not work with the DAQ Assistant.  Because there were not enough samples, the apparent zero crossing was occuring either too early or too late, leading to an incorrect value.  Therefore, the best solution when it comes to finding zero crossings is make sure your # of samples, and sample rate are high enough to get an accurate measurement.
    As a result, this is why my XY Graph was showing blocky hysteresis loops, rather than nice smooth curve hysteresis loops.  The data being sent to it was not quick enough, and therefore the XY- Graph connected the dots between the points that it was sent, yielding a truncated loop, which appeared blocky or sketchy.
    On the issue of triggering, this can apparently be set within the DAQ Assistant in the "Triggering" tab; the key is chosing the correct channel to trigger from, and a reasonable trigger level.  This was my problem, and this is why my Graph appeared to jitter.  It was not the graph itself, but the DAQ Assistant that did not tell it the proper triggering timing.
    So, in short, I solved my own problems, but I leave this as a record for those who encounter similar problems in the future.
    Thanks.

  • No Inventory record generated for zero stock check

    Hi All,
    The issue is no inventory record created for zero stock check.
    prerequisite:
    1. I activated the zero stock  check for the storage type in warehouse,
    2. I also activate the PZ inventory method for zero stock check for this storage type.
    3. storage type is under with 'P -Storage unit type" putaway strategy.
    Steps:
    1. First time I moved the last SU out of the bin, it generated a physical inventory when creating the TO.
        we can go to the item - other data of the TO, and found that hte inventory record created with "PN" inventory method. and the zero stock check indicator is 1.
    2. Then I continued to confirmed the TO with empty bin check. the invetory record was cleared when confirmed the TO.
    3. Then I moved that SU back to the same bin.  (only has one SU in the bin)
    4. Try to create the TO to move the SU out, the TO created, and if we go to TO item - other data, the Zero stock check indicator is 1, but this time, it doesn't create any inventory record?
    Can anyone tell me why it didn't create the inventory record in the 2nd TO?
    Thanks,

    i tried to replicate the case and got the same result that only first time inventory documen was created.
    seems its standard behaviour and if the inventory is already done for the bin then it does not carry out again for the same bin automatically as it did earlier.

  • Zero crossing and syncronizing

    I use 2 programs.I have atachetted them below.
     In "Line zero cross sync" I detect the crossings through zero of a sine and then for every crossing I try to write on a analog output an impulse.
     The second program "sincronizare cu reteaua subvi" measures the frequency of the signal and calculates a delay time.
     How can I delay the moment between detecting a zero crossing and writing the impuls, with the value calculated with the second program.
     The second problem: If I use a loop to delay the time how can I make sure that the two operations will be syncronized (if I modify the frequncy of the signal during the measurement I want the second program to modify the delay time simultaneously,not with a delay).
    I am using LabVIEW 8.0. 
    Thank you
    Attachments:
    Line zero cross sync.vi ‏85 KB
    sincronizare cu reteaua subvi.vi ‏32 KB

    I solved the problem.Thank you anyway

  • Looking for zero crossing point

    Hello,
    I have Amplitude vs. time data (wave).    
    I need to find the zero crossing time. Now I am using "For loop"  to search the Amplitude array for the index of the neighbor to zero through point by point, and then by linear inerpolating to get the zero crossing time.  When the point number is large, say 60kpts, it gets slow because the for loop "point by point" searching method, I think.
    I am wondering if there is any quick way to do that.
    Thanks,
    Wei Tong

    Try something like this, maybe? See if it makes sense.
    (It currently fails if a value is exactly zero and the function does not switch sign afterward. It just needs a bit more code to fix that. Modify as needed.)
    Message Edited by altenbach on 04-13-2008 12:52 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ZeroCrossings.png ‏33 KB
    ZeroCrossings.vi ‏57 KB

  • Recording time

    Hi,  I'm new to this but I am working on a project and I need to record the time that passes while taking a measurement.  I am trying to find the flowrate based on the amount of fluid (volume) divided by the time it takes for this volume to pass through.  I was hoping there was some way I could set it up so that when there is voltage excitation above a certain point, LabVIEW would begin to record the time and then stop again when the voltage fell back below a certain level. 
    I was wondering if there is a certain function that can be set up to record time in this fashion, possibly using a case structure?  Another way I've considered to manipulate the DAQ assistant task triggering options, but I keep receiving errors.  Hopefully I have explained my problem clearly and hopefully someone knows how to do what I am trying to do.  Thank you very much, and If needed I can attach my file or a picture of it. 

    There are several options you can use depending on what you are trying to accomplish.
    If you just need an aggregate time between measurements, you can use the Tick Count vi. This vi will give you a time in milliseconds that has no relation to actual clock time, but is very precise. You would get a tick count when you start the measurement, then another after the measurement completes. Lastly, you would get the difference of the two to get the elapsed time, in milliseconds. The millisecond timer will roll over (go back to zero) after 2^32 -1 milliseconds or about every 50 days. You should check to make sure the time did not roll over by making sure the second reading is greater than the first. Obviously, if your measurement is expected to take longer than 50 days, this wont work.
    If you need this related to clock time, you can do the same thing with the "Get date time in seconds.vi" This will work no matter how long the measurement is, but is only precise to the nearest second.
    The attached file shows both vi's I am referring to, as well as an example on how to use them in the manner to which I am referring. It is saved in version 8.0 so the most people can use it as I can provide.
    CyberTazer
    Software Systems Engineer
    Attachments:
    Timing.vi ‏11 KB

  • Duration of a zero crossing

    Hi all,
    I m a newbie to LabVIEW and I really need some help with some zero
    crossing issues.
    I have a wave generated from the values output by a pressure sensor. I
    differentiated this wave to obtain a wave with peaks, valleys and zero-
    crossings. Then I used the sign generating vi to generate another
    square wave depending on if the value is positive negative or zero.
    What I need to do now is to find the time duration between each zero
    crossing.i.e. How much time elapses before the next zero crossing
    occurs. Any ideas how to do this ?
    Thanks and regards.

    Here's a small VI which does part of that
    Have a nice day!!!
    LabVIEW | LabWindows/CVI | TestStand
    Certified LabVIEW Architect
    Attachments:
    Duration between peaks.vi ‏18 KB

  • Zero-cross​ing function

    Hi,
    I found this zero-crossing function in one of the old forums and I'm trying to understand how it works. In my case I have two sine waves, instead of one square pulse but I can't really figure out how this function works. I know that first, the waves are generated then you get their attributes, the data values go into the zero-crossing detector that controls the case statement but I don't know how the trigger time and time interaval are used to build the array, I think the timestamp outside the 'for' loop is for storing the previous itteration of the zero-crossings but I'm not really sure.I have no clue what happens in the final step before the zero-crossing times are subtarcted, as in the threshold array and so on. I've read how each function individually but I can't add the blocks together.
    So I was wondering if someone could please explain how this works?
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Zerocros.png ‏131 KB

    Adding to what crossrulz said, it helps to understand what the code you're looking at is.
    It would appear you don't quite understand what t0 and dt are.  t0 is the time at the initial point in the waveform.  This can be a wide variety of times rather than simply 0.  dt is the amount of time between samples.  If we multiply the iteration by dt, we know how much time has passed since the first sample.  After 0, 0dt is the same as 0s.  From there, 1dt, 2dt, 3dt, etc can all be calculated to a value measuring time.  But, it's only measuring "time since the first sample."  If it's only measuring that, the timestamp could be meaningless.  If you want to convert the time since first sample to an actual time, you need to add the initial time to it.  As an example, if dt is 1s and t0 is 4:00:00pm, after 3 samples we are at 2dt so 2 seconds.  Do we care about 2 seconds or 4:00:02?
    The "big timestamp array" is being fed into what is called a shift-register.  You can use this register to pass values between iterations of a loop.  Before the loop, we feed an uninitialized array into the shift register.  The first time the build array is used, it's fed an empty array and the first timestamp to save.  This is then output to the shift register on the right side of the loop.  This value is passed to the next iteration.  It will persist until we reach the build array for the second time.  Now, the 1 element array is fed into the top input of the build array and a new timestamp is added to the end of the array.  This will continue with the n-sized array being fed to the top input and the newest timestamp being added to the end to make an array of size n+1.  If we want to maintain all of the timestamps, we need logic similar to this.  You could plug it into the bottom and the new timestamp to the top.  This would put the newest timestamps in the first element of the array.  You just want to include the old array so you keep all of the timestamps instead of just the most recent.

  • Set buffer time to zero

    Hi,
    How can I set on the server and on the player (.swf) side not to keep buffer.I want to set buffer time to zero,so even if the internet connection lags not to keep buffer and when eshtablishes connection again to start without having kept any buffer.
    It may result on lagy video but thats not a problem,i prefer having 2 sec lag than having best possible quality without lag.

    On the server, you can set the size of outgoing buffer in seconds using NetStream.setBufferTime(bufferTime).
    For more details about this class, you can check the link
    http://help.adobe.com/en_US/adobemediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11aff5ba-7 d13SSASLR.2.3.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7f66SSASLR.2.3
    On the client side swf, you can do it using NetStream.bufferTime = 0. However, it is advisable not to set bufferTime to 0 for recorded streams. For more details, you can check the following link:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.htm l#bufferTime

  • How much recording time on my iphone 4 voice memo?

    How much recording time on iphone4 voice memo?

    I would suggest that it depends on how much free space you have on the phone. I have done voice memos of over an hour before, and have read of other users reporting larger ones. I do not believe there is any documented source of what size you can do.

  • Purchasing Cube -- 0PUR_C01.. "Added record" is showing zero in request

    When i try to load the data to this cube, my trasfer record is showing values while Added Record is showing zero values. Whats the problem. Please advise !!

    Hi,
    Check whether do you have defined the industry sector in R/3. This has to be done before filling the setup table. search the forums with note no 353042.
    This is done with the help of Transaction MCB_ which you can find in the OLTP IMG for BW (Transaction SBIW) in your attached R/3 source system.
    Here you can choose your industry sector. 'Standard' and 'Consumer products' are for R/3 standard customers, whereas 'Retail' is intended for customers with R/3 Retail only.
    You can display the characteristics of the process key (R/3 field BWVORG, BW field 0PROCESSKEY) by using Transaction MCB0.
    If you have already set up historical data (for example for testing purposes) by using the setup transactions (Statistical Setup Programs) (for example: Purchasing: Tx OLI3BW, material movements: OLI1BW) into the provided setup tables (for example: MC02M_0SCLSETUP, MC03BF0SETUP), you unfortunately have to delete this data (Tx LBWG). After you have chosen the industry sector by using  MCB_, perform the setup again, so that the system fills a valid transaction key for each data record generated. Then load this data into your connected BW by using 'Full update' or 'Initialization of the delta process'. Check, whether the system updates data into the involved InfoCubes now.
    If all this is not successful, please see Note 315880, and set the application indicator 'BW' to active using Transaction 'BF11'.
    Regards,
    Anil Kumar Sharma .P

  • Asset Master Record - Time Dependent tab - locations to be created

    Hi Guru's
    Hot to create the new locations in the Asset Master Record - time dependent tab.
    Some locations descriptions I need to change.
    Please help me.
    Regards
    Jenny Connes

    Hi,
    change your location description at following SPRO location:
    SPRO->Enterprise Structure -> Definition->Logistic - General ->Define Location
    Thanks,
    Dharmesh

  • How can I add recording time to a single recording not a series recording?

    If I set-up a series recording it allows me to add minutes to the recording time why can't I add time to a single recording? For example if I want to record a single show tomorrow I find it on the guide and hit record. Now I want to add a few minutes on the end of the show because I know it always runs over it's advertised time why can't I add the time? It doesn't gives to extra options for a single recording. The only time I can add time to a single recording is if the show is currently on then it allows me to add time but, not before the show is on. So what good does that do? Comcast allowed me to set-up extra options to a single recording.

    Actually you can.  It's a bit clumsy but what you have to do is go to the DVR menu, select scheduled reordings, select the recording you want to extend, scroll through the menu and you will find an option to modify the start / end time.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • Set maximum record time?

    Can I set maximum record time in Logic 8? Recording an hour-long live program unsupervised, & I'd like it to stop afterwards.
    (I don't know any problem with continuing recording for hours until the hard drive is full? But it's not necessary.)
    thanks

    You can use the Auto-Punch In/Out function to set Logic stop recording automatically.
    Also, set the bar value for the project end (at the transportbar, under the tempo).
    For How long you can record depends on you HD capacity, but also the file format (aif,wav,caf...) the bit depth and the sample rate.
    each format has its own limit.
    Refer to user manual and check for the best file format for your purpose.

Maybe you are looking for

  • Sales return tax procedure

    Respected ones, while creating a sales return order based on the billing document date , if the sales return is within six months we need to capture net value + tax and after six months we need to capture only the net value . How do go about this. I

  • URGENT:how can we translate/transport sapscript in the orig lang EN to PT?

    Hi, I have a very urgent requirement of converting a whole sap script which is present in English to Portuguese? This is v urgent.. Please help me out. Regards, Priya

  • IMovie '11 on Mountain Lion: Error loading plugins  [iLifeMediaBrowser]

    Hey all, I would love some advice regarding an install of iMovie that will not load completely.  We are seeing a problem with an install of iMovie '11 (9.0.8  1778) on Mountain Lion (10.8.2).  It seems the app will launch but most of the menus are gr

  • Changing execution times from recompile in 8.20

    Well, we are starting to have some serious problems with LV8.20 and its now compile times. I have read there is compression now in saving VIs which reduced the size of saved files on disk. The problem is that LV8.20 takes MUCH LONGER to recompile a V

  • Purchasing org assignment

    Hello Friends, I'm trying to assign Purchas Org to the plant of other Co Cd. But I'm not getting that plant in drop. Is it that we can not assign Purchas Org to the plant of other Co Cd? I think we can. Thanks.