Pulse

Hi everyone.
How could I make a bipolar pulse(changes polarity every time) using VI examples on LabView 7.1?
I tried to manage it by using two VIs and by configuring it's duty rate and delay time.
I've checked it by using oscilloscope but it didn't work out.
I am feeling that VI's like  "Generate Single Pulse Train" can't generate square wave from 0 V to under 0 V.
(for example, 0 to -5v square wave) In my case, it starts with 10v, then goes to 0v when setting the output polarity to negative.
Am I just confused or is there a way to solve this problem?
If anyone have an idea, please give me an advise.
I am using DAQ board for outputs.

Hello Mr. Kouim,
Thank you for your reply.
It looks like we're almost there!  The problem you're seeing now is
that the two counters are starting out-of-sync.  You'll need to
synchronize the counters by sharing the start trigger.  A good sample
to start with is:
Sample Finder>Hardware
input output>>DAQmx>Generate Digital Pulse Signal (Counter
output)> Gen Dig Pulse Train-Continuous-Dig Start.vi
Modifying the above to work with two counters will enable you to start
both counter outputs in-sync using an external trigger signal.
For your reference, I've made a simple program that does this.  Please see the attached file.
Thank you,
Daisuke Arase
Applications Engineer
National Instruments Japan
Attachments:
sync 2 counters.vi ‏111 KB

Similar Messages

  • Pulse Audio no longer detecting sound card; ALSA still detects

    After a recent update, pulseaudio has stopped detecting my sound card. ALSA still detects my soundcard, and I was able to find the following in the verbose output of starting pulseaudio.
    D: [pulseaudio] reserve-wrap.c: Successfully acquired reservation lock on device 'Audio0'
    I: [pulseaudio] (alsa-lib)utils.c: could not open configuration file /usr/share/alsa/ucm/HDA Intel/HDA Intel.conf
    I: [pulseaudio] (alsa-lib)parser.c: error: could not parse configuration for card HDA Intel
    I: [pulseaudio] (alsa-lib)main.c: error: failed to import HDA Intel use case configuration -2
    I: [pulseaudio] alsa-ucm.c: UCM not available for card HDA Intel
    When I check out the ALSA directory mentioned, it turns out to indeed be the case that the entire ucm directory does not exist
    [root@ArchSpiron james-arch]# ls -lah /usr/share/alsa/
    total 52K
    drwxr-xr-x 2 root 4.0K Apr 14 14:56 pcm
    drwxr-xr-x 7 root 4.0K Apr 14 14:56 .
    -rw-r--r-- 1 root 9.0K Apr 14 14:12 alsa.conf
    drwxr-xr-x 2 root 4.0K Apr 14 14:12 alsa.conf.d
    drwxr-xr-x 208 root 4.0K Apr 13 15:37 ..
    drwxr-xr-x 2 root 4.0K Apr 11 07:20 init
    drwxr-xr-x 2 root 4.0K Apr 11 07:20 speaker-test
    drwxr-xr-x 3 root 4.0K Jan 23 21:21 cards
    -rw-r--r-- 1 root 523 Dec 29 21:33 bluetooth.conf
    -rw-r--r-- 1 root 155 Dec 18 22:34 smixer.conf
    -rw-r--r-- 1 root 3.2K Dec 18 22:34 sndo-mixer.alisp
    Instead the configuration file it's looking for exists under the cards/ directory
    [root@ArchSpiron james-arch]# ls -lah /usr/share/alsa/cards/
    total 264K
    drwxr-xr-x 3 root 4.0K Apr 14 14:59 .
    drwxr-xr-x 7 root 4.0K Apr 14 14:56 ..
    -rw-r--r-- 1 root 4.6K Apr 13 16:20 HDA-Intel.conf
    -rw-r--r-- 1 root 1.4K Apr 13 16:20 aliases.conf
    -rw-r--r-- 1 root 7.0K Apr 12 08:10 USB-Audio.conf
    drwxr-xr-x 2 root 4.0K Jan 23 21:21 SI7018
    -rw-r--r-- 1 root 669 Dec 18 22:34 AACI.conf
    -rw-r--r-- 1 root 302 Dec 18 22:34 ATIIXP-MODEM.conf
    -rw-r--r-- 1 root 2.2K Dec 18 22:34 ATIIXP-SPDMA.conf
    -rw-r--r-- 1 root 2.4K Dec 18 22:34 ATIIXP.conf
    -rw-r--r-- 1 root 437 Dec 18 22:34 AU8810.conf
    -rw-r--r-- 1 root 159 Dec 18 22:34 AU8820.conf
    -rw-r--r-- 1 root 520 Dec 18 22:34 AU8830.conf
    -rw-r--r-- 1 root 5.7K Dec 18 22:34 Audigy.conf
    -rw-r--r-- 1 root 7.5K Dec 18 22:34 Audigy2.conf
    -rw-r--r-- 1 root 2.3K Dec 18 22:34 Aureon51.conf
    -rw-r--r-- 1 root 2.5K Dec 18 22:34 Aureon71.conf
    -rw-r--r-- 1 root 3.8K Dec 18 22:34 CA0106.conf
    -rw-r--r-- 1 root 1.8K Dec 18 22:34 CMI8338-SWIEC.conf
    -rw-r--r-- 1 root 1.9K Dec 18 22:34 CMI8338.conf
    -rw-r--r-- 1 root 2.1K Dec 18 22:34 CMI8738-MC6.conf
    -rw-r--r-- 1 root 2.9K Dec 18 22:34 CMI8738-MC8.conf
    -rw-r--r-- 1 root 1.6K Dec 18 22:34 CMI8788.conf
    -rw-r--r-- 1 root 2.9K Dec 18 22:34 CS46xx.conf
    -rw-r--r-- 1 root 5.5K Dec 18 22:34 EMU10K1.conf
    -rw-r--r-- 1 root 2.7K Dec 18 22:34 EMU10K1X.conf
    -rw-r--r-- 1 root 1.4K Dec 18 22:34 ENS1370.conf
    -rw-r--r-- 1 root 1.8K Dec 18 22:34 ENS1371.conf
    -rw-r--r-- 1 root 152 Dec 18 22:34 ES1968.conf
    -rw-r--r-- 1 root 4.3K Dec 18 22:34 Echo_Echo3G.conf
    -rw-r--r-- 1 root 1.2K Dec 18 22:34 FM801.conf
    -rw-r--r-- 1 root 333 Dec 18 22:34 FWSpeakers.conf
    -rw-r--r-- 1 root 672 Dec 18 22:34 FireWave.conf
    -rw-r--r-- 1 root 217 Dec 18 22:34 GUS.conf
    -rw-r--r-- 1 root 2.1K Dec 18 22:34 ICE1712.conf
    -rw-r--r-- 1 root 2.8K Dec 18 22:34 ICE1724.conf
    -rw-r--r-- 1 root 192 Dec 18 22:34 ICH-MODEM.conf
    -rw-r--r-- 1 root 3.0K Dec 18 22:34 ICH.conf
    -rw-r--r-- 1 root 2.8K Dec 18 22:34 ICH4.conf
    -rw-r--r-- 1 root 558 Dec 18 22:34 Maestro3.conf
    -rw-r--r-- 1 root 4.7K Dec 18 22:34 NFORCE.conf
    -rw-r--r-- 1 root 657 Dec 18 22:34 PC-Speaker.conf
    -rw-r--r-- 1 root 486 Dec 18 22:34 PMac.conf
    -rw-r--r-- 1 root 705 Dec 18 22:34 PMacToonie.conf
    -rw-r--r-- 1 root 1.2K Dec 18 22:34 PS3.conf
    -rw-r--r-- 1 root 780 Dec 18 22:34 RME9636.conf
    -rw-r--r-- 1 root 780 Dec 18 22:34 RME9652.conf
    -rw-r--r-- 1 root 1.5K Dec 18 22:34 SB-XFi.conf
    -rw-r--r-- 1 root 2.2K Dec 18 22:34 SI7018.conf
    -rw-r--r-- 1 root 1.7K Dec 18 22:34 TRID4DWAVENX.conf
    -rw-r--r-- 1 root 1.2K Dec 18 22:34 VIA686A.conf
    -rw-r--r-- 1 root 2.7K Dec 18 22:34 VIA8233.conf
    -rw-r--r-- 1 root 2.8K Dec 18 22:34 VIA8233A.conf
    -rw-r--r-- 1 root 2.5K Dec 18 22:34 VIA8237.conf
    -rw-r--r-- 1 root 830 Dec 18 22:34 VX222.conf
    -rw-r--r-- 1 root 839 Dec 18 22:34 VXPocket.conf
    -rw-r--r-- 1 root 1.5K Dec 18 22:34 VXPocket440.conf
    -rw-r--r-- 1 root 1.4K Dec 18 22:34 YMF744.conf
    -rw-r--r-- 1 root 687 Dec 18 22:34 aliases.alisp
    I'm not at all familiar with pulseaudio configuration. Does anyone know of a good way for me to resolve this issue? Have I even identified the correct issue?
    UPDATE:
    I was able to work around my problem for the moment by symlinking the configuration file to the location that pulseaudio was actually looking for it
    # mkdir -p /usr/share/alsa/ucm/HDA\ Intel
    # ln -s /usr/share/alsa/cards/HDA-Intel.conf /usr/share/alsa/ucm/HDA\ Intel/HDA\ Intel.conf
    Although this does get my sound back, it is a hacky work-around and obviously not ideal. Anyone who knows a bit about pulse configuration, I welcome your input here
    Last edited by OakRaider4Life (2013-04-14 22:14:34)

    Thank you so much for posting your solution!
    I was having the same problem. The funny part was it started happening (and not always) after KDE says that the Intel HDA device is "gone" and asking me to remove it from my configuration. Even by saying no it wouldn't work. Killing pulseaudio with
    pulseaudio -k
    would have everything fallback to Alsa but starting pulseaudio again wouldn't work.
    Rebooting right away doesn't take care of the issue either but after a while the problem would go away...
    Any inputs would be appreaciated!

  • USB-6009 pulse train generation with digital output....

    Hello!
    I've bought a new USB NI-Card (USB-6009) and now I'm trying to adopt an old vi that uses traditional DAQ drivers. I wrote that vi for a PCI NI-Card (PCI-6024E), which has two counters to generate two pulse trains simultaneously. Now I've only one counter and that's why I'm searching for a good way to create pulse trains using a digital output! The pulse trains are both ranging between 100 Hz and 100 kHz.
    I'm sure somebody has an idea how I can solve the probem in the best way
    Kind regards,
    Peter

    You can't do it with this low cost board. Both digital and analog outputs are software timed only. The analog out is rated at only 150  samples/sec and the digital is about the same. You can't even use one of the counters because it is not a hardware timed counter output. It is an event counter only as an input.

  • Since I installed Lion on my macbook the LED light does not pulse when I close the screen - the sleep function does not work.

    Since I installed Lion on my macbook the LED light does not pulse when I close the screen - the sleep function does not work neither when chosen after pressing the button nor chosen in the apple menu..

    I have had the same problem but on another forum it was suggested that disabling internet sharing would solve this. This fix seems to work on my machine - why it works I do not understand

  • Scrolling text is jumpy/pulsing when compressed

    I'm making end credits using the scroll up text animation behavior in Motion 2.1.2. Whenever I compress it for DVD Studio Pro and insert it the text looks terrible. It is pulsing in and out and is hardly readable. I found a few other people who have had this problem, but no solutions that have helped.
    I have done credits using the scrolling text in Final Cut without much problem, but for this project I need motion in order to use text of different sizes.
    Here are my specs:
    Project Properties - NTSC DV; 720x480; Pixel Aspect Ratio: NTSC D1/DV - 0.90; Field Order: Lower First (Even); Frame Rate: 29.97; Background color is black (0%)
    Render Settings - Motion Blur Samples: 8; Shutter Angle: 360; Output Antialiasing Method: Best
    I used Export using Compressor: DVD Best Quality 90 minutes 4:3; I tried using the Color+Alpha and just Color in the Output options. Premultiply alpha and Use field render are both checked. Use motion blur is not checked.
    Most of the text is Geneva Regular 14 pt font. I have tried completely white as well as setting the RGB sliders all at 235 with no difference. I also tried using a black outline with no difference. The scroll up behavior has a rate of 52.
    Please help! It took me forever to put these credits together and I don't want to start from scratch with another program. Making the text bigger helps a little bit but I would really like to keep it the same size for timing and format sake. However, I can't keep it like this because it looks terrible both on an Apple Cinema display and on a tv after burned to DVD.
    Thanks!

    My first guess would be the font itself. Geneva is a pretty thin font and it's not likely to look good interlaced and on a TV. Can you try a thicker font?
    I'd also turn off Field Rendering. It looked much worse with it on than off. Keep Frame Blending though.
    Andy

  • Stepper Pulse Voltage Level in Open Collector

    I am using the PXI-7344 Motion Controller to drive three stepper motors and 5 servos. I am running into unexpected problems with PXI-7344 Motion Controllers to drive stepper motors.
    Steppers are configured as CW & CCW and open loop.
    At first,I started with two PXI-7344 Motion Controller for 8 axes control.
    But two axes stepper control with two axes servo on a one PXI-7344 gave a problem that one of stepper axis speed was faster than a given command speed on a certain moment during all four axes were running simultaneously. In spite of new firmware upgrade, that problem could not be fixed.
    So now I am using three PXI-7344 Motion Controllers for 8 axes.
    The second problem is the output voltage level of stepper pulse.
    PXI
    -7344 Motion Controllers and stepper amplifiers are interfaced with "open collector".
    Stepper amplifiers are driven with +24Volts and +24Volts is supplied from stepper amplifiers.
    As hooked up to a scope to monitor,stepper amplifiers are working correctly as the output voltage level of stepper pulse over +15V for a rise but incorrect as below +15V causing fast speed and more pule move than the given command.
    The problem is that the pulse voltage level is not uniform for axes on PXI-7344 Motion Controllers. For an instance,Axis one always gives +15V pulses but other axes are not. And other PXI-7344 Motion Controller's axes always gives only around +13V level pulses even if it is new one.
    So it could not be replaced with other one except that gives +15V level pulses.
    Why does such strange thing happen?
    And how could that problem be fixed?
    Any help would be greatly appreciated!
    Thanks in advance.
    Choe

    Choe.
    The stepper outputs on the PXI-7344 Motion Controllers output TTL pulses ranging from 0 to 5 volts. I'm a bit confused by your explaination that the "PXI-7344 Motion Controller's axes always give only around +13V level pulses." Does this mean that the 7344 is outputting 13 volts, or is this the output of the stepper motor amplifier? Also the voltage level of each pulse should never effect speed, just torque.
    I recommend going to www.ni.com/ask and contacting one of our NI-Motion specialists. That may provide a better forum for getting to the heart of your odd behavior.

  • LabVIEW/SignalExpress: How can I automate measuring the time between two pulses?

    Hi everyone, bit of a newbie here so please bear with me.  
    I'm a student at a university conducting a muon decay experiment with an oscilloscope connected to some photomultipliers.  To summarize, if a muon enters the detector it will create a very small width pulse (a few ns).  Within a period of 10µs it may decay, creating a second pulse.  The oscilloscope triggers on the main pulse 5-15 times per second, and a decay event happens roughly 1-2 times per minute.  I am trying to collect 10 hours of data (roughly 1500-2000 decay events) and measure the time it takes for each decay.
    I've been able to set recording conditions in SignalExpress that starts recording on the first pulse and stops recording on the last.  The Tektronix TDS 1012 oscilloscope however feeds 2500 points of data from this snapshot into a text file (for use in excel or other software).  Even if I perfectly collected the data, I would have 100,000+ data points and it would be too much to handle.  I don't know how (or if it's possible) to reduce the sample size.
    To conclude, using Labview or SignalExpress, I would like to be able to have the software
    1.  Differentiate between the single pulse detections and double pulse decay events
    2.  Record only when two pulses appear on the oscilloscope
    3.  Measure the time between these two pulses and ONLY that to minimize the amount of data recorded.
    Any help would be GREATLY appreciated, thanks!

    Hi wdavis8,
    I am not that familiar with Tektronix, but there should be a place in the dialog that you go through when you create the action step to acquire date to specify a sampling rate. That would allow you to reduce the number of data points you are seeing, but may reduce the quality of the data.
    If it’s just a matter of that much data being hard to dig through when you have that many points, you could do some analysis on the data after the fact, and then create a new file with only the data you want to look at. For example, you could identify the peaks in the data, and based on the distance between them or the difference in magnitude, selectively write data to a new file.  
    Here is some information about peak detection in LabVIEW:
    http://www.ni.com/white-paper/3770/en/
    You could also do some downsampling on the data to get fewer data points:
    https://decibel.ni.com/content/docs/DOC-23952
    https://decibel.ni.com/content/docs/DOC-28976
    Those are just a few quick ideas. 
    Kelsey J
    Applications Engineer

  • In Delayed Pulse Generation vi,Problem With THE PULSE WIDTH??

    In Delayed Pulse Generation vi, I want to input a very low number for the Pulse Width while using an external timebase source. But the minimum pulse width has to be 2. Does anyone know how can I solve this problem??

    Hey 45,
    Unfortunately, there is no way to generate a pulse width smaller than 2x your external timebase.
    There is an option to create a pulse of arbitrary width of your external source if you can afford some software processing in between. What you can do is use 1 counter to measure how many source edges of your card's internal timebase (80 MHz for TIO only, 20MHz or 100kHz for TIO and STC) your external signal is. This uses pulse width measurement as the counter application. Once you know how many source edges it takes to represent your pulse, then you can use triggered pulse generation and use the internal timebase with the pulse specs set to create the exact pulse width you want (and delay) and you can use your external pulse as the trigger. Th
    is works well if your pulse is always the same width and you can measure it before hand. As an example, let's say your pulse is 20 internal timebase pulses when measured. This means you can use the pulse specs to specify a pulse width of 0.75 your pulse width by using only 15 internal timebase edges for your pulse width.
    I don't know if I was clear above or not but if you give me your exact application you are looking to achieve, I might be able to help you out. Hope that helps.
    Ron

  • Pulse train generation fails with certain values for "number of samples"

    I'm generating a retriggerable analog output signal, and so I'm using a counter as the sample clock (see: Retriggerable AI Using Retriggerable Counter). I am finding that, above a certain number of samples, and only for certain values of the number of samples, the counter task gives me error -200305, "Desired finite pulse train generation is not possibe." The error crops up only when actually starting the task.
    The analog signal that I'm trying to generate will be about 800 kHz, so my counter is set to run at the same frequency. I find that the counter task works fine if the number of samples to generate is anywhere between zero and 671,088 samples. Setting the number of samples to 671,089 gives the error above, as does 671,090 samples and so on. However, using 671,096, the counter task works fine. After that, the counter seems to output fine only if the number of samples is divisible by 8.
    The only thing I can think of is that (617088 samples) / (800000 Hz) = 0.839 s. At the internal clock rate of 20 MHz, 0.839 s is 2^24 samples, and it is a 24-bit counter on this hardware. So if it's this internal counter rolling over, that's fine and I can work around that. But if that's the case, what I don't understand is why increasing the number of samples in increments of 8 samples still works.
    The hardware is a PXI-6733 board, running with LabView 7.1.1 and NI-DAQmx 8.1.

    Hmmm,  multiples of 50 & 100?  Now I'm puzzled again.
    Here's how to make sense of the 100 kHz timebase idea though, even if it turns out not to be the right explanation.  For a retriggerable finite pulse train, you actually use a pair of counters.  If you were to program it manually, you could set your output counter to generate a continuous pulsetrain at 800 kHz using the internal 20 MHz timebase.  This output counter would also be configured to use the other counter's output as a digital level-based pause trigger.  So the 800 kHz pulsetrain is only output while the other counter's output is, say, high.
    The other counter is configured for retriggerable pulse generation.  The pulse duration or high time should be set for (# pulses) / (800e3 pulses/sec).  This other counter can be configured to use the 100 kHz timebase, so its high time would then have to be an integer multiple of 10 usec.
    So let's see...  An 800 kHz pulsetrain is possible with a 20 MHz timebase (exactly 25 cycles).  A 700 kHz (28 + 4/7 cycles) or 900 kHz (22 + 2/9 cycles) is not.  So when you request those other frequencies, you actually get a near approximation.  I dunno if DAQmx can be queried for the actual value correctly or not -- I recall an early version that reported back whatever freq you had asked for rather than what it actually used.  Queries based on ticks (rather than time or freq) did return what was actually used, as I recall.
    Let's suppose a request for 700 kHz gets truncated to 28 cycles of the 20 MHz timebase making a 1.4 usec period.  Then 50 of those periods becomes 70 usec, which is evenly divisible by the 100 kHz timebase.  Bingo!  (Note: 70 is the least common multiple of 10 and 1.4)
    Now suppose the request for 900 kHz turns into 22 cycles of the 20 MHz timebase, or a 1.1 usec period.  Now it takes 100 of those periods to get to 110 usec, which is also evenly divisible by the 100 kHz timebase.  Bingo again!  (Note: 110 is the lcm of 10 and 1.1).
    Did you follow the method here?  It should help you figure out expected results for various output freqs and #'s of samples.
    -Kevin P.

  • Using LPT to generate pulses

    hi..
    im new to labview,
    im trying to generate clock , strobe and data signals
    ( data to be user defined ) using the wave form generator function in LabView 7.1..the data has a different time period as compared to the other pulses..
    my end purpose is to use the parallel port to output these signals on an oscilloscope....
    could u please suggest how i should go about it?
    thank you,
    Sairaj.
    ps:i have attached the file tht generates the pulses, i have no idea how to use the parallel port after this, especially considering tht there are so many timing issues involved.Message Edited by Sairaj on 06-09-2005 01:00 AM
    Attachments:
    signal generator.vi ‏78 KB

    what a stupid shi...... - NI cancelled the attachment during preview post - here again.......
    hi retour,
    find attached a modified vi ( was for AD9835 - numerically controlled Oscillator ).
    You should be able to understand the principle and change these vi's for your needs.
    My intention was - to be fast and copy things together.................
    regards
    Werner
    Attachments:
    AD9835 SPI variation test1.zip ‏151 KB

  • How to measure the time a pulse is high for?

    I am using Pulse measure.vi to measure the output of a comparator. My comparator output feeds to an LED. The duty cycle is 50% so the LED just flashes on and off. I want to measure the time the output is high ('ON time') and I have been getting this by just multiplying the pulse width measure by the no. of pulses but I want to modify it to measure the 'ON time' of random signals with different duty cycles...
    The aim is that I am taking in a signal and need the LED to turn on when the signal 'ON time' reaches a certain specified time.
    But before I continue with the LED I am wondering how to add up the time the signal is high for?

    Hi PinkLady4218,
    You should be able to use one of the shipping examples to do what you need, please open LabVIEW and go to Help >> Find Examples.
    From the Example Finder please go to Hardware Input and Output >> DAQmx >> Counter Measurements >> Period or Pulse Width >> Meas Buffered Semi-Period-Continuous.vi
    You will then need to deinterleave the output array as it will show high time then low time then high time then ...
    You will need to confirm the order these values appear and then you can use a function from the arrays palette and use the function "Decimate 1D Array"
    Regards
    JamesC
    NIUK and Ireland
    It only takes a second to rate an answer

  • 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

  • How to measure the baseline of a noisy, pulsed signal

    Hi
    I am measuring the torque exerted by a large motor on a shaft using a load cell and lever arm. The shaft runs at approx 150 rpm. I have attached a drawing that shows the output I get. This is a test rig.
    I have written some code that measures the maximum peak out of a group of approx 5 peaks and writes this to a shift register. This gives me an idea of the maximum torque "spike".
    I also wish to measure the baseline torque (due to the bearings in the machine). Even when highly filtered (my noise filter is set to 49Hz) the signal exhibits this noise which is probably due to vibration in the system. The signal is zeroed when the motor is not running.
    Does anyone have an ideas on how to measure the "baseline" torque? The large spike in torque prevents me from doing a running average. Can anyone think of a way of averaging just the noisy part of the signal to get an average value? I aim to to subtract the average baseline torque from the peak value to get an idea of the torque due to the event which causes
    the spike.
    Any help would be greatly appreciated.
    Many thanks.
    Attachments:
    drawing of torque signal.gif ‏26 KB

    Thanks for the reply. I understand what you are saying. However, I might have to modify my method for measuring the peaks if I choose to implement your idea. I have taken a screenshot of my "peak finder" code and attached it.
    Bascially, the reset terminal is wired to a timer which outputs a pulse every few seconds. This resets the vi (a standard NI one I think) and sets the peak magnitude back to zero. This way, I am windowing the signal and measuring the maximum peak in every window. This is what I need to do.
    So I could use a logical filter to feed data to the running average only if;
    the amplitude of the signal is less than a certain threshold
    and if the current value has similar low peaks either side of it
    How would you construct the code to delay the evaluation so that the values in front and behind of the current data point can be analysed?
    thanks again
    Attachments:
    peak_find_screenshot.jpg ‏45 KB

  • Macbook Pro 2010 Running Slow and Pulse/Click Noise (Not Hard Drive)

    Hello. My 13" Macbook Pro mid-2010 (7,1) suddenly began running slow and lagging on certain operations. There is also a light pulse/click noise coming from the center of the keyboard. I am sure this is not a failing hard drive. How, you may ask me, am I so sure??? Well, I originally thought it was a failing hard drive and so replaced the hard drive, and there was absolutely no change, and the lagging and noise still continues. This makes it very frustrating to do basic, low-memory-intensive things like browse on Safari or watch a movie.
    I have upgraded to Mavericks, and have 8gb Ram. This problem started suddenly about a month after upgrading to Mavericks. In fact right now my computer is lagging just typing this, Activity Monitor says I am only using 2.75 ram of 8gb.
    Steps I have taken with no resolution
    -Replaced the hard drive
    -Reinstalled OSX Mavericks
    -Verified and Repaired Permissions (I still get a message the the following item can't be repaired "System/Library/CoreServices/RemoteManagement/ARDAgent". But I have read that this is a common thing and can be ignored.
    -Restarted the computer holding down left shift-option-control and the power key for 10 seconds (not sure exactly what this resets, but some type of system cache thing.
    -Reset the PVRAM stuff ( I restarted the computer holding down command-p-r. I'm not sure I did this correctly as it went to the firmware disk repair screen.
    Could there be a RAM issue? Does RAM start making noise when it goes bad? I bought my upgraded ram from ebay, it isn't the official Apple Store stuff. Could replacing the ram possibly help? My System Report tells me the RAM is OK.
    Putting a message on here for help is the last step before giving up. I can't do much with this computer because it is hiccupy and overall difficult.
    Thanks.

    1. Use  free  AdwareMedic to remove adware
        http://www.adwaremedic.com/index.php
       Install , open,  and run it by clicking “Scan for Adware” button   to remove adware.
       Once done, quit AdwareMedic.
    2. Safari > Preferences > Extensions
        Turn those off and relaunch Safari.
        Turn those on one by one and test.
    Remove CleanMyMac.
    http://macpaw.com/support/cleanmymac/knowledgebase/how-to-uninstall-cleanmymac-2
    Remove Conduit:
    http://www.thesafemac.com/arg-conduit/

  • How can I use the pulse train from a 6602 to trigger an niFGEN and niSCOPE on each rising edge of the pulse train?

    Hello,
    Here is my application: I need to use a 6602 counter/timer to generate a pulse train of certain frequency and duty cycle. On each rising edge of this pulse train, I need to output an arbitrary waveform on Ch. 0 of an niFGEN (5422) AND acquire data from CH. 0 of an niSCOPE (5124). I also need to synchronize the niFGEN and the niSCOPE to the same clock used for the pulse train (6602/ctr0). This process needs to continue until the user stops the system.
    I can generate the pulse train using the 6602 just fine using ctr0, but the pulse train shows up on OUT0 by default. When setting up the niFGEN and niSCOPE to trigger on rising/positive slope edge, OUT0 is not an option for either device as a source for the digital rising edge (pulse train). The main options for both are PFI0-3 and RTSI lines.
    Questions:
    1.) Is there a way that I can direct the pulse train to a location (such as an RTSI line) where BOTH the niFGEN and the niSCOPE can use it as a start trigger for each rising edge? I noticed in MAX that a route can be made between ctr0's internal output and a trigger line and others. If this is a solution, could you please explain how to accomplish this?
    2.) Once I configure the niFGEN and niSCOPE to be triggered on a digital rising edge, how can I effectively have this happen for every rising edge from the pulse train? In other words, can I just initiate the FGEN outside of the while loop and it will generate a waveform for each rising edge it sees at the source until the while loop is exitted?
    3.) Is setting a reference clock for the niFGEN and the niSCOPE the same thing as synchronizing both devices using the same clock that generated the pulse train? It is not clear to me the difference, and why it would necessarily be useful.
    Images of my current front panel and block diagram are attached. If you would rather have the actual VI's just let me know. Any help and/or explanation on this is greatly appreciated. Thanks in advance.
    Attachments:
    Front_Panel_Control.jpg ‏278 KB
    Block_Diagram_Control.jpg ‏263 KB

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • PCI 6602:How can I use the digital lines of the board and in the same time to generate pulse train using a counter?

    Hello!
    My problem appeared when I tried to update my code from Traditional NI-DAQ Legacy to DAQmx.
    I am using 2 counters (counter 5 and counter 7)  from PCI-6602, to generate pulse train, and also the Digital I/O lines of the port 0 (the lines form 0 to 7). What I do in my application is that I am starting to generate the pulse train on the output of the 2 counters, and after that I am playing with the state of the digital lines.
    In traditional there was no problem using the counters and the digital lines in the same time, everything was going perfectly, but in DAQmx this is not possible.
    What happens: I start to generate pulse train on the output of the counters,  no errors encountered, but when I try to modify the state of one line of the digital port the generation of the pulse train is stopped. This is happening when I start the task associated to the digital port.
    My question is: it is possible to create a channel on the digital lines without altered the channels created for the counters?
    Another thing what I manage to see using the  "Measurement & Automation Explorer" and Test panels for PCI-6602, basically is the same thing, I generate pulse train on the output of the counter 7 and try to start a task on the digital line, but I get one error :
    "Error -200022 occurred at Test Panel
    Possible Reason(s):
    Measurements: Resource requested by this task has already been reserved by a different task.
    Device: Dev4
    Terminal: PFI8"
    Instead if I use the counter 0 or counter 1 to generate pulse train I don't encounter the same problem.
    Which resources are used by the counters 2 to 7 from the PCI-6602 board and the counters 0 and 1 do not use?
    Thank in advance for any replies!
    Ciprian
    Solved!
    Go to Solution.

    Hello Jordan, thank you for your reply.
    I am sorry but I can not see or run your example, I don't use LabView, I use Visual C++ for developing.
    Here is the code for generating the pulse train:
    GeneratePulseTrain(unsigned long ulCount1, unsigned long ulCount2)
        short nStatus = 0;
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        nStatus = DAQmxCreateCOPulseChanTicks (m_taskHandle, "Dev4/count5", "", NULL, DAQmx_Val_Low, 0.0, ulCount1,ulCount2);
        if( bTriggerMode == true) // if hardware trigger is enabled
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_ArmStartTrig_Type, DAQmx_Val_DigEdge);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Edge, DAQmx_Val_Rising);
            nStatus = DAQmxSetTrigAttribute (m_taskHandle, DAQmx_DigEdge_ArmStartTrig_Src,"Dev4/PFI17" );
        //set the internal timebase
        nStatus = DAQmxSetCOCtrTimebaseSrc(m_taskHandle,"Dev4/count5","20MHzTimeBase" );
        nStatus = DAQmxStartTask(m_taskHandle);
        return nStatus;
    And the code where I try to set the digital line:
    SetChannelState(short nState)
        short nStatus = 0;
        uInt8 wrtBuf0[1]={0};
        nStatus = DAQmxCreateTask("",&m_taskHandle);
        // Configure line as output 
        nStatus = DAQmxCreateDOChan (m_taskHandle, "Dev4/port0/line0", "", DAQmx_Val_ChanPerLine);
        nStatus = DAQmxStartTask(m_taskHandle);
        wrtBuf0[0] = nState;
        nStatus =DAQmxWriteDigitalLines (m_taskHandle, 1, 0, 0, DAQmx_Val_GroupByScanNumber , wrtBuf0, NULL, NULL);
        nStatus = DAQmxWaitUntilTaskDone(m_taskHandle,10);
        nStatus = DAQmxStopTask(m_taskHandle);
        nStatus = DAQmxClearTask(m_taskHandle);
        m_taskHandle = 0;
        return nStatus;      

Maybe you are looking for

  • The document "navidad.numbers" could not be opened.

    I created a document during december, and now I can't open it. It's really important, I need help here. I doesn't gives me any explanation only the pop up saying: The document "navidad.numbers" could not be opened. Message was edited by: jaimemtz

  • How to play few times a video

    Hi everyone, i`d like to put a video for i play how many times it necessary by clicking at apple remote control... I do no how many times i will play in my presentantion, maybe i need 2, 3, 4, i do no, so, i`d like to put anything for i play the vide

  • I can´t see the ipad2 in my PC (os win7)

    How can i check in my pc for to explorer my ipad2? The OS is windows 7

  • Satellite Pro L300 (PSLB9A-02L001) - Remove Vista and install Windows XP

    I am awaiting delivery of a L300. I also bought XP as I want to instal XP as soon as I get the L300. The laptop comes with Vista installed which I have never liked. I was intending to create a Vista recovery disk just to be safe before I start the co

  • How to stop web background from resizing when zooming in an out?

    Iv added a background fill (tried on master page and the actual page) but still when i view it in browser  and try zoom in an out the background scales with the content? Iv done it before, but can't figure out how to do it again ? Cheers