Jump to content

LogMAN

Members
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    70

Posts posted by LogMAN

  1. If you compare LV2017 to LV2015 you'll notice that LV2015 only shows the outline of the contents, while LV2017 renders the whole thing. And not only does LV2017 render the whole thing, but it also shows broken wires while dragging, which means it compiles the code, which is obviously time consuming. And for some reason it does that every time the cursor moves

    Edit:

    • I just noticed that LV2017 also moves FP objects while dragging said code on the BD
    • Try moving the cursor very slowly, it renders much more smoothly. It actually doesn't render while the cursor is moving faster than a certain speed.
  2. For your particular problem the Waveform Chart won't work, as you cannot reset the index to zero without deleting data. Please have a look at "Waveform Chart Data Types and Update Modes" in the Example Finder, it visualizes the modes in which you can use the Waveform Chart.

    To achieve what you want, you'll have to build three separate XY Graphs (e.g. by storing them in shift-registers) and plot them into a single XY Graph. Please have a look at "XY Graph Data Types" in the Example Finder.

  3. Data communication via serial port (or any communication for that matter) takes time. The receiver must receive, process and reply to the data send by the sender. I suggest having a look at the examples in the Example Finder, they are well documented. Search for "Simple Serial" or just "Serial".

    Your VI sends data and immediately reads however many "Bytes at port" are available. There is no delay between sending and reading:

    no serial wait.png

    Here I modified your implementation such that it waits up to one second for data to arrive:

    serial wait.png

    • Like 1
  4. This topic is very interesting. I would like to re-iterate the initial situation. Maybe we can find a clue to what your IT department is concerned about (you should really go into an open meeting with them to find out). All quotes below are direct copies from https://www.gnu.org/licenses/gpl-2.0.html#SEC1

    On 9/5/2017 at 5:42 PM, 0_o said:

    The IT department instructed me not to use SVN anymore since it is GPL and that means that I would have to share MY OWN source code which is for commercial use.

    It is true and at the same time it is not. You must share your source code if you made changes to the original work:

    Quote

    2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

     
    a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
     
    b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
     
    c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

    By using the program you don't modify it. However, the part "forming a work based on the Program" can be confusing, which is why the license explicitly states:

    Quote

    If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.

    Can you identify sections of your work that are clearly not derived from the program?

    Can you reasonably consider these parts independent and separate works in themselves?

    Do I really have to ask these questions? :blink:

    You don't need to be a LabVIEW programmer to compare written text to graphical blocks and answer these questions. Your work is clearly not derived from the program and therefore the license does not apply to your work. If the IT department disagrees let them point out the sections of LabVIEW code that are derived from SVN (please make a video of it and share footage later :D)

    On 9/5/2017 at 5:42 PM, 0_o said:

    ... the second one is a joke right?

    Since when is Stack Exchange a trustworthy legal advisor for trained IT professionals?
    Even worse: Did they receive the links from a professional lawyer? => In that case do them a favor and get a new one

    On 9/5/2017 at 5:42 PM, 0_o said:

    Is this correct? they want me to use TFS and if I understand correctly it is GIT based and not working as good as SVN with LabVIEW.

    The middle part about TFS is the most important part. I don't want to argue about SVN vs. Git, there are more than enough topics about that, but I wonder why they actually did start searching for reasons to make you stop using SVN...

    To me it sounds like they are actively searching for reasons to make you use TFS and the legal part is just a pretense to do so. If that's the case you have several options to choose from. Here are two that I can think of right now:

    • Accept your fate. SVN is greatly integrated into LabVIEW using the TSVN Toolkit, which is a big plus. Git, however, works very well too if you can live without status indicators in your project. We actually use SourceTree with Git to manage our projects and it works well for us.
       
    • Present arguments against it. How much time do you spend using SVN during development? Setup a machine with TFS and let the IT department show you how to work with it efficiently. Then do some awesome changes (like renaming one of the core classes in your project that affects loads of VIs) and let them take care of committing changes. Then ask them to merge the changes with some branch (please only do that if you know how to do it properly in SVN, otherwise you won't archive anything). Do the same thing on your machine using SVN and compare the results.
    On 9/5/2017 at 5:42 PM, 0_o said:

    If they are correct, the second I use a tool from VIPM which is GNU GPL I need to open MY OWN CODE!

    Is that correct?

    This has already been answered. Licenses of third-party packages do apply, so read them carefully. Especially when doing professional work. The sheer amount of dependencies and licenses that come with it is one of the reasons we don't use many packages from the VIPM network, even though they could lead to faster development cycles. Read, accept and work according to the licenses or don't use them at all.

    Sorry for the extensive post :beer_mug:

  5. 16 hours ago, drjdpowell said:

    And, does anyone else have this problem?

    Works fine for me. No issues during installation and all examples work flawlessly. Absolutely mind-blowing! Thanks so much for sharing :wub:

    My versions:

    • VIPM 2017.0.0.2007
    • LabVIEW 2017 17.0 (32-bit)

    Edit: I should mention this is the only package I've got installed right now.

  6. 56 minutes ago, infinitenothing said:

    I keep coming to computers and I guess the user didn't approve the exception...

    How dare them making a choice when they are asked to? :D

    43 minutes ago, infinitenothing said:
    • Autoapprove the exception as part of installation

    You cannot approve the dialog automatically as it is shown only after starting the application (or restarting the computer) during which you don't have elevated access. However you could add firewall rules as part of the installation procedure (see below).

    43 minutes ago, infinitenothing said:
    • Is there a way to keep prompting them until they approve the exception or close the app

    None that I know of. It is also very annoying to get prompted over and over again after making a choice. Why even bother asking if there is no choice in the first place? Software that does that is malware in my opinion. Also I can see users taking three courses of action:

    • Allow access (stupid, since it could be malware, also teaches your users bad habits)
    • Decline and inform IT (IT will knock on your door, so go for it if you need to talk to them urgently :P)
    • Uninstall (yeah, might not be IT who is knocking next)
    43 minutes ago, infinitenothing said:
    • Maybe a command line I can send them if they say they are seeing error 56?

    You can actually run command line instructions during installation in order to add firewall rules. Have a look at the instructions over at TechNet: https://technet.microsoft.com/en-us/library/dd734783(v=ws.10).aspx

    Once you figured out the necessary firewall rules (e.g.: by checking a computer that accepted the rule), you can build the commands and execute them during installation. It should be possible to run the instructions using the post-install action (run application after installation), though I'm not sure if it will actually be run in elevated mode.

    Another option is to use a custom installer (we made our own using Inno Setup) and pack the LabVIEW installer inside the custom installer.

    • Like 1
  7. 3 hours ago, jimiweber said:

    Your solution actually worked. It's consuming exactly the amount of time that is expected. I attached the edited file for future references.

    While your VI works it takes a lot of CPU time by running the while loop each millisecond. In case you want it to wait for a desired amount of time, the snippet I posted earlier can be changed to handle any desired duration by adjusting the delay accordingly. You could also just calculate how much time you need in order to reach the specified limit:

    Dispensed Volume Reverse.png

  8. Welcome to LAVA! :beer_mug:

    2 hours ago, jimiweber said:

    What I try to do is add a constant number to a value, exactly every 1 milliseconds.

    [...]

    However, none of the two are working as I expect. They both take more than 1 second to do the job. Plus, they are dependent on computer processing power, which I don't want. What is a better way to do this? I am fairly new to labview programming, and maybe some insight might help a lot.

    The short answer to this is: You cannot do time constrained operations (within the millisecond area) using a regular PC. Other processes will "steal" CPU time which can put your program on halt for several milliseconds (up to several hundreds), so the timing is not predictable within your constraint. However do you really need to calculate a value every millisecond?

    2 hours ago, jimiweber said:

    The target is simple. It should be a dispense counter, that calculates how much is dispensed in loop iterations. So, for example, if the dispensed rate is 0.001 mL for every 1 ms, it should take 1 second to dispense 1mL.

    According to your description the dispensed volume is a linear function over time. This means as long as you know how many milliseconds elapsed since a specific moment in time, you can calculate the total volume dispensed. The following VI is an example on how to do that:

    Dispensed Volume.png

    This will give you a new value after 1 second, however keep in mind that there is still a chance it could take more time depending on how busy your computer is and which process gets priority.

    One recommendation after reading your VIs: Please make use of controls / indicators before using local variables. It makes your code much more readable and removes unnecessary complexity.

    • Like 1
  9. 2 hours ago, Neil Pate said:

    Hmmm, I cannot seem to recreate that behaviour either, but am pretty sure I have seen something similar.

    I have been playing around with this and found some interesting behavior.

    In the following VI I created a value changed event for a slide, duplicated it to another slide and finally to a numeric:

    Original.png Duplicate Same Type.png Duplicate Different Type.png

    As you can see the generated event differs depending on the type of the selected control:

    • Duplicating events to a control of the same type retains the data node.
    • Duplicating events to a control of different type resets the node.

    I wasn't able to reproduce your behavior because I generally put the control inside the event case that handles the Value Changed event. I only duplicate events which are of the same type or those which are working generically for example by connecting the CtlRef element, in which case I hide all other elements thus I don't get the bug.

    One more thing: If you duplicate an event without assigning a control right away (just confirm with OK) and later assign a control of the same type as the source event (a slide in my case), the node of the resulting event will be reset:

    Original.pngAdd Event Without Target.pngEdit Event Without Target.png

  10. 7 minutes ago, Neil Pate said:

    I have always actually disliked the fact that if you duplicate an event the IDE resets the Event Data Node to the full set. I have probably had this bug in the past but never actually noticed it.

    I don't remember them resetting when duplicating events. At least this is working fine in LV2015, so maybe it is specific to LV2013?

    Only when adding new events the nodes get reset, which is indeed quite annoying.

  11. 2 hours ago, Neil Pate said:

    I have recently discovered a subtle, but potentially disastrous, bug that can cause the Event Data Node to get confused as to the order of items which appear. I noticed this bug in LV2013 SP1 and have verified it still exists in LV2015 SP1.

    Thanks for letting us know. I wasn't aware of that even though I tend to hide unnecessary event data, adding more events later. Now that I know about it Murphy's law will most likely cause a lot of my code to break during the next weeks :(

    I have tested your VI in LV2015 SP1 and can confirm that behavior as well. This bug happens actually as long as there are at least two values available before adding a new event:

    Add Event Bug.pngAdd Event Bug 2.png

    It is also not limited to the "New Value" data. It seems the node is connected via index (which as far as I know from VI scripting is how everything is connected). When a new event is added the original event data node gets restored and the index is not updated properly.

    However if all visible nodes are connected there is no issue:

    Add Event All Connected.pngAdd Event All Connected 2.png

    Surprisingly there is also no issue if the very first element is connected:

    Add Event First Connected.pngAdd Event First Connected 2.png

    My guess: LabVIEW only checks if the very first node is connected and for some reason assumes none of them is used, therefore decides to reset the node.

    Hope they provide a fix for LV2015 too :)

  12. 5 hours ago, smithd said:

    Has any git user tried this out, or does Hg/svn have similar functionality?

    Yes, I tried sub-modules and decided against them. Not sure about Hg or SVN

    The obvious reason to use sub-modules is to maintain some "common" repository for use in multiple projects. The OpenG libraries are a perfect example of such libraries. Unfortunately there are a some things which made them less useful to me than first thought:

    1. Folder hierarchy

    Each of those libraries are organized in their own hierarchy of folders, most of which you don't need in your current project. In my case everything is organized in LabVIEW projects using virtual folders where the actual hierarchy on disk is much less complex (typically one folder for each library). So, when reusing a library it would be great to get the same hierarchy in the "owning" project in order to maintain consistency. Since my reuse libraries are organized without library files (*.lvlib), they are just a bunch of VIs on disk, which makes them hard to import into each project because I would have to recreate the hierarchy over and over again. VI packages solve this problem elegantly in my case.

    2. Palettes

    Reusable libraries commonly provide a bunch of VIs, most of which you don't (or shouldn't) use in the owning project. One great example is the array manipulation palette of the OpenG libraries which contains a lot of instances for few polymorphic VIs.

    Being able to select between a few polymorphic VIs on a palette is way easier than searching through the project to find the appropriate VI. For QuickDrop users like me the search function is very useful. By having all polymorphic instances in the project the search results are useless as all instances are returned as results (depending on the naming schema). Without palettes everyone is forced to search through the project, which is very time consuming.

    3. Maintenance

    The ability to change code "on the fly". You can fix bugs during development of your own project and therefore improve multiple projects at once. While this is true there is also a great chance to break consistency between projects because someone decided to do an "improvement" that is incompatible to other projects. This is actually my main reason against sub-modules.

    Example: Add VIs from a sub-module to a library file in the owning project, push the sub-module, pull it into another project, welcome to coding hell. :throwpc:

    4. Independence:

    By splitting reuse libraries into separate repositories and providing them as packages you gain control over each one of those libraries individually. During development of those libraries you can focus on the tasks it is supposed to do instead of having to consider the "big picture". In my experience this is a big burden taken from the shoulders of each developer. I already have to consider about 1k+ VIs in a single project while I don't have to consider the 1.5k+ VIs in our reuse libraries. And these are just "tiny" projects compared to the ones I have seen others do. When one of our reuse libraries is missing a feature I do a feature request. When something is not working as expected I do a bug report. Both of which can be implemented and analyzed on their own pace. If I need them done "now", I'll take charge of the feature request or bug report myself.

    Of course these are just my experiences based on our workflow. It could be an entirely different case for you.

    • Like 1
  13. Atlassian/Git with SourceTree as client. Also getting Atlassian JIRA soon™ :)

    Git because it doesn't require server connection and is the fastest to work with in our case.
    SourceTree because its easy to learn and useful for users with terminal phobia.

  14. 4 hours ago, Christian Butcher said:

    Thanks for this! Even though I was there, it's great to be able to catch some of the talks that were in parallel with others I attended.

    I wonder if you could tell us the conditions to use the server? My careless attitude managed to get my IP blocked this morning and so now I'm using my phone and being a little more cautious, but if you could tell us for example, "no more than N simultaneous downloads" then I can avoid being banned for abusive downloads again.

    I'm doing two downloads at a time (standard setting in FileZilla) and never got banned.

  15. Controls and VIs work for me. Other items can be checked by first casting the generic project item to the desired type. Here is an example to check if the private data of a class changed. Other types can be added similarly:

    Find Unsaved VIs This Project (2015).png

    I searched a bit for libraries and the project file but couldn't come up with a solution. Any ideas?

  16. Sure there is. Use a property node on the VI reference and select Modifications >> VI Modifications Bitset

    This is the description from the help:

    Quote

    Indicates whether changes were made to the block diagram since the VI was saved or opened, depending on which was last. If the value is zero, no changes were made. If the value is nonzero, changes were made.

    Here is an example based on the VI from the topic you mentioned:

    Find Unsaved VIs This Project (2015).png

     

    • Like 2
  17. We use SQLite for all local configuration and MSSQL for public/shared data.

    For SQLite we use your SQLite library (can't say it often again: Thank you very much for that great library!), for MSSQL we use the NI Database Connectivity Toolkit.

    Big data like graphs (raw data) are generally stored in TDMS files, and in a few rare cases as binary files or even XML files.

  18. I think the lack of feedback is caused by general confusion about the status quo. I'm sure many people still use the library, though there haven't been any update since 2011: https://sourceforge.net/projects/opengtoolkit/ <= Also that is the right spot for your changes :D

    The project is open source, so if you are really committed to get involved, this is what I think you should do:

    1. Contact the admins over at SourceForge to either merge your changes or grant you write access.

    2. In case you get no reply within say... one or two month, consider the project abandoned and fork it. (you are not limited to SourceForge, use the platform that is to your liking)

    I think there are a couple of people here at LavaG that would participate in the project if someone would just start being active and committed to the project again.

    • Like 1
  19. 23 hours ago, ShaunR said:

    And how do I get back a compact view of the icons rather than the screen hog version?

    You don't understand: This IS the compact view (though the icons looked way smaller on a 4K monitor)... how very strange...

    Seriously though for long-term user like us it doesn't look very appealing, but it might help attract new customer/user in the future. Nowadays everything is about how it looks, so NI would be stupid not to develop in that direction. Also there is one bright side: Now everyone got a reason to make use of QD. :D

    23 hours ago, ShaunR said:

    I've looked through the options but can't find one to turn off the new 2016 feature of the whole digram going haywire when moving an object. It makes it completely unusable for me.

    What genius thought this was an "improvement"?

    Not sure if this is what you meant, but it looks like a bug(feature). Do this:

    • Create a new VI,
    • place a structure (while loop),
    • insert one or two functions IN the structure (no need to connect them),
    • select both (all) and begin dragging so they come close to an edge of the structure,
    • while still holding the left mouse button (dragging) press and hold space (sometimes you'll have to keep moving the mouse and let go of space)

    This is how you grow your diagrams now :lol:

    • Like 1
×
×
  • Create New...

Important Information

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