Jump to content

Neil Pate

Members
  • Posts

    1,156
  • Joined

  • Last visited

  • Days Won

    102

Posts posted by Neil Pate

  1. Just to briefly revive an old thread, I still do not really fully understand the difference between To More Specific Class and Preserve Run-Time Class

     

    can somebody check my understanding here for this particular scenario

    • I have a class hierarchy, say parent class A and child classes B and C.
    • Actual class is only determined at run-time, so my wire is of class A
    • Under certain conditions I wish to run a method that is only implemented in class B so I should use To More Specific Class, rather than preserve run-time class

    Is this correct? This is pretty much how I have always done it in the past, I thought it would be worth re-visiting incase I am not quite using things correctly.

  2. LvVariant Get Attribute:

    attachicon.gifLvVGetAttr.vi

     

    Interesting, but I am not sure how these are better than using the Get/Set Variant Attribute prims. Have you benchmarked these compared to the prims? I suspect the difference will be very little difference, but am curious anyway...

     

    Edit: your VI does not actually do very much, did you perhaps forget to save default values on the variants or am I missing the point completely? I tried to add a variant attribute using the standard LV prim, and then read it back using the library call, but I could not get this to work ("an exception occurred in the external code").

  3. Hi All,

     

    I am dusting off some old code I use to get a Windows Notify Icon running. This code was originally developed in LV2009 I think, but recently used in a project in LV2012 with no issues.

     

    For convenience I have wrapped up the .net NotifyIcon API in several LabVIEW classes. My test code works fine, but I have some strangeness with the event callback VIs (these are invoked whenever you interact with the notify icon). Specifically, when I run the code my callback seems to change context from my project to something called <W>, and is in a reserved type state as shown in the second picture. When I stop my main VI this VI does not come back out of this state. This causes my classes to be locked in the project (reason for locking is they are apparently reserved for another application instance, which I can only presume is because of the reserved callback VI).

     

    In LV2012 when I run my main VI the callback VI does not get reserved like this, and when the main VI finishes everything goes back to normal.

     

    Any ideas here? What is the <W> context and why is it on localhost rather than My Computer?

     

     

    post-7375-0-46515000-1406157127_thumb.pn

    post-7375-0-75742000-1406157132_thumb.pn

    post-7375-0-31681100-1406157273.png

  4. Hi all,

     

    I am a bit embarrassed to say in my situation there is no bug in LabVIEW, this is clearly a case of PEBKAC.  :oops:  Sorry NI!

     

    The root of my problem was I created a sub-class from one of my main objects, and (for reasons I can not think of now other than it was very hot the other day) in the private data of the sub-class I added a data member object that already existed in the parent (same class, same name etc). Then when I was probing around I did not notice that I was looking in the wrong place in the cluster (basically I saw what I wanted to see...).

     

    I think I may still have the problem of a class not updating properly in a different part of my code, but I had already "fixed" that by re-arranging the class data slightly and the problem went away.

     

    Panic over for now. Thanks again Darin and Jack, I will certainly remember this thread for next time I get this problem.

  5. What's wrong with the silver palette? From what I've seen, it makes UI's look a bit more slick and modern, are there more technical reasons for the dislike from more experienced users than I?

     

    All my dislikes are purely aesthetic, I think they look quite cartoony and waste way too much space. I pretty much use System controls exlusively for GUI front panels.

    • Like 1
  6. Hi all,

     

    I have had some really weird behaviour in my app over the last few days. The problem seems to be related to several others mentioned on LAVA where the contents of a class are not being correctly updated via a bundle.

     

    My current problem goes something like this: I have a sub-VI where I update some members of a class, and then the class is used downstream in the calling VI.  If I probe the class wire directly before the exit indicator in the sub-VI, the contents are correct, but if I probe it downstream (immediately after returning from the sub-VI) one of the member elements is not set correctly!  :angry:

     

    This morning I had another issue with a similar class apparently not updating after a bundle operation, even though probing showed all the values to be correct.

     

    This issue is very very annoying as I now really do use classes quite a bit in my code, and this is such a terrible problem to debug as you can no longer believe what the probes are telling you.

     

    Any ideas? Next step for me is a mass compile or to clean out the object cache.

     

    Edit: cleaning object cache did not help.

  7. Who uses strict types in a driver level code?  

     

    Me! I pretty much use strict for everything except GUI typedefs/controls that I want to customise a little bit. I suppose I use strict over normal typedef just out of habit.

     

    And who uses silver controls?

     

    What silver controls? I don't see any silver controls on the pallette. I think you are mistaken, silver controls do not exist. System, Modern and Classic are all I can see on mine  :P

  8. Had to install the right software to the cRIO, then enable it via MAX (Time Settings tab, under Time Synchronization).  Then some tweaks to the configuration so that we had a consistent master, in order to avoid a situation where on every power cycle, a different clock in our network became master (which caused the time to jump around a lot more than we wanted).

     

    Also using cRIO-9024 and 9025s.

     

    Well, hopefully my cRIOs are stable now. I have nine of them running a long term test, with uptimes of about 60 days so far, so hopefully my issues are resolved.

     

    Next time I will definitely go the time sync route.

  9.  We have some systems using 1588 to sync clocks, haven't noticed any problems with that under VxWorks.

     

    That I think is the root of my problem, I was *not* using 1588 (which I presume you set up in the RT system ini file?), rather manually getting time updates over UDP and manually adjusting the system clock (i.e. in code). Doing this too quickly (i.e. more than a couple of times a minute) seemed to cause my RT code to crash horribly (some bits were still running, but not most of it).

     

    This happened on a bunch of new cRIO-9024s

  10. I recently had some nasty issues with doing something very similar. I have reasonably solid evidence that setting the system clock too often could case the cRIO to crash. I was trying to sync the cRIO clock from a master PC.

     

    Something I wanted to try (but never got around to doing it) was to use a time sync protocol rather than "manually" doing it in the RT code.

  11. I have several legacy applications that all use the web server to display snapshots of their FPs. The existing application was written in LV8.5 and I am in the process of porting it to LV2013. I have noticed that every time I build my application the niwebserver.conf file in the build directory gets overwritten by the one from the <LabVIEW> directory.

     

    Does anybody know of a simple way to stop this from happening? I have tweaked my niwebserver.conf file for the specific application, so I would rather not replace the one in <LabVIEW> with this new one.

     

    I am thinking about doing a post-build step to copy over the desired .conf file.

     

    Any other ideas?

     

    Edit: doing the post-build step was pretty trivial. Problem solved!

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.