Edge Triggered Callback Function with E Series DAQCard

Hardware: DAQCard-AI-16XE-50
Software: NI-DAQ 6.9.1 call from C++
Q- Does anyone have sample code to initiate a callback function in C++ when a pulse edge is input to a DAQCard-AI-16XE-50? I am using ACH1 as the input channel. Pulse edge occurance will be low duty cycle.Below code doesnt work..
(I could use a latch & poll but edge triggering would be cleaner!)
status = Set_DAQ_Device_Info(1,ND_AI_FIFO_INTERRUPTS,
ND_INTERRUPT_EVERY_SAMPLE);
retValue=NIDAQErrorHandler(status,"Set_DAQ_Device_Info (FIFO Interrupts)",0);
status = Set_DAQ_Device_Info(1,ND_DATA_XFER_MODE_AI,
ND_INTERRUPTS);
retValue=NIDAQErrorHandler(status,"Set_DAQ_Device_Info",0);
status = Config_ATrig_Even
t_Message(1,1,"AI1",3,1,1,0,
0,0,0,0,(unsigned int)EdgeCallbackFunction);
retValue=NIDAQErrorHandler(status,"Config_ATrig_Event_Message",0);
Thanks Millions if you help!!

Hi kittyKat,
The easiest way to create an interrupt service routine or callback function triggered on a digital edge is to use DAQ Event Messaging. In C, you can program for your DAQ board by using the function Config_DAQ_Event_Message. The different events you can account for are:
DAQ Event type 0 � Acquire or Generate N Scans
DAQ Event type 1 � Every N Scans
DAQ Event type 2 � Completed Operation or Stopped by Error
DAQ Event type 3 � Voltage out of bounds
DAQ Event type 4 � Voltage within bounds
DAQ Event type 5 � Analog Positive Slope Triggering
DAQ Event type 6 � Analog Negative Slope Triggering
DAQ Event type 7 � Digital Pattern Not Matched
DAQ Event type 8 � Digital Pattern Matched
DAQ Event type 9 � Counter Pulse Event
If you are not
using your analog input on your DAQ board, you can setup an analog input and use your external signal as an external clock. This would involve you using one of the shipping examples for analog input with an external clock and adding the DAQ Event Messaging for Event 1 and have the interval be 1 value. Therefore, your callback function will be called every scan or every time your signal pulses high (as the external clock). I've included some useful resources below.
Using DAQ Event Messaging under Windows NT/95/3.1
http://zone.ni.com/devzone/conceptd.nsf/webmain/159C194435C8CA5786256869005EF6AE?opendocument
DAQ Events and Occurrences
http://digital.ni.com/public.nsf/websearch/9F3DAD3E227E4203862566C2005B11EB?OpenDocument
Hope that helps. Have a good day.
Ron
Applications Engineering
National Instruments

Similar Messages

  • C++: Is it possible using callback function with ncacn_http and rpcproxy server ?

    I have a remote procedure and I can call it using http over rpc. I pass trough an rpc proxy server for arriving to my rpc server.
    But I cannot call a callback function to my client inside the server function.
    Is it possible using callback function with ncacn_http and rpcproxy server ?
    We are using IIS on windows server 2008 R2 and the server rpc and the client on the same PC with rpc rpoxy.
    If I use ncan_ip_tcp all works fine.
    Thanks
    Gianluca

    Hi,
    About the develop question please post to the MSDN forum.
    MSDN forum Developer Network
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=WAVirtualMachinesVirtualNetwork&filter=alltypes&sort=lastpostdesc
    Thanks for your understanding and support.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Replace Sybase callback functions with OCI

    Has anybody replaced the Sybase error and message callback functions with the OCI callback capability? If so, I would be interested in discussing any lessons learned that you might have.

    Has anybody replaced the Sybase error and message callback functions with the OCI callback capability? If so, I would be interested in discussing any lessons learned that you might have.

  • ProcessSystemEvents & callback functions

    Hello.
    I have a question about the ProcessSystemEvents() and callback functions. If I have the following "strange" callback function with the follwoing code inside:
    int func(...) {
      while(true) {
       ProcessSystemEvents();
    Could this code create a crash in the underlying run-time lib (cvirte.dll etc), with to many calls to ProcessSystemEvents?
    And will this code stop any other callback function from execution, since we are in an infinite while loop?
    Best regards,
    Christian G.

    A fuction like that should be called only once, if this is what you intend. While sitting in the loop, ProcessSystemEvents permits the system to react to events like the user pressing a button or something like this. You must explicitly avoid dangerous events like calling the function again and again, as well as all user actions that can cause problems (like modifying critical parameters while the function is running, improperly exiting the program and so on). To obtain this you may either disable unwanted buttons on the GUI or set a global flag 'system running' tested on all callbacks and functions to protect the system from unwanted operations.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Callback functions

    can anybody explain callback functions with a simple example

    interface Observer {
         void onEvent(int value);
    class Worker {
         Observer observer;
         Worker(Observer observer) { this.observer = observer;}
         void doIt() {
              observer.onEvent(1);
    }

  • Queue with callback function - strange behaviour when using max_retries

    Hi,
    I hope someone can tell me what is wrong or can explain the following strange behaviour to me.
    I am using one queue with a registered callback function. To test the behavoiur in case of an error I tested different settings, with or without explicit exception queue and with or without parameter max_retries.
    Database Version is 11.2.0.2.   Enterprise Edition
    I enqueue 10 messages in a loop.
    I define no exception queue and do not set max_retries
    ==> all messages stay in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 5
    I define no exception queue and set max_retries = 4
    ==> 1 message stays in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 4
           9 messages stay in the queuetable with q_name = nomal queue name and retry_count = 0
    I define an exception queue and set max_retries = 4
    ==> 1 message is transfered to the Exception Queuetable with retry_count = 4
           9 messages stay in the normal Queuetable and retry_count = 0
    I define an exception queue and do not set max_retries
    ==> all 10 messages are transferred to the Exception Queuetable with retry_count = 5
    I have no explanation for the behaviour in case 2 and case 3.
    To create the queue and the callback I use this code (reduced to minimum):
    begin
       DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE'
                              , queue_table => 'TESTUSER.TEST_TABELLE'
    --                          , max_retries => 4                     uncomment this line to set max_retries
    -- uncomment the following Block to use an explicit Exception Queue
    /*   DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE_EXC'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE_EXC'
                              , queue_table => 'TESTUSER.TEST_TABELLE_EXC'
                              , queue_type  => dbms_aqadm.EXCEPTION_QUEUE);
       DBMS_AQADM.START_QUEUE('TESTUSER.TEST_QUEUE');
    end;
    create or replace procedure test_procedure
      (context  RAW
      ,reginfo  sys.AQ$_reg_info
      ,descr    sys.AQ$_descriptor
      ,payload  VARCHAR2
      ,payloadl NUMBER
      ) authid definer
      IS
      -- für Queue
      dequeue_options   DBMS_AQ.dequeue_options_t;
      message_prop      DBMS_AQ.message_properties_t;
      message_hdl       raw(16);
      message           sys.aq$_jms_text_message;
      l_daten           VARCHAR2(32767);
      ex_hugo          EXCEPTION;
      BEGIN
        dequeue_options.msgid         := descr.msg_id;
        dequeue_options.consumer_name := descr.consumer_name;
        dbms_aq.dequeue(descr.queue_name, dequeue_options, message_prop, message, message_hdl);
        -- to provoke an error
        RAISE ex_hugo;
        -- regurlar coding
        commit;
    exception
      when others then
           rollback;
           RAISE;
    end;
    DECLARE
       reginfo1    sys.aq$_reg_info;
       reginfolist sys.aq$_reg_info_list;
    BEGIN
       reginfo1 := sys.aq$_reg_info('TESTUSER.TEST_QUEUE', DBMS_AQ.NAMESPACE_AQ, 'plsql://TESTUSER.TEST_PROCEDURE?PR=0',HEXTORAW('FF'));
       reginfolist := sys.aq$_reg_info_list(reginfo1);
       sys.dbms_aq.register(reginfolist, 1);
       commit;
    END;
    to enqueue my messages i use:
    DECLARE
      message            sys.aq$_jms_text_message;
      enqueue_options    dbms_aq.enqueue_options_t;
      message_properties dbms_aq.message_properties_t;
      msgid              raw(16);
      v_daten            clob;
    BEGIN
       message := sys.aq$_jms_text_message.construct;
       for i in 1..10
       loop
          v_daten := '{ dummy_text }';
          message.set_text(v_daten);
    -- uncomment the following line to use an explicit Exception Queue     
    --      message_properties.exception_queue := 'TESTUSER.TEST_QUEUE_EXC'; 
          dbms_aq.enqueue(queue_name         => 'TESTUSER.TEST_QUEUE',
                          enqueue_options    => enqueue_options,
                          message_properties => message_properties,
                          payload            => message,
                          msgid              => msgid);
          message.clear_properties();
       end loop;
       commit;
    END;

    Hi Chris,
    I tried to reproduce your complaint, but was unable to. I didnt use auditting however, just a series of "select user from dual" with proxy authentication. You might want to see if you can put together a small complete testcase for this and open a sr with support.
    Cheers
    Greg

  • NI DAQ and Arduino in Matlab (control obj in a callback function triggered by another obj)

    (I am aware that this may not be the most appropriate place to ask, but I'm pretty desperate...)
    I am writing a script to acquire online data from a DAQ card and to control an Arduino microcontroller based on the output of the DAQ card data.
    The acquiring of the DAQ card data works fine, but I'm having problems with (1) the online processing of these data and (2) the corresponding controlling of the Arduino microcontroller. I'll try to explain both problems as clear as possible, the matlab code that has already been written can be found at the bottom of this question.
    I'm using a 64-bit Matlab, so I can only use the Session-Based Interface.
    1) Online processing
    Data are collected at a rate of 1000 samples/s. Each time 250 new samples are available, a callback function is triggered to process these data (using a listener triggered by the 'DataAvailable' event). This processing consists of spectral analysis, using the 'spectrogram' function. The problem is that the spectrogram function should use a window of 500 samples and an overlap of 250 samples. So, new samples should be available for processing every 250 samples, but not only the new 250 samples but also the previous 250 samples are needed to accomplish the overlap. Basically, I need 500 samples for each callback function run, but this function has to be ran every 250 samples.
    2) Controlling the Arduino
    The biggest problem lies in the controlling of the Arduino. After spectral analysis, the calculated value is compared to a predefined treshold and if this value exceeds the treshold, the output of the Arduino should be put to one, else the output should be put to zero. The problem here is that, since the callback function is an external function, it doesn't recognize the Arduino object. The Arduino has been connected to Matlab at the start of the script, but is only available in the 'base' workspace. Connecting the Arduino on each function run isn't a possibility, since this should be done every 250 ms.
    Attempted solutions
    I have tried to make the function into a nested function, so that it can use the same variables as the ones in the script, but Matlab doesn't allow this. When I write a nested function, I get the following error: "A nested function cannot be defined inside a control statement (if, while, for, switch or try/catch)." However, I have never defined one of these statements, so the function isn't inside a control statement. I don't understand why this doesn't work.
    Matlab code
    Script
    %% Preparing Arduino
    % Connecting the arduino chip to Matlab
    a=arduino('COM4');
    % Defining the 13th pin as an output
    a.pinMode(13,'output')
    %% Preparing the DAQ card
    % Searching the DAQ card
    devices = daq.getDevices;
    % Create a session
    s = daq.createSession('ni');
    % Define the input channel
    s.addAnalogInputChannel('Dev1', 0, 'Voltage');
    % Define the total measuring and stimulation time
    s.DurationInSeconds = 4;
    % Define the interval for processing
    s.NotifyWhenDataAvailableExceeds = 500;
    % Loading the optimal stimulation parameters
    load('parameters.mat')
    setappdata(s,'freq',parameters(1))
    setappdata(s,'treshold',parameters(2))
    % Define a listener triggered by the DataAvailable event
    lh = s.addlistener('DataAvailable',@stimulation); 
    % Save the start time
    starttime=clock;
    % Start the measurements
    LFP=s.startForeground;
    Callback function
    function stimulation(src,event)
          freq=getappdata(src,'freq');
          treshold=getappdata(src,'treshold');
          LFP=event.Data;
          [S,F,T,P]=spectrogram(LFP,500,250,[],1000);
          PSD=log(P(freq));
          if PSD>=treshold
             a.digitalWrite(13,1)
          else
             a.digitalWrite(13,0)
          end
    end
    All comments/suggestions are welcome.
    Many thanks in advance!

    Hello hemm,
    As you noted this is most likely not the appropriate place to past these non-NI Development environment related questions.
    Especially since the issue does not seem to be related to the interface with the NI DAQ card.
    Maybe you could add some Message Tags so that people that are following specific tags might be able to  detect your question and help you.
    Would it be an option for you to use NI LabVIEW?
    If this is the case then it might be interesting to note that many of the Arduino users over here are using the NI LabVIEW Interface for Arduino Toolkit:
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/212​478
    This is however being supported from the following page:
    https://decibel.ni.com/content/groups/labview-inte​rface-for-arduino
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • Queue with callback function not dequeuing

    Hi,
    I would like to ask you for help or for a hint regarding our problem with the queue:
    A trigger is enqueuing to a queue. This works fine, but the callback function is never called. The queue already worked for a while, but since i changed something at the procedure called by the callback it does not work anymore.
    I already have tried the following:
    -Stopping and restarting
    -Dropping and recreating (with the scheduler having no jobs anymore)
    -Dropping, restarting the database and recreating
    None of these worked. Where do I fail, when considering that the queue with the same scripts worked already? I post the script for creating the queue and adding the subscriber:
    CREATE OR REPLACE TYPE pat_history_queue_payload_type AS OBJECT
    ( TSTAMP VARCHAR2(22 CHAR),
    TYP VARCHAR2(10 CHAR),
    DELTA_MENGE NUMBER,
    ORIGIN VARCHAR2(1 CHAR),
    TEXT VARCHAR2(1000 CHAR),
    QL_TSTAMP VARCHAR2(22 CHAR)
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE (
    queue_table => 'pat_history_queue_table',
    queue_payload_type => 'pat_history_queue_payload_type',
    multiple_consumers => TRUE
    END;
    BEGIN
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'pat_history_queue',
    queue_table => 'pat_history_queue_table',
    max_retries => 10
    DBMS_AQADM.START_QUEUE (
    queue_name => 'pat_history_queue'
    END;
    BEGIN
    DBMS_AQADM.ADD_SUBSCRIBER (
    queue_name => 'pat_history_queue',
    subscriber => SYS.AQ$_AGENT(
    'pat_history_queue_subscriber',
    NULL,
    NULL )
    DBMS_AQ.REGISTER (
    SYS.AQ$_REG_INFO_LIST(
    SYS.AQ$_REG_INFO(
    'pat_history_queue:pat_history_queue_subscriber',
    DBMS_AQ.NAMESPACE_AQ,
    'plsql://PAT.HISTORY_QUEUE_DISTRIBUTION.CALLBACK',
    HEXTORAW('FF')
    1
    END;
    The function CALLBACK which is called by the queue, is never called, I checked that with log messages. Also the package that contains the function is compiled ok.
    Thanks.
    Roland

    Hi,
    Does the subscription show up correct in sys.reg$ ?
    Regards,
    Harry
    http://dbaharrison.blogspot.com/

  • Memory leak with callback function

    Hi,
    I am fairly new to LabWindows and the ninetv library, i have mostly been working with LabVIEW.
    I am trying to create a basic (no GUI) c++ client that sets up subscriptions to several network variables publishing DAQ data from a PXI.
    The data for each variable is sent in a cluster and contains various datatypes along with a large int16 2D array for the data acquired(average array size is 100k in total, and the average time between data sent is 10ms). I have on average 10 of these DAQ variables.
    I am passing the same callback function as an arguement to all of these subscriptions(CNVCreateSubcription).
    It reads all the correct data, but i have one problem which is that i am experiencing a memory leak in the callback function that i pass to the CNVCreateSubscription.
    I have reduced the code one by one line and found the function that actually causes the memory leak, which is a CNVGetStructFields(). At this point in the program the data has still not been passed to the clients variables.
    This is a simplified version of the callback function, where i just unpack the cluster and get the data (only showing from one field in the cluster in the example, also not showing the decleration).
    The function is passed into to the subscribe function, like so:
    static void CNVCALLBACK SubscriberCallback(void * handle, CNVData data, void * callbackData);
    CNVCreateSubscriber (url.c_str(), SubscriberCallback, NULL, 0, CNVWaitForever, 0 , &subscriber);
    static void CNVCALLBACK SubscriberCallback(void * handle, CNVData data, void * callbackData)
    int16_t daqValue[100000];
    long unsigned int nDims;
    long unsigned int daqDims[2];
    CNVData fields[1];
    CNVDataType type;
    unsigned short int numFields;
    CNVGetDataType(data, &type, &nDims);
    CNVGetNumberOfStructFields (data, &numFields);
    CNVGetStructFields (data, fields, numFields); // <-------HERE IS THE PROBLEM, i can comment out the code after this point and it still causes a memory leak.
    CNVGetDataType(fields[0], &type, &nDims);
    CNVGetArrayDataDimensions(fields[0], nDims, acqDims);
    CNVGetArrayDataValue(fields[0], type, daqValue, daqDims[0]*daqDims[1]);
    CNVDisposeData(data);
    At the average settings i use all my systems memory (4GB) within one hour. 
    My question is, have any else experienced this and what could the problem/solution to this be?
    Thanks.
    Solved!
    Go to Solution.

    Of course.....if it is something i hate more than mistakes, it is obvious mistakes.
    Thank you for pointing it out, now everything works

  • Need an example how to use SCAN_Start with a callback function

    I would appreciate if someone helps me with a working example of how to use SCAN_Start with a callback function. I need just a basic functionality: to specify a channel list (with gains probably), to start a data acquisition task and to receive data buffers utilizing a callback function. t this time whatever I was trying to do caused computer hangups, though it is supposed to be one of the most regular tasks to perform.
    Thank you in advance,
    Mike

    Hello Mike,
    Thank you for contacting National Instruments.
    Attached is an example project which uses a callback function to begin analog acquisition (AI) by calling SCAN_Start. This project acquires from the first 2 channels on your DAQ device. Make sure to modify the device number in the code to match the number of your card.
    Let me know if you have any further questions...
    Sincerely,
    Sean C.
    Applcications Engineer
    National Instruments
    Attachments:
    Acquire_multichannel_61xx.zip ‏11 KB

  • External Function with a Pointer to a Callback Function Inside a DLL

    Hi.
    I'm loading a DLL and trying to call a function with the following prototype:
    Func1(HANDLE, hHandle, LPVOID (*pCallback)(UINT, UINT LPVOID), CHAR* sPath)
    Now, I have no problem with the variable types, because CVI 9.0.1 recognizes all of them and I have no problem with LoadLibrary() nor with GetProcAddress().
    But, how do I pass a pointer to a callback that is inside the DLL I'm trying to use.
    I've tried to declare the callback like this:
    LPVOID (CALLBACK Callback)(UINT iDevNo, UINT evEvent, LPVOID pData);
    and call the function Func1 like this:
    (Func1)(hHandle, &Callback, NULL);
    but this gets me:
     Undefined symbol '_Callback@12' referenced in "source.c".
    Hope I can get some help.
    I appreciate your time on this issue.
    Regards.
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda
    Solved!
    Go to Solution.

    Hi Daniel,
    First, you have to make sure that the callback function is exported by the DLL, so that the program that uses the DLL can access the function name identifier. Then, you have to make sure that you call GetProcAddress not just on Func1, but also on the exported callback function. You need to store both function address values in their respective function pointers. You then can pass the callback function pointer as an argument to the Func1 call.
    It's probably cleaner if you define typedefs for all your function pointers, in the calling program:
    typedef LPVOID (__stdcall *CallbackType) (UINT , UINT, LPVOID);
    typedef ??? (__stdcall *Func1Type) (HANDLE, hHandle, CallbackType, CHAR*);
    CallbackType     CallbackPtr;
    Func1Type        Func1Ptr;
    dllHandle = LoadLibrary ("...");
    CallbackPtr = (CallbackType)GetProcAddress (dllHandle, "Callback");
    Func1Ptr = (Func1Type)GetProcAddress (dllHandle, "Func1");
    Func1Ptr (..., hHandle, CallbackPtr, NULL);
    Boa Sorte!
    Luis

  • My callback function under MFC is never called back!

    I am developming a MFC application using NIDAQ 6.7 driver and PCI-DIO-6533
    for a new
    data adquisition system at the Jicamarca Radio Observatory. It is my first
    project with the
    PCI card. I am having problems with the CALLBACK functions. Following are
    relevant portions
    of the source code that illustrates my problem:
    void CallbackNidaq()
    int j;
    j=1234;
    TRACE("I have entered the callback function \n");
    void CCAMUView:nCallbackNidaq()
    HWND my_hwnd = m_hWnd ;
    u32 direcion=0 ;
    puntero = (unsigned char *)piBuffer;
    puntero[4*NSAMPLES-1]=0;
    puntero[4*NSAMPLES-2]=0;
    puntero[4*NSAMPLES-3]=0;
    puntero[4*NSAMPLES-4]=0;
    iStatus = Config_DAQ_Event_Message(iDevice,(i16)1,//add message
    "DIGRP0" , // string description
    (i16)0 , // DAQEvent 0-> Adquire N scans
    (i32)NSAMPLES , /*DAQTrigVal0*/
    (i32)0 , //DAQTrigVal1
    (u32)0 , //trigSkipCount
    (u32)0 , //preTrigScans
    (u32)0 , //postTrigScans
    0 , // hwnd
    0 , // to post WM_NIDAQ_MSG
    (u32)CallbackNidaq) ; // function address
    TRACE("I have already configured : status = %d\n",iStatus);
    int iStatus2;
    iStatus2 = DIG_Block_In(iDevice, iGroup, piBuffer, ulCount);
    TRACE("I have started asinc Status2 = %d",iStatus2);
    Sleep(1000);
    TRACE("Buffer= %d %d %d %d \n",puntero[4*NSAMPLES-1],puntero[4*NSAMPLES-2],pu​ntero[4*NSAMPLES-3],puntero[4*NSAMPLES-4]);
    What I expect to happen is as follows:
    After I configure the device I should get the first TRACE messages I do. I get
    "I have already configured : status = 0" ,
    "I have started asinc Status2 = 0"
    To make sure the device has actually read a buffer full of data, I print out the contents of the last
    four bytes which have been previously set to cero. They do show new values.
    My problem is that the callback
    function is never triggered.I never get the ""I have entered the callback
    function"
    message.
    For your information, in case it helps. I have used the compiler debug to
    find out the address of CallbackNidaq()
    but it does not aggree with the address I get for the (u32)CallbackNidaq
    address assign to the last argument of
    the Config_DAQ_Event_Message function.
    I would appreciate very much if you tell me What I am doing wrong.
    Wishes.
    Gabriel

    Hello Gabriel,
    the propotype of your callback function is wrong; must be (without CALLBACK keyword):
    void CallbackNidaq(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)
    See the Config_DAQ_Event_Message in NI-DAQ Help at the bottom.
    Hope this will help you.
    Grettings,
    Alain

  • Callback function module

    Hi Experts,
    What are callback function modules?
    Why do we use them and in what scenarios are we required to use them?
    What is their purpose and how are they helpful?
    Can anybody explain with an example.
    Regards,
    Sangeeta.

    Hi Sangeeta,
    CALLBACK modules basically return the u2018oldu2019 and u2018newu2019 memory of a dataset after an operation and thus give you a snapshot of what data changed in the process. They find use in event triggers, or to define a reaction based on some processing done in the transaction.
    E.g : say you want to send an Email to a supervisor everytime a user changes the BP name. The only way you can know if the BP name has changed is by comparing the database for BUT000-NAME_FIRST and BUT000-NAME_LAST between before and after the operation. To do this, you can just call module BUP_MEMORY_BUT000_CALLBACK, or BUPA_GENERAL_CALLBACK. This returns the BUT000 state before and after in 2 tables  - ET_BUT000_OLD and ET_BUT000_NEW. So you can easily compare the contents and react accordingly.
    The most classic use of Callback modules is in Data Exchange. The callback modules help the application decide what data has changed, and thus, what must be sent over to the other connected systems.
    Hope this helps you !
    Cheers,
    Rishu.

  • Edge triggered D flip flop in labview fpga

    Hi,
    I am trying to write a program to test ADC with PXI-7962 FPGA. This is basically a 9 bit SAR ADC whose data is to be read every time a 100 MHz clock have a positive or nagative edge. So I have to check for edges in the clock and take the value of the 9 bits in that same instant, for which I need edge triggered D flip flops. But I could not find any D flip flop on the FPGA functions pallette and also could not find a good solution in the web. Can anybody help me in this regard? 
    Thanks,
    Anindya

    I would recommend giving yourself a foundation in labview if this is going to be a sustained development effort. The best way to do this is with instuctor led training. If that isn't an option then the next best thing is self paced online training, which is free if you have purchased LabVIEW or LabVIEW FPGA.
    Strengthen Your Core with the New Self-Paced Online Training
    https://decibel.ni.com/content/docs/DOC-32313
    The advantage to giving yourself a foundation is you learn to ask the right questions earlier in development. The folks on the forums can only answer the questions you are asking, and while acessing every bit in a numeric is a perfectly reasonable question, we have no idea if what you are trying to do with them is reasonable and if accessing them all is even necessarry for your application.
    National Instruments
    FlexRIO Product Support Engineer

  • How to create a callback function module

    Hi all,
    I am working in a requirement where we need to call a function module at a 'after change' event. So how to create a callback function module and register it with the crmvevent ?_
    I created a sample function module and try to create entries in table crmv_event_cust, but i got an error message saying that the function module name I provided is not in table CRMC_FUNC_ASSIGN. When I try to create entry there, I got a message that function module is not in CRMC_OBJ_FUNC and that table is a standard table with no maintanance options !!
    looks like i am going in wrong way ... can any one please help ??

    Looking at my system all you need to do is create the entry for the callback function in maint view: CRMV_FUNC_ASSIGN.
    Your entry should be as simple as Z-function name Object Function - <same as others in the segment you are assigning>
    IE for the partner it would be CRM_PARTNER as object function, for general order processing CRM_ORDER
    Take care,
    Stephen

Maybe you are looking for

  • Windows 7 wont start, only get bluescreen

    Hello I have a problem I have Windows 7 64bit For a game I needed to change my processor limit to one so the game wont have graphic problems, I changed it and rebooted my computer after that I had to options if i chose the option to start windows nor

  • Interactive Report Refresh and JQuery Plugin Issue

    Hi, I have Interactive report in my page. I am using jQuery context menu plugin , so when user right click on a column he get an option to add , delete , update and other option. javascript pseude code for context menu $(function(){      context_menu

  • Subtitling Workflow: Is LiveType Just Not the Right Tool?

    I just finished a project that required subtitling a 7-minute video that was in another language, with about 120 subtitles. This was an in-progress video edit where we were going back and forth between subtitling and other edits, not a finished video

  • Version of iMovie for PowerPC G5 1.8GHz?

    Does anyone know what version of iMovie and iLife does work on it and where that version can be downloaded? The download page for iMovie is http://support.apple.com/downloads/#imovie but, rediculously, it does not say anything about the hardware requ

  • Guixt Transport

    Can anyone suggest how to do a Guixt transport?I cannot do with STMS