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.

Similar Messages

  • How does LabView 8 handle Ring constants?

    Hi all,
    This is probably more for NI guys, but I am wondering how LabView 8 handles text rings?  In the past, constants dropped into a VI that are of type "enum" will be updated when the typedef is updated, however, ring text constants will not.  Has this changed in LabView 8?
    Thanks,
    Jason

    Part 1 of 2
    Hi Chris,
    Please forgive me for differing on this point but you should have written
    When a control is strictly typed it will force all  [front panel] instances to be identical to the strict type definition and update all of the text constants.
    The "strict" part only takes care of the appearence and those changes only affect instance were they are seen by a user. The strings associated with the enum do not affect block diagram constants.
    The attached image and zip illustrates that the representation of an enum and a ring a very different. An enum has the defined strings "hidden" in the wire and the numeric value can only be one of the valid indexes of the defined strings. In this example I have shown three different constructs that illustrate the fundemental difference between rings and enums.
    1) Case Structures - An enum driven case will pickup the valid choices as defined by the enum's definition. A ring does not carry this info in the wire so it is NOT possible to label the cases to match the ring. This brings up another compliation. If the case structure does not have a default case defined there must be a case for each possible selection value. The strings of an ring can be defined at run-time. Is LV supposed to re-compile the case structures code every time the ring is re-populated? In the case of an enum driven case, this is not an issue because enums that are used in a VI that is running or reserved to run can not be editied.
    2) The "Format into string" can pick-up the valid enum strings by decoding the type descriptor of the enum wire. This is not the case with a ring because the ring is just a number.
    3) The "Flatten into string" function will return the type destriptor of whatever is wired to it. The typed descriptor contents of a enum shows that every valid selection for that enum is defined in the enum wire. Please note that the type descriptor for a ring has no information about any strings.
    End of part 1 of 2
    Ben
    Message Edited by Ben on 10-15-2005 10:41 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    ring vs enum.JPG ‏78 KB

  • 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

  • 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.
    };

  • 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

  • Watch the NI-Week 2009 Presentation: Updating the LabVIEW Error Handling Core

    The resources for the "Updating the LabVIEW Error Handling Core" NI-Week 2009 Presentation are now online.
    See them here: http://lavag.org/topic/10741-updating-the-labview-error-handling-core/
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.

    I have always gone the latter route when I needed it.  I usually use an action engine to keep track of the error messages.  Said action engine can be used to combine and suppress errors, as well.  I have posted an example below (LabVIEw 7.1).  In this case, the error propagation is occurring in a task handler which is processing multiple command/data pairs.  The command is set at the beginning of the task and the error handler is sprinkled liberally throughout the task code.  In this particular case, the desired behavior is to continue execution on error, but log the errors.
    I prefer this type of method because it gives me complete control over the error propagation.  It has the down side of requiring more code and effort, but I think it is worth it. I like functionality to be explicit on my block diagrams.  It makes long-term maintenance much easier.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    ErrorPropagation.llb ‏65 KB

  • Interruption handling in Flashlite

    Hi
    I am new to flash lite. I am basically more on the j2me side in j2me application we have options like hidenotify shownotify for handling event like call interruption and we can pause the game. In flashlite I think the application will get automatically paused. I want to know know we can implement something like this so that i can implement a pause menu. For example I have a game which on receiving a call interruption or any other action will move the flashlite application to background. On resuming the game i need to show the pause menu is it possible to detect these device events

    Hi,
    FL does not support such event reporting via API.
    You can use the following trick, but please not i have not tested it yet. Its just my theory
    Use the getTimer() function to save the time on regular intervals. Then when application is returned by FL from call event or menu navigation. Check the getInterval returned time difference is more than your application normally have.
    If the difference is more than regular, your application has just got back focus.
    The other way is to use PyS60 and listen for call events / application switching. It have API for these. And you can communicate with a PyS60 script to check for these events.
    Hope this is helpfull.
    FL is difficult and tricky world
    // chall3ng3r //

  • 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

  • LabVIEW's handling of simple COM Components

    I am a bit of a novice with labView (my disclaimer!), however I am writing a simple c++ com component and I need to specify methods that return more than one value.
    E.g. a method specified in IDL may be:
    [id(1), helpstring("method SendDSPUpgrade")] HRESULT SendDSPUpgrade(
    [in] long a_ModuleNo,
    [in] BSTR a_FilePath,
    [in] long a_Address,
    [out] long* a_MaxSize,
    [out,retval] long* a_ErrorCode);
    Here my COM component wants to populate the a_MaxSize and the a_ErrorCode - so that LabVIEW can use the resultant data.
    Can LabVIEW pass these parameters as pointers, or does it manage automatically like VB, or can this not be achieved ...?
    Thanks,
    Robert.

    Yep,
    LabView handles this automatically, converting to pointers where necessary transparently. I've tried it and it works smoothly.

  • General Labview Error Handler question discussion

    Recently two functions were brought to my attention, the General Error Handler and the Simple Error handler. 
    And I cannot wrap my hand around these two features.  While I have been using Labview I have always used the Labview error cluster.  When would you use these two features?  As I feel the cluster error is much help. 
    Maybe it is my defnition that I have confused: 
    The general error handler will display a dialogue box describing the error that will be passed and shuts down the code? 
    The simple error handler notifys the operator that an error has occured but it can be customized for adding functionality, it takes the error cluster input and determines if an error was generated.  "If an error has been generated, the VI displays a dialog box with the error code, a brief description of the error, and the location of the error."   How is this not the same as an error cluster?  
    If anyone has any simple code examples for this or knowledge I greatly appriciate it. 
    Caleb

    Jacobson wrote:
    Psireaper9 wrote:
    The simple error handler notifys the operator that an error has occured but it can be customized for adding functionality, it takes the error cluster input and determines if an error was generated.  "If an error has been generated, the VI displays a dialog box with the error code, a brief description of the error, and the location of the error."   How is this not the same as an error cluster?  
    You are correct that they give the same information.  The difference is that if you want to use an error cluster you will need an indicator on your front panel.  If you use the simple error handler you won't have to have an error cluster on your front panel but the user will be notified if an error does occur.
    Think about all the programs you normally use (excel, chrome, etc.).  As a user you expect that errors aren't happening, and if errors do occur then the application will usually just close out and you get an error dialog about the error.
    I use the simple error handler with no user interaction to extract the error text.  Is there an easier way of doing that?

  • Can Labview PDA handle XML?

    I have spent about a week using the Labview PDA 8.0 development tools and now have acquisition vi's running and storing data, etc...
    There is a push in my organization to use XML to tag data. I am still learning what this means, but I thought I would ask if there is any example code, app notes, etc... on XML, Labview, and Labview PDA.
    Thanks for any pointer!
    John

    I haven't used it yet but saw that there is some example code in LabVIEW to read/write data from/to XML files.
    Go to Help >> Find examples... to launch the NI example finder.vi and then go to the "search" tab, type xml, there are 3 example VIs.
    Hope you'll find what you need there
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • 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

  • Why can't LabView 6 handle Windows large fonts?

    I typically run WinXP at 1400x1050 with extra-large fonts set and
    screen resolution set to 120dpi.
    This makes LabView vi diagrams look like gibberish since all the text
    overlaps each other or is otherwise invisible.
    Is there any LabView configuration setting I can set to
    make it cooperate with the Windows font settings?
    If not, does NI assume everyone is running at 800x600 with Windows
    normal font sizes?
    wuwt?
    I am increasingly beginning to wonder about the actual utility of
    hi-res screens when so many Windows app's font management is so
    rudimentary. Albeit, much of the font problem is inherited from Windows'
    own legacy issues and lack of design foresight.

    >
    > Is there any LabView configuration setting I can set to
    > make it cooperate with the Windows font settings?
    >
    > If not, does NI assume everyone is running at 800x600 with Windows
    > normal font sizes?
    Here is the deal. LV is paying attention to the large font setting and
    making every font on the panel and diagram larger. Problem is that the
    objects on the panel and diagram are smart enough to resize to fit the
    font, but not smart enough to get out of each other's way. The fonts
    grow, but all of the other icons and such are bitmap based, a VI icon is
    32x32 remember, so when some objects grow and others don't. Also,
    especially on the panel, some objects were already overlapping by user
    design, and it is basically very hard for a drawing p
    ackage to deal with
    these sorts of issues.
    I think that you will notice that MS basically gave up on paying
    attention to font changes in their dialogs. Even with large fonts, most
    of the system dialogs, property pages and the like, will use small fonts
    because their layout would similarly go wacky.
    One solution to this is to go to LV's Tools/Options menu to the fonts
    page and set the fonts for Application, System, and Dialog to be
    something similar in size to the original fonts. By default LV asks the
    system what font to use, but you can override it.
    This will not change all fonts in LV, only things that use the App,
    System, or Dialog font, but that is pretty much 99 percent of VIs and
    all of our dialogs and such.
    Greg McKaskle

Maybe you are looking for

  • Disk free listing no longer work after rsync overwritten system files /etc

    Hi All, I am having difficulty running some key critical commands on this Solaris 10 server (Sun Fire X2200, M2 x64 Server) called SERVERB. This SERVERB is a disaster recovery system identical to our production server known as SERVERA. We recently sc

  • I need to format my iPod but I don't want to lose my files!

    Hello, obviously I'm here looking for help lol. The problem is this; I purchased my iPod mini December 2005 and never had any problems until several weeks ago. When I plug my iPod into my computer, it always says it needs to be formated. Seeing that,

  • Error log in to livecycle workflow designer

    Hello, I can't log in wokflow designer, i've got this message : error com/ibm/CORBA/IIOP/ObjectURL My installation of livecycle on the server (websphere 6) is good (forms 7.2.2 + assembler 7.2.2 + workflow 7.2.2), the connection to the database work

  • Google toolbar is messed up with firefox 3.6.12. Cannot install It!

    Hello. I didn't really like Firefox 4 so I have reinstalled v.3.6.12. However after reinstallation, Google Toolbar Search Box was gone! I've removed google toolbar and tried to reinstalling it several times without success. Very annoying!

  • Can't empty trash, tried secure (option-cmd-shift-del) & Terminal

    Have had this issue for a while and searched the Community for answers before. Had over a million items in the Trash (after trying to clean stuff up) - I know, I know. I usually do the Secure Empty Trash, with no problems, but now that so much was in