Active x and event callback in Labview

I have an active x written by Aanderaa Instruments (makes
weather and hydrology sensors), it contain various methods and events to get
the next line of records from a sensory scanning unit. The connection is
through the COM1, so far i have wired it up only using the methods to get next
record level, but then I have found that sometimes it does not get the complete
record from the COM port. So to solve that I have to use an event in the active
x to check for new record available. So what I want to do is send the event
(when complete record available) to VI that uses the get next record method to
pick up the data from the COM1 port and then send the data back to the main VI
for processing, plotting and writing.
My problem is that when I connect the output from the GetNextRecord method to a
indicator that I then wire on the connector pane to be an output from this
VI  get an error that there is a wire function conflict. I have tried to
explain a bit better in the attached pdf file with diagrams.
The reason why I want to export the data back in the main VI is because it runs
continuously collecting data every 2 min and I plot them on a graph and write
them to a file so it will no work to have all that done in the event callback
VI that will only run ever 2 min, then it will reset the graph the whole time
and I want continuous data plotting for 10 days of historic data records. I
also have a few other sensors that come in through a connector board that are
written o the same file.
hope somebody can give me some hints
Attachments:
labview question.pdf ‏721 KB

Duplicate post, click here for the original: http://forums.ni.com/ni/board/message?board.id=170&message.id=135639#M135639
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Project and Event Mgmt - Revisited

    I started a discussion a few weeks ago about how to manage FCP x projects and events.
    That discussion is here:
    https://discussions.apple.com/message/15630947#15630947
    However, as I look more closely at my workflow as permitted by FCPx I have a quandary that I suspect others have as well.
    Once I have created an event and a related project in the Events and Projects folder respectively, the question arises as what to do with those elements when you are done for the time being with both.
    I have created a large number of projects, each with their own event.  As I move on from them, I would find it useful to have them not show up in the active Project and Event lists in FCP X.  But I do want to get back to them from time to time.
    The wisdom seems to be to not move those project & event folders elsewhere with Finder, but to use FCP X Move Project instead. 
    But here is the quandary.
    If  you don't want to Move them to an external drive (and I would like to avoid that), the only other solution seems to be to move them to a sparseimage disk which can be mounted and dismounted whenever needed.  The problem with the sparseimage approach involves backing up with Time Machine.
    My tests (and survey of the boards) indicate that whenver you add a file to the sparsebundle disk image, the entire sparsebundle is backed up to the Time Capsule drive.  That eats up TC storage in a hurry.
    So, has anyone got any suggestions as to what to do with projects and events that you don't want to see on a current basis in the FCPx lists, but do want to get back to them from time to time.

    Rex,
    As a freelance editor I'm always working on multiple projects and use this workflow to hide, show or backup projects and events.
    As your aware while working on a project/event, these need to exists in the Final Cut Events folder and the Final Cut Projects folder.
    In order to hide an event, simply move the event or events from the main Final Cut Events directory, back one level.
    Example: I'm currently working on a productions where the events live on my Machintosh HD. First I create a folder called Final Cut Events HIDE.
    Under your Home Directory/Movies/Final Cut Events/ move the event you'd like to hide to the Final Cut Event HIDE folder.
    Be sure Final Cut Pro X has been quite.
    When you re-open Final Cut Pro X, you should have a empty event library.
    If you'd like to re-work on these events, simple quite Final Cut Pro X, drag and drop your "hidden" event or events back into the Final Cut Events folder, re-open FCP X, and there you have it.
    Use this exact same approach for projects.
    Regarding backup, you can manually backup your events/projects, however I only do this if the edit is completely finished and exists in my Final Cut Pro HIDE folders. All I then do is copy and paste to a backup HD.
    Hope that helps.

  • Event callback with active x in labview

    I have an active x written by Aanderaa Instruments (makes
    weather and hydrology sensors), it contain various methods and events to get
    the next line of records from a sensory scanning unit. The connection is
    through the COM1, so far i have wired it up only using the methods to get next
    record level, but then I have found that sometimes it does not get the complete
    record from the COM port. So to solve that I have to use an event in the active
    x to check for new record available. So what I want to do is send the event
    (when complete record available) to VI that uses the get next record method to
    pick up the data from the COM1 port and then send the data back to the main VI
    for processing, plotting and writing.
    My problem is that when I connect the output from the GetNextRecord method to a
    indicator that I then wire on the connector pane to be an output from this
    VI  get an error that there is a wire function conflict. I have tried to
    explain a bit better in the attached pdf file with diagrams.
    The reason why I want to export the data back in the main VI is because it runs
    continuously collecting data every 2 min and I plot them on a graph and write
    them to a file so it will no work to have all that done in the event callback
    VI that will only run ever 2 min, then it will reset the graph the whole time
    and I want continuous data plotting for 10 days of historic data records. I
    also have a few other sensors that come in through a connector board that are
    written o the same file.
    hope somebody can give me some hints 
    Attachments:
    labview question.pdf ‏721 KB

    Hello!
    I checked the PDF file with snippets of your code and it looks alright, no issues or comments regarding that from my side. However it is really difficult for us to troubleshoot when we don’t have the ActiveX control available and even though we had access to the control it would still be quite tricky to find the cause of the problems you are experiencing since we don’t have the hardware and so on.
    I found one link only that mentioned wire conflicts when talking about COM objects and ActiveX and you can find it here:
    http://digital.ni.com/public.nsf/websearch/0CED780​C5D5EDCD5862569D9005AE1FA?OpenDocument
    Regards,
    Jimmie A.
    Applications Engineer, National Instruments
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • New LabHSM Toolkit - Agile development of complex event-driven maintainable LabVIEW applications with active objects / actors based on a universal Hierarchical State Machine / statechart template.

    Dear Fellow LabVIEW programmers:
    Most of the systems you deal with are reactive. It means that their
    primary function is constant interaction with their environment by
    sending and receiving events. But most likely, they can have something
    happening inside them too, even when they are not processing messages
    received from outside. So, such systems have to continuosly react to
    external and internal stimuli. Right? Moreover, most likely, they
    consist of subsystems that are reactive too and, in turn, can have
    their own "life", to an extent independent from other parts (with
    which they still communicate, of course). Reactive (event-driven)
    systems are more naturally modeled with active objects. So, why then
    should we try to model and code them with GOOP and its passive
    ("dead"!) objects?
    "Flat" State Machines have been known for decades to have severe
    limitations. It's been more than 20 years since Dr. Harel invented
    Hierarchical State Machines (statecharts) to fight those limitations.
    Then why does NI still tout the same old good Moore FSM as the
    ultimate tool for event-driven programming in LabVIEW in its $995
    State Diagram KIt?
    The LabHSM toolkit we are happy to present, makes it possible to
    easily create and then maintain complex event-driven applications in
    LabVIEW as a collection of HSM-driven active object VIs using a higher
    level of abstraction and agile software development methodologies.
    These active object VIs are created based on a universal Hierarchical
    State Machine ( HSM or statechart ) template. So. all your code looks
    similar regardless of its functionality!
    We all love just jump to code, right? However, to be good boys, we
    need to do design first. Then implement it in code. If the logic is
    modified we need to redo the design first and then redo the code. When
    using LabHSM where behavior information is abstracted into a separate
    HSM data file editable with a supplied editor, there is no need for
    coding separate from design any more. The modified behavior becomes
    code automatically as soon as the HSM file is saved. Design is code!
    The implementation basically follows Dr. Samek's Quantum Programming
    paradigm. (see http://www.quantum-leaps.com). However, as already
    mentioned, LabHSM stores the behavior information in a file separate
    from the code itself. It also adds state dependent priorities to
    events, a separate queue for public events/messages, and, of course,
    some LabVIEW specific code like capturing front panel user events and
    putting them into the private Events queue. Communication and
    instantiation functions are also rather specific for LabVIEW.
    It is available for UNLIMITED PERIOD trial. Please visit
    http://www.labhsm.com for details and download. The site also contains
    references which you may want to check to learn more about
    hierarchical state machines and active object computing.
    Since this is our debut we will appreciate any comments and
    suggestions. Our contact information is available on our site, of
    course.
    Have a G'day!

    Symtx is currently hiring the following position. Please contact me if interested.
    Amy Cable
    Symtx, HR
    [email protected]
    Symtx, the leading supplier of functional test equipment, hires the brightest & most talented engineering professionals to design & manufacture complex custom electronic systems for advanced technology leaders in the defense, aerospace, communications, medical, transportation & semiconductor industries. Symtx’ challenging & dynamic work environment seeks to fill openings with highly qualified electronic engineering design professionals.The ideal candidate will be responsible for defining the requirements, software design and code development, and integration of test control software for custom functional test systems. Candidate should be familiar with data acquisition concepts, instrument control, complex test, measurement and calibration algorithm development and definition and implementation of control interfaces to hardware. Prefer familiarity with instrument control via GPIB, VXI, MXI, RS-232 desirable. Requires BS/MSEE and 3 -7+ yrs of experience in one or several of the following test applications in a Windows NT/2000/XP environment using Labwindows CVI, TestStand, Labview, Visual Basic, C++ and knowledge of RF systems is a plus. Job responsibilities will include software design, development, integration, team leadership, and interfacing with customers( includes PDR’s & CDR’s).

  • How to place event callback components and "main-VI" components in the same Front Panel?

    What I'm trying to accomplish:
    Place a .NET component, which generates events, and other standard LabVIEW components in the same Front Panel. The standard LabVIEW components should be updated when events are being generated in the .NET component.
    How I tried to solve it:
    Problem:
    The event callback code must reside in a separate event callback VI. In order to "pass the event up" to the main VI I tried to use a global variable. The interrupt does occur:
    but I was hoping that the string indicator would be updated when the event occurred, but it wasn't.
    Questions:
    What's the best way to solve what I try to accomplish? If I want to solve the problem on the picture above, how would I do it (it may not be the best solution, but I'm still curious what's wrong)? Please feel free to be over-explicit when replying as I am novice LabVIEW programmer. Thanks in advance for any help.

    There are two bundle functions for creating clusters. The function simply called Bundle operates almost exactly like the Build Array function I showed. The type of the output cluster depends on whatever you wire in as inputs. You don't have to supply a specific type parameter.
    The function called Bundle by Name takes in a specific type of cluster in the top input and allows you to fill in the values of that specific type of cluster. To create the specific type of cluster you want, you need to create a cluster of string references. Here's how to do that:
    Go to the Front panel and drop down an empty cluster shell.
    Go to the Refnum palette and drop down a Generic Control Refnum. Now here's a cool trick to turn that generic refnum into a string-specific refnum (a so-called strictly-typed refnum). Grab a string from the controls palette and drag it into the Generic Control Refnum. Once you drop it, you'll see the refnum change its icon to display a string picture.
    Make copies of this string refnum (as many as you need) and add it to the cluster shell.
    Now, if you're making specific types of clusters to work with, now is the absolute best time to learn about typedefs if you haven't already. It will save you hours and hours (if not days) of development time in the future. Trust me!
    Jarrod S.
    National Instruments

  • Configure Event Callbacks in test stand using labview

    Hi,
    I was going through Full OI - Configure Event Callbacks.vi in the test stand example. Can you please explain me how the vi works and what is techniwue behind it?
    When i open the individual VI's in the reference, I could see more that 1 control in the front panel. But Only the user parameter is wired in the vi? Why is it so?
    Regards
    Gopal

    Hi Gopal,
    When the TestStand Engine fires events, this VI specifies how your Operator Interface will respond.  For example, let's examine the first event callback registered in Full OI - Configure Event Callbacks.vi , Exit Application.   When the TestStand Engine receives the message to shutdown, and then finishes its neccessary shutdown procedures, it will send a message to the Operator Interface.  For the Operator Interface to receive this message, it must "listen" for it.  In LabVIEW, this is done by Registering an Event Callback.  See the links below for details on how to implement this. 
    The answer to your specific question is in step 7 of the first link below.  When TestStand sends the message to LabVIEW, there is information that is always passed.  The other input controls contain this information.  To create a VI that always includes these controls, right-click on the VI Ref input to the Reg Event Callback Property Node, and then select Create Callback VI.
    Here are two references that talk about handling ActiveX callbacks in LabVIEW in general:
    Registering and Handling .NET and ActiveX Events
    Register Event Callback (Not in Base Package)
    Cheers,
    David Goldberg
    National Instruments
    Software R&D

  • Executable and Register event callbacks

    Hi,
    I have been running into an issue regarding the building of an executable that has register event callbacks (specifically Test Stand Callbacks).  The VI that is responsible for setting up the event registration is an asynchronous VI.  During development everything works but during deployment of an executable the Callback is either not running or capturing the event from the Test Stand engine (I am looking for the end of execution event).  The setup is not reporting an error, and the pathing to the callback VIs is correct.  Any Ideas on this?
    Does the Teststand engine not post a endexecution callback when running from a executable labview environment?
    Thanks,
    Andrew
     

    akonecki wrote:
    Hi,
    I have been running into an issue regarding the building of an executable that has register event callbacks (specifically Test Stand Callbacks).  The VI that is responsible for setting up the event registration is an asynchronous VI.  During development everything works but during deployment of an executable the Callback is either not running or capturing the event from the Test Stand engine (I am looking for the end of execution event).  The setup is not reporting an error, and the pathing to the callback VIs is correct.  Any Ideas on this?
    Does the Teststand engine not post a endexecution callback when running from a executable labview environment?
    Thanks,
    Andrew
    The TestStand engine is singular regardless of what is hosting the components so it will post the appropriate callbacks. Try some tracing and see what flags up in your callback VI.

  • Event CallBack in TestStand - Labview OI

    Hi everyone,
    i am using the simple interface for labview of teststand, i have modified the interface what i like, now what i want to do is when the user press the control button to execute a sequence the system ask the user for something and depending of it answer execute or not the sequence, for this i have create a new event callback, modifying the configure event callback.vi, what i introduce in the Reg Event Callback is that when StartExecution event starts it run the callback vi that contains the question to the user.
    It works well because when the user press the run sequence control button or the restart contorl button, the system ask the user. But the problem is when the user press the exit control button, the system ask too.
    Why occurs this, and how can i fix it??
    Thank you in advance

    Hi Marith,
    This behavior is occurring because the Application Manager automatically executes the FrontEndCallbacks sequence file when the Operator interface starts, and again as part of the shutdown.  To prevent this from occurring, we'll need to check that the execution is not the FrontendCallbacks execution before launching the dialog (the other case is "FrontEndCallbacks.Seq"):
    You also may want to consider a couple alternative implementations:
    use the UImessage event to run the code when the UIMsg_ModelState_Initializing message is posted (when the process model begins executing)
    putting this code in the process model rather than the User interface - in this case we could just add a step in the setup of the model, and terminate the execution if the user chooses.
    Al B.
    Staff Software Engineer - TestStand
    CTA/CLD

  • Internal Activity Allocation in Training And Event Management

    Hi,
    I am facing a problem while internal activity allocation of attendees in Training and Event Management. When i try to run "Internal Activity allocation for Attendees" i get an error message as " Reference document 1005 could not be found".
    I have done all the configuration but even then i am unable to understand the reason for this error.
    Plz help
    Regards
    TS

    Hi,
    I have resolved the above error. it was due to master data maintainence.
    But now while posting i am getting an error that " Activity type XYZ can not be allocated to 2008"
    Can someone help with this?
    Regards
    TS

  • Error when activating update rules for R/3 training and event management

    hi all,
    when iam trying to activate update rules for training and event management cube it is giving fallowing error."IC=0PE_C01 IS=0HR_PE_1 error when checking the update rules
    Message no. RSAU461".
    please guide me how to solve this issue.
    thanks & regards
    Vamshi D Krishna

    Hi Vamsi,
    Have you followed the following document to implement HR ?
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0780530-bf03-2b10-d5ad-e9e8a53def23

  • Active X Calendar Event

    I would like to select an event case in an event structure when a new date is selected in an active x contained calendar. How do I get the active x event to be seen within Labview?

    Hello optobionics,
    Assuming you are using LabVIEW 7.0 or 7.1, there are two shipping examples that deal with registering callback functions for ActiveX events: �ActiveX Event Callback for Excel.vi� and �ActiveX Event Callback for IE.vi�. This will give you some idea of what to do. It is actually up to the program being called through ActiveX as to whether the events are available or not. The following KnowledgeBase also discusses using callback functions.
    Migrating from the ActiveX Event VIs to Using the Register Event Callback Node
    If none of these suggestions help, or if I�m not correctly understanding your issue, please reply with comments or answer
    s to the discussion above and any additional information that may help, and I�ll be happy to look further into it.
    Have a nice day!
    Robert M
    Applications Engineer
    National Instruments
    Robert Mortensen
    Software Engineer
    National Instruments

  • Problem with register event callback in use of instrument control

    now, i use the register event callback to register a value change of a boolean control on the front panel, and wire the cluster's ref of the instrument control parameters to the user parameter input, then create the callback vi. In the callback vi, i select the pump-control subvi, and pass the user parameter to the subvi. The problem is that,  when i press the boolean control, the instrument (here is pump) can act, but immediately, the code crashes.
    I use labview 8.6
    Attachments:
    callback vi.png ‏8 KB
    register event callback.png ‏8 KB

    You would wire the event registration wire that comes out of the Register for Events node into an event structure.  You will need to right click on the event structure and check off "Show Dynamic Event Terminals" and it into that.  Then you can create a new Event Case that uses the dynamic event.  You can place your subVI in that event in whatever way you want.  (Just drop the subVI in or do a Call by Reference there, or whatever.)  Look in the Example Finder for "Dynamically Register for Events.vi".

  • Problems with ActiveX Callbacks in LabVIEW 7

    Have encountered an interesting problem with ActiveX "Reg Event Callback" in LV7 (WinXP):
    In a nutshell, when a lot of events fire in rapid succession, the user-interface locks up.
    The events still fire, and the front panel controls update, but the front panel will not respond to clicks. Interestingly, if the block diagram is open, you can stop it and turn on execution highlighting, etc...
    - I've discovered that the problem we're encountering is related to multiple events firing before the (reentrant) callback VI has finished executing from the 1st event.
    - by watching the Performance data in task manager, and tracking the # of handles used by LabVIEW, I find that when this happens, the # of handles increases, b
    ut never decreases until you stop the VI
    - I would expect several (nearly) instantaneous events to launch multiple copies of that callback VI, and I can believe that would increase the # handles, but I would expect that LabVIEW would catchup shortly thereafter and the # handles would return to its starting count.
    As an aside, using the old ActiveX event and callback method with the exact same version of the activeX control does not have this problem, events just queue up and then fire appropriately.
    Anyone seen anything like this?
    Anyone (NI guys) have any ideas?
    Follow up question (NI guys): when will the support for the old ActiveX event stuff dry up?
    Thanks in advance,
    Ben
    Ben Zimmer
    [email protected]
    Software Developer
    Meikle Automation

    Hi Ben,
    The error message warns about the use of three ActiveX Event VIs that will no longer be supported in future versions of Labview. Following version 6 of Labview, the use of ActiveX Event VIs is shifting to the use of Register Event Callback VI instead. In looking at your screenshots, I did not see any use of the older ActiveX Event VIs. If possible, try attaching the actual VI to the post and I will take a look at that.
    At least in terms of support, phone support currently exists for Labview 6 and 7. With the release of Labview 8, support for Labview 6 will slowly be phased out. In this case, phone support for the ActiveX Event VIs will no longer continue as they are no longer included in the versions of Labview for
    which phone support is provided. However, Discussion Forums and web-based resources would be your best venue of support for those features.
    I would strongly recommend that you migrate to replacing ActiveX Event VIs to using the Register Event Callback VI. The following is a KnowledgeBase article describing the transition of ActiveX in Labview:
    Migrating from the ActiveX Event VIs to Using the Register Event Callback Node
    Also, are you using the Automation Open/Close VIs? These two VIs will allow acquire/release informatio nof the ActiveX object. I have attached a couple example programs that are included in Labview to help demonstrate this concept.
    Hope this helps!
    Kileen Cheng
    Applications Engineer
    National Instruments
    Attachments:
    ActiveX_Event_Callback_for_Excel.llb ‏944 KB
    ActiveX_Event_Callback_for_IE.llb ‏972 KB

  • How to access new data in User Message Event Callback?

    I am using the Simple LabVIEW OI as the model for my TestStand user interface.
    The sequence sends a User Message to the OI to request the string array of tests to run.
    But I am having great difficulty making this string array data available to the event callback VI.
    I do not want to use a global variable and so my unsuccessful method so far has been as follows:
    1. Use a Refnum to the Array and pass it into the Config Event Callbacks VI via the cluster 
    2. The "Selected Tests" in the input cluster in the Config Event Callbacks VI is a generic Control Refnum
    3. This Selected Tests (at the bottom) is then bundled and passed into the User Parameter
    4. But how do I convert the Selected Tests Control refnum back into the original string array in the actual callback?
    Also if there is anyone that can suggest a better way of doing this then please let me know.
    The bottom line is - how to get the latest data into the event callback function when it is called?
    Many thanks,
    Ronnie
    TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
    Solved!
    Go to Solution.

    Hi Ray,
    The 'Selected Tests' array refnum is #4 in the cluster order and matches all the way through - so I think that's OK.
    In the final diagram above, I can get the Selected Tests cluster from the 'User Parameter', but it is still in the form of a refnum.
    My problem is a lack of understanding in how to convert this 'Selected Tests' refnum back to the original data type (a string array).
    Basically I want to get the string array from the 'Selected Tests' refnum.
    As you can see from above I tried to use a property node. I've also tried to 'cast' the refnum to a 'more specific class' by choosing 'Array' but it's still ends up as a refnum.
    I hope you see what I mean?
    Thanks,
    Ronnie
    TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009

  • Event Callback from a Reentrant VI Recursion Error

    Greetings,
    I am using Register Event Callback with an ActiveX object to respond to user mouse events. The problem is that when I run the VI (the main, calling vi) as reentrant, Labview gives an error that the "Callback.vi" is attempting to recursively call "Main.vi".
    Is there a way around this problem? I intend to run two copies of "Main.vi", so reentrant execution seems necessary.
    - Colin Holbrook

    Hi Colin,
    Are you placing the Register Event Callback inside of the Main VI and then wiring the same Main VI to the VI Reference terminal?  If so, then that explains why you are getting an error.  You cannot use the Register Event Callback to call a VI within itself.  If this is not the case, then please post a simple VI that demonstrates the problem. 

Maybe you are looking for

  • Deploying EJB 3 session beans on OC4J 10.1.3.0.0 Standalone

    Guys, I am unable to deploy any EJB 3.0 session beans on my freshly installed OC4J 10.1.3.0.0 instance. I also have tried to deploy the EAR created by the "Develop a Stateless Session Bean using EJB 3.0" to eliminate problems in the deployed archive,

  • Mac cannot detect scanner option on HP Color LaserJet Pro MFP M177fw after trying every method

    Hello, I have recently purchased the new printer HP Color LaserJet Pro MFP M177fw and I am having a lot of trouble trying to scan. I have spend hours trying to fix this. I have tried all the methods on this website, (trying through preview, printers

  • Set default result to single page, 999 rows per page

    hi! im using 10g with windows server 2003. everytime i start isqlplus, the default setting is to display the result of a select query to multiple pages with 24 rows per page. i like to have my result in a single page. i can change it in the preferenc

  • New Flash Media Encoder

    So, I've been playing with the new Flash Media Encoder here: http://labs.adobe.com/technologies/fme/ It was a really simple download and works seamlessly with Flash Media Sever. I think you have to update FMS2 to the January 07 update to use it, thou

  • Bug Report ignored: Palettes do not resize when changing monitors

    So this bug was ignored during beta and it was NOT fixed in the official release of PhotoShop CS6. Since I don't feel like retyping the whole bug report after paying a grand for the software here is a link: http://forums.adobe.com/message/4316521 VER