Callback for Config_ATrig_Event_Message in VB6

Hi;
I am relatively new to Natinst products but I have some experience in
programming high speed DAQ in DOS embedded environment.
I am trying to make VB application for one of our measuring equipment
product using DAQCard-500. I was able without any problems to use the
"ATRIG EVENT" ActiveX control from NI but I need a more deterministic time
for triggering than a Microsoft Windows event message. So I am trying to
make the same using a callback function.
It started to work but after "solving" some minor thing I am stuck because
both the Visula Studio 6 Enetrprise etc. development environment and the
compiled program goes south right after the 10th trigger pulse. For the
first 9 everything is fine.
Does
anyone have any experience in this???
I would greatly appreciate if there was somebody I could turn to with this
problem.
Thanks;
Zoltan

The first parameter to Config_DAQ_Event_Message() is the device number. THis number is assigned by the configuration utility and is probably 1 if you only have one device in your computer. To verify this device id you will have to open the Measurement & Automation Explorer (MAX) and look under the Devices and Interfaces folder.
Currently you are using the AT_MIO_16E_10 device code, which is #defined as 36. This is the device code specific to your particular device. If you had two AT-MIO-16E-10 cards then they would both have the same device codes, but different device numbers.
Since you are using 36 are your device number, which is most likely incorrect, this would explain why you are never seeing the callback function executed.
Regards,
Justin B
ritten
Applications Engineer
National Instruments

Similar Messages

  • Callbacks for Process States

    Hi all,
    Are there any callbacks available for Process states(faulted,closed,completed) etc similar to callbacks for human workflow tasks in BPEL 1013? I need to handle the scenarios when a process is faulted or is aborted (from BPELConsole) and propagate this information to my application.
    thanks,
    Ravikiran

    This is normal exception handling. You just use the Fault handling in the SOAP response.
    Create a Fault message in your BPEL process and send this back to the client.

  • Courtesy Callback for CVP 9 w/o Call Studio

    Just a question, is Call Studio a requirement to be able to utilize courtesy callback for CVP? I have a customer using only micro-apps and didn't purchase Call Studio but they might be potentially looking at some sort of callback solutions. Hence, the question. Many thanks.                  

    Required for courtesy callback.
    Other callback solution would be custom and should be possible through ICM scripting (depends how you do it) directly.
    Thanks!
    -JT-

  • CTIOS Callback for other agent

    Is there a mechanism for scheduling a personal callback for another agent? Specifically I would like the ability to have the agent handling the call schedule a callback with a supervisor (any supervisor).

    Scott,
    > There are no ideal hooks to do this. The only callback that could
    be
    > used is SequenceFileUnload, but each sequence file would have to
    > define the callback and invoke a tool in a shared sequence file.
    You
    > would probably want to use PropertyObjectFile.ChangeCount to
    determine
    > if the files was modified since it was loaded and only do your
    > checking if true. Minimally you could warn the user if something
    was
    > not correct when the file was unloaded from memory.
    Thanks. The SequenceFileUnload option isn't really a viable fix for
    this problem as as I run into the same problem as the Tools menu item:
    the users will forget to add the callback to their sequence files. I
    was hoping there was some other hook I was missing.
    On a related note, is th
    ere a repository for "wish list" items for
    future versions of TestStand? The big "wish list" feature I think
    would benefit all (not to mention solve my problem ;-) would be the
    ability to create a new sequence file from a template (so new sequence
    files can be "preloaded" with specific FileGlobals, Locals,
    implemented callbacks, etc).
    Thanks,
    Bob

  • Callbacks for cancelling or progress?

    You all have been so helpful with my last few questions as I quickly get up to speed on DBXML, I thought I'd ask another one that's been bugging me: Are there any mechanisms to support callbacks for either cancelling an in-progress operation or obtaining information on the progress of an operation. We have large databases with X-Queries that sometimes take as much as 20 - 30 minutes (or longer) to complete and during that time all I can do is throw up a "please wait" message without any clue as to how much longer the process will take or ability to cancel. I could always launch the query (or other operation, indexing takes a little while too) in another thread and then ungracefully kill it if the user wants to cancel, but I'd hate to have to go that route - it just doesn't seem like good form. Thanks!
    -Dave

    That should go a long way - the biggest problem right now is trying a new index or query strategy only to have the query take a long time to finish before trying another one.
    As far as the actual query times, we've tried just about everything to get them down. I think our issue is just that the data is both big and complex. Our databases are typically about 1 - 2 GB with 4 or 5 levels of nesting and both elements and attributes. We've turned on node indexing for the database and have split the data into about 150 - 200 documents per database (and roughly 5,000 top-level nodes per document). A couple typical top-level nodes look like:
    <TransmitterPdu antennaPatternLength="0" antennaPatternType="0" cryptoKeyID="128" cryptoSystem="1" frequency="238037120" inputSource="0" lengthOfModulationParameters="0" padding="0" padding1="0" padding2="0" padding3="0" power="-270" radioID="705" transmitFrequencyBandwidth="25000" transmitState="1">
    <PduHeader exerciseID="1" length="104" padding="0" pduType="25" protocolFamily="4" protocolVersion="6" timestamp="1883939066" />
    <EntityID application="100" entity="1" site="13000" />
    <RadioEntityType category="0" country="0" domain="0" entityKind="7" nomenclature="0" nomenclatureVersion="0" />
    <AntennaLocation x="-5468000" y="-2549800" z="2063550" />
    <RelativeAntennaLocation x="0" y="0" z="0" />
    <ModulationType detail="2" major="2" spreadSpectrum="0" system="1" />
    <Metadata fromIP="000.000.000.000" receivePort="0" receiveTime="00:02:16.844001" />
    </TransmitterPdu>
    <SignalPdu dataLength="1024" encodingScheme="1" radioID="3" sampleRate="8000" samples="1024" tdlType="0">
    <PduHeader exerciseID="1" length="1056" padding="0" pduType="26" protocolFamily="4" protocolVersion="5" timestamp="217910114" />
    <EntityID application="3" entity="3" site="409" />
    <Metadata fromIP="000.000.000.000" receivePort="0" receiveTime="00:02:16.907001" />
    </SignalPdu>
    A typical query might be something like "return the average length for each type of top-level element". When designing them we usually try a few different strategies and indexes (checking the query plan to be sure the indexes are being used of course). In any case, if anyone has any more suggestions on how to speed up the quries - I'm all ears!

  • Callback for the delete button in a UITableViewCell

    Hi, I have set a UITableView to be in edit mode, and each cell has a round red circle next to each cell, and when pressed the red Delete button appears in the cell, but when this button is pressed, nothing happens. I've looked at these delegates for events, but nothing seems to happen in theses:
    - (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath
    - (void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath
    I've also tried setting the UITableViewCell editAction and target properties without success.

    Hi,
    I'm trying to use different callbacks through the "editAction" property in a UITableViewCell and it doesn't seem to fire. What I'm doing is, from my ViewController I set
    cell.target = self;
    cell.editAction = @selector(myEditAction:);
    and then my view controller implements
    - (IBAction)myEditAction:(UITableViewCell *)cell;
    I CAN use
    tableView:commitEditingStyle:forRowAtIndexPath:
    but that's not what I want.
    Any ideas?

  • Is there any event callback for "pre/post-register/unregister" object?

    Dear all,
    We noticed that there are rich set of event callback provided by TopLink, including "pre/post-Refresh/Build/Clone/Merge". However, we cannot found any callback method for "pre/post-register/unregister" events. They will be very useful, if we to manage the internal status of register/unregister to indicate whether it is still under the control of TopLink.
    Thanks and regards,
    William

    William,
    Those specific events do not exist. The postClone event is called after an object is registered. This is frequently used to copy non-persistent values from the cached original into the working copy.
    There is also the ability to customize the clone/copy policy used by TopLink in creating the working copies in the UnitOfWork.
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/DP4/_html/descfg028.htm#sthref3950
    Doug

  • Implement callback for an asynchronous BPEL process through Java

    Hi ,
    I am trying to implement a callback functionality for an asynchronous BPEL process through java.
    I found the code in the samples folder of SOA suite installation folder .
    <SOA_HOME>\bpel\samples\tutorials\102.InvokingProcesses\rmi\com\otn\samples\async.
    There is an AsyncInstanceWatchdog object which registers a callback object(in this case an object of AsyncCallbackImpl class) for a specific CONVERSATION_ID.
    String convId = GUIDGenerator.generateGUID();
    nm.setProperty(NormalizedMessage.CONVERSATION_ID, convId);
    deliveryService.post(proc_name, "initiate", nm);
    // register the callback
    watchdog.registerAsyncCallback(convId, testAsyncHandler,
    locator.getDomainAuth());
    // start it
    watchdog.start();
    There is no problem till the last line. But once the BPEL process returns the control( does a callback), it throws the following error.
    May 25, 2010 3:36:06 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    ORABPEL-02118
    Variant not found.
    The variant "output" has not been declared in the current scope. All variants must be declared in the scope before being accessed.
    Please check that the variant "output" is properly declared; otherwise there may be a misspelling in the name of the variant.
         at com.collaxa.cube.engine.core.Scope.getVariantRV(Scope.java:535)
         at com.collaxa.cube.engine.CubeEngine.getFieldValue(CubeEngine.java:2668)
    For your reference the variable output is declared in the definition of AsyncCallbackImpl (which implements the IAsyncInstanceCallback interface).
    There are 2 methods defined in the AsyncCallbackImpl class.
    public void onResult(Map pResultMessage) {
    System.out.println("called back! ");
    Iterator iTest = pResultMessage.keySet().iterator();
    while (iTest.hasNext()) {
    String key = (String)iTest.next();
    System.out.println(XMLHelper.elementToString((Element)pResultMessage.get(key)));
    public String getVariableName() {
    return "output";
    The variable name is same given in the sample code. And the BPEL process returns variable named output. So the name should not be a problem.
    Is it because of the scope of the variable.. If so, how do I change it.
    Any help would be appreciated.
    Edited by: saptarishi on May 25, 2010 4:24 PM
    Edited by: saptarishi on May 26, 2010 4:45 PM

    Solved it by some googling .... :)
    Here is the link:-
    [http://abhishek-soablog.blogspot.com/2008/09/orabpel-02118.html]
    or
    [http://beautifulwaste.blogspot.com/2008/04/calling-asynchronous-bpel-process.html]
    Both gives the same solution..
    In pre 10.1.3.3 release the default behaviour were to keep global variable information along with the instance information for completed BPEL processes.
    In 10.1.3.3 or later, this behaviour changed for performance reasons so that the default behaviour is now, not to keep any global variables for a BPEL process once the BPEL process has completed.
    You can configure this behaviour on a process level basis by using the parameter keepGlobalVariables in the bpel.xml file for the specific process:
    <BPELSuitcase>
    <BPELProcess src=".........." id="...........">
    <configurations>
    <property name="keepGlobalVariables">true</property>
    </configurations>
    </BPELProcess>
    </BPELSuitcase>
    Thanks
    saptarishi

  • Callback for specific step group

    Hi,
    I have a sequence, Main sequence. In this sequence, there is Setup, Main and Cleanup step group. Setup is to initialise my devices, Main is to perform the tests on my UUTs, Cleanup is to stop and clear task for my devices. I would like to have a TS sequence in such a way that it runs Setup and Cleanup once and continue to loop Main. With this setting, I would still want to have the UUT Information window popup.
    I have tried using SequenceLoadFile callback and put my vis for initialising my deivces (found in Setup) in this callback. It works when I first open my sequence file. However, I would like to know if I can do it in such a way that everytime I click Run (F5), it will run my initialise vis (found in Setup) once and keep looping Main with popup of UUT Information window for each UUT and run Cleanup with I click Stop on the UUT Information window.
    Could anyone give me some advise on how I can do so??
    Thank you & Regards
    Lee

    Process Setup Callback and Process Cleanup Callback.  They are model callbacks that you can add to your client sequence and put your initialize and cleanup code in.  You add them the same way that you added the Sequence File Load callback (which, by the way, is an engine callback). 
    The Purple sequences are engine callbacks.  The Green sequences are Model callbacks.
    It doesn't matter if you override engine callbacks like you are doing.  It just matters what kind of behavior you want.  In your case you need the two model callbacks I mentioned at the first.
    Hope that helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Callback for a state change on digital Input 6025E

    Hello All,
    I need to have a callback function invoked when a state change occurs on serveral digital inputs (interlocks, kill button etc.).
    I am using a PCI-6025E and traditional NI-DAQ. For test purposes I have connected the output P3.0 to the input P4.0 using a SCB-68
    terminal block and initialize the ports in the following manner:
    void initfunc()
    long nPattern;
    DIG_Prt_Config(1, 3, 0, 1); /* port 3 output */
    DIG_Prt_Config(1, 4, 0, 0); /* port 4 input */
    DIG_Out_Prt(1, 3, 0xff); /* set all outputs high */
    DIG_In_Prt(1, 4, &nPattern); /* returns 0xff */
    Config_DAQ_Event_Message (1, 1, "DI4", 8, 0xffff, 0xffff, 0, 0, 0, 0, 0, (unsigned long)(&myCallback)); /* callback on state change */
    Now later in my program I perform the following (again as a test) when a button is pushed on a dialog box.
    CDigioDlg:nKillBtn()
    DIG_Out_Line(1, 3, 0, 0);
    DIG_In_Prt(1, 4, &nPattern); /* returns 0xfe */
    My callback funtion never gets called on the state change. Now looking at the documentation for the Config_DAQ_Event_Message it says that
    it notifies traditional NI-DAQ applications when the status of an asynchronous DAQ operation (initiated by a call to DAQ_Start, DIG_Block_Out, WFM_Group_Control, and so on) meets certain criteria you specify.
    Eventually this routines will need to monitor these input lines continuously within a DLL. I want to call an initialization function within
    the DLL to configure the board and callbacks then return. I want the callback functions within the DLL to handle these state changes.
    Any help would be greatly appreciated,
    John

    Hello John. Thank you for contacting National Instruments. It looks like you are using the callback incorrectly. I found an example that uses the callback in Visual C++ with Traditional DAQ. This isn't the same setup as you are using, but it should give you a good idea of how to setup the callback. Please let me know if you have any questions. Have a great day!
    Marni S.
    National Instruments
    Attachments:
    DAQEvent3VC6.zip ‏5 KB

  • Installing a callback for multiple windows messages and processing EVENT_NEWHANDLE message

    Good afternoon all,  I am a newbie to using the Win32 API.  I have two questions:
    When a single callback is installed to process multiple windows messages, will the install function return the same windows handle for the panel?
    I also saw noted in the help your panel should handle and respond to the EVENT_NEWHANDLE message.  Does the InstallWinMsgCallback function need to be called make sure your panel handles this message as well?
    Thank you for your help.

    Hi hortoxn1,
    We have a KnowledgeBase Article on this topic that you may find useful:
    "How Do CVI Panels Process Windows Messages?"
    http://digital.ni.com/public.nsf/allkb/29C12428E7974EEF862565EF00839871
    Does that explain what you're looking for?
    Steven

  • Event Callback for JTS managed transaction.

    Dear all,
    We would like to implement some logic at the pre/postCommitTransaction callback method. However, we worry if the transaction is managed by JTS, this event will not be raised when JTS commits the transaction.
    Thanks and regards,
    William

    Dear Ailitche,
    Thanks for your suggestion. I am looking at the source for Oracle9iJTSExternalTransactionController and Oracle9iJTSSynchronizationListener.
    // at Oracle9iJTSSynchronizationListener
    public void beforeCompletion() {
    unitOfWork.issueSQLbeforeCompletion();
    unitOfWork.setPendingMerge();
    getSession().incrementMergesPending();
    Will these three lines of code trigger the preCommit event for UnitOfWork?
    Similarly,
    // at AbstractSynchronizationListener
    public void afterCompletion(int status) {
    if (wasTransactionCommitted(status)) {
    unitOfWork.afterTransaction(true, true);
    } else {
    unitOfWork.afterTransaction(false, true);
    Will unitOfWork.afterTransaction() trigger the postCommit event for UnitOfWork?
    Thanks and regards,
    William

  • Fast mode acquisition for 9214 with VB6

    Hi
    I have a VB6 app which acquires data from an NI 9214 temperature measurement device. The device has two acquisition modes, high accuracy (default) and high speed. Using MAX I can see that these modes both function in a test panel. However I cannot see how to change the mode to high speed programmatically in VB6. I'm building and running in VB6 in DevStudio 2008 on an XP virtual machine (host is Windows 7) using DAQmx 14.2. Also running the compiled executable directly on Win 7 with no problem. Just want to change the sampling mode to fast (up to 100 Samples/s for a single channel) whereas the default high accuracy mode is only 1 sample/s. Looking at transients of the order of 0.01 s over a 2 minute period.
    Can anyone help with this?
    Kind Regards
    Chris
    Solved!
    Go to Solution.

    Thanks. The VB6 examples are limited and none show use of the timing mode. The VB.NET samples are more extensive but I don't see timing mode settings in them either.
    I'll see if I can use the AdcTimingMode property properly. I'm not a VB6 expert so whilst I've seen this property before, I guess I must have used it incorrectly.
    btw - the doc for Public Property AdcTimingMode As AIAdcTimingMode specifies the difference between HighResolution and HighSpeed as the following. However I can't find anywhere the specifics of what is sacrificed to get high speed. The 9214 has 24-bit resolution in high accuracy mode but what is the actual resolution in high speed mode? Also what other functions are ommitted, for example input noise filtering, CJC etc. Can anyone point me to a document with the specifics? I assume someone at NI must know!
    HighResolution
    Increases resolution and noise rejection while decreasing conversion rate.
    HighSpeed
    Increases conversion rate while decreasing resolution.
    Thanks again for your help.

  • Unit gain setting for DAQ6063E in VB6

    I have written a simple application in VB6 to capture analog data on channel 0. I wish to use a gain setting of 1, however if I set the GAIN parameter to 1 for functions such as DAQ_Start I find that the captured voltages are only half the known applied voltage. The correct voltage is recorded if I use a GAIN setting of -1, supposedly a gain of 0.5. I am using DAQ_VScale to scale the binary data and I'm sure all other parameters are fine. Are the datasheets just wrong? Are there any problems using VB which doesn't support unsigned variables? Thanks for your help.

    All the documentation I have read online and about NI-DAQ states that a gain setting of 0.5 results after entering -1 as a parameter not 1. You need to refer to the documentation for your particular card and its supported gain settings for each measurement type.
    In order to determine if you has a hardware fault, visit http://www.ni.com/support/selftest/selftest.htm in order to test all of your cards gain settings. This utility also performs a self calibration just in case your device needs adjustment prior to testing.
    Hope this helps

  • Does UITableView have a callback for when it is done loading ALL cells?

    I find it very diffcult to change UIActivityIndicator on and off for data loading into a table. I set it on and then call "reload data" on my tableView and then turn it back off. I dont think that is correct, because reload data will return immediately, it doesnt block until al the data is loaded correct? So a better way it to check for a callback when all the cells are loaded?
    How are you guys doing this?

    The table isn't going to load all cells anyway.
    Say you have a 100-item table of which 6 cells are visible at a time. The table view will only use tableView:cellForRowAtIndexPath: to create 6 or 7 cells.
    Later on, if the user scrolls, the table view will call tableView:cellForRowAtIndexPath: some more, for the newly visible cells.
    If the table view held on to every cell once it had been loaded, more and more cells would gradually get allocated until all 100 cells were in existence and holding data. That would use up a lot of memory. (What if the table has 10,000 cells?)
    If the table view did the standard thing of calling \[release\] on a cell as soon as it didn't need it, memory wouldn't get used up but a lot of time would be wasted allocating and deallocating.
    So the table view has a list of "cells I have but don't really want". When they encourage you to call dequeueReusableCellWithIdentifier: in your tableView:cellForRowAtIndexPath: routine, they're effectively saying "when the table is asking you for a cell for a given table entry, ask the table if it's got any unwanted cells to give you, before you go off and allocate a new one".
    As far as your question is concerned, this means that the table never really finishes loading. It'll only load 6 or 7 cells at a time, and when the user scrolls, it'll load some more. Depending how you've written tableView:cellForRowAtIndexPath:, it may only ever have 6 or 7 cells in memory at a time.
    It all depends what you want. If you want your activity indicator to say "I am working on giving you a display but what you see on the screen isn't what you're ultimately going to get", then
    (1) Get each individual cell to start its filling-itself-with-visible-data process when you allocate/reuse the cell in tableView:cellForRowAtIndexPath:. Give the cell a unique visible appearance when you do this. When the load process is complete, get the cell to call setNeedsDisplay so that it can get repainted with the real data. The user's experience will be of a table that appears instantly, each cell with an activity indicator in it, and the activity indicators then disappear as soon as each cell finishes its work. It will look rather nice.
    Or (2) do much the same, but get each cell to increment a global "loads in process" counter when it is born/reborn, and decrement it when its data have arrived. Then use that global counter to control a single UIActivityIndicator.
    The key in both cases is for cell creation to be fast, and the actual loading of data to the cells (if it's slow) to be done separately.

Maybe you are looking for

  • Discrepency of GR and IR quantity.

    Hi, in the event if the GR and IR quantity is different, my users are using MR11 to "clear-off" the discrepency amount. However, understand that the posting will be made to the Inventory G/L account. Is there a way which the "clear-off" can be postin

  • JComponent needs to be painted on creation

    I have a Card class that extends JComponent. The paintComponent method is implemented. Added it to a JPanel. Added the JPanel to the JFrame. The JComponent only shows up when the frame is resized, not when the frame is first shown on screen. The only

  • Third party software will not close without a soft reset.

    I have a few third party software utilities/games that do not want to close without a soft reset, some show a white screen and others just will not close. Should I uninstalll these and reinstall them? My grandson has the same utilities on his Treo 65

  • Graphical screen painter no launch

    Hi everybody. I'm not able to launch the graphical screen painter by tcode se51 only the alphanumeric editor neither form tcode se80. I have installed the sap gui 7.1 with patch 17 in my windows vista computer. I've checked the in the directory C:\Pr

  • Why is iMessage not working with iOS 7?

    I have reset my network settings, reset all settings, called AT&T and even called Apple but my iMessage STILL says "waiting for activiation" after 2 whole days. Any suggestions on how to fix this problem? Every tried restoring it on my computer...