Analog in example

Hi, i've just started to use vb.net recently, after using labview for few years now. I was wondering if anybody had an example of an analog in logger. I have examples of analog in but no loggers. Any help greatly appreciated.
Thanks Stuart

Hi, Anuj:
Here are there questions about this example ( please see the attachment):
The program can run for several seconds. Then I get this error:
NON-FATAL RUN-TIME ERROR:
"AIAO_Sychronize.c", line 142, col 18, thread id 0x0000090C: Function WFM_DB_HalfReady: (return value == -10608 [0xffffd690]). noTransferInProgError: No transfer is in progress for the specified resource.
The program should outputs two sine waves of different frequencies to analog outputs 0 and 1. It should simultaneously synchronously reads from channels 0 and when the acquisition stops it graphs channel 0.
However, I can only see the outputs for several seconds, and then I got the error information. How does this happen?
Moreover, it is expected that the AOs w
on't actually output any points until the AI starts doing D/A conversions and so they will both start at the same time, but when I run the program the AOs output without any AI starting.
Finally, it is said that when the acquisition
stops the program should graph channel 0. How can I do this? Does that mean when I stop my snesor's working?
Thank you very much!
Marlon
Attachments:
AIAO_Sychronize.c ‏8 KB

Similar Messages

  • Looking for Analog Out example using DMA and C++; cannot find sample "GenMultVoltUpdates_SWTimed"

    Looking for example for Analog Out to multiple channels using DMA and C++.  Found reference to sample "GenMultVoltUpdates_SWTimed" which I do not have and cannot find.

    Hello Gerry,
    When you install DAQmx, there is an option to install
    support for Measurement Studio.  When you
    select this option, it will install these examples onto your hard drive.  All of the examples can be found at the
    following location: (C:\Documents and Settings\All Users\Documents\National
    Instruments\NI-DAQ\Examples\DotNET2.0\Analog Out\Generate Voltage)
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments

  • Analog out DMA performanc​e problems

    I'm working on an open-source driver for m-series and e-series boards (http://www.comedi.org). I've discoved some performance problems doing dma to analog outputs that I can't resolve. In summary, dma transfers to the analog output of a PXI-6281 in a pxi crate being controlled through a mxi-4 connection (pxi-pci8336) are VERY slow. I'm talking 250k samples/sec slow. That's the maximum speed the dma controller can fill the board's analog output fifo from host memory. I've also got an older PXI-6713 in the same crate, and dma transfers to it are about 15 times faster (about 3.5M samples/sec). I did notice that clearing the dma burst enable bit in the mite chips channel control register caused the 6713 to slow way down to something comparable to the 6281 (about 500k samples/sec). Setting or clearing the burst enable bit had no effect on the speed of the 6289. Is there some special mojo that needs to be done to enable burst transfers on the 6289? Also, even the relatively speedy 6713 does dma transfers much slower than it should, since the pxi-pci8336 advertises 80MB/sec sustained transfer rates over mxi4. Can you provide any insight into this matter? I've already looked through the ddk, and a register level document describing the mite chip, and example code which had chipobjects for the mite and an analog input example.
    By the way, dma transfers for analog input on the 6281 weren't as bad, I didn't measure the transfer time, but I was at least able to do input at 500k samples/sec without fifo overruns.
    I'll post more detailed performance measurements in a subsequent post, and include measurements for a couple other similar pci boards (a pci-6289 and pci-6711). In case you're wondering, neither of the pci boards get anywhere close to the bandwidth provided by the pci bus, but they're not as spectacularly bad as the pxi-6281.

    Here are my measurements:
    PCI-6711, tested on 1.4GHz Pentium 4:
    5.2 to 5.3 milliseconds to load fifo to half-full using dma. 0.9 to 1.0 microseconds to write to a 16-bit register. 1.9 to 2.1 microseconds to read from a 16-bit register. The mite's burst enable bit has no effect.
    PXI-6713, tested on 3.2GHz Pentium D:
    2.2 to 2.4 milliseconds to load fifo to half-full using dma. 0.5 to 0.7 microseconds to write to a 16-bit register. 5 to 7 microseconds to read from a 16-bit register. Turning off the mite's burst enable bit causes the dma fifo load time to increase to 16 to 17 milliseconds.
    PCI-6289, tested on 3GHz Pentium 4:
    2.0 to 2.2 milliseconds to load fifo to half-full using dma. 0.4 to 0.6 microseconds to write to a 16-bit register. About 1.2 microseconds to read from a 16-bit register. The mite's burst enable bit has no effect. I could do streaming analog output on 1 channel with an update rate of about 2.1MHz before the board's fifo started to underrun.
    PXI-6281, tested on 3.2GHz Pentium D:
    18 to 19 milliseconds to load fifo to half-full using dma. 0.3 to 0.4 microseconds to write to a 16-bit register. 4 to 6 microseconds to read from a 16-bit register. The mite's burst enable bit has no effect. I could do streaming analog output on 1 channel with an update rate of about 250kHz before the board's fifo started to underrun.
    Notes: the 671x boards have a 16k sample ao fifo, the 628x boards have 8k.
    The 4 to 7 microseconds times to read a register on the PXI boards seems large too, is that normal overhead for going over the mxi-4 connection?
    I wasn't doing anything else intensive on the pci bus during these tests. For what it's worth, according to pci specs the two pci boards should be able to dma their analog output fifos to half full in less than 150 microseconds.

  • How to use blutooth client in example s in 7.1

                  sir ,
                        sorry for giving invalid information regarding my problem.
             now i am  giving clearly.
                                   i am having one file consists of 3000 values(3000 samples of ecg data)
              with the sampling rate of 200 . means that samples are recorded for 15 seconds .
             with the use  of that file  i want to generate  ecg signal  continuously . i want to send the same signal
         to outside, means  connect to external circuits outside the pc. we are having labview 7.1  and daq assistant.
          i need  vi program to solve this problem using DAQ .I AM  attaching that file to message.
             waiting for reply .                     
                                                      ​                              thank you

    Hi naraiiiii,
    I'm a bit confused since the title of your post mentions the Bluetooth Client Example, but in your post you only discuss DAQ.  If you are looking to output a signal on your hardware, I would suggest look at the DAQmx Analog Output examples in the LabVIEW 7.1 Example Finder (Help>>Find Examples).  Also, there wasn't any attachment to your message.  Did you intend to post your VI?
    Best Regards,
    Megan B.
    National Instruments

  • I use a PCI MIO 16E board with an analog trigger. So I wire chann

    el 0 to the PFIO line, and I enter "PFI0"as the triggering channel on the front panel , I put a level,and I declare channel0 and 1. When I do a DAQ it seems that PFI0 detects the signal as I haven't a timeout, but it doesn't trigger off at the good level.

    el 0 to the PFIO line, and I enter "PFI0"as the triggering channel on the front panel , I put a level,and I declare channel0 and 1. When I do a DAQ it seems that PFI0 detects the signal as I haven't a timeout, but it doesn't trigger off at the good level.I noticed you posted an earlier question that generated several responses about the valid sources of an analog trigger. Was there a reason you decided to use the PFI0 option over just telling LabVIEW to use Analog channel 0 as the trigger source? At what voltage level are you wanting to trigger?
    Also, if you use the Analog Trigger examples in LabVIEW or the DAQ examples for your compiler, do you get better results?

  • Analog signal from Laser Power Meter

    Hello,
    First, I have to say that I am new using Labview.
    Probably for some of you the question I am going to ask is pretty easy, hope you guys can help me solving this.
    I am trying to acquire an analog signal from a Fieldmate Laser Power meter, the specifications from this meter are shown in the link below:
    http://www.coherent.com/downloads/FieldMateDataSheet.pdf
    I need to get the signal and save it in MS Excel files. My big issue is with the acquisition of the signal from the meter to the NI Board. I am using an NI SCB 68.
    Hope you guys can help me.
    Thanks.

    The SCB68 is just a shielded connector block, not a DAQ device.
    Use NI's MAX utility (Measurement & Automation Explorer) to find out what DAQ card you have installed in the PC.
    There are also plenty of analog acquisition examples that ship with LV, Search Examples in Help.
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • 5640R FPGA Examples: Samples missing at multiples of DMA-Size

    Hi all,
    We have started working in NI-5640R IF-RIO with Labview-2011.
    In our current setup, a 15 MHz sine wave is generated from a signal generator and it was connected with AI of 5640R.
    Then we ran the buit-in examples and recorded the data in Measurement-File (ExpressVI) in TDMD format. The output tdms file was then analyzed using SCOUT software. (see Demo_setup.png).
    After running various buit-in example we found that Driver>Stream-to-Disk example was running fine and input 15MHzCW sine wave was acquired perfectely by the 5640R card. (see Driver_Stream_to_Disk.png)
    But there seems to be an issue/bug with FPGA>5640R & FPGA>5640R Async examples. THe problem is that when we anlaze the acquired sine-wane in SCOUT software there are jumps in the singal which means that after every DMA some inbetween samples are being skipped by the Device/HOST.
    This is shown in the figures FPGA_5640R.png & FPGA_5640R_Async.png that after every DMA(5000) sine wave has jumps. 
    Afterwards we increased the DMA-size to 10000 and analyzed the captured signal again. It was observed that now the jumps in the sine-wave were visiable at 10000. (see FPGA_5640R_Async_DMA10000.png).
    Although Driver-examples are working fine but in our work we want to use 5640R FPGA.
    Can anybody explain this behaviour or what should we do to overcome this issue?
    Thanks,
        -Adeel

    Hi Chris,
    >>Did you use the Asynch Analog Input Example as it is out of the box or did you make any modifications?
       Yes i used it "as-it-is". Just added a Measurement-FIle at the I/Q output to visualize the results offline.
    >>When you are talking about changing the DMA FIFO size, are you referring to the host side or the FPGA?
         I am reffering to "DMA-Read Number-of-Elements" see image below. In examples this parameter is same as "AI-Samples-to-Acquire"
    >>From looking at the example, it looks like the host buffer is set to 1M elements, and the FPGA side to 16,383
        Yes this is correct and i didnot changed this settings
    >> Is there a chance you are changing the samples to acquire (That starts at a default of 5,000)?
         Yes by default it is 5000 and results were incorrect. Then i changed this to 10000 and 15000 and the results were same i.e. samples were skipped at multiples of this parameter (plz see my first post)
    Using hit & trial, this issue was resolved if we disconnecnt "AI-Samples-to-Acquire" control from FPGA-parameter inptu setting, then the error disapered and now every-thing is working fine.
    Thanks,
        -Adeel

  • Random errors using SCXI analog input on SCXI1100

    This system is using a AT-MIO16E card and labview. I am performing single channel analog scans using the NI SCXI analog input example, modified to use the RMS and extract frequency examples. During static testing (ANy one input), the readings are fine. In one frame, the 1125 is polled 4x, and the 1100 is polled once. The scan for the 1100 module does an RMS and frequency extraction. In this frame, the result from the frequency is NAN and the RMS is 0 about 50% of the time. Individually, the modules acquire the data flawlessly (1 volt, 49.5kHz). The 1100 is is passed scan rate, buffers, scans. The signal acquired is a 50kHz square wave. I've tried scan rates from 150 to 250k. Any ideas on what could be causing this?

    Hello;
    It's hard to tell what might be happening without seeing the code, but the best way to test that out is to acquire the data without applying the RMS functionality, and double check if the data is the expected.
    If it is, then the problem is inside the RMS function. I'm sorry I couldn't give you a definite answer, but at this point the problem might be anywhere in the code, and we probably need to narrow the possibilities down.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • FAX Analog line for the Router

    Hi NetPro.
    May i know that if i have 22 numbers of FAX Analog lines which i module should i add on into the router ? and how many ports which can fullfill the 22 lines of FAX Analog lines.
    example : EVM-HD-8FXS/DID ... etc
    Thanks
    Regards,
    Kitten

    Are you connecting 22 analog faxes (FXS), or are you connected to 22 analog POTS lines (FXO)?
    EVM can only do 16 max FXS or 8 max FXS + 6 max FXO.
    which router do you have?
    If FXS, consider getting 24 port VG224 http://www.cisco.com/en/US/prod/collateral/voicesw/ps6790/gatecont/ps2250/ps5516/product_data_sheet09186a00801d87f6.html

  • Event counter using USB-6210 analog

    Hi,
    Any suggestions or directions where to look to generate a VI that would record event from a magnetic counter of a mouse wheel. I would like to record up to 16 wheels using the USB-6210 device. Thanks!
    VO2max

    Thanks for the extra information.
    The 6210 actually has two counters, so you could count the edges (on two of the wheels) if the signals are TTL compatible.  You can use the Count Digital Events.vi example to help you get started.  From LabVIEW, it can be found at:
    Help » Find Examples... » Hardware Input and Output » DAQmx » Counter Measurements » Count Digital Events
    If your signals are TTL compatible, I would highly recommend purchasing a PCI-6602 and using this method for all 8 channels.  You could modify the example code by increasing the delay (software-timed sample rate) to a larger value (say 1 minute), and logging the results to a file as you run.  Doing this would log the value of the event counter every minute, and would keep the file size relatively small (about 15kB if you run for 8 hours).
    If you must use a single 6210 and require all 8 channels, the only option would be to use continuous analog inputs.  You would have to sample at a high enough rate to not skip the pulses (I am not sure what that is without knowing more about the signal), and then process the digitized signal in software to determine the information that you need.  I would use the Producer/Consumer design template in conjunction with a continuous analog input example to get started.  In the consumer loop, you would have to implement the functionality of the counter in software.
    Using a hardware counter would be preferrable to using analog inputs.  The counter is made for exactly this type of task, and implementing it in software can be complicated as well as processor intensive.  If you have any questions let me know, I'm happy to help you out.  You can always try out the counter task on the 6210 for two wheels to see how it will work before deciding whether or not to purchase a new board.
    -John 
    P.S. After your first post I had assumed that you were testing computer peripherals, but it looks like you actually have eight rodents.  We had a good laugh over here over my confusion.
    John Passiak

  • Visual basic 6.0 source code for reading DAQ 6015 USB

    I am doing a specific software in Visual Basic 6.0 to measure some characteristics of a filter.
    To do that I use a NI DAQ 6015 for USB; I need to drive a pressure controller by an analogic output with an increasing (step by step) tension DC.
    Can anyone give me the source code to do this.
    It seems that I have another problem : the sensors give me a right tension DC, but after the MAX software gives me always +10 Volts : is it a malfunction of the card or of the software; in this last case, can anyone give me the good code.
    Thanks a lot.

    Hello!
    Visual Basic 6.0 is now supported by NI-DAQmx 7.5, so you can directly use the NI-DAQmx drivers to use your DAQPad-6015.
    You can find an analog output example in the following folder "C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Analog Out\Generate Voltage\Cont Gen Volt Wfm-Int Clk". This will show you how to generate a continuous waveform.
    Concerning the voltage that is at 10 volts, it looks like you misconfigure the external connection. You should take a look at the NI-DAQmx help file in the section "Measurement Fundamentals >> Signals >> Analog >> Connecting Analog Input Signals" to check that you use the correct configuration.
    Best regards!

  • How to do multi-buffered acquisition on NI-6115

    I need to acquire multiple sequential arrays of data over a single channel using an external clock and a digital trigger (~1000 arrays total, 1000 samples/trigger, external clock frequency 500kHz, trigger frequency 250Hz). It is important that the sampling start right after every trigger, and that I do not miss any triggers. I can already do this using simple buffered acquisition with the ai start and ai read vis in a loop, except it misses triggers while the loop re-starts. Is there any way I can define a buffer large enough to hold all of the samples I need, then to have it read only the number of samples I want after each trigger into this large buffer? I don't need to see the data until the whole acquisition (1000 x 10
    00 samples/trigger) is over. Is this what multi-buffered acquisition does? I cannot find any literature on the NI site related to multi-buffered acquisition. Thanks for any help.

    So every 4 msec you get a trigger signal that should initiate a 2 msec acquisition (1000 samples at 500 kHz sampling rate)?
    There's an example of a way to use your board's counters to support retriggered analog acquisition here on the NI site: Retriggered Analog Input Example. The code may look a little complicated, but the basic idea is described pretty well.
    The goal is to make sure the timing is handled in hardware so you don't miss triggers while doing the software reprogramming. AI Start would be called only one time prior to your loop, and only AI Read would be calle
    d inside the loop.
    Just be careful about your timestamp info. The analog acq. task won't have any "awareness" of time intervals between samples. It'll be up to you to slice up the data into appropriate chunks. You can probably do this by simply requesting the right number (1000) from AI Read.
    Good luck,
    -Kevin P.

  • Error FFFFFFFE: FPGA Signature doesn't match

    Hi,
    I am using 5640R. When I tried to run the "ni5640R Analog Input" example, the first time would be okay, but the next time will fail with an error FFFFFFFE. The source is "private_5640_signature Register Verify.vi" and the message is "FPGA Signature doesn't match". What can I do to eliminate this error?
    Thanks very much!
    Best Regards,
    Tim Kuo

    hello Sir,
    I want to Generate the Single Side bands (LSB,USB). I got the Am Modulation output but failed in to get side bands.
    I am using PCI 5640R card, i have to check these signals on external oscillsocope.
    please guide me to get these signals.
    Thanks.

  • How do I get the 1121 card to read the switch and make it a 1 or 0 to count pulses?

    Hello,
    I am developing a test stand to test tires. We have LabView 7.1 and the SCXI chassis with an 1121 transducer card. I am trying to count the rate and total number of revolutions made by the tire. The signal is acquired from a 12V-proximity switch that is actuated once per RPM. The tire turns at 1,000 RPM or a little more.
    The signal will have to go through a 100-foot cable to get to the LabView chassis, will this be a problem?
    How do I get the 1121 card to read the switch and make it a 1 or 0 to count pulses?
    Will LabView be able to read this many pulses per second?
    How do I get MPH and a RPM reading out of it?
    Thank you,
    James Happe

    Hi James,
    Since you are cabling your DAQ board to an SCXI chassis with an 1121, you will not be able to use your counters without additional hardware.
    The 1121 is an analog input signal conditioning module. It performs filtering and attenuation to help measure analog signals. What it does not have is access to your board's counter pins.
    In order to use your counter pins you will need to get the necessary hardware. You have two options:
    1) Buy and SCB-68. This is a breakout box that will cable directly to your DAQ board replacing your SCXI chassis. You can connect your signals directly to your counter with this. However, I would advise against this because your application has a 12 volt signal. This will overload the 5v maximum voltage for your counter pins.
    2) Buy a 1180 feedthrough panel. This will allow you to use all of your DAQ board's functions with the SCXI chassis. Withouth the 1180 feedthrough panel, the SCXI-1121 is the only thing connected to your DAQ board. Since the 1121 only performs conditioning on the analog inputs, that is all you can access. The other pins cannot be used (no access). With the 1180 feedthrough panel, you can put a connector block on and access all of your other pins (including the counter pins). Again, I would advise against this since your 12 volt signal will overload your counter pins.
    My suggestion would be to perform an analog input task. Set up your 1121 in MAX and use a LabVIEW shipping example. In the shipping example select an analog input channel from your SCXI-1121 module. Set the appropriate voltage range and take some measurements. Once your signal is connected and you can read it using an analog input example you are half way there.
    Take the analog input shipping example and modify it to perform frequency analysis on the voltage readings. You can simply wire the data from the DAQmxRead VI into one of the frequency analysis VI's (noted in my first post). The output if that VI will give you the frequency of your signal.
    -Sal

  • How to programmatically change the feedback device??

    Hello,
    We are using the NI UMI7774, together with a Servo-drive for a linear actuator. In our application, we must first go to a certain position, then maintain a certain force for while, then go back to a certain position....
    For the position control we have mapped the actuator's encoder as the feedback device in MAX - and it works well. For the force control part, we want do use the "Force control using analog feedback"-method (see NI-Motion manual, chapter 13). For this, the force sensor needs to be mapped as the feedback device...
    (1) The question is, HOW can we make this mapping programmatically in our application source code???...is there a method "setFeedbackDevice()" or something??
    (2) Is it likely that we have to have 2 PID-settings (one for the position control part and one for the force control part) and if yes, how can we load the PID parameters programmatically, without opening MAX??
     (3) In the mean time, we have experimented a bit: Using MAX and the encoder as the feedback device, we have positioned the actuator to a certain point. Then we mapped the Force sensor as the feedback device in MAX and pressed Save. However, when we run the force-control-using-analog-feedback example, it didnt work. It still used the encoder as the feedback and hence just moved to a certain position.....We then did another try, where we set the force sensor as the feedback device in MAX, pressed SAVE and pressed INITIALISE.....the actuator subsequently started rattling, without us issueing another move command??.....does anybody know, what this could mean and what we should do????......
    THANKS a LOT FOR ANY ANSWER AND YOUR EFFORTS.......
    p.s. We know that there is also the option of "Force Control using Monitoring Force", but after some discussion on here, it appears that the Analog Feedback-method seems to give better force control results in our application....

    Hi janClose,
    You can change the feedback programmatically by using flex_config_axis(). The axis needs to be stopped when you call this function.
    The control behavior differs significantly when you change the feedback resource, so yes, you will have to tune your axes for both feedback modes seperately. You can change the PID parameters by using flex_load_pid_parameters(). Please note, that you can define two sets of PID parameters and you can switch between these two sets by calling flex_load_single_pid_parameter().
    The last paragraph in the online help for flex_load_pid_parameters() discusses this feature.
    Parameter changes in MAX are not applied before you reinitialize the board, so if you just save the changes the board's operation mode is not affected. The reason why the motor starts rattling when you initialize it, is due to the fact that you are still using the position control PID parameters, which are typically not valid after changing to force control.
    I hope that helps,
    Jochen

Maybe you are looking for