Can I use Ctlref in a event structure with a mouse up event?

I have a large number of controls on a front pannel. I'm using a event structure that triggers the motion of a given motor when the corresponding control is pressed. However, I would like to avoid creating N mostly identical events, so I was planning on using a mouse down event on the front pannel, then retrieve the control reference using the Ctlref node (with gives "Reference to the control on which the event occurred" according to labview manual) and scan a array of references to find out which motor is supposed to move. However, it seems that this node does not appear (contrary to what the manual says).
I have found other ways to do what I need (I was thinking of using an array containing the coordinates of my controls and the coords node of the event structure), but I wanted to know why I can not find that node (which appears for "value change" event for instance). I'm using Labview 2013.
Solved!
Go to Solution.

Bad luck for you. Mouse down on panel does not have the control refnum as it is not operating on a control. Mouse down on a control does have it and since you can configure mouse down events on several controls in the same event case, it provides also a control refnum so that you can still operate on the control in question.
This is probably also the issue Jeff might have seen. When configuring multiple events for the same frame LabVIEW will only show the event terminal that are present in all of those events. Terminals that don't exist in at least one specific event of the multiple events for that frame are not selectable anymore.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • How can i use the same front panel graph in more than one events in an event structure?

    i want to display the signals from my sensorDAQ in a graph.but i have more than one event in the event structure to acquire the signal and display it in the graph.the first event is to acquire the threshold signals and its displayed in the graph as a feedback.after the first event is executed, i will call the second event,where the further signals are acuired and compared with the threshold signals from the event 1.my question is how can i use the same front panel control in more than two events in the event structure?please answer me i'm stuck.
    Solved!
    Go to Solution.

    Hi,
    I have attached here an example of doing the same using shift registers and local variables. Take a look. Shift register is always a better option than local variables.
    Regards,
    Nitzz
    (Give kudos to good answers, Mark it as a solution if your problem is Solved) 
    Attachments:
    Graph and shift registers.vi ‏12 KB
    graph and local variables.vi ‏12 KB

  • Can I have multiple event structures with the same event cases?

    Hello, 
    I'm doing an application that reproduces the front panel of the HP6675A power supply. To achieve this, I have done a state machine with different states
    (initialize, measures, voltage, current, ocp, ov, store, recall, etc). In each state, should have an event structure that catches the events of the buttons, like for example: if the current state is the Voltage mode and the user press the current button the next state will be the Current mode. For this in each state of the state machine should be the same event structure with the same events.
    My problem is that the Vi doesn't work properly when I have multiple event structures with the same event cases. There are some possibily to do this, and how? Or is impossible to have multiple events? I have been reading some posts, but I don't find solutions. 
    Any help is appreciated.
    Thank you very much.
    Solved!
    Go to Solution.

    natasftw wrote:
    Or as others mentioned, make two parallel loops.  In one loop, have your state machine.  In the other, have just the Event Handler.  Pass the events from the handler to the state machine by way of queues.
    A proper state machine will not need the second loop.  The "Wait For Event" or "Idle" state (whatever you want to call it) is all you really need in order to catch the user button presses.  The setup is almost there.  Maybe add a shift register to keep track of which state to go to in the case of a timeout on the Event Structure.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is it better to have one Event Structure with more (10 or 15) cases or several with fewer?

    I have several buttons and events on the GUI of my app to monitor. Would it be better to use one Event Structure with several cases (10 or 15) or have a couple and split the cases evenly? None of the cases have much processing to handle, so there is not a time lag issue. I am just worried about overloading the structure. One of the tech support guys mentioned that the event structures are not that hard to get confused.
    Has anyone had any problems with Event Structures?

    I use event structures very often in my code. I use them just to handle the interface and to run small code. I have had event structures that handled over 50 user interface events and never had a problem. In my personal opinion If there was any code to run I would let the event structure handle the the user interface event that fired a que in another while loop that handled the code.You can find examples on this, if not I will send you one. It is just good programming practice for beginners because it will alow you to build more robust VI's in the future.
    Hope this helps
    Joe
    Joe.
    "NOTHING IS EVER EASY"

  • Event structure doesn't handle all events from external DLL source

    Hi!
    I use a DLL, wich handles an USB CAN transceiver device, and generates LabVIEW user events with extcode.h and PostLVUserEvent() function.
    In my vi I use an event case structure to handle theese external events. The problem is, that if the events come too frequently, then it cannot handle all events.
    The vi contains a couple of parallel while loops which process the incoming data from the external event.
    In another application I use the same architecture, and that works fine. This one is more complex.
    Do you think I have reached the limits of the program? Or what else can be the problem?
    I have tried to use a queue in the  event structure, it helped a little, but yet, not all the events are handled. My external DLL sends all event, so the problem is not there.
    Thanks in advance!

    Hi Wasz,
    Thanks for the post and I hope your well.
    It is not possible for the event structure to miss events - it simply queues them up. To keep the event structure 'in time' with the code you must ensure the code to execute in each event is minimal to allow the event structure to handle the next event. 
    Please see this two links:
    event structure buffering: leading to,
    How to avoid built-up for "cursor move" events? : where somone is trying to avoid handling all events.
    What sort of events are not being handled? Could it be an issue your events are not configured correctly? Maybe if you could produce a small example in LabVIEW code, so we can just test the event structure configuration... someone working around the external dll call - which you seem sure is working correctly.  
    In terms of queuing to process the events in other loops is certainly an option to speed up the event structure. To do this, use a produce/consumer design pattern.
    hope this helps,
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • Event Structure with Event source: This VI and Event: Mouse Up

    I downloaded an old example from 2008 on this forum and would like to duplicate it.  It uses an event structure with an event case of just Mouse Up.  Under Event Specifiers:  the Event Source is <This VI>  and Event: Mouse Up.  This works like I want in LV 2009.
    In LV 2009 if I choose for Event Source  <This VI>   under Events Mouse Up is not an option!    I tried Event Source: Pane,  and  then Event  Mouse Up is an option, but this does not trigger the event if you drag the mouse off the pane before you lift the mouse button.
    I can copy the Event Structure over to my VI  and rewire every case but that does not seem to be a good solution cuz I want this in several VIs.
    I have attached the original VI with the Event Specifier I want.  How do I get this Event Specifier in LV 2009?
    Attachments:
    Slider event control.vi ‏19 KB

    phillman wrote:
    I downloaded an old example from 2008 on this forum and would like to duplicate it.  It uses an event structure with an event case of just Mouse Up.  Under Event Specifiers:  the Event Source is <This VI>  and Event: Mouse Up.  This works like I want in LV 2009.
    In LV 2009 if I choose for Event Source  <This VI>   under Events Mouse Up is not an option!    I tried Event Source: Pane,  and  then Event  Mouse Up is an option, but this does not trigger the event if you drag the mouse off the pane before you lift the mouse button.
    So what you can do is monitor the 'Mouse Leave' event for th pane, and then start polling the mouse state.
    Technically it is correct that there is no Mouse Up event detected since the Mouse Up is not happening on th epane.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Can I use custom query in DB Adapter with Polling

    Hi All,
    I am getting problem while using db adapter with polling. Can I use custom query in db adapter with polling.
    I am using 2 tables; table 1 and table2
    Structure of table1 is as:
    File_name
    Batch_id
    Creation_date
    Status
    Structure of table2 is as:
    Batch_id
    Employee_ID
    Last_Name
    First_Name
    Middle_Name
    Group_ID
    Site_ID
    Dept_Num
    Report_id
    I have to use below query while polling to table1
    Select count(*) as NOSEXP, Report_id
    from table1, table2
    where table2.batch_id =
    table2.batch_id
    and table1.Status= 0
    group by Report_id;
    I mean, when I use DB adapter to poll table1, I have to use above query.
    Can you Please suggest on this.
    Thanks in advance.

    I will check for existance not based on Primary key but based on three other fields in the table. I think , by default DB adapter configured for MERGE checks for existance based on PK. Can we change the Primary Key in the mapping file after the DB adapter is configured. In that case , will it check for existance based on the fields , I mention.
    Edited by: user12020809 on Sep 16, 2012 6:08 PM

  • Can I Use Oracle DB 11g Express Edition with Atomikos  Transactions.

    Hi,
    Any Help is appreciated.
    Im able to use Oracle 11g Standard/Enterprise Edition with Atomikos for XA transactions.(XADMS).
    My question is Can I Use Oracle DB 11g Express Edition with Atomikos for XA Transactions.
    Thanks,
    kensuser

    Hi,
    Thanks for the answer.What jdbc drivers should I use. Because still Im getting exception when using Oracle 11g XE.
    But the same application runs with Oracle 11g Standard/Enterprise Edition.
    Here is my Exception trace: Sorry, I'm a first time user, so pasting the exception as it is, will find out how to format the same, as use this forum. ant help is appreciated. Thanks in Advance
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UIToolAdminkit': Invocation of init method failed; nested exception is com.atomikos.datasource.ResourceException: XA resource 'EXXADBMS': resume for XID '3139322E3136382E35352E31382E746D30303030313030313937:3139322E3136382E35352E31382E746D31' raised -3: the XA resource detected an internal error
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:393)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1437)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
         at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
         at org.apache.catalina.core.StandardService.start(StandardService.java:525)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    Caused by: com.atomikos.datasource.ResourceException: XA resource 'EXXADBMS': resume for XID '3139322E3136382E35352E31382E746D30303030313030313937:3139322E3136382E35352E31382E746D31' raised -3: the XA resource detected an internal error
         at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:500)
         at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:57)
         at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:66)
         at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:85)
         at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:176)
         at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:204)
         at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:138)
         at $Proxy13.prepareStatement(Unknown Source)
         at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
         at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
         at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
         at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
         at org.hibernate.loader.Loader.doQuery(Loader.java:696)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
         at org.hibernate.loader.Loader.doList(Loader.java:2228)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
         at org.hibernate.loader.Loader.list(Loader.java:2120)
         at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:935)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
         at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
         at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:1)
         at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
         at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
         at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
         at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:904)
         at com.kensho.common.UIbundlDAOImpl.findAll(UIbundlDAOImpl.java:13)
         at com.kensho.common.UIbundlDAOImpl$$FastClassByCGLIB$$6f2db14b.invoke(<generated>)
         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
         at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
         at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
         at com.kensho.common.UIbundlDAOImpl$$EnhancerByCGLIB$$8797972a.findAll(<generated>)
         at com.kensho.common.UIToolKitAdminBBean.getAllBundleItems(UIToolKitAdminBBean.java:37)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
         ... 29 more

  • Event structure with sub-VI

    hi,
    I designed a event-driven state machine UI that uses pop-up sub-VI for user date configuration and COM port config. Calling the sub-VIs works fine, but by closing them and sending back the modified data to the main state machine, the event handling routine stalls. With highlighting, I could verify that after returning from the sub-VI, the timeout event is being carried out as the only one (used because there is some background code to be processed repeatedly).
    There are more buttons on the front panel then handled events in a certain state (the other buttons are used in other states), but the unused buttons are neither disabled nor hidden. Could that cause the problem? Or does the OK button of the closing sub-VI (or the changing data out of it) affect the main state machine event handler?
    Thanks for your reply
    Pac

    Hi, Pac.  Looking at your original VI, I would make a couple of general comments:
    1) I don't suggest using an event structure in a timed loop.  The timed loop is to ensure determinism in the code that is running. This doesn't really fit well with handling user interaction.  As suggested in other posts, I would have a separate loop that is watching for user interaction with an event structure.
    2) Having different event structures in each frame of a case structure is asking for trouble.  The link Jarrod posted should be very helpful, but it is just a subset of the thorough documentation on using event structures (note: I may be a bit biased as I am one of the authors of the documentation .  I would browse this whole chapter (http://zone.ni.com/reference/en-XX/help/371361A-01/TOC20.htm) and pay specific attention to the "Caveats and Recommendations" section which should help save you a lot of frustration.
    J
    Jason King
    LabVIEW R&D
    National Instruments

  • Can I use more than one iTunes account with my apple TV?

    Can I use more than one iTunes account with my apple TV?

    That depends what you mean. If you mean can you purchase from more than one iTunes account on the Apple TV, then the answer is no. If you mean can you stream from more than one iTunes library, which use different accounts, then the answer is yes, so long as they both use the same ID and password for homesharing.

  • Can I use iCloud to sync two devices with different apples Ids?

    Can I use iCloud to sync two devices with different apple ID's

    What do you mean by "apple ID"?  There's an ID you can use at the iTunes store to buy songs, apps, etc.  there's an ID you can use for your iCloud account - the two can be different or the same. So which service are you referring to when you talk about an apple ID?

  • Can I use ARD to control my mac with Back to my Mac service?

    Can I use ARD to control my mac with Back to my Mac service?
    The with Back to my Mac service on you see your mac in the Shared column, hit Share Screen & your good - on ARD I don't see my remote Mac listed anywhere in that program.
    Thanks

    ARD, to the best of my knowledge, does not work via Back To My Mac. Certainly it's not an direct or obvious feature, though I can't say that there might not be a workaround I've not heard of.

  • Can I use an iPad and a ipad2 with the same iTunes in my computer? I want to use both

    Can I use an iPad and a ipad2 with the same iTunes in my computer? I want to use both. Want to give one to wife.do I need to open a new iTunes account for her?

    bashepard wrote:
    Can I use an iPad and a ipad2 with the same iTunes in my computer? I want to use both.
    Yes, No problem at all.
    Want to give one to wife.do I need to open a new iTunes account for her?
    No - you can share the same iTunes account (my wife and I share the same account). But when you sync the iPads, just remember to select the correct content for her iPad and the correct content for your iPad.

  • Can i use an old eprint email account with a new printer?

    can i use an old eprint email account with a new printer?

    Hello arbazu,
    Unfortunately, when setting up a new/replacement printer, you wont be able to use the same email address, nor can it be transferred to another printer. Once an email is used, the email address itself is not able to be used for a certain period of time (which I believe is 6 months).
    However, by creating a new email address, but adding an 01 or 02 at the end, you can get something very similar to what you had previously.
    If I have helped in any way, just click the Kudos star on the left. Also, if your issue has been resolved, don't forget to select Accept as Solution

  • Can I use the USB cable that came with my digital camera to conect camera to iPad by connecying the camera cable to the USB end of the iPad cable?

    Can I use the USB cable that came with my digital camera to conect camera to iPad by connecying the camera cable to the USB end of the iPad cable? I have a double ended USB connector if necessary.

    No.
    You need to use this.
    http://store.apple.com/us/product/MD821ZM/A/lightning-to-usb-camera-adapter?fnod e=3a
    or this
    http://store.apple.com/us/product/MD822ZM/A/lightning-to-sd-card-camera-reader?f node=3a

Maybe you are looking for

  • Accessing NAS Drive through vpn windows 8.1

    Hi I hope someone can help  I have been having some trouble connecting to my netgear ready nes from my remote office  we have a LAN to LAN vpn set up using 2 draytek routers witch works well i can print, access remote desktop and so on. I cant access

  • Amount difference of Import PO in table EKKO and KONV

    Hi Gurus I have created Import PO in which 1200 Qty Price is 100000(jpy) per 200 ,total price  of 1200/200 qty is 600000, but when i view the Table entries EKKO for this particular PO and I have checked in Total value field i find only 6000  i.e it i

  • Cannot install hp photosmart 7450 in windows 7 computer

    I've already tried the steps in manually installing the printer, but still, it failed to install. Is there another way to install my HP Photosmart 7450 in my windows 7 compute?

  • Call function outside of component?

    Hi, How can I call a public function that lives outside a component? I have a "Main.mxml" file that is set as my default application. In this file I have a public function called "switchView(). I also have another mxml file called "LoginView". I want

  • Purpose of Entry/Check Table and Currency Quantity Fields...!

    Hi......!, I want to know what is the purpose of this   Entry/Check Table and Currency Quantity Fields, while creating a table in DDIC . give me a clear explanation .....! best answers would be rewarded. thanks prasad