Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 12/04/2017 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. 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
  3. 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.
  4. 6 points
    Door Prize! Two of these custom bluetooth speakers will be given away, sponsored by the LAVA BBQ itself! [Front and back views]
  5. 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.
  6. 4 points
    DISTek will be giving away an Arduino based Sparkfun Kit. https://www.sparkfun.com/products/14556
  7. 3 points
    I agree with James. That could be achieved through composition and adding an abstraction layer. (Sink and Source in the diagram below)
  8. 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.
  9. 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.
  10. 3 points
    I also have a method to propose: U64 Nanoseconds to LabVIEW Timestamp.vi
  11. 3 points
    New version is available. (LV2018 32-bit) http://www.ni.com/download/labview-development-system-2018/7406/en/
  12. 2 points
    Here is a library I created to wrap the WinSCP .NET library. You can use it to connect to a remote server via SSH and transfer files, create remote directories,etc., with WinSCP from LabVIEW. I know there is a commercial library for I think $500 a pop, but this is something that is missing from LabVIEW that really ought to be included with native functions in the file I/O palette. The VI's in this packed library are built around the "WinSCPnet.dll" library that installs with WinSCP. You will have to download and install WinSCP to get the DLL, as I do not want to distribute it without their permission: Download WinSCP Here After downloading and installing WinSCP, you will have to connect the VI's in the packed library to WinSCPnet.dll. I make no warranties here, and no promises it will work, since I already have the stuff installed. The use WinSCP with an SSH Key, you will have to generate a key and copy the public key to your server. WinSCP uses the Putty format for SSH 2. You will also have to obtain an SSH fingerprint from your server for input to the session. Otherwise, you will have to provide user login credentials. You can use the "C:\Program Files (x86)\WinSCP\PuTTY\puttygen.exe" utility to generate a key. I use Git, so I used the SSH utilities included with that to generate and copy the key to my server. If you do that, you will have to use puttygen to import your OpenSSH key and convert it to putty format for use with the WinSCP/LabVIEW library. Sorry I don't have more time to do full docs and directions for use, but maybe someone else can comment with additional directions. I will monitor this topic and try to answer any questions. Good luck, and happy SFTPing! PS: No I will not save it to an earlier version. Maybe someone else can. WinSCPnet.lvlibp
  13. 2 points
    Maybe it's a new version of the Marshmallow test.
  14. 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
  15. 2 points
    There's a private 'Operate Menu Dismissed' event that may help in this situation.
  16. 2 points
    As I posted on the ni.com forums but it would be great if people made sure to notify the NI security team first. If they aren't going to fix the issue or are completely unresponsive go nuts but I would at least want to give companies the opportunity to do something first. http://www.ni.com/support/security/ I sent security@ni.com an email at 4:45 and got a response at 4:46 (not an auto-reply) so, if nothing else, it's clear that they want to hear about these things.
  17. 2 points
    I can't say I support the use of the Write DVR Value. The point of using a DVR is to protect critical sections of code (ie avoid race conditions). If you are just randomly writing a value to a DVR without doing the Read-Modify-Write protection, you might as well use a Global Variable and get better performance.
  18. 2 points
    For the record, text wrapping in the context Help window has been confirmed by NI support to work as "expected" which means in the following way: 1) if you have a single paragraph with NO carriage return, the text will wrap: 2) If you have a single (isolated) carriage return ANYWHERE in the text (as after the first sentence in the original post), wrapping is suppressed (that's the "expected" behavior according to NI R&D). For instance, if I press return after the first sentence in the Description above, wrapping is suppressed: 3) You have to introduce carriage returns IN PAIRS, in order to get a new line AND preserve wrapping: Of course then you get an empty line that you may not necessarily wanted...
  19. 2 points
    I found this gem! Strange that that isn't the recommended setting in the tutorial. http://digital.ni.com/public.nsf/allkb/4A8B626B55B96C248625796000569FA9
  20. 1 point
    I noticed on sourceforge that there is a version 4.2 of OpenG Zip. Will it be released as a package anytime soon?
  21. 1 point
    You may want to consider using a Data Agnostic Smart Probe instead of a subVI. From that probe, you can get a reference to the calling VI. And I think there are ways to figure out which probes are on which wires, etc. Here's my nugget post on Data Agnostic Smart Probes: https://forums.ni.com/t5/LabVIEW/Darren-s-Occasional-Nugget-02-23-2018/m-p/3759109
  22. 1 point
    Screwdrivers are $29.99 though, that's how they get you.
  23. 1 point
    Here is a quick and dirty edit. It allows for column separators to be moved, but I noticed that on resize it will set the column widths. So this means if you manually move the columns, and then resize the control it may change the columns in an unexpected way. But at that point you can manually move the separators again. I only have 2017 and 2018 so this is for 2017 and newer now. Variant_Probe-2.4.3-0.ogp
  24. 1 point
    A Radio-button has a natural interlock mechanism. You can customise the booleans to be regular buttons and also change their positions to get a 2D grid type feel if that is what you want.
  25. 1 point
    Hmm, there was a problem I had there but I thought the version I packaged had fixed it. My current development version should find that path - but it depends quite a lot if you have multiple Pythons installed on your machine. BAsically there doesn't seem to be a bullet proof way of getting the correct path in Windows.... That's a sensible idea - it's going into the development code. That's largely a result of the test client being mainly aimed at debugging the protocol and for testing message handling rather before moving on to code to more tightly integrate LabVIEW programs with the remote kernel. That said, I'm in the process of adapting the client to allow different methods of locating and connection to the kernel and that will include suppressing the kernel shutdown message on exit. I'm also (very slowly) working on an implentation of a LabVIEW universal-binary-json serialiser/deserialiser with a view to creating some custom ipython messages for transferring binary data efficiently between LabVIEW and Python. The idea is that the LabVIEW client would create message handlers at the Python end that would allow LabVIEW data to be pushed directly into the Python namespace or to request python data to be sent back to LabVIEW. Don't hold your breath though, the day job comes first...
  26. 1 point
    Are there plans to fix all the bugs? I've just spent a month writing two xcontrols and all that was mainly finding workarounds to the bugs (and I still don't know why some of the work-arounds actually work)
  27. 1 point
    The root loop is definitely per process. It’s simply the primary thread started up by Windows for a process in which the GetMessage(), TranslateMessage(), DispatchMessage() Windows API calls are made over and over again, with minor LabVIEW specific adaptions. This thread is associated with a hidden window whose window procedure then translates everything into a Platform independant message infrastructure that very much resembles the Mac classic message loop. This is basically the famous root loop with the message procedure in the hidden window being a sort of platform wrapper around it. Under Windows there comes in a potential extra complication as the OLE marshalling hooks into the process GetMessage() API, completely outside the control of LabVIEW. So if you interface with OLE/COM/ActiveX and to some extend even .Net compenents things can get interesting,
  28. 1 point
    This is a very good question, and while I will try to answer, at the moment I have mostly a hazy vision that I have not fully worked out the details of. My priority is and has been to elaborate a good design for the core of Rebar, then create enough of an implementation of it that you can do some useful things in it and can see a path towards other useful things. How much the design and implementation of Rebar/VI interop gets worked out will depend very much on how much demand there is for it. A VI calling a Rebar function should look about the same as calling a subVI. A Rebar function's signature will contain information equivalent to the inplaceness information computed by the VI compiler for a VI, so the VI compiler will know when it need to copy the data that it sends to Rebar. Similarly, a Rebar function should be able to call a VI; the Rebar compiler may need to dig out inplaceness information for the VI that is normally invisible to the user. One difference in this direction would be that Rebar should be explicit that it is obtaining a specific clone of the VI and calling that, which it might wrap up into a closure-like object. So then the question is what kind of data you can pass back and forth between Rebar and VI. The rules here are that Rebar cannot pass any raw values to VI that VI will not guarantee the invariants of. Specifically: Rebar can't pass its own references, or anything containing its references to VI, since VI won't do lifetime checking. Rebar can't pass values that have destructors, because VI isn't guaranteed to call them when appropriate. For any types that Rebar cannot pass raw to VI, it must wrap them in refnums. This amounts to having a reference-counted shared object between Rebar and VI, so there are still some Rebar types that wouldn't qualify, but it should be enough to allow the most interesting Rebar-created values to VI and have the runtime maintain their invariants. In this way, you could define a TCP connection type, a file handle type, an IMAQ image type, or whatever you want in Rebar, and provide an API for it back to VI with refnums. This would have the nice result of allowing you to re-implement many parts of the LabVIEW runtime in Rebar. That's about as far as I've got on interoperability. Obviously the devil is very much in the details here, and often creating an interop system between two different languages is way harder than designing each one in isolation. Like I said above, though, none of this matters much unless Rebar is interesting enough that people want to use the two side-by-side.
  29. 1 point
    I use the dll wizard often and it has saved me a lot of time. It took awhile to understand how to massage the .h files into something digestible but once I got the hang of it, it was worth the effort. The error handling is pretty good at pointing you to the offending spot in the .h file. I think that the wizard has improved over time so if your last exposure was years ago I would give it another try.
  30. 1 point
    I wasn't aware of the power of all those design patterns. This makes a great toolkit even greater. This discussion made me realize I have to take a closer look at all those different design patterns. I tried to add the new method as a property node instead of a normal method. That's why I couldn't find it. Having these templates for every design pattern makes them very easy to use. I downloaded the new version and it looks perfect to me. Thanks for updating the templates so quickly.
  31. 1 point

    Version 1.0.0

    33 downloads

    One of the difficulties with editing XNodes without the license is that invoke nodes for the XNode class don't show any methods. This XNode acts pretty much like a real Invoke node, but it allows access to all possible methods. You can also right-click and replace it with a real Invoke node.
  32. 1 point
    Nice! I recently became addicted to podcasts and was wondering if/when there would be any LabVIEW based ones. VIShots made one many years ago, but it isn't updated anymore. Subscribed!
  33. 1 point
    Assuming your pulse is a pulse on the strain gauge itself and not the lightbar, the specifications of the hardware you selected should be capable of capturing a pulse in that range. I would recommend taking buffered measurements with a Windows system. If you need to react to this pulse as it occurs, you may need a real-time system instead. The NI 9237 can capture at 50 kS/s (or 20 us per sample) - http://www.ni.com/pdf/manuals/374186a_02.pdf. This is more than enough to detect your pulse without aliasing (>2 times the frequency) and to give a decently accurate representation of the signal (>10 times the frequency - http://www.ni.com/white-paper/13655/en/). The NI 9425 is less clear, but it appears to be able to measure down to 8 us per sample - http://www.ni.com/pdf/manuals/373782b_02.pdf. However it may not be capable of buffered measurement (https://forums.ni.com/t5/Digital-I-O/Can-NI-9425-DI-be-buffered/td-p/3368527).
  34. 1 point
    Possibly. This is why "Real men run as root" Anyhoo. I think any attempt to create a [universal] builder/installer would be best envisaged on Windows first to prove the concept, so these kinds of quirks could be ironed out later. The success of such an endeavour would (I think) be very dependant on symlinks as they are kind of like a silver bullet to allowing different library versions and LabVIEW versions of the libraries to exist side-by-side and swap between. The conclusion I came to with my investigation was that a separate repository (in "Program Data") of installed toolkits, under each LabVIEW and toolkit version, enabled very quick and easy uninstall and version change by simply creating and deleting symlinks in the vi.lib directory pointing to them. Once that is achieved, then project based installs become a simple matter of choosing which links are present for each project whilst still maintaining menus in the palettes.
  35. 1 point
    A new video resource is the gdevcon1 videos.
  36. 1 point
    @David_L I get your point. If someone wants to migrate this all to the Wiki that's fine. I've been keeping the pruning to a minimum, so anyone updating a wiki can incorporate the suggestions from this thread.
  37. 1 point
    I would vote for a community based Wiki. Checking around one has been started. http://labview.wikidot.com/ Exists but has no content. Does anyone know who is the admin?
  38. 1 point
    @GDevcon Just for good measure. I chose Helen Sharman for my #OurGiantsAreFemale at #GDevCon First British Astronau… https://t.co/2dNOkwI6Wc
  39. 1 point
    I few other methods for you to consider: 1) a separate "helper loop": in this, the main loop of the template is a "manager", with a separate loop inside the actor doing the work. The "worker" can be controlled by non-actorish ways (such as an Abort Notifier) by the Manager, which is always capable of handling new messages coming in. This encapsulates the non-actor communication, keeping it local (and understandable). I likely addition to this is a "job queue", to hold the list of actions that the manager queues up for the worker. Here is where one can have job priority, or cancelable jobs. Note that this is different from the "action stack" (what you called a "state machine"). These are different things that are too often combined. 2) Have a "Sequence actor" that does the long actions, which can't itself be aborted, but which acts on hardware via short-to-execute synchronous Request-Reply messages to separate hardware actors. Send the "abort" messages to the hardware actors, putting them into a safe-mode state where they reply to action requests with errors. The first such error message causes the "Sequence actor" to end it's sequence (using standard error-chaining logic). Note that if your stop really is an emergency then this bypassing of your complex higher-level logic to talk directly to low-level hardware actors is actually a lot safer and more easily testable. 3) An asynchronous version of (2), where the "Sequence actor" uses Async Request-Reply for interaction with the Hardware actors. Less flexible than (2), but more properly actorish, in that the Sequence actor is always able to handle messages. I actually don't mind your abort notifier triggered from outside the actor. This is, as you say, bending the rules for a limited and clear purpose, and for the special case of aborting. Unfortunately, though, you're dealing with the problem of "state" (true "state", not the actions of a so-called "QSM") and that isn't ever easy.
  40. 1 point
    Attached is my solution to the Car Wash example. I completed it in 4 hours, but found it much more challenging to finish in the time constraint than the Boiler. This is my first attempt at solving with a producer/consumer architecture. Any comments/advice would be greatly appreciated! CLD Exam 3 - Car Wash - 80.zip
  41. 1 point
    Help us help you. Please provide details on what kind of help you want: Do you want us to: Give you some ideas on how to start? Or review code that you've already written? Or write the code for you? Also, please provide details on how much LabVIEW experience you have and how much general programming experience you have.
  42. 1 point
    I think I have found a fundamental issue with the DB Toolkit Open connection. It seems to not correctly use connection pooling. The reason I believe it's an issue with LabVIEW and ADODB ActiveX specifically is because the problem does not manifest itself using the ADODB driver in C#. This is better shown with examples. All I am doing in these examples is opening and closing connections and benchmarking the connection open time. Adodb and Oracle driver in LabVIEW. ADODB in C# namespace TestAdodbOpenTime { class Program { static void Main(string[] args) { Stopwatch sw = new Stopwatch(); for (int i = 0; i < 30; i++) { ADODB.Connection cn = new ADODB.Connection(); int count = Environment.TickCount; cn.Open("Provider=OraOLEDB.Oracle;Data Source=FASTBAW;Extended Properties=PLSQLRSet=1;Pooling=true;", "USERID", "PASSWORD", -1); sw.Stop(); cn.Close(); int elapsedTime = Environment.TickCount - count; Debug.WriteLine("RunTime " + elapsedTime); } } } } Output: RunTime 203 RunTime 0 RunTime 0 RunTime 0 RunTime 0 RunTime 0 RunTime 0 RunTime 0 RunTime 0 Notice the time nicely aligns between the LabVIEW code leveraging the .NET driver and the C# code using ADODB. The first connection takes a bit to open then the rest the connection pooling takes over nicely and the connect time is 0. Now cue the LabVIEW ActiveX implementation and every open connection time is pretty crummy and very sporadic. One thing I happened to find out by accident when troubleshooting was if I add a property node on the block diagram where I open a connection, and if I don't close the reference, my subsequent connect times are WAY faster (between 1 and 3 ms). That is what leads me to believe this may be a bug in whatever LabVIEW does to interface with ActiveX. Has anyone seen issues like this before or have any idea of where I can look to help me avoid wrapping up the driver myself?
  43. 1 point
    More info here: https://forums.jki.net/topic/2679-vipm-2017-for-linux-is-here/
  44. 1 point
    A little while ago I posted some code on how to create boolean controls with images that scale well because the images are vector based and can scale up or down better than a static image like a PNG. After making that I made a utility that allows for selecting an image, and a control template and it creates the control. I showed this off to Danielle Hamburger and she encouraged me to clean it up and post it to the community. I'm still putting this in the In Development section just because there are several external tools needed that working around would be ideal if this were to be finished but for now it works and I use it often. So it works like you'd think. There is a library of vector images you select from, pick the one you want, then pick the Control Type (which is a folder of CTLs), then click create and it creates the control setting the decal button, VI description (adding License text if needed) and sets the icon editor icon. Dependencies If you just run the Vector Boolean Control Creator you'll need OpenG Time, OpenG File, and the JKI State Machine toolkit installed in LabVIEW 2015 or newer. The included libraries will work without anything else as long as you are in Windows (more on that later). If you want to include your own controls there are a few more steps and I left a text file explaining that in the Template Controls folder, but I included several already. If you want to add your own images I also left instructions in the Libraries folder. I wrote a VI that can convert from SVGs to the needed PNG and EMF files as long as you download inkscape (again instruction text files included). But inkscape is only a dependency if you want to use that utility to add your own libraries which are in SVG. Demo For good measure I made a Jing video showing how it works. Windows Only... So the Windows only part is an interesting one. I started with my UI being just a single 2D picture control and as you type your search in the top, it would go and open each image that matched the result, shift them into rows and columns, detect the number of columns shown, then detect and show mouse selection, and all the other stuff that would be needed. To say the least it was slow. I tried several ways to improve it, but in the end it was slow and I couldn't come up with a solution I liked. I could have added a search button but I really like the live search of typing it in and seeing it update as you type just like the icon editor glyphs do. So for a first release I went with the cheap and hacky solution and that was to leverage some .Net to embed a Windows Explorer window into my front panel, which is just the search results of a folder on disk. This now means you see the PNG images on the front panel, but it will only use that to show the UI to you, but then use the vector based EMF file when creating the control. Doing the search was a bit weird too since I couldn't figure out how invoke a search with the Explorer .Net so instead I wrote to a temp location a saved search that is XML, which I tell the UI to navigate to which then shows the search results. Oh and there is some .Net GDI resize going on so the PNG image is used as icon editor icon for the control but dependency could likely be removed with some G work. Anyway hope people find this useful. Vector Boolean Creator.zip
  45. 1 point
    The DSC toolkit Glyph really are pretty horrible. More 1995 than 2002 if anything. I've been using Edraw max to create graphics. There is a lot of P&ID stuff in there. No high vacuum but it's pretty easy to create graphics from the raw shapes and apply color gradients to give it that 3D effect. The ability to scale easily because of vector graphics is awesome too. You can set you drawing sizes in pixels directly which make it really easy to design for a given resolution. https://www.edrawsoft.com/pid-examples.php I will typically make a P&ID with edraw, export it as a PNG, drop that directly in the front panel and then drop my customized controls with graphics also made in Edraw in place over that. It's produced pretty decent results.
  46. 1 point
    If anyone stumbles across this, a better method is to use the windows .net calls. https://msdn.microsoft.com/en-us/library/system.diagnostics.process%28v=vs.110%29.aspx its probably the same thing system exec does under the hood, but you get asynchronous control of standard in, out, and err. I'm certain the performance of this will crush anything else, and all the software is already on your windows machine. ~Jon
  47. 1 point
    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.
  48. 1 point
    Norm - this is really cool. I think this part of the last video really hits home and defines the benefits of this design pattern, highlighting why using strings would cause an epic fail. I agree with Shaun in that strings are generally easier to read than integers in a Case Select, but in this case it doesn't really matter - the benefits are huge (you get some readability from the casted type anyways). I can see the benefit of this straight away esp for scripting, and will be adding this to my templates folder. Thanks for posting!
  49. 1 point
    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
  50. 1 point
    Actually, activating on the left click instead of the right is fairly easy. If you use the "mouse down?" filtering event you can dynamically tell LV which button has been clicked (see image below). So far, the trick for dynamically firing the menu activation event would be to be able to dynamically fire the "mouse down?" event. If we could do that, the other part is easy. PJM


×
×
  • Create New...

Important Information

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