Jump to content

nhollenback

NI
  • Posts

    65
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by nhollenback

  1. On 7/3/2018 at 0:03 AM, StefanLemmens said:

    According to the file info it should be 55:46 and it stops suddenly in the middle of the presentation.

    Thanks!  I'll look into this one.  The video, as posted to Vimeo as 20:33.  I'm having trouble getting onto the tecnova server to grab the rest of the videos and to check on this one.

  2. On 6/15/2018 at 9:26 AM, Mark Balla said:

    Thank for the update on the crashing videos I will re format them and look into the issue.

    Last Friday the old server that we are using crashed and so currently it is down.

    No videos were lost

    I.T. is working on a new solution but may take a week or two.

    NI is also working on putting the videos on their Center of Excellence Vimeo  site by June 30th

    I will post updates when they become available.

    Videos are all now available on ni.com/coe.    They are view only, so no massive time to download large files.  We are missing some videos, and will work to get these up on the coming weeks.  If anyone has questions or concerns, catch me at nancy.henson@ni.com.

     

    We are real exited that we have a portal ni.com/coe that allows us to host the sessions and videos.  NI does not do any official videos of NIWeek tracks.  It's the effort of Mark and others in the community and then a few of us at NI.  Thanks for the patience and let us know if you like this format for viewing

    • Like 1
  3. On 6/12/2018 at 1:06 AM, StefanLemmens said:

    Unfortunately the video "2018NIWEEK_332_Samual Taggart_Test Strategies for Project Success" crashes at 20:33. It seems something is wrong with the file. I downloaded it again but that doesn't help. Is anyone else experiencing the same problem?

    I think that video may only be 20:33 long.  The video file that was posted on vimeo (where we are hosting videos for ni.com/coe), is 20:33.  I know there were a few issues with some with some recordings just not sure which ones yet.  Thanks for highlighting this.

  4. I was assigned CAR 255982 for what I was seeing.

    I'm kinda surprised no one else is seeing this because NI was able to demonstrate the error on their end building up a class hierarchy from scratch (reliably.)

    At any rate I won't be using property nodes with classes.

    Thanks for the input from everyone.

    ~Jon

    Hey Jon,

    Thanks for closing the loop on this. Since I'm not doing any up or down casting I'll keep using property nodes for now. But I will be back here if anything odd and repeatable occurs.

  5. Here is a snippet from the code that is crashing

    Hey Jon,

    If I get rid of the up and down casting it all works great. I create the JonChildChild class outside the loop and there is no crash. So I wonder about the need for the upcast and 2 subsequent downcasts.

    Also, you can replace the downcasts with "Preserve Run-Time Class" and you are golden!

    Best,

    N

  6. Here is a snippet from the code that is crashing

    Thank you for the warning to save and close everything else. yes.gif Did NI have a specific answer as to "why"? Anything other than removing the property node in the offending sub? I'll take a look a little further this evening.

    I owe it to the students in my OOP course this week as I did "brag" about how cool the property node feature is.

    N

  7. Right, I know what you're talking about. This is most definitely not the case for the behavior I was referring to. Specifically, I've had property nodes break in a VI which is a member of the class being operated on: the class method should have access to the private methods since it is the same class.

    I'm assuming it's not reproducible.

    I don't have a complex hierarchy. One abstract parent and 5-6 child classes. Everything has worked flawlessly (though now that I've stated this, it'll break tonight!). I like the fact that when I realize I need access to another data member, I can add the method and save the class and then it's availability is updated in the property node that is already on the BD.

  8. I'm experiencing problems with using property nodes on classes to the point where I've been forced to abandon them entirely.

    One of the new features of labview is that data members of classes are accessible through property nodes (both by value and by reference.) I found this to be extremely powerful as it allowed me to access not only the private data of the child class, but also the data of all ancestor classes (who have exposed their members to property nodes <- this makes it almost a public data type)

    ......

    Has anyone had success using property nodes with classes?

    Specifically using them in conjunction with DVRs?

    ~Jon

    Just a reminder to us all. The property node only exposes the class private data of the parent when the property node is public. If I make the property node protected, then I can see the class private data from a VI outside the class hierarchy, but it is black and I can't access it. This is the "right" behavior. Could this be what you are experiencing? (I'll send screen shot later if needed)

    I have great success with property nodes for classes. They are fast to write since they are all scripted. I may have a class with 50 data members. I know that I want 20 to be public or protected. But, at design time I am uncertain how to group those 20 (and I don't exactly have 20 terminals on the connector pane - or I better not). So in about 3.5 minutes, I can make 20 reads and writes that are exposed through the property node. Then later on when I am coding I can access only the data members that I need!

    I have only done a quick test on the DVR usage.

    I'd be happy to also try to reproduce the error, as I need to be aware of for my application.

    Best,

    N

  9. Is that anything like the combined effect of alcohol and altitude?

    Looks like I won't be arriving until around 10pm on Sunday night. So depending on how long it takes get situated at the hotel, I'll either be fashionably late or have to catch up on my beer consumption during the rest of the week.

    Fashionably late works!!! I think we closed it out kinda late last year.

    N

  10. How about just using Excel? I don't know if the .NET container supports it (although it probably does), but the ActiveX container supports it for sure. What you get is basically an Excel sheet inside your VI.

    The main issue with this is usually if you have different versions of Excel on different computers.

    Thanks for the reminder!!! When I looked into Excel, I did find Microsoft Office Spreadsheet 11.0. I think I had to download it from another location. But it is only an Active X solution. At the time, it was not immediately obvious how to get data into the control. Of course, after reading your post, it was immediately obvious. :frusty:

    If you are thinking about another control, let me know. On the .NET side, I've only found GridDataView in System.Windows.Forms Assembly. If you are aware of another assembly that is installed with Office, let me know.

    Thanks a bunch!!!!

  11. I've only used them in a read-only implementation, but did you consider the free Office Web Components? It doesn't require an Excel license but then justly won't read/write the XLS format, but that's the only limitation that I remember.

    Are you referring to the DataGrid .NET control that is in System.Windows.Forms? If so, I looked at it. But it seems that it would require extra programming to get the simple functionality that is wrapped into the Aspose Cell solution. I don't mind writing the read/write xls portion if getting the data into the grid control is a snap.

    Let me know if I'm missing something obvious here.

    Thanks!

    N

  12. I need to be able to read an spreadsheet file, allow the user to edit it with basic cut and paste functionality, and then save it back to a spreadsheet file. I've looked at about 10 .NET options and this one appears to have exactly what I need will almost no coding required. This is important as the lack of programming time will help the client swallow the cost.

    As you can see from the screen shot. That basic cut & paste functionality is built right into the control.

    So my question for you all is this: what else is out there that you like better and why? So far I've looked at FlexCel, Byte Scout, Net Advantage, Rad Controls - not sure company name, Syncfusion, DBi, Conponent One and a few others. Rad controls was the close second.

    post-8534-127438499445_thumb.png

  13. Hi again

    Here is our next version of DVR class template.

    This is a simple one and simular to what many of you already have tried.

    GOOPRef2.zip

    Cheers,

    Mikael

    Nice job on the simple template - yes, this is what we have all tried. There is a place for this template. I don't want to reinvent the wheel, much less the flat tire.

    However, I really need the naming and the debugging of the original posting. Great job!!! I will spend more time with the original over the next few weeks and will post questions as they arise.

    N

  14. This is a cross post from the NI Discussion Forum:

    I need to create a UML class diagram from existing LabVIEW 2009 projects and classes. Has anyone had any experience using the Endevo UML Modeller 1.2 to do this? The web site does not have an evaluation version of the UML Modeller.

    Hey Julia - feel free to call me if you have questions. I've been using this most excellent tool for a while. It can be a huge life saver in doing just what you want - create the class diagrams from large OOP applications. Even better you can sync code with the model.

    Best,

    Nancy Hollenback

  15. If my ears are working right this is the first time I have had a chance to speak with you. Nice to meet you and thanks for the reply.

    So these globals would be read-only? i can see how the single-element qeue has built-in protection but if I am crating two instances of the class at teh same time, SOMEBODY has to write to them and who will win with protecting the global with semaphores?

    Ben

    Ben - it's a pleasure to meet! Hoping my schedule will permit more time here!

    First, I'm thinking primarily about the basic native by-ref class (then I will extend my thoughts to wrapping that with a reference). And I must admit that I'm historically a by-Ref gal that is now digging by-Val.

    Let's consider two use cases: The first does not require this class global variable, the second does.

    Let's say that I have a parent class that is LogFile. The child classes could be TDMS LogFile or XML LogFile. In this case, the parent data could include the path for the directory to the files that will be logged. Yes each instance of the child would have a unique wire and each wire would contain a unique path.

    Now let's change the use case. Let's assume there is only the TDMS LogFile class and we have multiple instances of that class. However, there will always be one and only one path for the directory for all of the TDMS LogFile objects. And all objects will need to be able to read this information. This is the kind of data that might be stored in that static/class global variable. And the developer would simply create the method to set the value and that method would likely be called at the beginning of the application. And because the global variable is private to the class, it is protected from any spec of code, other than the associated method, being able to set it.

    Let me know if you are tracking with me here or if I need to clarify further, then let's wrap with references and chat more!

  16. Wouldn't a global restrict the proper operation of a class to single instance? If I wanted two instances of that class, isn't there a possiblity that the two instance could be hitting the same global in differnet ways?

    Ben

    I think the point is that each instance of the class would have access to that one "class" or "static" variable. Endevo has a "class attribute" which is scoped to all instances of the class. And I think that is the goal here as well.

  17. Congrats and best wishes!!! Best advice I ever got was that it takes 3 months to get out of the "fog." Wish my Bay Area trip did not get cancelled. Would love to come babysit and give you and Beth a few hours off!!!

  18. Wrapping the class constant and Init functionality in a Create method isn't an adequate solution for several reasons:

    1. As The Decisions Behind the Design points out, LV classes do not need creators. They are created as soon as you drop the cube on the block diagram. Requiring a class to be "created" (via the Create method) before it can be used directly contradicts that.
    2. There is no way to prevent the user from dropping an reference object cube on the block diagram and attempting to use it directly without sacrificing some of the advantages of OOP. There's not even a way to discourage them from doing so. Wrapping the class in a library and making it private stops users from putting the object cube on the block diagram, but it also prevents users from inheriting from that class.
    3. Dropping constants directly on the BD is in fact the normal way to program in Labview. Using creators is abnormal; there are only a few native data types that require them. Having a mix of classes, some of which require creators and some do not, is very inconsistent and non-intuitive. How do you explain to the casual LV user (and non-programmer) why some objects need to be created and some do not--especially when the need for a Create method appears completely arbitrary from the outside?

    Great thread that I need to reread a few times. I see a few different topics:

    One is naming convention. By-reference classes include a create/obtain and destroy/release (obtain having the unique functionality of obtaining another reference to the existing object data that must also be subsequently released). So let's keep that same convention.

    By-value: By it's very nature, as it has been stated above and in Decisions behind the Design, does not require the creation of the reference for the object. Don't use the create/obtain terminology here. I like what Endevo has done. When their toolkit generates a by-value class, the term is simply init. I would concur that "init" is not technically necessary. However... I run in to many OOPophobes. :wacko: And if the "cube" causes confusion and consternation, then I will just bury it in an init VI. That is just a style preference in certain circumstances.

    Second... much has been said about initializing either type of class. I'll pass on commenting on that for now....

    Third is the distribution of the class. Yes, I am a project junkie. I do everything from the project. However, I might considerer distributing some classes through that antiquated thingy called the "functions palette." It's at least a modest attempt to hide intricacies.

  19. A topic that has never come up on LAVA or in any of the presentations/discussions I've been involved in in the last three years:

    There is a general repudiation of global VIs among advanced LV programmers. Generally, globals are good until the first time you are sorely burned by them, and then you develop an allergy to them that gets stronger with time, especially as you discover techniques that give you other ways to share data in your programs.

    The argument against globals is

    1. They allow any random VI any where in your system to change values, making it hard to write stable, proveably-correct code.
    2. They always create a data copy on read.
    3. They are subject to the read-modify-write race condition if used in two places in your code in parallel.

    But the argument from the other side is that

    1. global VIs are so easy to write compared to [insert alternate mechanism here]
    2. You can search and find all uses of a global VI, which you cannot do with Data Value Reference (DVR) and single-element queues (1EQ). You can search for all uses of LV2-style globals (LV2), but most of the time, those are written with a simple get/set, which means they have the same data copy and read-modify-write danger. So why not just use a global VI?

    The argument is one for the ages.

    But now we have LV classes, or any library, really. With a library, we can create a global VI and make it private scope. Now we know that the global VI is only used by a finite set of VIs -- those that are members of the class. We can guarantee that any read-modify-writes are either done singly or can be guarded by semaphore locks. We can combine the global VI with a DVR, so that the global VI stores the refnum of the DVR for easy lookup, and let the DVR be used to avoid the data copies.

    The original presentation of LVClasses mentioned the use of global VIs as a good way to implement data common to all objects of a class (called class static data by C++/C#/Java programmers). But the question of whether this is a good recommendation has never come up. Given all of this, I now formally ask the question: should a global VI that is given private (or community, since the same finite-set-of-VI-arguments apply) scope be considered acceptable LV coding practice? Would a VI hierarchy that used globals in that way be acceptable in the LAVA Code Repository?

    Nicely stated and wow no comments yet!!! I'll take a stab as I am amongst the knee-jerk "toss my cookies"-at-sight-of-global-variable crowd. That being said, my take is we need to know options around global variables, then we can come back to the strategic use of them.

    I also admit, that at first I did not like the use for the static data. But you might sell me on this one (and for those that know me here in Colorado there was just a 8.6 tremor across the state as I typed those words).

    Here is my take:

    1. I will look for an opportunity to implement this in the near future.

    2. This implementation will be completely transparent to the end user. If well constructed could be an elegant solution. End user just want the library of methods to get the job done and done in a clean fashion.

    3. If I don't like the implementation, I can always change it as long as I've forced my end user to a public interface that will allow for that change.

    4. Not for the novice LVOOP developer (thinking about the coupling with DVR when I make that statement).

    5. I will still recommend learning to code with out the global variable.

    6. Can't wait to hear everyone else's opinion while pondering this one.

    Thanks for the idea!!!!

    PS - Don't tell anyone about #1. Please keep it a secret. :rolleyes:

  20. Thanks Chris. I almost ended up with tea all over my monitor.

    Thanks Gary - my laptop almost got a nice dusting of Diet Dr. Pepper.

    I would recommend taking the Advanced Architectures course.

    :thumbup1: And I know an instructor who likes to travel and thinks onsites for the AAL rock!

  21. I think I passed the CLD test at NI week, any suggestions ongetting ready for the CLA ?

    I'm assuming you've read the tasks & objectives...

    A good start is to go over those and go back over your LV manuals. Make sure that you fully understand all sections in the manual that are referred to in the tasks & objectives.

×
×
  • Create New...

Important Information

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