VISA Event / Interrupt Handler

I have a VXI chassis with a MXI controller card in slot 0.  I have connected MXI controller card to a dell computer with a MXI-2 PCI card in it.  I am running RHEL4. I am able to get the comparator card to generate a trigger on TTLTRIG0 line (VXI P2 pin 23 RowA).  I have verified via an oscope that the TTLTRIG0 line goes low for approx 2us.  So I believe I am generating the trigger correctly.
I want my C program using VISA to call my handler when the TTLTRIG0 lines goes low.  I am using the following program AsyncTrig.c as a guide. http://zone.ni.com/devzone/cda/epd/p/id/1935
But the C code handler routine never gets called.  Is there something I am missing?  MXI controller board setup? PCI card setup?  Do I need to use IRQ lines instead of TRIG lines?
Any info / help would be greatly appreciated.

Hi,
It sounds like you are generating the trigger correctly in the code.  There should not be anything you have to change on the hardware to send/receive the trigger.
Have you tried using a different trigger line besides 0? Triggers 0-7 should be available to use on your system.
What version of Linux kernel build are you running? 
Are you using ECL, TTL, synchronous, or asynchronous for triggering?
Also attached below are several articles that discuss VXI triggering in more detail.
VXI Trigger Tutorial
Triggering with NI-VXI
Regards,
Andy L.
Applications Engineer
National Instruments

Similar Messages

  • Changes in VISA interrupt handling?

    Hello all,
    I'm grasping at straws here, so I'm looking for a shoulder to cry on.
    I wrote a USB acquisition prog with CVI a decade ago for a custom board. It worked fine for a few years and then was turned off. We are trying to use it again but it's not working properly.
    We don't have the original PC, so we are using it with the lastest CVI on Win7 or XP, with latest VISA driver (regenerated .inf file).
    Communication with USB works fine... except for the interrupt routine. Instead of receiving one interrupt with 3 bytes of data (say 'ABC'), I receive TWO interrupts, the first with 0x1, the 2nd one with 'BC'. There are different types of interrupt frames of different lengths, all have the same split in two, with the 1st as 0x1, the 2nd with valid data.
    Anybody has any idea why there could be such a change in the way my interrupt routine works ?Has VISA changed its handling of interrupts in this time period ?
    Short of a PC-side solution we are ready to reflash the card, hoping that we have the most recent version of the firmware !!!
    If it can be useful, here's a dump of USB VISA parameters (I'm not familiar with most of them):
    VI_ATTR_RSRC_IMPL_VERSION: 0x500400
    VI_ATTR_RSRC_SPEC_VERSION: 0x500100
    VI_ATTR_RSRC_MANF_ID: 4086
    VI_ATTR_RSRC_MANF_NAME: National Instruments
    VI_ATTR_INTF_TYPE: 7
    VI_ATTR_INTF_NUM: 0
    VI_ATTR_INTF_PARENT_NUM error: L'attribut spécifié n'est pas défini ou supporté par la ressource référencée.
    VI_ATTR_INTF_INST_NAME: USB0
    VI_ATTR_MAX_QUEUE_LENGTH: 50
    VI_ATTR_RSRC_LOCK_STATE: 0
    VI_ATTR_RSRC_CLASS: RAW
    VI_ATTR_DMA_ALLOW_EN error: L'attribut spécifié n'est pas défini ou supporté par la ressource référencée.
    VI_ATTR_TMO_VALUE: 2000
    VI_ATTR_TRIG_ID error: L'attribut spécifié n'est pas défini ou supporté par la ressource référencée.
    VI_ATTR_IO_PROT: 1
    VI_ATTR_TERMCHAR: 10
    VI_ATTR_TERMCHAR_EN: 0
    VI_ATTR_SEND_END_EN error: L'attribut spécifié n'est pas défini ou supporté par la ressource référencée.
    VI_ATTR_SUPPRESS_END_EN: 0
    VI_ATTR_RD_BUF_OPER_MODE: 3
    VI_ATTR_WR_BUF_OPER_MODE: 2
    VI_ATTR_RD_BUF_SIZE: 4096
    VI_ATTR_WR_BUF_SIZE: 4096
    VI_ATTR_USB_SERIAL_NUM: 1240332
    VI_ATTR_USB_INTFC_NUM: 0
    VI_ATTR_USB_PROTOCOL: 0
    VI_ATTR_USB_MAX_INTR_SIZE: 64
    VI_ATTR_USB_CLASS: 0
    VI_ATTR_USB_SUBCLASS: 0
    VI_ATTR_USB_ALT_SETTING: 0
    VI_ATTR_USB_NUM_INTFCS: 1
    VI_ATTR_USB_NUM_PIPES: 2
    VI_ATTR_USB_CTRL_PIPE: 0
    VI_ATTR_USB_BULK_OUT_PIPE: 1
    VI_ATTR_USB_BULK_IN_PIPE: -1
    VI_ATTR_USB_INTR_IN_PIPE: 129
    VI_ATTR_USB_BULK_OUT_STATUS: 0
    VI_ATTR_USB_BULK_IN_STATUS error: La référence d'objet spécifiée n'est pas initialisée.
    VI_ATTR_USB_INTR_IN_STATUS: 1
    VI_ATTR_USB_END_IN: 5
    Solved!
    Go to Solution.

    Hi,
    I have a few questions that may help clarify the problem:
    1. What Operating System were you originally using?
    2. What version of CVI and VISA was originally used when this was working?
    3. If you revert back to the old machine/system, do you recieve the same error?
    It sounds like it could be a firmware issue. Another thought, since this is a custom device, it is possible that it was using a USB RAW Driver, which supports Bulk, Interrupt, and Control communication protocols. I have included some general information about USB instrument Control below, including the required changes for setting the communication protocols for USB RAW.
    http://www.ni.com/white-paper/4478/en/
    I would recommend reading through this. Best of luck!
    R. Brill
    Applications Engineer
    National Instruments

  • Why use Visa Events?

    In short, why would one want to use Visa Events?  I have been experimenting with them in order to try to find new ways to handle or avoid Visa Read timeouts and I am struggling to see how they are useful, because they throw timeout errors too.  To provide some background, I am hacking on a test application that reads and displays data from a serial port.  The data can be intermittent, because I often toggle my my serial devices on and off.  I don't want to be bothered with timeout errors stopping my application, so I have used varisous ways to handle them.  The current way I am experimenting with uses Visa Events, hence the reason for this question. 
    If the Visa Read times out and the Visa Wait on Event  times out, then what is the advantage of the latter?  Is the Wait on Event less resource intensive than Visa Read?  By the last question, I mean does the Visa Read poll or block behind the scenes while the Wait on Event does not? 
    Thanks in adavnce.

    Hi Tysoni,
    There are many advantages to using VISA events, one of which being that they can prevent LabVIEW from continuously polling your serial ports.
    The links below provide some additional information on VISA events and receiving time outs while using VISA events.
    http://digital.ni.com/public.nsf/allkb/179E61F87CF8B340862571EA0037CFA3
    http://digital.ni.com/public.nsf/allkb/E393205297CFF1B386256DFA00738F4A
    Regards

  • Visa event driven applicatio​n

    in my application i need to enable visa read event like visual basics on_comm event because visa read vi has a long waiting time if nothing is received.for that my application is getting slow.if i get some suggestion regarding this it will be an immense help for me.

    I've created an app note plus LabVIEW examples to show how to handle query synchronization with instruments using VISA events. The app note is currently being reviewed by our technical communications group. Once finished, the app note, examples, and a Macromedia Breeze presentation will be posted to DevZone. I'm attaching the draft copy of the app note plus examples. I'd appreciate any feedback you might have.
    Attachments:
    Status_Registers_and_Service_Requests.llb ‏1241 KB
    SRQ_App_Note.doc ‏238 KB

  • How to enable Sql Dependency OnDataChange event to handle multiple request at a time

    when we work with sql dependency then we work with OnDataChange event and this event notify us regarding data change in table. suppose my application monitor a
    test table by using sql dependency. suppose huge number of data is getting insert and updated in
    test table very frequently. so i do not know how sql dependency
    OnDataChange event can handle this situation because OnDataChange event will fire as many as time data will be change in db table.
    here is my snip for onchange event
    void OnDataChange(object sender, SqlNotificationEventArgs e)
    ((SqlDependency)sender).OnChange -= OnDataChange;
    BBALogger.Write("PartIndexer Service RegisterNotification called end", BBALogger.MsgType.Info);
    if (e.Source == SqlNotificationSource.Timeout)
    MailSend(); // notification mail send
    BBALogger.Write("PartIndexer Service SqlNotificationSource.Timeout error", BBALogger.MsgType.Error);
    Environment.Exit(1);
    else if (e.Source != SqlNotificationSource.Data)
    MailSend(); // notification mail send
    BBALogger.Write("PartIndexer Service SqlNotificationSource.Data", BBALogger.MsgType.Error);
    Environment.Exit(1);
    else if (e.Type == SqlNotificationType.Change)
    StartIndex();
    BBALogger.Write("PartIndexer Service Data changed", BBALogger.MsgType.Info);
    else
    BBALogger.Write(string.Format("Ignored change notification {0}/{1} ({2})", e.Type, e.Info, e.Source), BBALogger.MsgType.Warnings);
    RegisterNotification();
    please help me to design my OnDataChange event such was if data is changed very frequently in test table then
    OnDataChange can handle the situation. OnDataChange event should not be freeze and can log each data change in xml file.
    i am just looking for guidance like how to design OnDataChange as a result it could handle and log data when huge number of user will change data in test table frequently. thanks

    Hi,
    You should be able to delete all nodes selected by an XPath expression... Have a look at this...
    http://docs.oracle.com/cd/E28280_01/dev.1111/e15866/ui_ref.htm#i1290003
    Cheers,
    Vlad

  • (com.apple.collabd[15483]): Service setup event to handle failure and will not launch until it fires.

    Hello,
    I am fairly new at Xserve administration, but I got thrown in the fire and i need your help.
    My system.log is being hammered with this error:
    (com.apple.collabd[15483]): Service setup event to handle failure and will not launch until it fires.
    I did my research and it seems to be related to Wiki, but I disabled wiki and restarted and it is still coming up. Any advice would really help
    System Version: OS X 10.10.1 (build 14B25)
    Server Version: Server 4.0.3 (Build 14S350)

    Try deleting the preferences file

  • Solaris 8 (INTEL) - Interrupt handler

    We are developing a device driver for a PCI card. The interrupt level assigned is 10 and the priority level is 6.
    In the interrupt handler, we first check whether our device has generated the interrupt and if not return with DDI_INTR_UNCLAIMED otherwise we proceed to clear the interrupt status and do the appropriate action and return DDI_INTR_CLAIMED.
    we have observed that while returning from the Interrupt handler, the control is going into a function "LOOP2", and our interrupt handler is invoked again from "LOOP2" and this goes into a loop. ( We use kadb to debug ).
    Kindly clarify.

    Hi!
    I also had the same exact problem during the install. The only way that I could procede was to tell it that I didn't want to install networking. Now when I boot, it tries to load the elx0 driver (for my 3Com 3c509b) and brings the following message, "SIOCSLIFFFLAGS cannot assigm requested address." I have checked the Irq/IO setting in the hardware configuration agent and everything seems to be correct. To top it all off, once I logon if I enter "ifconfig elx0 192.168.1.2 up" then everything works fine. I tried to forceload the elx0 module in /etc/system to see if the module just wasn't loaded early enough but this did not help. Any ideas of what else I should check?
    TIA

  • High-level interrupt handler

    Why can I decide to support a high-level interrupt or not? Under what condition does the Solaris kernel will map my hw interrupt (INTA from PCI bus) to a high-level interrupt? When should I refuse to support a high-level interrupt? Why? Can I force my hw interrupt to be a high- level interrupt?
    Also think about that, most hw interrupts indicate something important such as the case buffers are full. If they are assigned below the scheduler's, it really does not make sense.
    Is it possible to block any hw interrupts? Or I'd put it this way can I prioritize hw interrupts in Solaris?
    Thanks
    tyh

    Hi,
    On x86 each IRQ has a software priority assigned to it implicitly by the bus driver, although I think you could override it in the driver.conf. Unlike SPARC, the processor doesn't support a PIL so software priorities are implemented by masking all lower-priority IRQs and re-enabling interrupts.
    High priority interrupts, above dispatcher level, run in the context of the current thread on the cpu, normal level interrupts are handled by interrupt threads.
    The interrupt threads are the highest priority threads on the system, so will preempt any other running threads. In addition mutexes in Solaris use priority inheritance, so the interrupt threads will get to run.
    In general, high level interrupts are allocated to devices with small buffers such as serial or floppy, so that their buffers get serviced in the fastest possible time. Others can afford to wait for just a bit.
    Your driver should check to see if its device has been allocated a high level interrupt. If this is the case, the high level handler should clear the interrupt and save the data/status (in the driver state structure perhaps) and trigger your soft level interrupt handler (which will run as a thread).
    Blocking of interrupts is done for you when you acquire a spin mutex (ie initialised with an iblock cookie). Such a mutex is required to synchronise access to data shared with a high level handler in your driver.
    Please take a look at the Intel Driver writers orientation at:
    http://soldc.sun.com/developer/support/driver/docs/Solaris_driver_models/index.html
    Hope that helps,
    Ralph
    SUN DTS

  • What is the event to handle before leaving the page?

    Hello All,
    I am using splitApp. I have a scenario where user can edit few fields in one of the "Detail" page. When user clicks some item in master page, before changing the detail page I want to show a popup to user if changes should be saved.
    Is there an event where I get to know any detail page navigation? or some event to handle before leaving the page.
    Thanks,
    Rashmi

    Hi Rashmi,
    It depends on which element you are using.
    Suppose you are using sap.ui.commons.TextField where you are editing your data(In Detail View) then change event is triggered whenever the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed and you can use this event in your code according to your need.
    Here you may set some global variable and check that value if it is set or not.
    Best Regards
    Dhananjay

  • Interrupt Handling

    My problem is that I am using a third party API provided by a Vendor in order to access their DAM (Digital Asset Management) system. This API is used by a Swing application. I provide the user with a way to interrupt long running operations, but sometimes, if the interrupt is fired when the API code is executing, the interrupts get swallowed up and then I am unable to stop the thread.
    Any suggestions for working around this problem?
    If I were to paraphrase the question: What is the best way to catch interrupts if making calls to third party code that does not implement interrupt handling properly?

    Don't know nothing great comes to mind. Only other thing I think you could try is thread.kill

  • Interrupt handler

    hi all,
    i want to model an interrupt handler
    i have a class that is working it's job and when it receive the interruption it should cancel it's job and execute the interrupt handler

    You could add a wrapper to you job e.g.
    final Callable job = ...
    Callable called = new Callable () {
       public Object call() {
           try {
               return job.call();
           } catch (InterruptedException ie) {
               // handle interrupt.
    };

  • Raise event inside handler of another event

    Hello,
    Is there any way of triggering an event from handler of another event? Its like: Trigerring even 'expand_empty_node' inside handler of event 'checkbox_change'. I am using slav tree.
    Regards
    Puru

    Hi,
    Please declare the event in componentcontroller and use code wizard to raise that event.
    Depending upon your functionality, write in the event handler in a view (used or consumer component). If you want to use the event across components then please mark that event as interface event by checking the interface column.
    thanks,
    Rahul

  • How Keyboard & Mouse Events are handled in java?

    Hi
    How Keyboard & Mouse Events are handled in java?
    Kindly brief, how a key typed in the keyboard is sensed and it is entered in JTextField?
    or
    Pls. give me some links.
    Am going to send the events from external device (like keyboard) to OS and from that I need to capture that event in Java Swing?
    Pls. drop in a bit. So that it will be helpfull to me.
    Thanks in advance,
    bee

    Actualy am very much aware of using KeyListener and MouseListener. I am in need of internal details,
    how typing a key in keyboard is captured by KeyListener? How the event is passed to java swing and and it is fired to keylistener.
    Pls. help me.
    Thanks
    bee

  • Kernel BUG at skbuff.c.... In interrupt handler - not syncing

    Hello,
    VERSION: ZENWorks Imaging Server v6.50
    I am trying to create an image of a workstation. After I boot up with the
    Boot CD and input the proper settings (prompts by SETTINGS.TXT) the
    workstation gets an IP and everything works fine. At the moment when I try
    to create the image:
    img mp <IP address of imaging server> <//path/imagefilename>
    I get the following error:
    ~~~~~~~~~~~~
    Kernel BUG at skbuff.c :92!
    invalid operand: 0000
    <0> Kernel panic: Aiee, killing interrupt handler!
    In interrupt handler - not syncing
    ~~~~~~~~~~~~~
    The error is much bigger, but I only included the first two and last two
    lines of it.
    I am not sure how to resolve this. If I made a mistake with the commands
    please let me know, although I think they are correct. I also tried
    creating an image through the user interface but I got the same error.
    Any solution, recommendation, or advice is greatly appreciated.
    Sincerely,
    Steve O.

    Marcus,
    Thank you for the response.
    Sorry to ask again, I am new to Novell. I simply want to make sure. Do you
    mean downloading and installing the following patch for ZENWorks 6.5
    desktop management?
    zen65sp2.exe
    I found this file from the "Download - patches" website.
    Thanks for the help.
    Steve O.
    > [email protected] wrote:
    >
    > > I am not sure how to resolve this. If I made a mistake with the commands
    > > please let me know, although I think they are correct. I also tried
    > > creating an image through the user interface but I got the same error.
    > >
    > try the iso from sp2..
    > --
    > If you have already compiled drivers or have linux.2 please put them on
    > http://forge.novell.com/modules/xfmo...ect/?zfdimgdrv
    > Live BootCd and USB Disk from Mike Charles
    > http://forge.novell.com/modules/xfmod/project/?imagingx
    > eZie http://forge.novell.com/modules/xfmod/project/?ezie
    >
    > Marcus Breiden
    >
    > If you are asked to email me information please change -- to - in my e-mail
    > address.
    > The content of this mail is my private and personal opinion.
    > http://www.edu-magic.net

  • Labview Interrupt Handler

    Hi folks,
    I am doing a project using labview to capture some signal timing with
    DIO. Does there anybody have this experience can share with me? Where
    can I get the labview interrupt handler program code example?
    Thanks,
    Johnson

    I have two years experience with LabVIEW and twelve years experience
    with control and data acquisition. I guess, it's a wrong way to
    "capture some signal timing with DIO". It's too unreliable and it not
    ensures any reasonable precision. Think about using general purpose
    counters. Almost all DAQ board includes this hardware. They are
    dedicated to implement such a tasks.
    Yevgeni Tunik
    In article <[email protected]>,
    Johnson wrote:
    > Hi folks,
    > I am doing a project using labview to capture some signal timing with
    > DIO. Does there anybody have this experience can share with me? Where
    > can I get the labview interrupt handler program code example?
    > Thanks,
    > Johnson
    >
    >
    Sent via Deja.com http://www.deja.com/
    Share what you
    know. Learn what you don't.

Maybe you are looking for