NI-DAQ Select_Signal() arguments

iStatus = Select_Signal(iDevice, ulGpctrOutput, ulGpctrOutput,ND_LOW_TO_HIGH);
The above code appears in NI's example program "TIOgenSquareWave.c". I can find nothing in the documentation that refers to this arrangement of parameters. What's going on here? Is this documented somewhere?
Thanks
Doug Hanna

Doug;
That line is usually used when the counter output is programmed to toggle/pulse when its Terminal Counter is reached.
The will force the output of the counter to perform the specified action and actually output a signal.
Hope this helps.
Filipe

Similar Messages

  • How can i control the DAQ directly from VB

    Actually, it is my first trial to use Visual Basic to get signal from DAQ.
    And i don't how to interface them. I have read an article to use DataSocket.
    However, it demostrated the OPC demo in OPC sever only, and so i didn't know
    how to get the signal directly from DAQ card to monitor the real-time
    signal.
    Also, i have tried to build a .dll from my VI file which is used to monitor
    the DAQ signal. However, the .dll file didn't have any return value or
    argument, did it mean i can use this method?
    And how can i interface the DAQ using VB?and my ADC model is AT-MIO-16E-2!
    Thank you very much

    Hi Sen,
    Are you using Measurement Studio ? If so then you can use the DAQ activeX controls.
    If not and you are using VB directly, then NI-Daq installs with examples for visual basic ( if you chose the option while installing- if not do a custom install and choose VB support). If so then you should find them under Program Files ->National Isntruments->NI-DAQ->Examples->VisualBasic. These may help you.
    Essentially NI-DAQ ships with a .bas file that contains the "declares" for the NI-DAQ dll functions. These files should be in
    Program Files ->National Isntruments->NI-DAQ->Includes (look for the .bas files) You can add these to your project to get access to the DAQ functions..
    On the second question, do you mean you are using labVIEW to create your dll ? If this
    is the case, then when you create your dll (in labVIEW's applciation builder) you have to set the parameters for the function (VI) and also the VI's return values. This will ensure that you can make use of your VI ..If you don't set a return value you really can't use it...Once you set the return value ,and create a dll, then you can use it like any other dll in Visual basic.
    Hope this helps...
    This link may help you
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/5052ad60f1accc3d862568a100717fd1?OpenDocument
    Nandan Dharwadker
    Staff Software Engineer
    Measurement Studio Hardware Team

  • DAQ external triggered at 5kHz

    Hello expert,
    I got totally confused as I tried to do some externally triggered DAQ
    with my DAQPad-MIO-16XE-50 board.
    My problems are the different kinds of counters and timers and functions
    to control them.
    I added a piece of code, which I think should do the job...
    numChans=2;
    chans[0]=1;
    gains[0]=1;
    chans[1]=3;
    gains[1]=10;
    scanRateDivS[0]=1;
    scanRateDivS[1]=127;
    DAQ_Config (DEVICE, 0, 2)
    ^^^^^^^^^^^^^^^^
    as far as I understand is the scan interval now externally controlled...
    (signals on PFI_7)
    Select_Signal(DEVICE, ND_IN_SCAN_CLOCK_TIMEBASE, ND_PFI_7,
    ND_HIGH_TO_LOW)
    ^^^^^^^^^^^^^^^^^^
    is this necessary? the manual says the timer generates an IN_START_SCAN
    after the specified occurences of signal transitions... whe
    re do I
    specify this number of transitions???
    DAQ_DB_Config (DEVICE, 1)
    SCAN_Sequence_Setup(DEVICE,numChans,chans,gains,scanRateDivS,&scansSequence,&sampleSequence)
    SCAN_Sequence_Retrieve(DEVICE,sampleSequence,scanSequenceVector);
    SCAN_Start (DEVICE, circBuff,circBuffSize, 2, 8, 0, 1)
    ^^^^^^^^^^^^^^^^
    which parameters are to be set here? Is the scan timer in use at all? or
    should I just call Select_Signal with ND_IN_SCAN_START routed to
    PFI_7???
    while (sampLeftToAcq>0 && !kbhit()){
    iStat = DAQ_DB_Transfer (DEVICE,halfBuff,&ptsTfr,&status);
    if (iStat) break;
    iStat = NI_DAQ_Mem_Copy(memhandle, halfBuff, numBytesWritten,
    (long) halfBuffSize, 1);
    if (iStat) break;
    numBytesWritten+=halfBuffSize;
    sampLeftToAcq -= halfBuffSize;
    If I apply a trigger at 5kHz, the Computer locks up and presents Error
    12 after removing the trigger signal.
    At 2.5kHz everything works fine...
    I just want to sample 127 times one channel and then once two channels
    externally triggered at 5kHz.
    Perhaps anyone could supply me with the essential code for this.
    Many thanks, Martin

    Hello expert,
    I got totally confused as I tried to do some externally triggered DAQ
    with my DAQPad-MIO-16XE-50 board.
    My problems are the different kinds of counters and timers and functions
    to control them.
    I added a piece of code, which I think should do the job...
    numChans=2;
    chans[0]=1;
    gains[0]=1;
    chans[1]=3;
    gains[1]=10;
    scanRateDivS[0]=1;
    scanRateDivS[1]=127;
    DAQ_Config (DEVICE, 0, 2)
    ^^^^^^^^^^^^^^^^
    as far as I understand is the scan interval now externally controlled...
    (signals on PFI_7)
    Select_Signal(DEVICE, ND_IN_SCAN_CLOCK_TIMEBASE, ND_PFI_7,
    ND_HIGH_TO_LOW)
    ^^^^^^^^^^^^^^^^^^
    is this necessary? the manual says the timer generates an IN_START_SCAN
    after the specified occurences of signal transitions... whe
    re do I
    specify this number of transitions???
    DAQ_DB_Config (DEVICE, 1)
    SCAN_Sequence_Setup(DEVICE,numChans,chans,gains,scanRateDivS,&scansSequence,&sampleSequence)
    SCAN_Sequence_Retrieve(DEVICE,sampleSequence,scanSequenceVector);
    SCAN_Start (DEVICE, circBuff,circBuffSize, 2, 8, 0, 1)
    ^^^^^^^^^^^^^^^^
    which parameters are to be set here? Is the scan timer in use at all? or
    should I just call Select_Signal with ND_IN_SCAN_START routed to
    PFI_7???
    while (sampLeftToAcq>0 && !kbhit()){
    iStat = DAQ_DB_Transfer (DEVICE,halfBuff,&ptsTfr,&status);
    if (iStat) break;
    iStat = NI_DAQ_Mem_Copy(memhandle, halfBuff, numBytesWritten,
    (long) halfBuffSize, 1);
    if (iStat) break;
    numBytesWritten+=halfBuffSize;
    sampLeftToAcq -= halfBuffSize;
    If I apply a trigger at 5kHz, the Computer locks up and presents Error
    12 after removing the trigger signal.
    At 2.5kHz everything works fine...
    I just want to sample 127 times one channel and then once two channels
    externally triggered at 5kHz.
    Perhaps anyone could supply me with the essential code for this.
    Many thanks, Martin

  • Creating Installer and DAQ-MX: Error Code

    Hi,
    I found this question was asked a few times back in 2009 and 2007 but the answesr on the forum don't really help me - partially because they say : oh it just worked.
    I'm trying to craete my first installer for a LabView project.
    It is simply a DAQ assistant for an NI Card. I am trying to move my application from a comptuer with LabView to the one with the card = without labview and I'd rather not install labview on both.
    When I include DAQ-MX and the Run Time module I get this error code fro the installer.
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    CDK_Build_Invoke.vi.ProxyCaller >> CDK_Build_Invoke.vi >> CDK_Engine_Main.vi >> IB_MSI.lvclass:Build.vi >> IB_MSI.lvclass:Engine_AddProductsToDistribution.vi >> NI_MDF.lvlib:MDFDistBuildList_Close.vi
    Loading product deployment information
    Loading product deployment information
    *** Error: Improper function call or command line argument. (Error code -30)
    Type 'DefaultFull' of product 'NI Security Update KB5Q5FJ4QW for the LabVIEW Run-Time Engine 8.2' is not found on the source distribution. Insert the correct source distribution or select another product type.
    *** Error Details:
    Error in MDF API function: _MDFDistBuildList_Close
    Error in MDF:istributionBuildList::AddDependentProducts.
    *** End Error Report
    Don't quite know what it means
    For this one
    Type 'DefaultFull' of product 'NI Security Update KB5Q5FJ4QW for the LabVIEW Run-Time Engine 8.2' is not found on the source distribution. Insert the correct source distribution or select another product type.
    I think it means that it's not finding the CD from where to get this install wizard? Is that it? Well it is never prompting me for a media where to find this file... so I'm stumped.
    Any help would be appreciate, I'll reply on the weekend too!
    Thanks!
    Also, I<m trying to craete an installer for a .net application. Anything I need to know in particular for that? i.e. where do I include my .dll file? Does that go in the source files?
    Thanks.
    I've attached the only file in my project that I am trying to install...
    Lol.
    Solved!
    Go to Solution.
    Attachments:
    Encoder Testing.vi ‏68 KB

    Hi, the message "...KB5Q5FJ4QW" basically means knowledge base (KB) 5Q5FJ4QW. You can check it here. In summary, the NI Security Update force all users to be administrators, for security purposes, otherwise their applications won't run. The article states that you have two option:
    1 - Download and install NI Security Update 5Q5FJ4QW from Drivers and Updates to each machine. OR
    2 - After installing the update to a development machine, rebuild an application installer that includes the LabVIEW or LabWindows/CVI Run-Time Engine and run it on each target machine.
    I hope this helps
    Alejandro | Academic Program Engineer | National Instruments

  • Using a variable in a js function argument

    Folks,
    This is very basic, but I still cannot get it...
    I have this js function in an ASP page:function MM_changeProp(objId,x,theProp,theValue) { //v9.0
      var obj = null; with (document){ if (getElementById)
      obj = getElementById(objId); }
      if (obj){
        if (theValue == true || theValue == false)
          eval("obj.style."+theProp+"="+theValue);
        else eval("obj.style."+theProp+"='"+theValue+"'");
    }i don't understand the function, as it was put in automatically by dreamweaver. right now, i am using this onclick event of an image:<div id="apDiv19" onclick="MM_changeProp('apDiv7','','backgroundColor','#FFFF00','DIV')"></div>the #FFFF00 is the color YELLOW. it is being passed to the theValue argument of the js. what i simply want to do is establish a global variable that will house a color string (like #FFFF00), and then use it in the function argument everytime i need the function. something like this:<div id="apDiv19" onclick="MM_changeProp('apDiv7','','backgroundColor',VARIABLE,'DIV')">i do not know how to do two things:
    1) initialize and assign the variable a value, and where to establish it (inside the script tags? in the head? in the body?)
    2) how to use the variable as an argument in the function
    any help greatly appreciated for this novice. thanks!

    ajetrumpet wrote:
    Folks,
    This is very basic, but I still cannot get it...
    I have this js function in an ASP page:This forum is not about ASP nor JavaScript. Please use Google to find an appropriate JavaScript forum.

  • An error has occurred:Invalid postback or callback argument in InfoView

    Hi Friends,
    When i try to change the parameter values and click OK button while scheduling a report in InfoView, i am getting the following error:
    An error has occurred:Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager. RegisterForEventValidation method in order to register the postback or callback data for validation.
    Till now i have not find any good solution for this. Please help in providing any better solutions to fix this.
    Edited by: Shivananda Puli on Aug 6, 2010 11:55 AM
    Edited by: Shivananda Puli on Aug 6, 2010 11:55 AM

    This forum is for questions in regards to using the SDK within a custom application, since you are using Infoview, please post this in the applicable forum under the [Business Objects|/community [original link is broken]; section

  • ORA-00600: internal error code, arguments: [ktsircinfo_num1]

    While taking export of a table received EXP error and while dropping/selecting the same gor ora-600 errors.
    . . exporting table TEST4
    EXP-00003: no storage definition found for segment(29, 371385)
    SQL >Drop table test4 cascade;
    ORA-00600: internal error code, arguments: [ktsircinfo_num1], [29], [29], [371385], [], [], [], []
    sql> Desc test4;
    ORA-00600: internal error code, arguments: [ktsircinfo_num1], [29], [29], [371385], [], [], [], []
    I dont want to log TAR with oracle right now... I tried dropping and recreating Undo tablespace but still did not help much . Database version is 9204

    hi
    read metalink ID - 153788.1
    CHeers

  • Can arguments be corrupted on passing in to function?

    Hello,
    I'm seeing something that's got me stumped. Maybe you folks can advise.
    What appears to be a valid arguments are getting corrupted when passed to a different function.
    Here is my set up:
    - LibA.a
    - LibB.a
    - SampleApp
    - MyApp
    The bad function call is going from LibA in to LibB.
    LibA, LibB and SampleApp have all been pre-complied (thankfully in debug mode) by an older version of Sun Studio on Solaris x86/64. SampleApp uses both LibA and LibB and runs just fine on my system.
    MyApp uses both LibA and LibB in a manner similar to SampleApp. Yet, MyApp crashes due to this pointer corruption.
    When single stepping the code, I see the pointer in the caller being valid and being passed as a parameter. In the callee, the value of the passed-in parameter pointer in simply wrong.
    Note: The caller is in the pre-compiled LibA.a and the callee is in the pre-compiled LibB.a I'm never even touching that code to recompile it. Further, the code itself must be correct since SampleApp uses those functions, and runs fine.
    Thus, I'm thinking that my error is in the linking stage, but I'm not sure what it could be.
    Any ideas?
    Thank you,
    David
    Edited by: 878694 on Aug 11, 2011 3:52 PM

    It's impossible to say what is wrong without a fairly complete example, preferably one that could be compiled and run to see the problem. Some generic guesses:
    1. Compiler bug. The code should be recompiled with a new compiler where the bug has been fixed. Impossible to say what sort of bug that might be without a test case.
    2. As in my original comment, the two libraries see inconsistent declarations. For example, after one library was built, a declaration in a common header was changed and the other library, or some binary in it, was built using the different declaration. This kind of error is common when makefiles do not express all the needed dependencies. The fix is to delete all binaries and recompile everything (to be sure no change is missed).
    2a. A related error is when common declarations are repeated in .cc files instead of being placed only in header files and included where needed. What are supposed to be identical declarations get out of sync. The fix is to reorganize the source code to eliminate copies of declarations, delete all binaries and recompile everything (to be sure no change is missed).
    3. You are not seeing what you think you are seeing. For example, if the address of a derived class is passed to a pointer-to-base-class, the address might need to be adjusted. In this case, the difference in values is correct, and something else is causing whatever incorrect program behavior you see.

  • USB-6009 DAQ

    Hi;
    Would you please advise which NI-DAQ software version is for USB-6009 using LabVIEW 7.1?
    Regards

    Hi;
    I have downloaded NI DAQ MX 8.9 which is supports LabVIEW 7.1, but it can not detect the NI USB-6009 driver and still asking for the driver.
    Can anyone help please?
    Regards

  • USB 6009 DAQ to use in Simulink at External mode with DAQ toolbox

    hi
    Currently I am using usb 6009 daq board for data acquisition in using simulink. I have created a model with taking analog input from data acquisition toolbox. Then when i want to run in external mode and try to connet to target, the following error is coming up:
    Could not execute target data map file 'untitled_rtwin_win32\untitled_targ_data_map' or it does not exist. Stop the target, delete the untitled executable, rebuild the code,and try again. Note that execution of external mode requires the build directory to be present...
    How can I solve this problem? For your info, I am using 32-bit matlab, version: 2012a
    For your info, a snapshot of the error is attached,
    Any help would be appreciated Thanks
    Attachments:
    Untitled.jpg ‏130 KB

    Hi Mahmudur,
    what does MathWorks say about this error message?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I have LabView but I do not have the Calibration and Configuration Palette,and I could not download it, how can I download it or if i cannot,can I work with the NI-DAQ Calibration_1200?

    I have read in a tutorial for the board 1200 that I can calibrate it with the Calibration and Configuration Palette in LabVIEW, but I do not have them and I could not download it to access its libraries, so I can only download the NI-DAQ software,What's my best choice and if it is to download the palette with its libraries, how can download it with them?I'd appreciate your answers

    If you wish to use your 1200 device in LabVIEW, you must download and install NI-DAQ. When you install NI-DAQ, it will ask you if you would like to install support for LabVIEW. By installing this support, you will then have access to the DAQ pallette in LabVIEW. The DAQ pallette requires that you have NI-DAQ installed.
    For more information on installing and using your device, you can refer to the DAQ Quick Start Guide. You can download it from:
    http://digital.ni.com/manuals.nsf/14807683e3b2dd8f8625677b006643f0/0eca53fe80911b1f862568560068295d
    Regards,
    Erin

  • How to set the User rights to use DAQ/IMAQ in WinXP as general(=limited) user

    When I install Software, written in LabVIEW (build an executable/installer), as administrator it works fine. But when I switch over to a user account with limited rights (we are talking about WinXP) it will not run and gives error messages. It happend to me at two almost the same computers, one with a DAQ-board, and one with an IMAQ-board. (At the computer with IMAQ1411 -> I also checked MAX -> errors/no access.) What to do?
    Attachments:
    DAQ_example.JPG ‏9 KB
    IMAQ_example.JPG ‏15 KB

    Hello,
    I investigated the issue further. To work around this problem you should add write permissions to the C:\Program Files\National Instruments folder. Be sure that all subfolders and files are awarded write permission. This should solve your problems. eventually you could break it up to one file which must be set to write permission but by setting the whole folder to write permission you solve this problem for many other drivers to so you would not run into this everytime you use different hardware.
    Best regards,
    RikP
    Application Engineering
    National Instruments
    Rik Prins, CLD
    Applications Engineering Specialist Northern Europe, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • No data output field in DAQ Assistant

    I am currently trying to read temperature from my NI WSN 3202. I have a thermistor connected to AI0 and AIGND.  I am following a tutorial to convert from volts to degrees F and everything has been working so far. 
    Once I reach the step for DAQ that is when I have issues.  I've created a simulated device (following another tutorial).  When I configure everything for DAQ, there is no data field so that I can wire it to my indicator and then to the formula block.  Can anyone assist me with this problem?
    Pictures have been included. (The picture that has the data field is what I'm trying to get to)
    Thank you in advance!
    Attachments:
    1.PNG ‏111 KB
    2.PNG ‏94 KB
    3.PNG ‏326 KB

    I would do as the error message tells you, reinstall DAQmx.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How do you invoke a method with native int array argument?

    Hi,
    Will someone help me to show me a few codes samples on how to invoke a method which has only one argument, an int [] array.
    For exampe:
    public void Method1(int [] intArray) {...};
    Here is some simple code fragment I used:
    Class<?> aClass = Class.forName("Test2");
    Class[] argTypes = new Class[] {int[].class};
    Method method = aClass.getDeclaredMethod("Method_1", argTypes);
    int [] intArray = new int[] {111, 222, 333};
    Object [] args = new Object[1];
    args[0] = Array.newInstance(int.class, intArray);
    method.invoke(aClass, args);I can compile without any error, but when runs, it died in the "invoke" statement with:
    Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at Test1.invoke_Method_1(Test1.java:262)
         at Test1.start(Test1.java:33)
         at Test1.main(Test1.java:12)
    Any help is greatly appreciated!
    Jeff

    Sorry, my bad. I was able to invoke static methods and instance methods with all data types except native int, short, double and float, not sure the proper ways to declare them.
    After many frustrating hours, I posted the message for help, but at that time, my mind was so numb that I created a faulted example because I cut and pasted the static method invocation example to test the instance method passing int array argument.
    As your post suggested, "args[0] = intArray;", that works. Thanks!
    You know, I did tried passing the argument like that first, but because I was not declaring the type properly, I ended up messing up the actual passing as well as the instantiation step.
    I will honestly slap my hand three times.
    jml

  • How Do I Use Examples for Visual C++with NI-DAQ?

    我有一张NI6723的卡,用the Measurement & Automation Explorer测试的时候,一点问题都没有。完全安照前面所说的例子(http://digital.ni.com/public.nsf/allkb/0087C1E2092​0F7B986256D9B0061DEE2),我用Visual c++建立工程后,编译没有任何错误。但是运行后就会弹出错误:
    [AO_VWrite] returned NI-DAQ error-104041
    The specified device is not a National Instruments product,the driver does not support the device (for example,the driver was released before the device was supported),or the device has not been cofigured using the Measurement & Automation Explorer.
    请问各位,这是怎么回事?

    用TRADITIONAL DAQ可能不支持
    M系列有很多卡不支持

Maybe you are looking for

  • Release product serial number for final cut studio

    i bought an imac. gonna take it back. installed final cut studio. how can i unlock the key for the next computer? do i have to contact apple to release it?

  • What is a safe temperature for the CPU?

    My new MBP's CPU is running at around 55-65 degrees idle, and upper 70's to low/mid 80's when doing anything intensive. (According to iStat widget) I was wondering if this is normal or safe, as according to http://www.hardwaresecrets.com/article/366/

  • Server App does not change SMB AFP option as expected

    I have been fighting SMB shares on Mac OS since upgrading to Mountain Lion (I skipped Lion) and I think I have the situation figure out at least in my case. First Opportunistic Locking needs to be turned off in Windows 7. It does not appear that Mac

  • Config my system.

    I have some problems with kernel vs et131x (Ethernet card) # powertop Top causes for wakeups: 38.5% (250.0) ifconfig : et131x_open (et131x_error_timer_handler) 21.8% (141.9) <interrupt> : uhci_hcd:usb3 13.2% ( 85.8) <interrupt> : ohci1394, yenta, sdh

  • N8 - Rattling noise when listening with headphones

    Just got my N8 but unfortunately noticed a slight but annoying rattling noise when listening to music via earphones. It's most noticeable at the start and the end of songs as well as in quieter passages. Anyone else noticed this? If this is a known i