Jump to content

Black Pearl

Members
  • Posts

    410
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Black Pearl

  1. If speed matters, I guess nothing will beat the native array. The other issue I see is that LV doesn't support generics, so you will need to implement the linked list for every class and can't reuse it. If you really want to dive into by-ref design, there are several threads here that discuss it. Maybe a good starting point would be to search for Daklu's bag implementation. Felix
  2. Thank you Paul, I'll give SysML a higher priority. Apart from it's usefulnes to system engineers (in my case I could be classified as system integrator, writing software with LV is just a part of my job, my favorite actually), it opens an interesting technical perspective. As I wrote previously, I think there is a good chance that it is possible to make uml match LVOOP using profiles (for those who are not into the uml syntax: it's a way to extend uml and it's part of the core specs). Profiles allow you to restrict uml, e.g. to disallow multiple-inheritance. If SysML is introducing new diagrams on profiles alone, it should also be possible to implement LV specifics (extending instead of restricting). The concept of uml-profiles is still above my uml knownledge, but I think both objectives are possible to realize. This leaves two obstacles towards an uml-LVOOP interface: * Is this sufficient to describe data-flow/by-val classes (would it be sufficient to say that an attribute or a class is by-val?) * How about the availability of tools that correctly implement profiles (I know that uml2 tools for eclipse had said something about implementing it). Second point on Pauls topics: requirements tracing. I don't question the benefits of this, but without a punishing force (regulated industries) you won't find it. Personally, I've seen it practiced once and plenty of examples where it can't be implemented. Here I wonder if a hybrid solution would be acceptable by those that practice it. By hybrid I mean if a uml/LVOOP code-generator and reverse-engineering tool would place the trace-elements in an own format (like vi scripting tags) and map that to SysML or uml notes/sterotypes/artifacts?. The main interface is already defined by XMI. And how huge would be the effort to get such a process certified? On the general request on NI's involvement: I'm really in favour of pushing NI towards the uml standard. But I don't expect and I don't want them to show to much activity on this side at the moment, they just should be aware of this. One of the main reasons is, that I'd like them to focus on LVOOP developement (which only they can do) and burden such tasks as interfacing uml to the community (that's not free-of-charge, see endevos uml modeller, but you can do it without root-access to the LV-code). At later stages (that's why I want to push them), they are needed like to make an uml-profile an accepted standard for LabVIEW and maintaining it for new uml specs. On community needs: All the discussion here shows a very, very broad range of priorities in the LV/uml integration. I'd like to get more grip on this, then I could design some polls on the community page. The one direction is not new to uml, usage: reverse engineer, code-generation, documentation, modelling, fetish/abuse, consulting, conforming to a standard. The next is about budget (beside money this is also the time to learn using the tool). Also completness is an issue, do you need all diagrams or just the class-diagram (do you really need a state-chart or just a state-diagram?)? Or do you need a broader scope (SysML is one option, I personally use dia which isn't good for uml but has a lot of other diagram formats as well). Felix
  3. I've stumbled on the keyword 'SysML' recently and added it to my (ever growing) 'must know' list. Can you please provide me with a short abstract focussing on what it can be used for. Felix Edit: I'd like to see you promoting your IE suggestion on the community page as well.
  4. I did create a community group for uml on the dark side: http://decibel.ni.com/content/groups/uml This thread is of course refered there. You're all invited to join, but I'll stay on LAVA as well of course. I'll try to do more on the LabVIEW/uml frontier the next month. I think this is a really interesting issue, as the graphical nature of uml is actually favouring our minds experienced with graphical software engineering. On the other hand, uml is condensing a bunch of OOP concepts that are not yet represented in LVOOP (interfaces, abstract classes...). And to even think bigger, uml has some concepts intended to bridge the gap: on the one hand it could be necessary to try to reuse the infrastructure only and develop a modelling language on it's own via CMOF or EMOF in parallel to uml to comply with the LVOOP native by-val syntax. On the other hand, a subset of LVOOP (by-ref design) could be modelled using the profiles packages that are in both Infrastructure and superstructure of the uml specs. But it must admit that I'm just to much in my early steps on both uml and LVOOP to see the way to go. But I'll be bloging in the community mentioned above about my uml-findings (it's pretty dry but philosophical stuff, best digested with some dry red wine!). Felix
  5. released the 'quick create new vi from template'

  6. Version 0.9.4 LV7.1

    1,430 downloads

    Installation: Copy the contents to LabVIEW xxxx/resource/plugins Abstract: Speed up creating new vi's from templates! It's using the 'new vi'-hook to create the new vi from a custom template. A plugin architecture allows to map different templates to the keyboard. For a quick-start, try Ctrl+N followed by 'H' (without releasing the Ctrl key). Detailed Description: When using New -> Blank VI from the Startup Window File -> New VI from the menu of any vi or the Ctrl+N shortcut the lv_new_vi.vi hook is called. Releasing of the Ctrl key (when using the shortcut) uses the Default.vit. The next key-press k creates a new vi from the template [...]/plugins/lv_new_vis/templates/k.vit. This is case insensitve and only works with a..z and SPACE. If no template is found or if an error occures, the default action of LabVIEW (empty vi) is performed (Failsafe). In addition to normal vi templates it supports global vi templates and control templates. Even more customization is possible using special tags on the vi or vit. Use [...]/plugins/lv_new_vis/tools/lv_new_vi__TagEditor to read and set them: isBD_ToFront? bring the block diagram in front instead of the front panel isRunMe? will instead run the vi in the template folder. Use this for wizards, more sophisticated scripting and other dialogs. Examples (V0.9.3: seperate ogp package): Try the following keys to see the different possibilities: f: normal vi, FP at front b: BD at front g: global vi c: control w: wizard h: help You do not need to delete the demo templates, a w.vit will load even with w_example.vit present. Compatibility: Developed in good old 7.1 and tested with 2010. I don't know if it works nicely with the project explorer and did never try to use it with projects, libraries and classes. Planned Features: * Error logging * Redirections via Config file (I will link the standard templates) (Edit: It's faster to just place them in the templates folder.) V 0.9.1 Fixed issues with the Application Instances of LV8.0 and higher. Wizards are still launched in the diaolog App.Instance, they need to get the default App on their own. V 0.9.2 Changes: Closing all references Beta: Uses VI Activation Event to abort when the user switched to a different app. (See discussion for details). V 0.9.3 Uses VI Activation Event to check Ctrl-Key when user switches from a diffrent application. Now available as packages (ogp). Uses a seperate package for the examples. V 0.9.4 Fixed issues with 0.9.3: After start of LV, Ctrl+N didn't work the first time Enjoy, Felix
  7. Name: quick create a new vi from template Submitter: Black Pearl Submitted: 14 Aug 2010 File Updated: 03 Jan 2011 Category: *Uncertified* LabVIEW Version: 7.1 License Type: BSD (Most common) Installation: Copy the contents to LabVIEW xxxx/resource/plugins Abstract: Speed up creating new vi's from templates! It's using the 'new vi'-hook to create the new vi from a custom template. A plugin architecture allows to map different templates to the keyboard. For a quick-start, try Ctrl+N followed by 'H' (without releasing the Ctrl key). Detailed Description: When using New -> Blank VI from the Startup Window File -> New VI from the menu of any vi or the Ctrl+N shortcut the lv_new_vi.vi hook is called. Releasing of the Ctrl key (when using the shortcut) uses the Default.vit. The next key-press k creates a new vi from the template [...]/plugins/lv_new_vis/templates/k.vit. This is case insensitve and only works with a..z and SPACE. If no template is found or if an error occures, the default action of LabVIEW (empty vi) is performed (Failsafe). In addition to normal vi templates it supports global vi templates and control templates. Even more customization is possible using special tags on the vi or vit. Use [...]/plugins/lv_new_vis/tools/lv_new_vi__TagEditor to read and set them: isBD_ToFront? bring the block diagram in front instead of the front panel isRunMe? will instead run the vi in the template folder. Use this for wizards, more sophisticated scripting and other dialogs. Examples (V0.9.3: seperate ogp package): Try the following keys to see the different possibilities: f: normal vi, FP at front b: BD at front g: global vi c: control w: wizard h: help You do not need to delete the demo templates, a w.vit will load even with w_example.vit present. Compatibility: Developed in good old 7.1 and tested with 2010. I don't know if it works nicely with the project explorer and did never try to use it with projects, libraries and classes. Planned Features: * Error logging * Redirections via Config file (I will link the standard templates) (Edit: It's faster to just place them in the templates folder.) V 0.9.1 Fixed issues with the Application Instances of LV8.0 and higher. Wizards are still launched in the diaolog App.Instance, they need to get the default App on their own. V 0.9.2 Changes: Closing all references Beta: Uses VI Activation Event to abort when the user switched to a different app. (See discussion for details). V 0.9.3 Uses VI Activation Event to check Ctrl-Key when user switches from a diffrent application. Now available as packages (ogp). Uses a seperate package for the examples. V 0.9.4 Fixed issues with 0.9.3: After start of LV, Ctrl+N didn't work the first time Enjoy, Felix Click here to download this file
  8. is preparing a new gimmick to be submitted in the CR

  9. Sorry about the wrong category, but this was the old 'rusty nails' section and there is a very bloody-rusty nail out there. So be aware of that sea-monster: Dark side nugget Felix
  10. I have some vi's that send the error on my global event bus and then clear the error wire. I like the error wire to determin by data flow when all modules finished execution and I can use the Quit LV prim. These terminals are labled as "error out (cleared)" or "error out (no error)". So my personal reaction would be to lable them "error in (ignored)". Felix
  11. next weeks work is north of the arctic circle: cool!

  12. Congratulations. Felix
  13. From AddQ's HP, (G# Online Manual): G# - [..] This code is open source code per the terms of BSD-license. G# Debugger – [..] This code is open source code per the terms of BSD-license. G# IDE (Integrated Development Environment) - [..] The IDE is not open source and copyright by AddQ Consulting. [..] Felix
  14. Ton, very nice you discovered this. I have seen a behaviour in LV 7.1 (so unsupported and I never tested it on newer versions + several bug-fixes in LV8 on events) that is similar: Two user events directly fired one-by-one the later one was missed when I used some event structures (at least two in SubVIs, most likely another one in the main vi). Using an wait 0 between removed this problem. I will see on monday if I still have the code and check it with a recent version. If you have, please post a CAR so I can refer to if my issue is the still persistent, 'cause it might be related (too slow event structures). Felix
  15. hopes to stay in town the next week

  16. I'm not much ahead of you. For OOP design patterns, I normally use wikipedia (in lack of a text book). My idea of using a factory was linked to the DVR concept. Using a DVR as private data requires an initialization method which you would call in the factory. A factory is most of the time implemented as singleton. The DVR is a reference. If all your objects have the same reference, they share the data. You just need to pass the DVR to every object you create in the factory, then they all share the buffer. Working with DVRs is very similar to single element queues (SEQ). If you don't set the VI as reentrant, it can only run when it isn't running in an other section of your code. This is a very elegant way of protecting against concurrent access to data. In all other situations you need to explicitly state this, using semaphores around globals, the dequeue/enqueue operation of SEQ, the Inplace Structure for DVRs. Why don't you just use an array as private data in your parent class and implement the data access methods (Get/Set). All code that is the same for every device (like save) will be implemented in the parent class using these data access methods. All device specific code goes in the child classes, like 'record' and use the parent methods to place the data in the array. (As a side note, you can override the Data Access methods in a child class, the parent calls to these methods like in the save will 'dynamic dispatch' to the child methods) Most of the time a by-value implementation should be good. Then you treat the object like a cluster. If you need to access the same data in parallel loops, you need a by ref implementation. There are 2 diffrent ways to do it: a) place the class data in an DVR, the private data is then the DVR. You can mix this with by-value data (for example only place the buffer in the DVR). b) place the object in an DVR. Then wrap all methods of the class inside inplece element structures. You can mix it with by-val, too (direct calls of the class methods, e.g. in the initialization part before you have the parallel loops). Felix
  17. My idea would be to have the DVR initialized in the factory class itself and whenever a new ImageDevice object is created, the DVR is set by the create methode of the factory class. The factory object of course needs to be a singletone (there is plenty of discussions on singletons on lava and ni forums). Rethinking this, a simpler solution would be to implement the buffer as an 'Action Engine'/'LV2global'. This would be the same concept as I would make the factory a singleton, by using the serialization that 'naturally' takes place at the subVI boundary. And rethinking again, is it really a design constraint for you to make this buffer 'static'? Again, one different implementation could be to make the buffer an object itself and make this object a singleton. Felix
  18. has more travelling ahead

  19. Not correct, I did ask if interfaces support multiple-inheritance. The whole concept of interfaces would be stupid if a class would only be able to implement a single interface. To clarify: IMyInterface declares MethodA and IMyOtherInterface declares MethodB and I can draw somthing that would be comparable to IMyChildInterface extends IMyInterface, IMyOtherInterface and if I now have a class that implements IMyChildInterface I am forced to have both MethodA and MethodB (and anything else that IMyChildInterfacedeclares). Does your concept of interfaces allow inheritance on interfaces at all? Felix
  20. Just a question, do you have multiple-inheritance on interfaces? Felix
  21. Concerning 'static variables': Just to clarify, you want to have a single variable that is shared among all objects? Then you could use an DVR (data value reference) for this. Then use a factory (search for factory design pattern) to create the objects at run-time and initialize them with the same DVR. To set/unset the 'recording' button, I would use User Events and the objects will fire them as Enter/Exit Action of the recording code section. This is motivated by the fact that your FP code has already an event structure and you don't need an additional loop like when using queues, notifiers, some kind of global for this. Felix
  22. I use dia for fast scetches. I even wrote a code generator for state machines, look into the LAVAs CR. Recently I started to play around with eclipse (galileo). That's really powerful (full uml2). Felix
  23. is heading to asia for another round

  24. I did make some progress concerning multiple-inheritance. Because I won't have time to continue on this the next weeks, I want to share my current approach. The first thing is inspired a lot by Daklu's Interface Framework. Basically I just have an array of objects called step-parents. When I want to cast to a step parent, I check through this array with the PRC if I find it. Then my Child just needs to wrap the calls and pass them to the step-parent class. Here it's simpler than the Interface Framework, where the Interface needs to call back to the class. Also I need an inheritance step to make the protected vi's available. I think it's easy to understand this from the uml draft. Now we come to the real tricky thing: the diamond problem. For the methods, it's a decsion of the designer weather to wrap the function from the step-parent or call it's own ancestor. Much more difficult is dealing with the class private data. So we go: the class private data is DVR to the real data. In each Initialization call-chain (going with call parent through the inheritance chain and then creating the step-parent objects), I check weather this object is already present genalogy-array. If yes, the PRC is returning my an object of the same type as 'this', so I can (that's really cool!) access the private (!) data of the object and use it as the value of my DVR ref to the private data. So all object's through the multi-inheritance tree that or of the same type have the same 'shared' private data! The nasty thing is, that at the moment it seems to be necessary to code the Initialization for really every class, but this can be automated. Still an issue is this: If you cast to a step-lineage, dynamic dispatching is not working. Felix
  25. I had read some of the posts where AQ was talking about the thralling. I really like this feature, because I get a design-time type-check instead of a run-time type-check (errors when I cast to a wrong class). I was thinking about which structures would need a thralling-feature and a came up with - only arrays. Also, the array-prims will determine the output-type if they are 'inlined'. So it seams to be almost-there. What I didn't think about is nested subVis with thralled array terminals. If I find time, I'll place this in the Idea Exchange. Felix
×
×
  • Create New...

Important Information

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