Differentiation of an analogue signal

Hi all,
I am using Labview 8.5 along with a USB 6008 DAQ to acquire an input signal from an LVDT. The output from the LVDT is 0 - 10V which corresponds to a total displacement of 50mm. My job is to acquire the input signal(displacement) and differentiate it twice to get both velocity and acceleration. I have managed to acquire both the displacement and velocity signals but the acceleration graph is very distorted. Finally i need to acquire data for all three signals for a certain length of time and write the data points to an excel file where they can be graphed. I am struggling to find an example of writing the data from a waveform graph/chart to file. Does the data logging need to be done in signal express or can it be done with the VI? I have attached the VI which i have written. Any help with the VI would be much appreciated. I am new to the software.             
Attachments:
LVDT Program rev1 (2).vi ‏320 KB

Hi,
"...i need to acquire data for all three signals for a certain length of time..."
Go to LabVIEW>Help>Find examples, then search for "analog", navigate to "Acq&Graph Voltage-Int Clk.vi" and open it. This example illustrates a finite acquistion for one or more channels you specifiy with DAQmx Low-Level functions.
Acquiring for a certain time means "number of samples" multiplied with "sample rate. E.g. 1000 Samples with a rate of 1kHz gives you 1s of your signal.
"...and write the data points to an excel file..."
Again use Example Finder and "file" as a keyword to search. There are some Examples showing how to write a tab-deliminated textfile, which will be accepted by Excel. If it's not time critical and you can directly wire the 2D array from your acquisition to the "Write to spreadsheet file.vi" which you will find in the FileI/O Palette.
Hope this helps,
Christian

Similar Messages

  • NiDAQmx and 6220 board - Retriggering to start sampling analogue signals

    I have a M series 6220 board with labview 7.
    I want to measure analogue signals using a digital trigger - much like the examples given in the library shipped with ver.7. However I want to "retrigger" periodically so that I can sample the my analogue signal each time my external circuit sends a trigger pulse out. This retriggering facility continuing until I press a stop button.
    At the moment all I can do is get one triggered set of samples and then the VI stops.
    Any code advice or examples would be appreciated.
    rgds
    Charles (labview beginner)

    Ive saved it to LV7.0 and attached a gif image in case you have any problems with the VI.
    Attachments:
    Digital Start and Stop Trigger Folder(7.0).zip ‏71 KB

  • Noisy Analogue Signals From SCB-68

    Hi,
    I have a set up as shown below. 
    Futek Load Cells >> SCC-SG04>> SC-2345 >>SH68-68EP Cable >> SCB-68 >> Analogue input of PCI 7350 8 axis motion controller.
    This set up has resulted in a noisy analogue signal from 7350 with high amplitude spike. 
    I had tried to check the signal from load cell by connecting load cells >> SCC-SG04 >> SC-2345 >> M-Series DAQ card, the reading was fairly smooth with no spikes. Therefore, i suspect the noise was picked up in the connections for SCB-68.
    Is this set-up correct to connect the load cell signals to PCI-7350? If so, how can I reduce the noise picked up from the connections?
    Thanks for helping. 

    Hi,
    I have a set up as shown below. 
    Futek Load Cells >> SCC-SG04>> SC-2345 >>SH68-68EP Cable >> SCB-68 >> Analogue input of PCI 7350 8 axis motion controller.
    This set up has resulted in a noisy analogue signal from 7350 with high amplitude spike. 
    I had tried to check the signal from load cell by connecting load cells >> SCC-SG04 >> SC-2345 >> M-Series DAQ card, the reading was fairly smooth with no spikes. Therefore, i suspect the noise was picked up in the connections for SCB-68.
    Is this set-up correct to connect the load cell signals to PCI-7350? If so, how can I reduce the noise picked up from the connections?
    Thanks for helping. 

  • Noisy Analogue Signal and Lowpass Filter Questions

    Hi everyone,
    I am getting analogue signals from a strain gauge that are a bit more noisy than I would like... Normally, I jump right in an smooth the signal using a lowpass filter of whatever order gave me the result that was acceptable, without overkill and smootig the signal to nothing... However, I am settingup a new DAQ device and would like to a little more informed about what and how am doing this...
    So, here are my questions:
    1. How do I determine the filter order? I usually use a 2nd order filter for smoothing.. I understand the comncepts of roll-offs and phase delay as they relate to the order numbers... On what basis should I decide which order filter to use for this specific signal?
    2. I am still thinking that using a lowpass filter is the best approach... I assume the lower cutoff freq is in Hz (i.e. 10Hz) and is NOT a normalised freq [i.e. cutoff freq / (sample rate/2)]?.. The default value is 0.125, which seems too low for a Hz value? Also, on what basis should I decide what cutoff freq to use for this specific signal?
    3. I need to synch the filtered strain gauge signal with other, unfiltered signals... But as the filter will add a phase delay it will affect signal synchronisation... I heard somewhere that a 4th order filter is zero-phase, but I can't see how that could be right as the filter only operates in one direction... Any suggestions for what I could do to maximise the timing alignment between the filtered and unfiltered signals?
    All comments welcome!
    Regards,
    Jack

    Jack,
    I was the Instrumentation Engineer at a university for 24 years and worked with several execise physiologists, biologists, and neuroscientists on similar projects.  My group was the "lab/tech staff" you have little of.  There were 3.5 (engineer, 1.5 electronics technicians, and machinist) of us for the entire university.
    OK.  The strain gauge signals probably have no information above a few tens of Hz (hummingbirds) or a few Hz for most larger species.  EMG is usually filtered in the amplifiers to slightly larger bandwidths (few hundred Hz) unless you are trying to see the individual action potentials.  Does the dynamometer have specifications on the bandwidth or sampling rates used?
    Since your bandwidths are realtively low, I suggest that you sample all the analog inputs (and the trigger outputs, if the boards have the capability) from the same clock.  You can later decimate or average data on channels where less data is needed.  Record the trigger signals on an unused analog input if you have one available.  It can be very handy to have the information about when the triggers actually occurred in the same dataset as the response data.
    Delay equalization is a complex topic. Suppose that you are sampling all your channels at 1 kS/s. Suppose you have a 10 Hz low pass filter, 2 pole Butterworth, on a strain gauge channel and a 50 Hz filter, 4 pole, elliptical, on an EMG channel and you want to synchronize the filtered data with some unfiltered channels.  The two filters have very different phase and delay responses over the 0-500 Hz frequency range. To equalize you would need to determine the maximum delay at any frequency in the range for both filters. Then you would need to design THREE all-pass filters. One would have a phase response which compensates the 10 Hz filter. Another would compensate the 50 Hz filter.  These would need to be designed so that the total delays through the low pass plus all-pass filters is the same.  Then you need a third all pass filter with that same total delay to compensate the unfiltered data.  This is may be a non-trivial job for an expert, depending on the low pass filters.
    What kind of noise are you seeing and how is it affecting your measurements?  Can you post some data?
    Lynn

  • Generating Trigger (or TTL) from Analogue signal

    HI everyone
    Well I am investigating the droplet surfing on the vibrating bath. In this case I have to synchronize the camera with the accelerometers.
    Accelerometers are connected to the vibrating plate that vibrate sinusoidal with frequency of 80Hz. I am acquiring the acceleration using DAQ NI USB 6212. A camera (Camera Link camera Basler, NI PCIe 1433) is used to acquire the images of the vibrating plate. The frame rate of the camera is 20Hz that controlled by either external signal (TTL) or camera attributes.
    I would like to generate a trigger from the DAQ (AI signal) to the camera at first minimum acceleration as shown in attached file. I have also attached the vi file. Could you please let me know if is there anyway we can generate the trigger from the analogue signal.
    Cheers
    Naresh
    Solved!
    Go to Solution.
    Attachments:
    Signal.png ‏105 KB
    Camera_DAQ.vi ‏169 KB

    Hi Guys 
    Thanks for you help. The problem is solved now. I have changed the exposure controller from free run to trigger.
    Cheers 
    Naresh 

  • How do I output digital/analogue signals based on a text file

    I have a CSV file with three fields in each record; time, rpm, and a voltage. A sample file is attached. The rpm numbers are generated using 8 counts/revolution. I want to replicate this file somehow. At a trade show this past weekend I was told Labview could possibly read this file and output the signals. How would this work? I develop an app in Labview that reads the txt file and then run the app. The app generates the signals using what device? Any info is greatly appreciated, thanks in advance
    Toby

    Many of the National Instruments hardware cards (or potentially third party manufacturers) can be used by LabVIEW to create analogue and digital I/O signals from a text file.
    The PCI cards often have 2 analogue outputs and 8 analogue input channels (often more), as well as Digital I/O's and counter timers.
    I suggest that you firm up your requirements and contact your local NI sales office for specific hardware advice.
    Message Edité par Conseils le 12-18-2006 03:27 PM

  • How do I ouput a digital signal from an analogue signal

    Hi all, I'm using a 6221 PCI card with LabVIEW 2010 (no add-ons) with the CB-68LPR connector block and I want to use an analogue voltage input signal of between 0 V and 5 V from an LDR to alter the brightness of an LED so I can maintain a stable level of illumination for a webcam based image capture and processing system.
    I can get the analogue voltage input from the LDR (set up as a voltage divider circuit) using the DAQ assistant via the Ain 0 channel on using pins 68(AI.0), 67(AI GND) and 14(+5 V) and write it to a graph and numeric display but I don't know how to write the value out to a pin that can be used for PWM I am thinking of using pin 40 PFI 13 P2.5 and a digital GND (pin 13).
    I've looked at example code that has been written to produce a PWM signal but these programs don't output the signal to a device/circuit they are just "nothing stuff" that output the PWM signal to a graph.
    Can anyone help me out or point me to the tutorials/code examples that are for real world applications?
    Solved!
    Go to Solution.

    Hello,
    PWM can be done in DAQmx using a counter output task.
    I think the 'PWM-Counter Output.vi' example goes quite a long way to doing want you want I think. This is found in the LabVIEW shipping examples.
    I also found it here:
    http://zone.ni.com/devzone/cda/epd/p/id/1710
    This might be worth a read aswell:
    http://zone.ni.com/devzone/cda/tut/p/id/2991
    Let me know if this is of any help.
    Nick C.
    Cardiff University

  • Analogue Signal Pulse Count

    I am using CDAQ with a NI9229 4 Channel analgoue input card. 
    I have a sensor that outputs an analogue 5v square wave signal. The pulses are triggered from eithe a north or south pole of a magnet. I have  an aluminium wheel with 30 magnets, all magnets are in opposition to each other. when the wheel is rotated the output is a square wave.
    My magnet wheel is rotating at 182° per second. Over 360 degrees there is 30 magnets. Thus making the sensor switch 30 times.
    The time to revolve the wheel one revolution is 1.978 seconds.
    I have set up the NI9229 to the following
    - sampling rate is set to 25kS/s So to record the data for one revolution it works out as 49450 bits.
    - Have set the trigger levels for recording a hi or lo pulse to 2.7 and 0.7 volts.
    50000 samples would be two seconds worth of data which would be more than 360° of rotation of the magnet wheel.
    The problem I am having is that my pulse count changes between 30 and 31. But as I am only recording 1 revolution of data there is physically only 30 switches. Do you know why I am getting a change of 30 and 31.
    Attachments:
    pulse count 2.PNG ‏20 KB
    pulse count.PNG ‏19 KB
    front panel.PNG ‏83 KB

    I think I know what the problem is now but don’t know a way around it.
    I have attached two screen shots. One shows that the rising edges are counted as 15 and the falling as 16 the other shows both are 15. This is due to where it starts to take data I believe.
    For detecting the rising or falling edge I compare the data to 4.0 or 0.5v If its below 0.5 then sends a hi signal and counts 1, if its above 4.0 it sends a hi signal and counts1.
    But depending on when it starts taking data the signal is already a falling or rising edge. Comparing one bit of data on a rising  edge to see if its below 0.5 will send a hi as it hasn’t started to rise as shown in the first picture.
    Is there a better way to count pulses
    Attachments:
    1.PNG ‏61 KB
    2.PNG ‏64 KB

  • How do I set up LabVIEW V6.1 to output analogue signals using a LabJack U12 interface card?

    Hi there,
    I have a LabJack U12 interface card that has two analogue outputs, AO0 and AO1. What I would like to be able to do is set up LabVIEW V6.1 to eventually control the dimming of some external lights, from say a simple control on LabVIEW's front panel.
    I will have some external circuitry connected to the interface card to perform the dimming of the lights, so all I will require is a variable voltage on the output of the card. I think the specification of the card is 0 to +5 volts for the two analogue outputs. I have tried looking on the website for LabJack (www.labjack.com) for any ideas, but with no success! Please find my LabVIEW file as an attachment.
    I would be very grateful for any help on this matter,
    Neil Sampson.
    Attachments:
    Basic_ver6_2_1.vi ‏158 KB

    On the labjack downloads page:
    http://www.labjack.com/downloads.html
    Pick "Labview5 VIs" download. In the zip file is ljacku50.llb, which contains EAnalogout.vi for outputting an analog signal.
    2006 Ultimate LabVIEW G-eek.

  • Saving an analogue signal to Excel

    Hi, I'm trying desperately to record an analogue voltage signal in a format that can be opened in excel. The code that I have written works fine however when i come to open the file it is full of weird ?›°‰ ?£ØGG?›°‰ ?‘?b‹â‹Þ@ stuff why is this happening?
    After looking over several forum postings on the subject I am still left with some questions.
    It seams that I need to build an array or use the Active x function. I have tried a few times to add an array into my code but have been having difficulties
    + another part of my code is a login screen which saves the user name and date, how can i have the user details saved with the data recorded by the DAQ? 
    Thanks Wes
    Attachments:
    record pressure.vi ‏214 KB

    Naming a file with a .csv extension does not automatically make it a .csv file. You actually have to write the data as text and put separators between the columns. You have a wired a 1D array of DBL to the data input of your file write so that is the data type that is being written - binary data. Why don't you just use Write to Spreadsheet File or Write LabVIEW Measurement File? Either one will convert your DBL array to strings and that is what you want.

  • Pre and post trigger using analogue signal level to start trigger

    When an open accelerometer channel reaches certain level (say 4 mV) I need a trigger to start data acquisiton, saving the previous 1.5 seconds of data across all eight channels and then stop recording and store the data six seconds after the trigger was started. 
    Can DASYLab do this? 
    Your help's appreciated,
    Bob
    vibration testing

    The trigger modules are all control modules; they all output a TTL type signal, 0 or 5, that can be used by other modules.
    In this case, the simple trigger configuration should look like this.
    A/D  ----------- Trigger ---------------- X Relay   ----------------   Write Module
                  \---------------------------------0
    The trigger controls the open and close of the Relay, which release the Analog data that you branched to the second input of the Relay.
    --cj
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • Detecting analogue signal change?

    I have a LDR monitoring an LED that comes on for 2 sec and off for 1sec. (see the attached waveform)
    At the moment I can detect (via a comparator) if the peak has changed to detect if the LED is on.
    However the tricky part is detecting if the pattern of the on/off period has changed, hence if the LED is on for 5sec and off 3sec, the change of rate should be detected.
    So if the signal doesn't match the waveform (both x axis and y axis ) then the user must be alerted.
    I'm lost on how to approach this issue
    Any suggestions will be appreciated.
    I'm using labview 2011 and DAQ 6009
    Attachments:
    waveform.png ‏12 KB

    Duplicate post.  Please keep it in 1 thread.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How do I convert analogue 5.1 surround sound into a digital signal? (Pioneer SE-DIR800C headphon

    I understand that my SB Audigy 2 card will only output 5. sound from games through its 3 analogue connectors. How do I convert this analogue signal into a digital one? What hardware do I need to purchase?
    I have read the thread on "Digital Connections, SPDIF and Dolby Digital Info", and also I've thoroughly read the "Creative Speaker Connectivity Guide".
    The reason I ask is that I have just bought a pair of Pioneer SE-DIR800C Surround Sound headphones. This are supposedly fantastic for recreating surround sound on headphones because there is a clever little decoder box. They accept a DTS / Dolby Digital signal via the digital co-axial and optical inputs, and there is a single analogue input which only accepts stereo sound.
    My XBox and PS2 will output true digital 5. sound via an optical cable and I am confident this will work perfectly with these headphones. I'm really looking forward to playing Halo in surround sound! But for gaming on my PC, I'll be limited to just an analogue stereo signal. Well, unless I can find some device that will convert my SoundBlaster's analogue 5. outputs into a digital signal, which I can then plug into the little decoder box for these headphones.
    So, back to my question:
    What hardware do I need to buy to convert an analogue 5. signal (via 6 x RCA or 3 x 3.5mm stereo ) into a true digital signal (via optical or co-axial SP/DIF)? Is it some type of headphone amplifier I need? If possible, please recommend makes & models of equipment.

    Thanks stefan
    OK, basically I have found 3 options for getting digital 5. out of a PC:
    a) Creative DTS-60 (approx $90). This converts the SB's analogue into digital, but it's not available in the UK and it also introduces a noticeable 50ms sound delay. Also, who wants an extra box hanging out of their PC?
    b) Buy a new sound card which has Dolby Digital Li've output. For example, ) BlueGears HDA X Mystique 7., or 2) Turtle Beach Montego DDL, or 3) Terratec Aureon 7. PCI (NOT the Space, FireWire or Uni'verse cards). I couldn't find the first two available in the UK so I have just ordered the Terratec card from Komplett.
    c) Buy a new motherboard that has built-in Dolby Digital Li've output, for example the ABIT Fatalty AA8XE. Unfortunately my PC is only just over year old and I'm not quite ready to replace it.
    I hope this info is useful for people. Maybe Creative will start making a card with DDL output too.Message Edited by NinjaHeretic on 2-22-2005 08:46 AM

  • Differential Signal to Single Ended Signal Conversion

    Hi,
    Im facing a problem here. I need an ADC that reads 0-20mA. The signal comes from a signal conditioner that creates a differential signal. However, a NI device with single ended inputs is much cheaper than differential inputs.
    The signal conditioner already exists and I cant change that.
    Im looking for something that can convert the differential signal to a single-ended signal.
    I tried finding an IC that does that, but couldnt find one. Do they exist?
    Maybe its easier for voltage than for current.
    How is this usually done?
    Best regards,
    Arvel

    Use a current sensing resistor and then use a current shunt amplifier.  The amplifier will amplify the voltage drop across the reistor.  From there, you can just read the output voltage with a DAQ.  Create a DAQmx scale to do the math to convert that voltage into a current reading.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Convert TV signal from digital to analogue.

    As our TV signal has now changed to digital how can I convert to an analogue signal? If I attach a free view box with an aerial output into my Touchsmart IQ722 will it work?

    Those are some good questions!  And I don't know the answers, but maybe this will help:
    http://www.ramelectronics.net/audio-video/audio-co​nverters-extenders/analog-to-digital-digital-to-an​...
    You might find some information that will help you,
    Good luck,
    GeorgeFN
    GeorgeFN
    I work on behalf of HP.

Maybe you are looking for