Dan universal counting clock

Hey Dan!

I tried to get your universal clock from counting to stop when it gets to 00:00:00, but this part threw me:

If (clockTime < 0) {}

sign = "-";

clockTime = - clockTime;

} else {}

sign = "";

}

I tried

If (clockTime < 0) {}

clockTime = 0;

but he ignored. How do you want to do to stop the meter (upwards or downwards)?

I would change the line just before the section that you modified.

Countdown, stop to zero:

Replace this:

clockTime = clockStart + rate*(time - inPoint);

with this:

clockTime = Math.max (clockStart + rate * (duration - inPoint), 0);

Stop, count to 100, use this:

clockTime = Math.min (clockStart + rate * (duration - inPoint), 100);

Dan

Tags: After Effects

Similar Questions

  • Sample USB - 6343 Counter clock

    I use a USB-6343 CTR0 to measure the angular position. I expect to ~ 1 million encoder pulses (or account) per second. What USB-6343 clock signal would be preferable to use the counter sample clock?

    Dar Hi,.

    At what resolution do you need measure the angle?

    One of my colleagues has compared the maximum sampling frequency on the counters of series X USB to be approximately 8 MHz for a single channel, continuous operation for 10 minutes.  However, if the signal that you intend only generates pulses at 1 MHz, 8 MHz rate seems unnecessary because you will receive the same reading several times.

    Concerning the two methods you mentioned, either would not be possible:

    (1) you could count the external signal and sample at regular intervals.  For example, if 10 kHz sampling you'd expect to see ~ 100 strokes per sample if clock signal is 1 MHz.

    (2) you can also use the meter to count a time base internally (for example 100 MHz) and the sample out of your external signal.  Thus, during a period of your external signal, you expect to see 100 graduations of the time base.

    It seems that what you're trying to do is to measure the frequency of your encoder at regular intervals.  To do this, I suggest you actually a variant 3.  X series cards support a measure of frequency clocked for example (see the X Series user manual).  The card has two occurrences of the external signal as well as occurrences of the internal time base known and uses it to determine the frequency.  The one caveat is that the signal you are measuring the encoder must be at least two times faster than the sample clock signal.  I suggest to use Freq Out or another counter to generate the sample clock.

    Best regards

  • AO with sample Counter clock

    I have a problem with AO with counter-sample pointing SMU-6124 in Labview 8.6.

    The attachment shows my entire code for this.

    When I run this code, I've never met no error, but no output (expected in AO pulse train).

    Strangely, in the title to "highlight the execution" for debugging, the output has been shown in my oscilloscope (of course, no errors in labview).

    What's wrong in my code?

    Labmaster.

    *) Please run 'merge.vi shape pulse' beware.

    Hello labmaster,.

    I took a peek at your code, and a question, is that you use the done VI DAQmxBase is task rather than the fact VI DAQmx is operational. You cannot combine the DAQmx and DAQmx Base API and this could be the cause of your error. When you use this VI in DAQmx application the task performed? output will always return the value true. This return value is prevents your loop and resulting in your cleaning tasks before all your data is generated.

  • Is it possible to use the internal clock for meter tasks in the buffer?

    Hello

    Hardware: USB term mass 6251

    Software: LabView 2011 SP1

    I need to measure the angular lever position and speed of a carpet. For that I use two quadrature encoders. To accurately calculate the speed I use buffered from the measures of position using one of the available onboard counters. I understand that for this technique, I provide a sample for the meter clock. I wonder if it is possible to use the internal time base. Note that both of my counters are used so I can't generate a signal to clock with them.

    I found two conflicting pages related to my problem:

    1) http://digital.ni.com/public.nsf/allkb/EA7FFFEAFC3E1D85862572F700699530

    2) http://digital.ni.com/public.nsf/allkb/775290A3121D1FFC862577140074D3B3

    The first says that I can use the internal clock of 100 kHz, and the other says that I have an external clock.

    Comments/solutions?

    Javad

    Hi Javad,

    On your specific device, there is not a direct route from the time base of 100 kHz for the meter (according to the routing table of MAX):

    Yellow cell indicates that a route is possible but there is not direct (the "gate" terminal is used as sample clock for counters of the M series).  Mouse on the cell reveals yellow that make this route really requires the use of a counter (so it is not suitable for your application).

    On the line above "100kHzTimebase" you will notice it is called 'FrequencyOutput', which does not have a direct route to the door.  This would be the way to go if you want to route 100 kHz (or some other frequency) as your sample counter clock - you can set it up the same way to a standard meter output task:

    The output frequency doesn't have that many features like a meter output, but it is able to generate a continuous stable frequency.  There are only 32 different frequencies that can be generated using Freq Out on the 6251:

    {10 MHz, 100 kHz} / {01:16}

    Do not forget that the resolution of your measure of frequency by using this method will be equal to how many times you update the measure (hopefully, that makes sense).  In other words, if at the end of all the 1 second, you take the total number of charges since the last second, you would have a 1 per second equal resolution change in the number.  If you take the difference twice per second, you would end up with half the resolution.  You will be sampling the account register fairly quickly, but you will need only to do the calculation of the frequency after that all N samples in order to obtain a significant number.

    Another method that will certainly give a higher resolution in less time at typical speeds of coders is to set up a measurement of the frequency (the counter will count the internal 80 MHz base time period your external signal and the pilot calculates the frequency based on the result).  This method uses only a single entry - so you can just feed the 'A' your encoder quadrature signal (the method will not work if you are interested in absolute position or direction).  Without using signals A and B together, you will be susceptible to noise (which is common to have a quadrature encoder) that you want to delete (perhaps by setting up a digital filter).  Finally, you want to set a reasonable timeout on your reader calls (which will be blocked until a period of your external signal occurs), and the error-200284 handle simply report "0Hz" to make sure that your program is still sensitive even without an external signal present.

    Best regards

  • Can I create a digital clock effect after effects 4.1?

    Hi all

    I used an old software of my in some new installations on Windows 7.  I just installed after effects 4.1 and I use it for the first time... I know software 13 years, but that's what I have for now.

    I have been using Adobe first 6 for awhile and I'm pretty comfortable with it, but creating a digital clock effect first manually has realized a project requires a lot of work that I am now looking for an alternative to.  I am also a semi expert in Photoshop, but I don't have the new version than to use the effects of timecode functionality.

    So I installed my old copy after effects 4 and I found the tutorials in a search on how create a mobile digital clock effect in new versions of After Effects, but I don't know if plug-ins available or tutorials apply to version 4.

    D there's allot of good things happening in the software in 1999, and I found that even my old version of first 6 is very similar to the new CS5 version to allocate resources, then why not check everything after effects 4?

    Also, you are looking for a user guide or instruction manual online for after effects 4... When I installed my first software it automatically installed a set of files of HTML user manual and a full PDF user guide, but I searched and who apparently have not been installed with after effects 4.

    Thanks for any help,

    Digi

    Rick is 100% correct, but I'm assuming 4.1 AE will not search the web, or Expressions for Dan Up-Down clock, so here's a tutorial on the numbers plugin, I mentioned, just in case.

  • Displays the time system (no timecode)

    For the life of me, I can't find expressions that deal with the time display current system using the source text property.

    What is a good way to get "16:53? (assuming that time is really 16:53)

    Moreover, thanks to universal Dan counting clock, it uses a variable named 'clockStart ='. What should I use to return current system time?

    Yes, that's correct.

    Dan

  • Creating sequential text

    How can I quickly add sequential years in the form of text Eg. 1987, 1988, 1989 etc. on each image?

    If you are really new to AE and then start here: Basic AE

    To use the numbers effect add a new solid to a publication, enter numbers in the effect controls panel, and presets to find the effect. Now, drag the effect numbers to the solid and set the parameters of the effect to animate your account down so that it looks the way you want it to look. Make sure that you use a monospaced like Courier font to keep the numbers to jump around.

    To learn more about the effect numbers enter numbers in the field find help in the upper right of the AE and follow the links to community resources. The search help field is most useful for a beginner in AE tool...

    After gain you experience, you will discover the expressions to create counters. Much more versatile and a much better way to do try the universal meter Dan Ebberts. counter universal - design Expressioneering Dan Ebberts...

  • toLocaleString

    Hello

    I am trying to create an animated text effect which returns using the built-in "toLocaleString" JavaScript String class method.

    I want to format a numeric value (it's actually a number in the sense of JavaScript) as currency with the currency symbol, decimal point and point decimal, but when I use the following command, I get only the gross value:

    [value of slider]

    123456.78


    [code]

    Effect = ("Cursor")("Slider").value.toLocaleString ('en-US', {style: "currency", the motto: "USD"});

    [output]

    123456.78

    [expected]

    $123,456.78

    In addition, it seems that values greater than 1000000.00 not be supported by the effect of Slider. Is this a problem known and documented/feature?

    If there is another way to achieve this effect, then, please, let me know as soon as POSSIBLE.

    Thank you.

    You talk about expressions in After Effects to create a video or you're talking about Web design or another type of script? Sliders have a finite value, but you can add a multiplier.

    If you talk about expressions, then take a look at the universal Dan Ebberts counter. counter universal - design Expressioneering Dan Ebberts...

    I have a very modified version of what aviation preset that I use all the time.

  • Display number Variable

    Hello world.

    Here's what I'm trying to do: I have a double arrow face indicating the distance between two things. The arrow will shorten that two things are closer (these two things are essentially squeezing the arrow), so I'm going to keyframe its scale. I have a number on the arrow, which is the measure between these two things. I would like the number to decrease gradually as the arrow gets shorter. I'm guessing that there is a way to do by parental property 'ladder' of the arrow the number and using an expression that fewer little as the passage of the arrow. Is this possible?

    Thank you

    You add an expression to the layer of text in alt/option clicking on the Source text. You point the expression of the value of the scale to use. Let's say you make scaling horizontally, then you would point to the X scale value. If your arrow was vertical you remind the value of Z scale. Now, you add a linear method to the value of the scale and if you want integers you round off the result. Say you want the numbers to go from 1000 to 10 so your linear expression would say something like v = linear (t, 0, 10, 100 and 1000)

    The expression of integers would look like this:

    t = thisComp.layer("Shape_Layer_1").transform.scale [0];

    n = linear (t, 0, 10, 100 and 1000)

    Math.Round (n);

    The expression is complicated if you need figures after the decimal point. This universal Dan Ebberts counter is a good starting point: universal meter

  • Clicking printing noise

    Printer all-in-one HP2610

    Windows 7 Ultimate

    I just installed new ink cartridges (96/97) and am getting a clicking sound when printing, but I don't get the clicks while using the copy function. I uninstalled and reinstalled the cartridge and run the alignment program. Don't know whether to run until it closed or replace it. I have about $90 in ink cartridges and impossible to find someone who uses them.

    Hello Chuck1103,

    • Please open the rear hatch of the printer.
    • Clean the rollers using a lint, turning the direction of counter clock wise.
    • Close the rear access door.
    • Try to print.

    If the problem persists, then call HP Tech Support (US) 1-800-474-6836

    Kind regards
    Jabzi

    Help the community by marking this post.
    Your question has been answered? Mark it as an acceptable Solution.
    See a great post? Give a Kudos!
    I work for HP

  • Timestamp of photon arrival times

    I would like to make a measure of cross-correlation of two photons.  Auto hardware correlators and crossed correlators are available, but expensive.  It seems that many other users resulted in the idea of using the 80 or clocks 100 MHz in the counter of entry for each desired channel, starting the counters at the same time and get every channel of photons in the door of the corresponding counter.  Each photon triggers so the meter to store the total of the clock in its internal register, that is, the time stamp for this photon. Since then carries on a 32-bit counter clocked at 100 MHz only occur every 42 seconds, and average rate of photons will be at least 100 Hz, excesses should be easily recognized and corrected in post processing.  So assume that all we have to do is get meter reads in a buffer.  Bursts of photons with separations of arrival can be as small as few clock cycles.  Average rates may be a few hundred kHz or more on each channel.  We can adjust this rate by turning the power of the laser to the top or to the bottom - the source for the broadcaster that produces the stream of correlated photons.  I suspect many others would like to know which system is better for these types of measures, the 6602 or the X-Series.  If FPGA is a good solution, perhaps we should start a new thread about it.  But for 6602 or X-Series: what is the fastest, it can do so for short bursts (speed for how long) and what is the sustainable rate?  I realize that the sustained rate will depend on the material.  I thought I only saw that the PXI beats the PCI bus in this type of application.  PXI versions are better?  In particular, what are the effects of the FIFO 128 sample on the X-Series compared to the 2 on 6602 buffer solution.  And I noticed something about the speed of the front end for these two choices could be a problem in this regard.  Pulses (photon) TTL on the door will have a width of 10 to 50 nsec.

    For the flow of the series X is going to be much faster than the 6602 mainly due to the FIFO aboard (but PCIe gives more throughput than PCI).  PCI or PXI should have the same flow (and PCIe vs SMU would also have the same flow).

    Forum user (and NOT used) Andrew S displayed some X series streaming of references here.  On a single meter, it was able to maintain the sampling frequency of ~ 20 MHz on PCIe X Series and ~ 8 MHz on USB of the X series.  6602 benchmarks are much lower, somewhere between 200 and 300 kHz (although the system used for benchmarks is old enough).

    The 6602 allows shorter pulses that the X series.  The specifications page indicates a minimum of 6.25 the 6602 ns pulse width.  I saw a specified number directly to the X series in fact.  X series devices include a maximum external base of 25 MHz clock frequency, which assuming duty cycle 50% would be 20 ns high and low times.  50 nsec would certainly long enough of a pulse, but 10 ns * could * be pushing.  You will probably need to do some tests to confirm or not the X series is able to detect all the impulses for your configuration - if not then I would suggest the X series (PCIe-6320 is the lowest cost one) on the 6602.

    Best regards

  • Card required for control special measures

    Hello!

    We have some NOR-DAQ cards (PCI-6221, 6251 and 6036E) but none of them seem to be capable of the following measure.

    There is a digital pulse train that must be received (practically with a meter). To measure the VOLTAGE to a channel of AI when a pulse is received. The frequency of the pulses can be 1 KHz, therefore generating events at each pulse for the PC is not viable. He must also know where the pulse OCCURRED (something as the card should have its own clock and should be able to put next to the measured voltage value).

    In addition, the map should give a sign of output (pulse change or line) of 1. the number of pulses reached a given amount or 2. the voltage is lower or exceeds a value given to a channel to HAVE. If an automatic output is not available at least we have an event to the PC.

    Will there be any card to fix this? In fact the card must have at least two meters since we have two trains of digital pulses, but only is active to a degree. Thank you very much for your suggestions!

    Could you clarify it please ", we have two trains of digital pulses, but alone is.
    Active to a degree.  You check in for a number of pulses on several lines?  You have more than one channel of Analog Input?

    Without taking into account the requirement for the 2nd train of digital pulses for the moment, to my understanding of the application the 6251 could do you need:

    1. the signal of AI must be connected to the 6251, since it is the only one of the three that supports analog trigger.

    You need to configure an analog reference trigger to allow comparison shipped.  You can use the line to HAVE it if you are sampling just one channel (or an APFI line if you're sampling from multiple channels).  Export event of analog comparison will tell you when the signal is outside a certain threshold (the graph presents 'Entering the window' but you can select "Exit" instead):

    2. connect the Digital pulse train to one of the PFI lines on the 6251.  It will be the sample for your task clock to HAVE.

    4. use the same PFI line as a source for a meter (pulse) output task.  Set the initial delay so that when the desired number of pulses have been counted you will produce a pulse on the output of the counter.

    5. you now have a line telling you what N pulses have been reached (from step 4) and a line telling you where I is outside a window (in step 1).

    6. If you want to timestamp pulses using the edge of the Office counter, you must use the counter 2nd as a county of edge stamped with the external pulse as your sample clock signal.  This will give you a very precise timestamp of your external impulses (compared to the beginning of the task).

    If you need for impulses of timestamp on multiple lines, you can look in the task configuration of change detection of DI on the 6251 and using change detection event as the sample for the task of counter clock.  You must implement logic in SW to determine which line has generated the actual event.

    You have also 4 other counters to play with on your other DAQ hardware two, so depending on what you want to do, you should have a little flexibility.

    Best regards

  • Question on the NI PCIe-6320 cash events

    Hello, all:

    I use 6320 for counting digital proofs. I use a tampon gated method of counting. At the end of each inventory period, I read everything in the buffer of events to get their timestamps. However, there is a problem with this method. When the number of events exceeds 1 million (?), all buffered of lost events and I can't read anything. My guess is that this is due to the size of the buffer or counting clock reversal. (?)  There are basically two ways to overcome this problem. We're to do several reading and the other events is prescale events. Anything know how to perform a count prescale? For example, I can just count the timing of each event in the fifth.

    My method of counting is seen in the attached vi.

    Thank you.

    Since your actual code is different from what has been published, I can only take a few guesses for why you can't count impulses more than (about)? 1 million.

    1. If your code real don't wire DAQmx Timing.vi a value of 'number of samples', so a primary task which is told that she acquires 100 MHz uses a default buffer size of 1 million samples.  You can create a larger buffer by wiring in a greater value.  You can also loop on your reader calls to help prevent a buffer overrun.

    2 Theres a limit to the rate, you can stream data from the system RAM card.  The X-series is good better than most of his predecessors in this respect for the measures in the base.  (See this thread and the related links.)  But it won't always manage frequencies of efficient sampling of 100 MHz for any significant duration.

    3. Another option I've seen used is County binning.  This method works a little inside-out your method by letting external impulses increment the counter that this indictment is sampled at a constant sampling rate.

    4. I could not yet make any real life playing with a card X-series, but I think that there is also a precise frequency measurement mode for sampling at a constant rate.  This mode may be useful for you as well.

    -Kevin P

  • Selection of DAQ PCI cards - pulse based on the position of the AO

    I build a replacement computer for an aging instrument control system, and I'm trying spec a PCI card to use.  My line of sight is on the M6229, but I'm a little confused as to if she's going to do what I want.  We will use LabView 8.6 for the software, and RT module is not an option.

    The question has been posted here in various forms, but I think that this iteration could be a little original:

    The requirements of the program are:

    -Two analog outputs are used to generate a raster 2D model, while the internal counter counts the pulses of preamp at each stage of the grid.

    -The dwell for each point must be controllable by the user (ideally as low as 0.01 ms), and the count rate can go up to 5Mcps.

    -The number of points x / y in the raster model is controllable by the user, a will have a maximum of 400 x 400 (160000).

    At the moment I'm simulating a 6229 in MAX and written a model of Sawtooth on channel X and a linear ramp on the channel of Y.  The sampling frequency / can be deducted immediately requested size of dwell and pixel of the user.  I generate the set of values of xy 2D matrix and write to data acquisition.  I use voluntarily no more points that are necessary, because this application prefers one out an alias on the AO conducted, channels to maintain a separate position for each pixel in the detector.  Thus, for example, for a 100 x 100 pixel image with 1ms live per pixel, the quick scan signal is essentially a 100 Hz sawtooth, sampled 100 times at a sampling rate of 10 kHz.

    However, the frequency of sampling for the pulse counter must be very high to follow with the input of the preamplifier signal.  I think that I can't have separate sampling frequencies for two separate tasks, so I'm left with a choice between creating an XY array unnecessarily large to match the sample for the pulse counter clock, or ask your question here

    Does anyone have any advice? In the end, I want to make sure we buy the best equipment for the job, but as always, we are also interested in the best bang for the buck.  Is a map of the M series not up to this task?


  • How can I detect a trigger missed (i.e. 2nd trigger arrives before the task completes)

    Is it possible to know if a trigger pulse has been failed, because the device is busy?

    To give a specific example:

    I use a NI4462 Board with digital triggers of falling on the PFI0 entry point.

    I have an external clock, exactly the 1 kHz square wave.

    On each falling edge of the clock, I (re) start a task than 200 times, samples (200 kHz).

    Normally, it works well (as long as I take care to keep the task, stop and start the task in a tight loop and not make too much treatment in 5 ms, which remains after the last sample).

    BUT, if something went wrong (think of the external clock running too fast 1%), the 2nd trigger would happen during the running task (say, on the sample of 198).

    The NI4462 (I think) simply ignore this trigger, because the task is still running, and I would miss out on a framework for data set, getting only the 1st and 3rd groups of 200,

    Is it possible to detect when this has happened and raise at least one error?

    Thanks for your help.

    P.S. I also worry about the 63-sample-delay filter: is there a better solution than post processing to cut the beginning of a group and on the end of the previous 63 samples? This works well, but it incorporates a timing glitch after the 63rd sample.

    Hello

    I can't imagine a way to solve this problem in your task to the DAQmx. This should be relatively simple in FPGA or maybe even in real time. I'll come if I invent something.

    You could check your trigger with a counter clock (just carry your meter with your signal of 1 kHz) and throws an error if it derives.

    Perhaps I could ask a little more of the context of this question - why do you need this architecture? I don't know why you cannot acquire just streaming samples - this can lead us to a different solution!

    I will mention that your schedules are very tight, as this 5 spare part is at best because I don't think that your sample clock is synchronized with the clock of your relaxation.

    In response to your question about the delay, can preload you the filter before your main acquisition to lose the delay?

    A bit like the solution described in this KB (http://digital.ni.com/public.nsf/allkb/F989B25FF6CA55C386256CD20056E27D?OpenDocument), of course you would have to set up your triggers properly. A trigger of reference might use with a size of pre-triggersample of 63.

    I hope this is a help - let me know how you go.

    Best regards

Maybe you are looking for

  • Can't find stuff listed in search

    After a number of emails by using the search for "Joe Blow", appear (36), but how do I know which folder the enamel is in? I think that they are physically removed a long time ago. I can't find them in any of my files, which are well organized. None

  • FaceTime/iMessage, do not connect

    any time I try to connect with my apple ID just little loading symbol continue to go and he never charges / open face time - the same as with iMessage? any advice-simple instructions if possible

  • Why doesn't Firefox support the Windows 7 taskbar properly.

    Firefox does not work in static form of the Windows 7 taskbar button. When you close the main window of Firefox, the downloads window stays open. Because it is a Firefox window still open, you cannot start an another main Firefox window without first

  • Satellite A300D-205 - tools for the multimedia keys

    Hi guys. I installed windows XP for my Toshiba Satellite A300D-205 and all devices to work perfect except the media touch buttons. It works with Vista, but it does not work with XP. Can you give me some ideas (or tools) how to operate? Thank you.

  • I stopped my backup to Midway and only half of my pictures was reinstated.

    I stopped my backup to halfway through because he was taking too much time. I've only got about 1/3 of my pictures downloaded. Is it possible for me to download the rest of the photos that I'm missing without having to load this particular back again