Jump to content


Popular Content

Showing content with the highest reputation since 02/10/2013 in all areas

  1. 20 points
    After I made this post I decided to bring the LabVIEW Wiki back online. It was not easy and took several days of server upgrades and hacking. The good news is I was able to bring up all the original pages.. The even better news is I talked with @The Q and @hooovahh and we are all on the same page as to how to move forward. @The Q did a great job of stepping forward and trying to fill the void that the LabVIEW Wiki's absence had left. He's agreed to migrate all the new content he created over to the LabVIEW Wiki, from Fandom and continue to develop new articles and content moving forward on the new site. He will also help in moderating the Wiki and will be promoted to Admin rights on the Wiki. His help is much appreciated. The LabVIEW landing page created here on LAVA is awesome but the forums don't lend themselves to static content creation. Instead @hooovahh has agreed to move the old landing page to here. That will be the new home for the landing page. This will become a valuable resource for the community and I hope all of you start pointing new people in that direction. With many editors, it can only get better and better over time. Where do we go from here: Logging in. - The old accounts are still there. If you're a LAVA old-timer, then you can try to login using your LAVA username. If the password doesn't work then reset it. You can also create a new account here. I'm going to announce a day when new accounts can be created. I'm limiting it for now because of all the spam accounts that can be potentially created. There's an issue with the current Captcha system. if you are super-eager to start creating content now and want to help, send me a direct message on LAVA and I can manually create an account right away. - New account creation is now open. Permitted content: - I'm not going to put restrictions on content at the moment. Obvious vandalism or offensive\illegal content will not be tolerated of course. However, the guidelines will be adjusted as time goes on and new content is created. There's just not enough content right now to be overly concerned about this. We need content. Discussions about the Wiki. - Each article page has an associated discussions page where you can discuss issues related to that article. Please use that mechanism (same etiquette as wikipedia). General Wiki issues\questions and high level discussions can be done here. So now, if you need to add content, you can do it yourself. Feedback as always is welcome.
  2. 11 points
    The NIWeek 2013 Videos are compressed and ready for down load from Tecnova's ftp server All of the videos are files and are around 400 to 450 MB for an hour presentation. I would strongly recomend using an ftp client to transfer them to your computer. A web browser may work but if you want to download multiple viedos the ftp client makes things much easier. My ftp client of choise is FileZilla and it is free. FileZilla can be downloaded at http://filezilla-project.org/ If you are unfamiliar with FileZilla there is a youtube tutorial video found here Thanks to my IT department at Tecnova for giving me the space. V I Engineering has also volunteered the ftp server to help distribute the videos. Thank you Chris for your help. Use this log in information ftp://frc.tecnova.com login: LabVIEW_Videos pw: LabVIEW login and password is case sensitive. if you are using Filezilla your site manager window will look like this. For Use this log in information ftp://tahoe.viengineering.net/LabVIEW_Videos login: LabVIEW_Videos pw: LabVIEW login and password is case sensitive. if you are using Filezilla your site manager window will look like this. I compressed and uploaded these videos in a rush and didn't have time to look through them all so if you find issues please post to this thread. Please enjoy and share the videos with anyone you can. Mark
  3. 9 points
    Tecnova has created a new LabVIEW Video site to replace the previous ftp server for downloading NIWeek and CLA Summit videos. Location: https://labviewvideo.tecnova.com Login: LabVIEW_Videos (Not case sensitive) Pw: LabVIEW (case sensitive) Check out the LabVIEW Videos Tecnova site Demo to see all the features of the new site. For comment or feedback please email LabVIEWVideo@tecnova.com Thanks to Tecnova Management for supporting the LabVIEW Community. Note: Testing has shown successful downloads using Chrome, IE and Edge for Windows and Safari for Macs. FireFox however tries to auto play the video and may not work like the other browsers. LabVIEW Video Demo.mp4
  4. 8 points
    I don't think it takes too long after deciding to do an actor based project to run into the case where you have an actor spun off without a way to kill it. You'll figure that out and get your solution working so you can pass it off to someone else and forget about it. Soon after, that someone else will come to you and say something like "yeah, those actors are cool and all, but they're really hard to debug" I ran into some of these problems a while ago, so I decided to write a little tool to help with it. I decided to call it a monitored actor. Here were my design criteria: I want a visual representation of when a monitored actor is spun up, and when it is shut down. From the visual representation, I want to be able to: stop actor, open their actor cores, and see if they're answering messages The visual representation should give you an idea of nested actor relationships. Implementing a monitored actor should be identical to implementing a regular actor. (meaning no must overrides or special knowledge) Monitored actors behave identically to Actors in the runtime environment. It turns out that you can pretty much accomplish this by creating a child actor class, which I've called Monitored Actor. A monitored actor's Pre-launch Init will try to make sure that the actor monitor window is made aware of the spawned actor, and Stop core will notify it that the actor is now dead. The actor monitor window contains ways to message the actors and pop up their cores and such. I think it's fairly obvious what each button does except pinging. Pinging will send a message to the actor and time how long it takes to get a response. This can be used to see if your actor is locked up. The time it takes to respond will be shown in the ping status column. if you want to periodically ping all the actors, set the "poll Frequency" to something greater than 10ms. This will spawn a process that just sends ping messages every X ms. Where I didn't quite meet my criteria: If you were to spawn a new actor and Immediately (in pre-launch init) spam it with High priority messages, the Actor monitor window will not know about the spawned actor until it's worked through all the High priority messages that got their first. You probably shouldn't be doing this anyways, so don't. Download it. Drop the LVLIB into your project. Change your actor's inheritance hierarchy to inherit from monitored actor instead of actor. You shouldn't have to change any of your actor's code. The monitored window will pop up when an actor is launched, and kill it's self when all actors are dead. Final note: This was something I put together for my teams use. It's been working well and fairly bug free for the past few months. It wasn't something I planned on widely distributing. A co-worker went to NI week though and he said that in every presentation where actors were mentioned, someone brought up something about they being hard to debug or hard to get into the actual running actor core instance. So I decided to post this tool here to get some feedback. Maybe find some bugs, and get a nice tool to help spread the actor gospel. Let me know what you think. Monitored Actor.zip
  5. 7 points
    View File Plasmionique Modbus Master This package contains the Plasmionique Modbus Master library for LabVIEW. It supports RTU, ASCII and TCP modes with the following function codes: 0x01 - Read Coils 0x02 - Read Discrete Inputs 0x03 - Read Holding Registers 0x04 - Read Input Registers 0x05 - Write Single Coil 0x06 - Write Single Register 0x07 - Read Exception Status 0x0F - Write Multiple Coils 0x10 - Write Multiple Registers 0x16 - Mask Write Register 0x17 - Read/Write Multiple Registers 0x2B/0x0E - Read Device Identification Other features include: - Sharing a COM port across multiple Modbus sessions using VISA locks (10 second timeout). - Sharing a Modbus session across multiple communication loops. - TCP transaction ID handling to ensure that requests and responses are matched up correctly in case responses are received out of order. - Modbus Comm Tester, available through the "Tools->Plasmionique" menu, for testing communication with a slave device without writing any code. - Detailed help document available through the "Help->Plasmionique" menu. Examples are included in "<LabVIEW>\examples\Plasmionique\MB Master\": MB_Master Comm Tester.vi: Demonstrates usage of API to open/close connection and communicate with a Modbus slave device. MB_Master Multiple Sessions.vi: Demonstrates usage of API to open concurrent Modbus sessions. MB_Master Simple Serial.vi: Demonstrates polling of a single input register over serial line. Download a copy of the user guide here: MB_Master - User Guide.pdf Note that Version 1.3.4 of this library has been certified compatible with LabVIEW and has been released on the LabVIEW Tools Network: http://sine.ni.com/nips/cds/view/p/lang/en/nid/214230 The most recent version of this library will always be released on LAVA first before going through NI's certification process. ***This project is now available on GitHub: https://github.com/rfporter/Modbus-Master Submitter Porter Submitted 04/01/2016 Category LabVIEW Tools Network Certified LabVIEW Version 2012 License Type BSD (Most common)  
  6. 6 points
    I just started down the rabbit hole of making a new XControl recently. Oh man such a pain. Here is a little graph I made complaining about the XControl creation process, and the time needed to make something useful. Any alternative is appreciated.
  7. 6 points
    Door Prize! Two of these custom bluetooth speakers will be given away, sponsored by the LAVA BBQ itself! [Front and back views]
  8. 5 points
    Hello all. So NI is trying something new this year for NI Week. Year after year NI gets feedback from those that attend NI Week and one of the most common things people ask for is more technical sessions. We don't care too much for a marketing presentation telling us how your company is awesome, and we don't really need NI to tell us about some new hardware we'll never use. But coming back from NI Week with new technologies that excite me and make my job get done better, makes my boss want to send me next year. So as a way for NI Week to get more technical, NI has dedicated a room at NI Week to advanced users to give presentations on advanced topics, allowing them to make up their own Advanced Users. This track will be in addition to the other tracks NI usually has for various industries, like aerospace, and automotive. These presentations will be given by advanced developers who are LabVIEW Champions and will focus less on marketing and more on being technical, sorta similar to what you'll see at a CLD/CLA Summit. So checkout Room 15 Tuesday and Wednesday for the advanced awesomeness, you should expect lots of hearty frank group discussions. It seems not all of the topics are posted by NI yet, but here are just some of them. And yes for a bit of self promotion I am giving an updated presentation on XNodes that I gave earlier this year.
  9. 5 points
    I've occasionally seen or heard from people wondering about hosting labview web services in other servers, like apache, microsoft IIS, or nginx. They may already have a server they just want to plug into, or maybe they want to use some of the more advanced features available in other servers -- for example LDAP/activedirectory authentication (http://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html). However dynamic content still needs to be provided somehow, from LabVIEW. I've never really done too much with web services and I was curious how this stuff works in other languages. I'm fairly certain I'm 'rediscovering' some of this, but I couldn't find what I was looking for anywhere in labview-land....so I thought I'd share what I found out and what I did about it in case anyone else was curious about the same. What seems to be the case is that when people using other languages want to add code to the back end of a web server, they have a few basic options: Compile code into the web server. This option is more difficult to reuse, as you're making a plugin for a particular server, but some servers can use plugins for other servers. Apache has modules, for example mod_perl which is basically a dll which runs perl. IIS can run all sorts of .net code and scripts I *think* this is what LabVIEW has done for its web service, but can't confirm. Use a protocol between the front-end web server and the back-end application. The simplest version is CGI -- the web server runs an exe, passes any post data as standard in, and waits for data on standard out or standard error. This is slooooow as it runs an exe every time. This was improved with FastCGI where the web server launches N copies of the exe on boot and then leaves them running. These EXEs are sent packets which correspond to the CGI standard in data and respond with standard out and/or standard error packets. These packets can be sent through standard I/O (which is tough with lv) or through TCP (which is easy). Some people use a simpler HTTP server running in their program as the back-end. It can be simpler and less robust than, say, apache because in theory you're only getting well-formed packets from the front-end http server. Compared to FastCGI this can be even faster because the HTTP request doesn't have to be re-packaged into an FCGI request, but HTTP is single-threaded (for lack of a better term -- requests must be responded to in the order they were received). The other advantage is you can use a web browser or other http client to talk directly to the simple http server, which you can't do with FCGI (for debugging purposes). This is essentially a https://en.wikipedia.org/wiki/Reverse_proxy There are some custom protocols used like WSGI which seems to be python-only, or things like java applets. The point is, its pretty common to let something big and complicated like apache take care of the incoming requests on port 80 while letting one or more back-end servers handle specific requests as needed. This could handled by the standard labview web services (ie Apache reverse-proxies to the standard labview web service) but I was still interested in how this stuff works so I made some (rough) code, which I've posted here, a few weeks back: https://github.com/smithed/LVWebTools tl;dr: Built, monolithic web-service-code like what labview does seems to be pretty uncommon. Most (citation needed) languages seem to just use a protocol between the main, very separate web server responsible for authentication, security, and static file serving and the tiny backend exe responsible for everything else. I made some neat tools to do this, in LabVIEW. Also, the internet really is just a series of tubes. ----------------------------------------------------------------------------------------------------------- Note: the following is really into some of the weeds, if you don't want to try the code stop here. I started with FastCGI because it seemed simpler...but it turned out not to be. You're still responsible for adding most of the headers and response codes and such into your response, so it seemed like it had less structure but that structure was actually necessary anyway most of the time. If you want to take a look at it, FCGI/FCGI server.vi is the main VI and FCGI/default responder action.vi is the main VI I was using to test out different responses. With apache, you'd set it up using mod_proxy and mod_proxy_fcgi, but I'd actually recommend a new web server called Caddy (http://caddyserver.com/) because it is more developer friendly. The "caddyfile" you'd need would be as follows: " fastcgi /lvroot" (adjusting the ports and such as needed of course). If you run the caddy server with that file, and then navigate to http://localhost/lvroot/anything it will invoke the labview code. With fastcgi, you manually add any headers you need to the top of the response, so as an example you'd have to write: "Content-Type: text/html <http><body>blah</body></http>" After that I decided to try out http, which I quickly learned was a really gross protocol. The core of it is nice and simple, but the issue to me is that the transport-related headers are mixed in with content-related headers, and oh by the way you can shove extra headers in the content section if you want to, oh and hey if you want to change protocols in the middle of operation thats supported too. Its weird. But I got a verrrrry basic server loop up and running and its located in http/http server.vi. This one I actually used for something (the Freeboard thing I mentioned in this thread: https://lavag.org/topic/19254-interactive-webpage-vi-options/) so I made a basic class to inject some behavior. That class is located in http/http responder and provides the "get.vi", "post.vi", "put.vi", and "delete.vi" you'd expect. Since I was 90% of the way there anyway, I added a protocol upgrade function in order to pass functionality off to (for example) a websocket handler. This was totally not worth it (the code got more complex), but its cool that it works. As above, I'd recommend caddy server and the appropriate line you'd want to add to your file is "proxy /lvhttp localhost:9001" Because HTTP allows sending partial results, my implementation uses a queue to send data back...I think most of the fields are pretty obvious, except to note that the headers field is a variant attribute look up table with a string/string implementation (header/value). If a response code isn't specified, 200 is assumed. Side note: Because I have a giant NI next to my name I feel the need to note that this is just a fun project, not intended in any way to replace the fully-supported in-product server which includes all the fancy things like authentication, URL routing, etc. My thought was that this could be handy for making really stupidly simple services that plug into big ones *already running* in apache, nginx, or IIS.
  10. 5 points
    Two ways to do what the OP is asking. 1. VI Server world: Children have a static link to their parents and Parents have a dynamic link to their children. This means that once a class is loaded into memory, the parent knows about the child. According to the documentation this will NOT work in the runtime environment, but i've used this several times when making IDE Tools. 2. Runtime Reflection: The following code will also give you an array of all of the children loaded in memory, but this time it uses less VI Server so it will work in the runtime environment. I use this when using a plugin architecture. I've not done a lot of performance testing with it, but on a medium-ish size project (one with ~150 classes) it only takes about 50 ms to run, so it's worked well for me so far. Having given you those solutions, I still think your best bet is to use a statically defined array. This will ensure things are loaded into memory when their needed and such. My solutions really only become worth it once you're dynamically loading classes.
  11. 5 points
    The big benefit for developers that I see here is that it may highlight some of the source control issues that we have suffered for many years. It may prompt changes in the core so that we can use these powerful tools (like github) much more effectively. I dare say that once you have 20 branches all pushing their changes, the nightmare of merging, cross-linking and phantom recompiles might be laid to rest once and for all That alone should be enough of an incentive to participate, if only because pushing changes will cause such havoc for the people merging the Master that they have to do something before they tear [the rest of] their hair out
  12. 5 points
    An unofficial response: avoid this primitive. It was requested by a group within NI and it turned out they didn't need it halfway through its development. In a lot of cases it can create a compile error. In some cases it will cause a crash on save. The author says that it was never thoroughly tested (so don't expect IEEE 754 conformance!) and that bug reports for it are rejected since it was never officially released (not even for internal use). This is a prime example of digging around in LabVIEW and finding fool's gold instead of actual gold.
  13. 4 points
    Hey fellow LAVA people. I just turned 50 on April 2nd, and wanted to do something challenging for me, both mentally a physically. I'm running 10K every day for a year and raising money for cancer research. If you want to follow along on my journey, you can subscribe to the 10K365 youtube channel for the latest. Then go on over to 10K365.com and give whatever you can. Thanks, I consider all of you as friends and one of the reasons I love LabVIEW.
  14. 4 points
    DISTek will be giving away an Arduino based Sparkfun Kit. https://www.sparkfun.com/products/14556
  15. 4 points
    The Vision Common Resources install is FREE and allows you to use the IMAQ image control in your application. You don't get any image processing but it is fine for loading images and displaying them with all the ROI tools. I believe the only bit you need a license for is IMAQdx...
  16. 4 points
    I disagree with Darin a little...I think there are valid times when you should comment on what the code is doing. Sometimes what may be self documenting to you is not as self documenting to others. I run into this commonly with bit manipulations and bitwise functions, and lately even more so with FPGA. Often times if someone just left a comment "this checks if bit 4 changed" I would understand quickly vs. trying to read the ands and ors and scale by power of 2's that my mind doesn't yet process as easily. Maybe this is my own shortcoming, but I still think it's worth noting. The problem is at what point do you determine whether something is self documenting in general and the majority of programmers would agree that it is, or whether it's self documenting just for yourself (code reviews, anyone?). I find myself looking at my own code and thinking "that makes sense" but forgetting that it took me 3 hours to get it to work. Anyways, this is just one example and I think touches on the same thing Cat is saying above. One thing I am always sure to document is the random "increment" or "decrement" function. C'mon, we've all seen this, the code works, yet we wonder wth is that there for!
  17. 4 points
    You can set the INI variable and restart LabVIEW using two Invoke Nodes. You will have to confirm "Quit will abort all running VIs" and it should start back up with the correct setting. (LV 2012)
  18. 3 points
    I agree with James. That could be achieved through composition and adding an abstraction layer. (Sink and Source in the diagram below)
  19. 3 points
    Where to start. A wiki here a wiki there, everywhere a wiki. We used to have a section on LAVA which was like a Wiki many many years ago. However, I shut it down. Reasons: Users didn't know it was a Wiki and instead of posting questions to the forum, would create new Wiki pages with their questions. This was a nightmare to moderate. It was setup so that when you created a Wiki page, the discussions for that page, would be linked to dedicated forum threads. Again, more confusion, since it was not a model commonly used elsewhere on the web. The forum\wiki blend was not very intuitive and it made the site hard to "figure out". Nobody cared or understood the wiki. A handful of people used it and never really caught any steam. After that experiment was shut down, I decided to create a separate domain dedicated to the LabVIEW Wiki. It was labviewwiki.org. I still own this domain. I think this was 2009, I don't recall. But anyway, I used the same open-source software that powered wikipedia, mediawiki. Here's the wiki-index page: https://wikiindex.org/LabVIEW_Wiki. Seems like it had around 300 pages. MediaWiki is super powerful, but not intuitive for new editors. I spent most of the time creating templates and documentation describing how to edit pages. I created a lot of the content but there were some others who added unique content like all the LabVIEW ini keys. All the keyboard shortcuts. All the hidden scripting features (before it was mainstream), etc. It was pretty cool. And yes, we had awesome landing pages and getting started pages that I spend hours and hours crafting. I was young and motivated. The problem was that we got struck with a rash of spammers. More like bots. They would go through and create hundreds of pages overnight. In that environment, you need moderators and editors to delete the pages and watch for edits. I was the only moderator and admin. So my plate was full. I ended up locking it down and forced it so that you had to have a login account to edit pages. On top of that, the login's had to be manually approved by me to prevent bot accounts. Of course, a wiki cannot be maintained or augmented by one person. The whole point is to have a community edit the pages. Not sure if Wikia (or MediaWiki) has solved the spamming issue. @The Q, I noticed a lot of the content is scraped from ni.com. Have to be careful about this and copyright claims. One thing I was very careful about with the LabVIEW Wiki I worked on was to create original content as much as possible. Also, what's the point of just duplicating ni.com. That's pointless in my opinion. Google does an excellent job of getting the info you need from multiple sources. But that's my opinion and the community edits should drive that of course. Sounds like the community wants to reboot the Wiki idea like Hollywood reboots comic book heroes. Sure, let's see where this goes. @The Q seems to be enthusiastic about it. Are there others here willing to put the time and effort into building the content? Any volunteers? If there is some real interest, then I can try to resurrect the old Wiki content and domain (not sure if the content it's salvageable, but I can try). Then we can go from there. I don't have time to admin the site but I can hand over the keys to someone that has more time.
  20. 3 points
    I gave a presentation at the America's CLA summit this year where I introduced the MGI Solution Explorer. Here's the link to the presentation information and some documentation (that will be expanded) for the tool. MGI Solution Explorer Info Feel free to post feedback here.
  21. 3 points
    reshape array + index, inside of a diagram disable structure reshape array takes any dim array and returns 1-dim array. Index takes 1dim array and returns element. Disable structure makes sure the code doesn't run and that you always get the default value for the data type. any aggregation function (add array elements, array max and min, etc) will work too, but I think the reshape/index is clearer.
  22. 3 points
    I also have a method to propose: U64 Nanoseconds to LabVIEW Timestamp.vi
  23. 3 points
    New version is available. (LV2018 32-bit) http://www.ni.com/download/labview-development-system-2018/7406/en/
  24. 3 points
    I've been working a lot lately with by-reference architectures that still cooperate completely with LabVIEW's implementation of OOP and polymorphism. I've also recently taken an interest in trying to speed up development with secondary providers (similar to GOOP) to enable automatic creation of accessor VIs hidden behind the DVR, automatic creation of the private data type and constructor/destructor, etc. within the project window. I'm generally not a fan of the extra stuff that goop adds in to classes, I'd prefer to keep the source code looking as close to a normal class as possible. That said, I've started on my first ever XNode and it's a cross between an unbundle by name node and the -> operator in C. It functions just like a normal UBN, however it was also pull items out of DVRs. Having to plop down a UBN to pull out the reference from the class, an in place node to dereference, and then another UBN to pull the data out gets tiresome after about the 100th property VI gets written. So far I've gotten the node drawing completed (except for data type coloring of the labels), the type inferencing from the input wire, and the popup menu for selecting an item. Next up will be the menu selection code so that the names will finally show up in the terminals! Then I get the daunting task of scripting up the GenerateCode ability >_> Anyone interested in something like this? Following this will be a match to the Bundle by Name node that serves the same purpose except to write the items.
  25. 3 points
    There was a crashed cache table in the database which I repaired. I think this might have been the source of the problems. So perhaps it's fixed now. Not sure how this table always gets corrupt. Mysteries of MYSQL and the forums software.
  26. 3 points
    Without the source your only hope is to use the mechanisms left by the developer. If there is no ActiveX and the only interaction is with a mouse and keyboard, then you'll have to simulate a mouse and keyboard. There are several examples of using AutoIt or LabVIEW to look for windows to be active (based on their titles) then simulate pressing keys to navigate where you want and type in information. This is quite error prone and user interaction may mess with stuff.
  27. 3 points
    "Resolved to customers satisfaction" it is then. FWIW. Escalation can be very quick or many days. It's only the time-zone differences that make the delay if (and this is a big if) the application engineer knows who to contact and can articulate your concern. This is why examples are so important. Once you have found a well connected application engineer that you can ask for by name to get past the front door bouncers - 24 hours max for a useful response.. As en ex European. - a telephone call with a follow up email (with example and bulleted list of questions) at 4pm and you will usually have the result sitting in your inbox in the morning . That named engineer is now your dive buddy (as much as they might resist ) in the murky waters of NI support procedure. Hold on to them as if your life depended on them because your sanity does
  28. 3 points
    Once again, I'll be there with (some of) the rest of the LabVIEW Tools Network team. See everyone in a few weeks!
  29. 3 points
    Correct, although this isn't actually relevant for XControls, as they do actually run even if the VI is not running. Another term for "reserved" would be "entering run mode" and it happens when the hierarchy the VI is in starts executing and the run arrow changes from white to something else which isn't broken or unsynced. Here's a table I did a while back and never got to use: It doesn't include all the states (like the green arrows), but it is fairly representative. The relevant states are the bottom three. This behavior can actually have consequences if you have weird code like setting val(sgnl) from another VI or if you register for an Application event like VI Activation and it's certainly relevant if your user manages to do something like double click on controls before the VI closes, as the events are saved in the queue even if the VI isn't running and will be processed the next time the VI is called and the event structure executes.
  30. 3 points
    For the 2015 LAVA BBQ, Delacor have teamed up with author, friend of Delacor and all round outstanding guy; Steve Watts at SSDC to offer a truly unique door prize. Steve has kindly signed a copy of his book "A Software Engineering Approach to LabVIEW" but not only that. Steve has included the draft / amended pages that would have gone into any potential future second edition of his book. These are the only copies of these pages anywhere in the world and you as a LAVA member can have a chance to win them (and the signed book itself)
  31. 3 points
    This post will not directly address your specific problem but rather concentrates on clearing up some confusion which cost me personally many headaches and which I have not seen addressed before (I never actually looked that hard). I have had lots of trouble finding the link between theoretical discussions on the Composite Pattern and actual implementations (Composition) in LabVIEW for years. A short time ago, the penny dropped (figuratively). The Composite Pattern refers to a single hierarchy tree where you have a number of child classes. You define one class of this hierarchy Y (for example a single step above the base class X) to actually contain an array of the base class. It is simply an object which allows a group of objects of base Type X to be operated on as if the object containing them all was also a simple Object X. You can therefore easily picture a hierarchy of objects by simply having an array of Objects X where some of them are actually Object Y containing other objects, some of which again may be X and some Y and so on. By abstracting the "many X" into Y (which due to inheritance is also X) you have implemented the Composite Pattern. The Composite Pattern (as the GoF describe) is certainly not what NI propagates as Composition (a solution where many objects of DIFFERENT hierarchies are collated into a single object in order to implement different functionalities). The key sentences in the links you provide regarding the Composite Pattern are: Implementing the composite pattern lets clients treat individual objects and compositions uniformly (Y containing two or more X is itself an object of Type X) and There are times when a program needs to manipulate a tree data structure and it is necessary to treat both Branches as well as Leaf Nodes uniformly (Whatever operations you can perform on X must also be doable with Y - they have the SAME interface) Composite Pattern != Composition Composition is a general term and can be used for defining a class A which contains classes B,C and D all of which have different interfaces and hierarchy trees. This is a grouping, a Composite object. The word Composite here does NOT infer application of the Composite Pattern. The Composite Pattern is a small sub-set of possible object groupings or Compositions because it has much different requirements and is much more restrictive. WAY back in college, I had a really hard time understanding inheritance in OOP. I couldn't figure out how the mapping from child to parent could possibly be implemented in a way that was stable and robust. It was only after LVOOP came to LabVIEW that the proverbial penny dropped (I'm not wealthy, the time it takes for pennys to drop for me means I'm actually really really poor). Inheritance is an EDIT-TIME declaration, not a RUN-TIME declaration. To anyone who understands OOP this is a no-brainer. But my brain interpreted it differently and because nobody cared to make this distinction when teaching it to us at college I lost out on nearly 20 years of understanding OOP.
  32. 3 points
    I've bookmarked this one a while back. https://decibel.ni.com/content/servlet/JiveServlet/previewBody/22385-102-3-42676/LabVIEW%20VI%20Dimensional%20Model.pdf Not sure if the same properties also apply to BD
  33. 3 points
    Name: Traffic Jam Game Submitter: hooovahh Submitted: 04 Feb 2015 Category: *Uncertified* LabVIEW Version: 2011License Type: BSD (Most common) Has your stressful day at work got you down? Want to take a load off and relax with a game? Why not a LabVIEW game? Here is a game I made a while ago and forgot about. It is called Traffic Jam similar to this, or this one called Rush Hour. The basic goal of the game is to get the red car out of the parking lot, by moving the other cars. Cars can only move in one direction and can't turn. My coding style has improved over the years, but I'm not yet ashamed of the work I did on it. It was fun working with the picture control and generating the UI based on the level files. This game comes with 122 levels. Why 122? Because I forgot to put in the last 18. Feel free to add them yourself by editing the Set text files. This game also keeps track of your high score, so you can try to go back and do it in less moves. Click here to download this file
  34. 3 points
    But.... If I ignore what everyone says, then I must also ignore what you say..... D'oh, what to do? Coffee.
  35. 3 points
    Alternatively, if you dont have the command line tools installed (or don't want to use them ), you cou could use TortoiseSVN's COM interface (http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev-com-interface.html)
  36. 3 points
    Oh, yeah. But the crime isn't in making the accessors dynamic dispatch. The crime is not being organized enough to design the parent class. And that crime can have serious penalties for your code. Using dynamic dispatch for data accessors will generate massive data copies -- no inlining, no inplace memory optimizations. That does NOT mean you should never do it... it means you should do it ONLY if you truly need your child to define the data storage or get involved in the validation. Luckily, this is a situation that should almost never happen. Really? Really.... but that means you need to understand why you generally should not be doing it. You are violating the Liskov Substitution Principle. LSP says simply, "Any promise made by the parent class must be upheld by the child class." Having a child that *narrows* the definition of acceptable data values is an explicit violation of LSP. This rule must be maintained for most frameworks to work correctly. A child can accept a wider set of values, but it cannot accept a narrower set. Consider: I have a framework that calls your parent class. I read the documentation on your Write Value.vi. What does that documentation say? It says, "This VI accepts any positive real number and returns an error for negative numbers." Great! So I pass in 7.5. I have no idea your child class even exists. The documentation for the parent class says "any positive number". Now your child class gets created and gets passed into my framework, and it returns an error for any fractional value. WHAT? How could I possibly design for such undocumented behavior? A child is free to be *less* restrictive than its parent, but not more restrictive. For example, there are child classes that will happily handle NaN values but a NaN to the parent class returns an error. If I'm writing a framework that uses the parent class, I'm going to be careful to check for NaN up front to avoid the error, but if I am in a section of the code where I have the child directly, then I may pass NaN. So, when would it be acceptable for a child to get involved in validation? When you've documented that "the range of acceptable values varies based on the object in this wire, meaning callers cannot validate inputs ahead of time and must be prepared for an error from this function for any data value." LSP is not something that can be checked by a compiler. It is the contract that you write on the parent class that people who have never heard or seen your child class rely upon. Important safety tip: If you are the author of both the parent and the child, whenever you write code that calls the parent, you should pretend you've never heard of the child class. Write explicitly for only the parent class contract. If you do that then the bugs that come up are bugs in the child. Trying to factor into the calling code all the things you know your child classes might do will lead you to writing very poor performance code in the callers -- you will error check for things that shouldn't ever be possible, you will double check values that should already be validated, all because you cannot trust your children to uphold the promises. At the time you write your parent class, you should definitely be able to say whether or not a child is going to need to do additional validation. You might change your mind later -- and if you do, you can go change the terminals to be dynamic dispatch at that time. But don't pay the cost up front just because you might need it later. The dynamic dispatching is not expensive. The data copies can be. For most methods, dynamic dispatch is fine because the data passing across the border is inputs to some algorithm and outputs are computation results -- the outputs don't have to stay behind in the method VI. For property accessors, it's expensive because you're leaving a copy of the data back in the object, and no inplace sharing or other memory optimizations are possible across a dynamic dispatch call.
  37. 3 points
    This is why in 2014, NI will be shipping the new Bifurcated Timeline LabVIEW. For any dataflow with an ambiguous answer, we'll fork the entire universe and provide one answer to each quantum state vector. Even if you find yourself in the wrong timeline, you can take solace in the fact that in one of the various realities, LabVIEW did exactly what you expected it did and that other you is quite happy. Be happy for your self's good fortune! The feature is undocumented because documentation being provided is one of those quantum states that got forked during testing and this universe lost out. But it's in there, nonetheless. I hope you enjoy it!
  38. 3 points
    We have created a free licence key that unlocks Symbio's version of GDS in case people still like to use that: GOOP-GOOP-GOOP-GOOP-GOOP Cheers, Mike
  39. 3 points
    Been there, done that. I have G implementations of ZMTP (at least most bits I need) and AMQP (0.9.1 not the 1.0 trainwreck). I tend to use AMQP most often since my code is more complete (and there was more adoption of it when I wrote it), but they are both great. The brokerless nature of ZMQ can be great when you need it, turns out most times I was implementing a de facto broker and could have stuck to AMQP. Unfortunately the specs are really laid out seductively in terms of classes and methods so I gummed up the works by using a bit too much LVOOP (not to mention busted my carpal tunnels). Performance is ok, but as I de-LVOOP it is finding another gear. I create worker pools consisting of simple LV workers and similar C++, Java, or Python workers and see what share each worker does. LV is behind, but getting up there with the big boys. The LV9 to LV12 performance kick was also welcome here. The AMQP implementation gave rise to one of my new mantras: No LVOOP in a loop.
  40. 3 points
    I like this tool, I'll definitely give it a go once the bugs are worked out. I've also wished that this functionality were built into the Project Explorer. When a new class is generated and the inheritance assigned, we would see the static parent class method VIs already populated in the child. The VIs could be grayed or italicized to visually indicate that they are inherited methods. These wouldn't need to be actual VIs stored on disk, just visual pointers back to the parent methods. We could also have dynamic dispatch VIs come in as italicized and red font or something to indicate they can be overwritten...
  41. 3 points
    I tried it through .net and it works. I had to browse for the mscorlib.dll file for LabVIEW to find the SHA256Managed-class. Cheers, Mikael
  42. 2 points
    Maybe it's a new version of the Marshmallow test.
  43. 2 points
    Well after some research, this is what i came to. Sending the email in html format with the following VI to transform Unicode from LabVIEW to HTML character. I think it will work in most of the case. Benoit PS: Thanks for your help. Unicode to html.vi
  44. 2 points
    Take a look at drjdpowell's Messenger library (available in VIPM). I believe the demo shows an example of how to do what you want. Its relatively easy to learn the basics, and its even more powerful under the hood.
  45. 2 points
    That's the way I've been thinking about it for now. Since the goal is to select the right subdiagram at type prop time it should work fine. The compiler should eliminate the dead code so there would be no performance penalty. For the future I'm considering a more general solution. When you wire something to the To Variant primitive the output is very close to a type type. If the data portion of the variant were eliminated it could work exactly like a type type. It would be a compile time constant so any computations with it could be constant folded away. The only other puzzle piece that would be needed would be a pseudo-primitive (TypeErr) whose only purpose would be to generate a typeprop-time error if its boolean-constant-valued input were true. The technique for making a subdiagram specific to certain types would be to connect the input to the To Variant* producing a type type constant. Check this against the valid types and generate a type prop error if it doesn't match. All the type checking code should get constant folded away so performance would not be affected.
  46. 2 points
    Welcome to the Internet... Also, you spelled Google with a lowercase g
  47. 2 points
    As rule I tend to avoid express VIs, but I happened to click on a link in Christian's signature and found this. I haven't looked at it in detail, but this may be the one express vi I'm willing to use.
  48. 2 points
    Recently the PDF creating toolkit using ItextSharp by Exaprom has been updated to version 2.0. https://decibel.ni.com/content/docs/DOC-10952 The toolkit is very well put together and I've used it on a couple projects. The example generates the manual for the toolkit, and it is pretty impressive to see all the features of the toolkit demonstrated, by generating the user manual.
  49. 2 points
    I tend not to edit Wikipedia myself, I find my technical prose is usually inadequate. However, I just took a glance at the LabVIEW entry on Wikipedia and I am horrified. There are inaccuracies, irrelevancies, it's choppy, and generally poorly gathered. Too many cooks here I feel. I wonder who is responsible for this content? I understand that the general public are required to maintain these pages, but is there a core group of enthusiasts that like to keep this page accurate? I suspect not, because the leading paragraph still stated that the current release is LabVIEW 2012 - which tells me there are no LabVIEW enthusiasts who are also keen on keeping this page up to date. (I changed it to 2013 - my first Wiki alteration!)
  50. 2 points
    (I'm sure you--MJE--know most of the stuff I say below, but I'm spelling it out for the benefit of other readers.) I propose implementing an actor with the expectation that its message queue is a de facto job queue violates the one of the fundamental principles of sound actor design. Message queues transports and job queues have different requirements because messages and jobs serve different purposes. Message are used to transfer important information between actors. Actors should always strive to read messages as quickly as possible since any unread messages may contain information the actor needs to know to make correct decisions. ("ReactorCoreOverheated") Whether or not they immediately act on the message is up to the actor, but at least it is aware of all the information available to it so it can make an informed decision about what action to take. Jobs aren't serviced the same way messages are. Jobs are a mechanism to keep worker loops busy. They're more of a "Hey, when you finish what you're doing can you to start on this" kind of thing rather than an "Here's some important information you should know about" kind of thing. Commingling these purposes into a single entity is part of the QSM mindset I mentioned earlier and leads to additional complications, like priority queues. So how do you implement a job processor if it isn't an actor? Make it an internal component of an actor. Create a helper loop that does nothing but dequeue and process jobs. When the actor receives an AddJobToJobQueue message in its message handling loop, it places the job on the job queue for eventual processing by the helper loop. Sound suspiciously like an actor? It's not. The job processor is directly controlled by the message handling loop. Actors are never directly controlled by other components; they control themselves. The job queue can be manipulated by the message handling loop as required, even to the point of killing the queue to trigger the job processing loop to exit. An actor's message queue is never manipulated or killed by anyone other than the actor itself. There's a lot of gray between an actor and a helper loop. The implementations can look very similar. I try to keep my helper loops very simple to avoid race conditions often found in QSMs. They are very limited in what operations they perform. They don't accept any messages and send a bare minimum of messages to the caller. ("Exited" and "Here'sYourData.")

  • Create New...

Important Information

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