Display of Acquisition sample done with a USB-4431

Tried a bunch of examples, code the DAQ Assistant, mega-search time. At the end of the road. It's about my first traditional appointment to programming DAQmx after years of programming DAQ followed a long hiatus.

I use a hammer strength IEPE hit to begin sampling of a USB-4431. I'll be post-processing fft; I want ten seconds of data to 4096 samples per second (40960 samples).

As I am acquiring data, I want to update a chart to display the contents of the buffer, adding data to the chart every 125 mS up to what the end of the second 10 captures.  Relaxation, start sampling data and acquisition works very well. The problem becomes it to the chart control.

The graph is updated in spurts and incompatible adjustments. The second set of 10 shot finally makes the curve, but it takes anywhere from 30 to 120 seconds to display, sometimes in quick "pieces" with long breaks. Sometimes the initial trigger data gets poster immediately, and it takes sometimes 15 seconds just to display the first 512 samples!

I obviously had something fundamentally wrong here.  Could someone please have a look at the code below to me. TIA ~!

void main (void)
{
X_AxisIndex = 0;
NumDataPoints = 512; A sample rate of 4096 samples/second, trying to update the chart each 125 milliseconds.

CreateDaqTask();
DAQmxStartTask (taskHandle);
RunUserInterface();

} / / Hand

Sub CreateDaqTask (void)
{
It all works very well as far as I KNOW *.
DAQmxCreateTask("",&taskHandle);
DAQmxCreateAIForceIEPEChan (taskHandle, ' Dev1/ai0', 'Hammer', DAQmx_Val_PseudoDiff,-10, 100, DAQmx_Val_Pounds, 50.0, DAQmx_Val_mVoltsPerPound, DAQmx_Val_Internal, 0,0021, NULL);
DAQmxSetChanAttribute (taskHandle, 'Hammer', DAQmx_AI_Coupling, DAQmx_Val_AC);
DAQmxCfgSampClkTiming (taskHandle, "OnboardClock", 4096, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 40960); Take 10 seconds of a data value to 4096 samples per second.
DAQmxCfgAnlgEdgeStartTrig (taskHandle, 'Hammer', DAQmx_Val_RisingSlope, TriggerLevel);
It all works very well as far as I KNOW *.

The idea here is to launch a reminder all the 512 samples/4096 samples per second = 125 mS so I can view the data in a chart control, update all the 1/8th of a second.
DAQmxRegisterEveryNSamplesEvent (taskHandle, DAQmx_Val_Acquired_Into_Buffer, NumDataPoints, 0, EveryNCallback, NULL);

} / / CreateDaqTask

Int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData)
{
Read the data of 512 points and display them.
DAQmxReadAnalogF64 (taskHandle, NumDataPoints, 15.0, DAQmx_Val_GroupByChannel, buffer, NumDataPoints, & CurrentBufferIndex, NULL);
PlotWaveform (main, Main_Graph, buffer, NumDataPoints, VAL_DOUBLE, 1.0, 0.0, X_AxisIndex, 1.0, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, VAL_YELLOW);

X_AxisIndex += NumDataPoints;

return 0;
} / / EveryNCallback

Thank you, WW, I'll give that a try.

> For input analog, the USB-4431 has a size of 1 023 sample buffer, and it is shared by all channels. .

Can you tell me where you found this information please? I looked and looked, obviously in the wrong place.

Also, I discovered that if I move the mouse quickly as he tries to redraw the graph, it draws a lot more systematically and quickly, but still not in real time.

UPDATE: I got SetSleepPolicy (VAL_SLEEP_NONE); active.

I thought it was to prevent Windows events interfere with the events of data acquisition. Seems to have the opposite effect here. I turned it off, works great now.

Tags: NI Software

Similar Questions

  • Acquisition of images with 3 USB cameras causing too many uses of the memory/cpu

    Dear experts,

    I'm trying to capture images with 3 cameras USB, located in 3 different positions. I have to initialize each cameras using USB list vi camera when switching between cameras. I realize that, by making this method causing too many uses of the memory/cpu and can cause CPU hang up. If I stop the program, the memory/cpu counter are down.

    Do you know how to reduce this problem.

    Thank you

    Hart


  • Displays a text ("sample application") Logo and Description ("this is a sample application") with different font size

    Hello


    I use the universal theme of apex 5.0 and tries to display logo text ("sample application") and description ("This is a sample application") with different font size.


    Type of logo - text

    Logo - sample application - this is a sample application.

    I want to display the description in the smallest font size, so I changed the Logo below

    Logo - < span style = "" are-size: 3.8 rem; ' > Sample App </span > - < span style = "" Dimensions are: 1.8 rem; "> this is a sample application </span >" "

    But I have following problem.

    1 - the font size for both is the same (why the size is not different?, because I gave the size of different font within the span tag)

    2 - the text of the whole logo whose description is displayed twice.

    -Once in place of the actual logo and

    -the second on the left upper tree navigation. (just below the text of the actual logo)

    I tried to use the logo attribute, but what makes the whole logo & its description with the same size. I need size of different font for both, so it is unusable.

    Attribute logo - style = "" are-size: 3.8 rem; ""

    Really appreaciate help.

    Thank you

    Deepak

    DeepakJ wrote:

    I use the universal theme of apex 5.0 and tries to display the text of the logo ("sample application") and description ("this is a sample application") with different font size.


    Type of logo - text

    Logo - sample application - this is a sample application.

    I want to display the description in the smallest font size, so I changed the Logo below

    Logo - application example - This is an example of application.

    But I have following problem.

    1 - the font size for both is the same (why the size is not different?, because I gave the size of different font within the span tag)

    Cannot reproduce. Using the code above results in different format text as expected. (He looks terrible IMO)

    2 - the text of the whole logo whose description is displayed twice.

    -Once in place of the actual logo and

    -the second on the left upper tree navigation. (just below the text of the actual logo)

    Including HTML tags in text in the 5.0/theme 42 APEX logos results in this behavior. I consider this as a bug as (a) it says nowhere that it is not possible to do so; (b) the text of the logo is not HTML - or attribute-escaped when used in the page.

    See How to avoid to show the logo on the navigation bar to get an explanation of the underlying cause and a workaround to allow the common use cases include the text and a picture in the logo. This particular solution is of no use here. The solution to this problem requires a custom with the theme the theme roller style sheet, which is the preferred way and support to customize and extend the universal theme.

    • Click the Thème Roller on the developer toolbar.
    • Expand the CSS custom section.
    • Add this style custom rule:
    .t-Header-logo a span {
      font-size: 3.8rem;
    }
    .t-Header-logo a span:after {
      font-size: 1.8rem;
      content: " - This is a sample application.";
    }
    
    • The page will automatically preview changes.
    • Click on record under and type a name for the style of custom theme.
    • Topic close Roller
    • I hope that decide that it is not a good idea and cancel the mods.
  • I bought a sony vgnfz240e made a restore disk that day until something was done with my laptop. It displays errors and now I os__

    I bought a sony vgnfz240e made a restore disk that day until something was done with my laptop.  A little later, they had me try to restore and it did not work said there was something wrong with my hardware. I'm finally back and at that time there there is no notes on the book of sony that I needed to make new disks but I asked the technicians of the company if I were to make a new.  Says no, and now that I went to reset my computer to factory settings it is errors on the disk and is not a corrupt disk either.  I show no operating system, but they say that there is a way.  I need help.  I have vista home Premium can someone help me please.

    http://eSupport.Sony.com/

    Here are the General information relating to the recovery.

    Contact Sony for the exact details.

    How to get Vista recovery Media or the Vista recovery Partition on your computer back to factory settings.

    There is no Vista free download legal available.

    Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.

    Normally, they do this for a cost of $ small.

    In addition, ask them if you have a recovery Partition on your computer/laptop to restore it to factory settings.

    See if a manual provided with the computer or go to the manufacturer's website, email or you can call for information on how to make a recovery.

    Normally, you have to press F10 or F11 at startup to start the recovery process...

    Another way I've seen on some models is press F8 and go to a list of startup options, and launch a recovery of standards of plant with it, by selecting the repair option.

    Also ask them if it is possible to do the recovery disk/s for the recovery Partition in case of a system Crash or hard drive failure.

    They will tell you how to do this.

    Every computer manufacturer has their own way of making recovery disk/s.

    Or borrow a good Microsoft Vista DVD (not Dell, HP, etc).
    A good Vista DVD contains all versions of Vista.
    The product key determines which version of Vista is installed.

    There are 2 disks of Vista: one for 32-bit operating system, and one for 64-bit operating system.

    If install a cleaning is required with a good DVD of Vista (not HP, Dell recovery disks):

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu

    http://support.Microsoft.com/default.aspx/KB/918884

    MS advice on the conduct of clean install.

    http://www.theeldergeekvista.com/vista_clean_installation.htm

    A tutorial on the use of a clean install

    http://www.winsupersite.com/showcase/winvista_install_03.asp

    Super Guide Windows Vista Installation

    After installation > go to the website of the manufacturer of your computer/notebook > drivers and downloads Section > key in your model number > get latest Vista drivers for it > download/install them.

    Save all data, because it will be lost during a clean installation.

    See you soon.

    Mick Murphy - Microsoft partner

  • -error message 200284 when calling DAQmxReadAnalogF64() with a USB-6210

    I have tried the code a CVI application to communicate with a USB-6210. I want to start the acquisition to gain 30 samples and then collect them. My problem is when I call the DAQmxReadAnalogF64() function, I get this message error of-200284. The error message means that the data has not yet been acquired in a nut shell. He said I should do to ensure that my startup trigger is configured correctly. I tried to use the internal clock to start the acquisition. I tell myself that I have not configured something correctly.

    In the DAQmxCfgSampClkTiming() function, I set the sampleMode to DAQmx_Val_FiniteSamps I thought I would collect 30 samples (number_of_scans = 30) when I called DAQmxStartTask(). It does not work. When I put sampleMode to DAQmx_Val_ContSamps I can collect data. Here is a stripped down most of my code:

    returnAcq = DAQmxCreateTask ("myAcqTask", & acq_taskHandle);
    returnAcq = DAQmxCreateAIVoltageChan (acq_taskHandle, physicalChannel, "acq_channel", DAQmx_Val_Diff, minVal, maxVal, DAQmx_Val_Volts, "");

    returnAcq is DAQmxCfgSampClkTiming (acq_taskHandle, "OnboardClock", sweepsInterval, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, number_of_scans);.
    returnAcq = DAQmxStartTask (acq_taskHandle);
    returnAcq = DAQmxReadAnalogF64 (acq_taskHandle,-1, 5, DAQmx_Val_GroupByChannel, Data_readings, number_of_scans, & read, 0);
    Disable the task
    DAQmxClearTask (acq_taskHandle);

    I guess my question is: am I set up so that the internal clock will begin the acquisition when I call DAQmxStartTask()? I thought when I put the second parameter in DAQmxCfgSampClkTiming() to 'OnboardClock', this would use the internal clock.

    Thanks in advance for your help,

    Don Pearce

    Don,

    You're right, your task is configured to use a sample clock internal with a trigger for starting the software.  The description of the error pointed out several reasons why people might see this error.  What is the value of 'sweepsInterval '?  I think that as configured DAQmx should be pointing at the speed (in Hz) specified by sweepsInterval.  By the way-1 in the entrance to numSampsPerChan, I think DAQmx will try to read all samples for a finite acquisition (30 in your case).  If you run below 6 Hz, the lira could be the time-out period before these data were available.

    When it is configured as a continuous, what are the values is passed in the sampsPerChanRead parameter?

    Dan

  • OfficeJet 4630:4630 will not work with the USB on my Mac air

    I connect my printer to my Mac with a USB cable and the printer is displayed with a yellow mark and "strive" on my computer. When I try to scan something, the printer says I'm not connected to the internet. So I opened the printer Web page and there was nothing I could do, except for the page just telling me there was a mistake with an internet connection.

    Hi @jiabeixi987

    I don't know what causes this yellow exclamation or has no analysis, but I would be happy to help you.

    We will reset the printing system, repair disk permissions, add the printer using the driver and try to start a new search.

    Reset the printing system

    1. Click on the Apple icon ( ), then click on System Preferences.
  • How to call the samples shipped with JDE

    Hello

    I'm new to the BlackBerry development. I downloaded and installed JDE 4.7 which contained similators 9530 and 9500. JDE and Load Simulator fine on my windows XP machine. I use JDK 1.5. I had a few teething problems if anyone can help it will be great.

    It's strange that this simulator does not load if the java environment variables (JAVA_HOME, CLASSPATH and path to the location of the binary java) are defined in the windows environment. It loads well if the environment does not contain these variables. I worked around this by setting the variables in the environment and using a jdkenv.bat file if necessary.

    When I run ide.bat (for JDE) he lookes for javaw.exe in the path which make sure by running jdkEnv.bat before ide.bat. So my JDE also charge very well. I did a generation of samples shipped with JDE he built successfully. So far so good.

    Problem:

    When I try to run the samples, it loads the Simulator fine. I also see the name of the sample applications, if I followed the following phone Simulator {options} USER interface-Advanced Options-Applications online online I can see the names of all listed here demo. But I don't see any UI on the Phone Simulator that I can use to invoke these demonstrations of?

    I tried an explicit charge of the demo by file-> load Java program, it displays an hourglass and returns me to the phone home screen. It also updates the date and time of the application above mentioned location to the new location. But I'm still not a UI element user where I can call it in the demo.

    How to call HelloWorld or PhoneApiLog demo of the Simulator.

    I'm new to the development of BB and I'm sorry if I'm missing something simple. But indications will be useful.

    Concerning

    asachdeva.

    Discovered samples at-online downloads.

    Thanks for taking a peek.

  • X 201 tablet will not lock, restart, sleep, closing or display UAC/consent UI after plugging in USB

    I have a X 201 Tablet (3113-W4M) comes preloaded with Windows XP SP3.  I amazed image XP and reloaded with Windows 7 Enterprise and got all the drivers for Windows 7 from the Lenovo Web site.

    The problem is that when the system resumes from standby or hibernation * and * I plug in a USB mouse or a USB keyboard/mouse combo, I manage not to lock, shutdown, restart or Hibernate the system.  In addition, something that called UAC is unable to display.  If I look at the process in the Task Manager, I see where consent.exe is running (called when a guest of UAC approval needs to be displayed).  Sometimes it runs several times corresponding to several events that should have displayed the prompt (e.g. running RegEdit).  Disable UAC is a workaround for this problem but does not address the root cause, and does not address the issue of the stop/lock/etc.

    After that extended troubleshooting which included 2 full OS reboot, trace log and deep customer processes, I reduced my question to the following steps:

    (1) boot with no USB Tablet mouse and/or keyboard attached

    (2) attach USB mouse and/or keyboard

    > Tries to lock the workstation and run Regedit, both work as expected.

    (3) Hibernate tablet (USB mouse and/or keyboard are connected)

    (4) out of the hibernation (USB mouse and/or keyboard are connected)

    > Try to lock the workstation and run Regedit, these two don't

    I discovered what I spend my working system (Logitech S510 keyboard/mouse combo) at home (Logitech LX 310 mouse).  I have all the updates of course Windows 7 and I installed the latest Logitech Setpoint.  The problem has occurred before and after the installation of the setpoint software.

    Curiously, I can reboot the system via command line using 'shutdown - r' but it takes 4 to 5 minutes as opposed to the less than a minute when it does occur.

    Thanks in advance to the community.

    Joel

    Try the fix for Microsoft suggested in this thread, so far it works for me:

    http://Forum.Lenovo.com/T5/X-series-Tablet-ThinkPad-Laptops/X200-Tablet-Win7-black-screen-freeze-on-...

  • 3.0 compatible with the USB 2.0 computer USB Ext drive?

    I have been using an external drive G-Tech USB (2.0) with my old computer

    which is also USB 2.0. New as 3.0 USB drives, I would like to know

    If a new USB key which is 3.0 will be compatible. The current drive works fine

    but I want to get a second as a backup. I thought about buying a used 2.0 drive but

    I prefer to get a new. I don't mind if the 3.0 is a little slow with my USB 2.0 as

    as long as it works.

    Yes.

    (142727)

  • MCE only receive digital signals with Toshiba USB hybrid TV

    Hi, I have a problem with the USB hybrid TV, I want to use with Windows Media Center, it works fine, but I can see only digital Tv, no cable Tv. If I use the software provided with TV usb I can see digital cable and cable, but with Windows Media Center only digital television.

    Can someone help me please?

    Thank you!

    Luca

    Hello Luca

    Please don't be crazy about me, but you have to understand that maybe it's not possible to use the material in any desired combination. This product is designed for all the cell phones (not only for units with WMCE. Because of this manufacturer is it comes with own software.

    As you can see, it also works with WMCE and also digital. In my opinion it's the big thing. By the Way: AFAIK WMCE supports analog and digital TV by use of the antenna). Try Please also check some support WMCE or even forum WMCE site.

  • El Capitan upgrade must be done with a clean install?

    Hello

    El Capitan upgrade should be done with a clean installation, as opposed to an upgrade?

    I don't know how to do this, or what are the advantages and disadvantages?

    This means all the software on my computer is deleted and I need to re - install all the applications (if installing a clean)?   I think not so thought I had better ask!

    Best regards

    Mike

    If you have existing question in your system current, then things could get worse if you upgrade simply. My personal choice is always do a clean install of newest version of Mac OS X.

    How to perform a clean install of OS X El Capitan on your Mac.

    How to prepare your Mac OS X 10.11 "El Capitan."

    OS X El Capitan-download and Quick Installation Guide

    Make your own installer from El Capitan flash drive using the El Capitan tool:

    Be sure to save the installer in the downloads before installation folder, otherwise it will be deleted once the installation is complete.

    You can create an installer of flash of El Capitan via the Terminal drive. El Capitan has its own manufacturer Installer integrated that you use via the Terminal:

    You'll need a freshly partitioned and formatted at least 8GBs. USB flash drive leave the name of the flash drive on the system by default, "Untitled." Do not change this name. Wait as the full process that will take some time.

    Open the Terminal in the Utilities folder. Copy and paste the following line in its entirety in the Terminal window.

    sudo/Applications/Install\ OS\ El\ Capitan.app/Contents/Resources/createinstallmedia--volume/Volumes/Untitled--applicationpath X\ "/ Applications/install OS X El Capitan.app.

    Press RETURN, enter the admin password (will not resonate to the window) then press RETURN again.

    You must have setup in your Applications folder or change the paths in the command line above.

  • Cannot use the NOR-IMAQdx with 3 USB camera driver

    I have a system WIN7 64-bit I would use with two USB 3 Vision cameras (both are 24UJ003 from The Imaging Source DFK), which works very well with the software IC software. The camera can be opened with IC software but will be visible only with a cadence of 1fps, any size I put it.

    I can open them able and Automation Explorer, but they do not appear under NOR-IMAQdx in the tree.  When I click on the software in MAX tree below, NOR-IMAQdx revealed as being installed (14.5). The camera (and OR) instructions say change the camera driver to that found in C:\Program NIUninstaller Instruments\NI - IMAQdx\Staging\NI USB3 Vision, but my driver is located in C:\Program Files (x 86) \National Instruments\NI - IMAQdx\Staging\NI USB3 Vision.

    Attempts to install the driver displays the following message is displayed:

    "The folder you specified contains a compatible software driver for your device.  If the folder contains a driver, make sure that it is designed to work with Windows for x 64 systems".

    This makes it sound like the driver is in the wrong place or it does not for a 64 bit OS.  Any advice on how to switch them TIS drivers to drivers OR-IMAQdx and also how increase the pace of the second camera would be very much appreciated.

    I tried to connect the cameras individually, and they both have the same performance as when they are connected together (we have good pace, and the other has only 1 fps).

    Are you sure that the camera is Vision compatible USB3? Nothing that I do not see in the marketing material says it is compatible. Is it possible you need a firmware update to make it compatible?

    The installer put IMAQdx driver in the space provided for an x 64 system and he always puts the number of correct bits of the driver down to the system that you have installed. My hunch is that the camera is not to expose a USB3 Vision interface for the driver to bind.

  • PWM with NOR-USB 94xx?

    Hello everyone,

    already, I asked once about the creation of PWM with hardware. And I was pleased with the response. But now I found 94xx Series-USB OR hardware. Here are the materials of high-voltage-Digital i/o. If any of you have already met with this one, would like to hear your conclusion about them. Would also appreciate if you could answer my question:
    Is it possible to create a PWM Signal with NOR-USB 94xx?

    Thank you

    Grigory

    Grekov wrote:

    I'd be more interested in the USB Module NI 9472 USB connection. Because it's the only one that would match my request.

    What is your application?

    Why don't choose you something in this list.

    If your condition is out to say 24 v PWM signal... you can also plan to use a custom circuit intermediate, not only to scale the output signal of the device (at 24 v) but also the reader following circuit.

  • Agilent E3640A PSU with GPIB-USB-HS

    Hello all, I created an Agilent E3640A power control software standard interface GPIB. It works very well. Now, I want to replace the standard GPIB interface (with GPIB card) with GPIB-USB-HS adapter cable, so that I can send commands via USB connection, eliminating the need for GPIB card. How can I use my existing application to work with GPIB-USB-HS adapter cable? Is this a change? or I completely rewrite the code, and if so, are the drivers available for GPIB-USB-HS adapter cable? Thanks Jeet

    More information please.

    Have you removed the PCI interface before you try the USB interface? If this is not the case, your program may still try to access the E3640A on the PCI card.

    What is the USB HS recognized in Explorer measurement and automation as GPIB0?

    The E3640A knows if scan you for Instruments to MAX?

    What (number) error is raised during the execution of your program with USB HS?

    It would also help if you could show us NI SPY logs saved when executing your program with PCI and USB-Interface Card

    Usually you don't need to install different drivers, because the package NOR-488. 2 installs drivers for all variants of the NI GPIB hardware.

  • HP 15.6 black liquor "-r131wm: im having truble with my usb drivers"

    Im having some trouble with my USB ports both 3.0 and the other usb port two 2.0 do not respond they give a signal of power because they can charge my phone but the OS which I down graded to win. 7 NPT back usb ports that I watched usb drivers and he scored as drivers uninstalled, I ran windows update but that was no good please help I need to get the work done but with output usb port no need im thak you in advance

    Hello:

    Use the W7 x 64 drivers for the HP 250 G2 except the BIOS and firmware files.

    http://h20564.www2.HP.com/hpsc/SWD/public/readIndex?sp4ts.Oid=5449369&swLangOid=8&swEnvOid=4059

Maybe you are looking for

  • HP notebook 15 f009wm

    my laptop has better performance if I add memory and I can do myself?  Is there a place to find what to buy and instructions for me to do it myself.

  • Creating a DVD from HP restore Partition of hard disk

    OK, let's go.  We have three computers in this House.   One is an HP 2004 775th with XP that was suggested be sent to pasture.   I agree to this.  My other computer is a HP Pavilion p6750f with Win 7 Home 2011.  Large computer and has no problem.  I

  • How to install two screens-

    -HP pavilion h8xt, two monitors acer (w. both vga and dvi and also a socket dvi to Add ' l on the graphics card.) Monitors came with a double over dvi cord. Can I plug a monitor into the graphics card dvi connector and the other monitor into the othe

  • Power slave Flash

    I just got my Canon Rebel T5 D1200, it came with a flash Vivitar VIV-SF-3000. When I try to use it, it does not work, I tried all modes (normal / slave) also when I push the test button, it isn't right now, Flash sometimmes it takes a few times by pr

  • HP Solution Center does not work and I can't download it despite many trials

    my hp Solution Center does not work, I can not scan and I have tried several times to download a driver but it will not work.  I have a very frustrated by this and need someone to fix it please