A run-time-error, how to fix

"I write a function to return a pointer of type float64 and assign the pointer to my defined Pionter 'newdata' in my StartCallBack, there is no error, but when I USE"

DAQmxWriteAnalogF64 (gtaskhandle0, leng [0])<=leng[1]?2*leng[0]:2*leng[1], 0,="" 10.0,="" daqmx_val_groupbyscannumber,="" newdata,="" &written,="">

I receive a run-time-error like this: "work.c", line 231, col 121, id thread 0x00007FB4: Array too small argument (40000000 bytes).  Argument must contain at least 80000000 bytes (10000000 items). Why does this happen?

My part code:

DAQmxCreateTask ("", & gtaskhandle0 ");
DAQmxCreateAOVoltageChan (gtaskhandle0, ' Dev1 / ao0:1 ', ' ',-10,0, 10.0, DAQmx_Val_Volts, "");
DAQmxSetTimingAttribute (gtaskhandle0, DAQmx_SampClk_Rate, 1000/looptime);
DAQmxWriteAnalogF64 (gtaskhandle0, leng [0])<=leng[1]?2*leng[0]:2*leng[1], 0,="" 10.0,="" daqmx_val_groupbychannel,="" newdata,="" &written,="">
SetCtrlAttribute (panelHandle, PANEL_REALWRITE, ATTR_CTRL_VAL, (double) written);
DAQmxStartTask (gtaskhandle0);


From the code, we cannot see how many samples do you expect to write but there are two aspects to consider.

DAQmxWriteAnalogF64 expects to receive the number of samples per channel to write; in other words, your "2 *" in the function call is probably wrong. See here for the function. This can cause the error you receive, because the length of the array does not match the settings (you probably want to write 5 million samples per channel).

Second aspect, it seems to me that your function is the production of the final table with samples interleaved (i.e. array1 [0], array2 [0], array array1 [1], array2 [1]... [n-1] array1, array2 [n-1]). If this is true, you must pass the DAQmx_Val_GroupByScanNumber in the function call.

Tags: NI Software

Similar Questions

  • QML no compilation errors, but a run-time error, how to debug?

    Code QML without compiling error, but not show debug in C++ code show that qml-> hasErrors() took, but the I don't know what error cause of line. any ideas? I am looking for debug QML, but it seems only break in javascript, don't create not procedure.

    Momentics you need to open a "QNX Outlook Information System" [window-> open point of view]

    Right-click on the target and select "start SSH session".

    In this SSH session, after logging in, type ' slog2info w | grep ' 9000' '

    Look for a message on the QML problem.

  • How can I get rid of the message "Run Time Error" in Windows XR home when I open my computer?

    When I opened my computer I get the error message "run time error. Your computer wants to close in an unusual way. I clicked and after it appears once again twice more, and I click it every time, he goes and I can use the OK computer.

    With the utility 'disk cleanup', & defrag, within a normal time, try

    R.clicking my computer, properties, advanced, performance, file, change

    button with selected C:, the value to "let the system manage", click on set 2 X, close, restart


  • How to respond to a thread in the section (read-only)? R6025 run-time error

    Hello community of adobe photoshop

    I have a solution to an unanswered question in one of the Photoshop (ready Only) article.


    any way I could drop off my answer in here?

    Re: Photoshop CS5 MS Visual C ++ R6025 run-time error

    in any case, I met the same problem.

    in my case, the error occurs when I use the copy and paste the shortcut (ctrl + x / c and ctrl + v)

    because of the jdownloader app that detects copy info and causing the crash

    Disabling the links copy jdownloader solved the runtime error detection function.

    If it does not work. then this is probably a different problem.

    in any case, this solution was posted by someone else, I met a long time ago.

    I hope this helps.


    Good suggestion!

    I do now.

  • Run-time error '91'; Variable object or with block variable not set "

    Help, please... I had "run-time error '91'; Variable object or with block variable not set "for kawai2004 game.  Please help how to fix this error.  Thank you very much.


    See the following article

  • Run-time error '48': file not found t2win - 32.dll

    Since I've updated my Astrocalc program I can't program to open on my desktop. I get the message: run-time error '48': file not found t2win - 32.dll.

    You have any ideas how I can fix this problem please?  I have been trawling the web for months on and outside, but had nowhere :-(


    The file t2win - 32.dll is a Visual Basic Runtime file that should be installed by the AstroCalc program.

    Suggest you contact them and get the latest AstroCalc version that supports Windows 7.

  • Satellite X 200 - 25 G: problem of Flash Cards - Run time error file TCrdMain.exe

    Hello world!

    I don't know how, but I have a problem when my windows Vista from (running)
    The problem is with these file TCrdMain.exe this file is for Flash cards, end running every time when I put my PC on (with windows startup). But I see this problem: "Run time error file TCrdMain.exe ' and I should click Close.
    I don't know where can I uninstall this program and when I find that driver (Software) (if I uninstall and then install this driver, maybe that everything will be OK). This is the main problem.

    And another question...
    There are so many programs with this computer (laptop), and if I want to install Windows XP for example, where can I find everything (each programs) there may be 10 or 15 pograms.

    It will be a big problem if I change my OS. Y at - there a site where I can download, everything...
    Thanks for the replies, nd sorry about my English :-) skills
    Best wishes from the Bulgaria and have a nice day!

    Post edited by: me



    I'm not very well why the executable Run TCrdMain.exe error, but it is certainly up to Toshiba FlashCard software and the FlashCard belongs to the package Toshiba Vista added value m.

    Kody is good. Reinstall the VAP and check if this helps solve this problem.

    With regard to the question of the other;
    You are right; the notebooks are preinstalled with many different applications. But it is necessary because the laptop supports many different features.
    However, if you want to install XP OS on the X 200 PSPB9E series, you will need drivers Toshiba XP and all need Toshiba XP drivers are available on the European driver Toshiba page

    You must install all the drivers available if you want to use all the features of the laptop.


  • What is this dialog box? "Run-time error '380': invalid property value."

    I'm trying to load a registration program and I get a dialog box that indicates that following.

    "Run-time error '380': invalid property value."

    What it means. How can I solve this problem?


    Hi arthur rossi.

    See the FAQ of the Roemer software that has exactly the problem mentioned.

    Refer to the Question I get an error message that says: one of the following values: "Runtime error 380 invalid property value", "Runtime Error 52" or "Invalid file name" in the following article. "

    Roemer Software FAQ (frequently asked Questions)

  • Cannot open cash book complete due to the run-time error 429.

    Can't open the program because the runtime error 429, how can I solve this problem?

    original title: try opening a program called FULL of CASH book and an error is displayed in Run Time error 429 active x component cannot create object

    Connect with the people who wrote, distributed or support the program FULL of the CASH book.

  • Visual Studio from Microsoft run time error hr:80090003

    live messenger installation with all others * after a crash. received the messege: (run time error hr:80090003 microsoft visual studio) how do you solve the problem?


    The question you posted would be better suited to Windows Live Solution Center. I suggest you to send your application in the Windows Live Solution Center for better support.

  • I get a Run time Error, whenever I connect to internet explore

    ... Error message whenever I connect to internet explorer, an error message appears "Run time Error and stops, I tried to solve the problem I even called my internet provider Verizon... Please help!


    Internet Explorer freezes or crashes

    Tips for solving problems with Internet Explorer

    When you start Internet Explorer, it opens, flashes and then closes immediately


    Several troubleshooting methods:

    What antivirus/antispyware/security products do you have on the machine? Be one you have
    EVER had on this machine, including those you have uninstalled (they leave leftovers behind which)
    may cause strange problems).

    If no joy there's something blocking perhaps.

    Start - All Programs - Accessories - System Tools - IE with no Addons - what works best?

    IE - Tools - Internet Options - Advanced - tab click on restore, and then click Reset - apply / OK

    IE - Tools - Internet Options - Security tab - click on reset all default areas - apply / OK

    Close and restart IE or IE with no addons

    not better?

    IE - tools - manage Addons (for sure disable SSV2 if she's here, it is no longer necessary but Java
    installs and it causes more questions - have you never update Java to go back in and turn it off again.) Search
    other possible problems.

    Windows Defender - tools - software explore - look for problems with programs that do not look
    right. Allowed are usually OK and "unauthorized" are not always bad. If doubt about a program
    ask about it here.

    Could not be a free - SpyBHOremover - BHO - standalone program, needs no installation, download.
    unzip and run - all are not bad, but some can cause your question (toolbars are BHO).

    How to change, add or remove startup programs in Windows 7

    Also get Malwarebytes - free - use as scanner only.



    Try these to erase corruption and missing/damaged file system repair or replacement.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN


    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • After updating to iTunes, I couldn't open TI-kept saying: run-time error.

    After updating to iTunes, I couldn't open TI-kept saying: run-time error. Help please

    C:/program files (x 86)


    An application has made an attempt to load the C runtime incorrectly library.

    For more information, contact the application support team.

    I uninstalled iTunes, tried to reinstall, it never leaves me. Always giving this error.

    Original title: Microsoft C ++ Runtime error


    Uninstall everything according to the instructions from Apple:

    «Remove and reinstall iTunes, QuickTime, and other software components for Windows Vista or Windows 7»


    It is also the same list of what to remove what is in the link above from Apple:


    Or try this program to remove it:


    Then, download and save the iTunes on the desktop > then right click > select run as administrator to install.

    "Resolution of problems with iTunes for Windows Update"


    If the advice already given does not, please contact Apple for assistance.

    "Not to install iTunes or QuickTime for Windows"


    "iTunes support-how to use iTunes.


    "Contact iTunes Support.


    Or ask in the community Apple iTunes:


    See you soon.

  • Run the run-time error '339': 'mscomct2.ocx' or one of its dependenceies component is not correctly registered: a file is missing or invalid

    As I upgraded fom Win 7Pro to Win 8 Pro I can't get one of my software programs work correctly, it worked fine on Win 7 Pro, I tried all sorts of internet remedys, but nothing works, I get the message following run-time error '339': 'mscomct2.ocx' or one of its dependenceies component is not properly registered : a file is missing or invalid.i have tried to get that it is running in compatibility mode, but the same error message keeps comeing. The software installs fine, can someone give me that any ideas how I can stop this error message and get my software to work, it's the only piece of software I use every day, but during the last three weeks, I have been unable to use frustrating it.very. Thanks You.Robert

    A quick and simple solution to this problem.

    Simply follow the instructions below, download the file, install it and bingo, you have sorted.

    This will save you having to reinstall interactive Raceform, but you can do before a new installation if you wish.

    Click on the link below (or copy and paste it into a browser address bar):


    If you do this in Google Chrome you will see this in the lower left corner of your screen-

    Double-click this and you should now see this-
    Choose to run
    Now, you will see this-
    And it should now be as easy as just after the other, agree questions etc after clicking this first suite.
    This will allow you to install drivers for Visual FoxPro that will hopefully Raceform Interactive must be installed after that he completed.
  • Run-time error '-2147467261' (80004003).

    Hi friends,
    I nee help to solve the problem of forllowing.
    I get the error on the Publisher bi ms word add on a run time. Here's what I do.

    1. open MS word
    2 Goto addins > BI Publisher
    3. click on Log on
    First error
    "Model Builder not foound" after clicking on 'OK' to the message, I am the following
    «Run time Error '-2417467261 (80004003)»»
    "Object reference not set to an instance of an object.

    I have screenshots of error messages, but I don't know how to post them here.

    I really appreciate your help on this one.

    In Add / Remove Programs-> Oracle BI Publisher Desktop - delete.

    You should be able to download "Model generator" BI Publisher Enterprise-> Developer Tools

    or you can find it here: http://www.oracle.com/technetwork/middleware/bi-publisher/downloads/index.html

    Thank you

  • CVI 2013 ' FATAL RUN - TIME ERROR: pointer to free memory passed to the function of library "when you access a struct of struct

    typedef struct StringsStruct
      char A[10];
      char AA[10];
      char B[10];
      char BB[10];
      char C[10];
      char CC[10];
    } StringsStructType;
    StringsStructType Strings = {0};
    char *const SelectedStrings[3] =
    int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                           LPSTR lpszCmdLine, int nCmdShow)
      if (InitCVIRTE (hInstance, 0, 0) == 0)
        return -1;    /* out of memory */
      strcpy( SelectedStrings[1], "TEXT" );
      /*** FATAL RUN-TIME ERROR:   "main.c", line 32, col 11, thread id 0xXXXXXXXX:   Pointer to free memory passed to library function. ***/
      return 0;

    Any chance to get this working in 2013 CVI?

    "& Strings.A [0]" does not work either.

    Hello CVI - User!

    Thank you for reporting the issue. I filed the bug report # 423491.

    I did have a chance to get rid of the error by changing the definition of the structure, but I was able to get the program running by disabling execution checking when the fields in the structure are initialized:

    strcpy( (char*)(uintptr_t)SelectedStrings[1], "TEXT" );

    Or perhaps a more descriptive workaround solution:

    #define UNCHECKED(x) ((void*)(uintptr_t)(x))
    strcpy( UNCHECKED(SelectedStrings[1]), "TEXT" );

    Thank you


Maybe you are looking for

  • Restore photos to a new device

    Is it possible to restore the photos from my old iPhone to my new without actually having to restore the other stuff, like apps and all that that is all restore a backup?

  • My printer request password WPA security?

    Try to install a new HP printer.  He asks a WPA security password.  Where can I find?

  • Satellite P300-1BB: Windows 7 - unknown device Acpi Microsoft code 28

    Hello I try Windows 7 Ultimate on my P300-1bb, but I have an unknown driver, it is write: Acpi Microsoft (code 28).I have install all drivers and bios update, but nothing that recognizes this pilot. Where can I find this driver? Thank you

  • Everyone knows the watch switch silent mode to its own?

    I noticed that my Apple Watch going in silent mode on its own. Anyone experience this problem? I want a software update with a small icon on the top when the watch is in silent Mode. Any thoughts?

  • 'Burn' start does not

    I followed the instructions of Vista to bury a music CD... moved the files 'list of details' for "Burn list' then tried clicking on the button"start burn", but nothing happens! When I pass ANY other element on the page, it puts in evidence showing th