Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Looks like Block Diagram Binary Heap (BDHb) resource took 1.21 MB and the rest is for the others. There are 120 Match Regular Expression XNodes on the diagram. If each XNode instance is 10 KB approximately, and they all are get embedded into the VI, we get 10 * 120 = 1200 KB. The XNode's icon is copied many times as well (DSIM fork). So, the conclusion is that we shouldn't use XNodes for multiple parallel calls. The less, the better, right?
  3. Today
  4. yeah that is the payload ๐Ÿ˜‰
  5. In the past I have used the IMAQ drivers for getting the image, which on its own does not require any additional runtime license. It is one of those lesser known secrets that acquiring and saving the image is free, but any of the useful tools have a development, and deployment license associated with it. I've also had mild success with leveraging VLC. Here is the library I used in the past, and here is another one I haven't used but looks promising. With these you can have a live stream of a camera as long as VLC can talk to it, and then pretty easily save snapshots. EDIT: The NI software for getting images through IMAQ for free is called "NI Vision Common Resources". This LAVA thread is where I first learned about it.
  6. 4. WinAPI version using ChooseColor function. NativeColors.rar Far from ideal, don't kick too hard. ๐Ÿ™‚ Determine Clicked Array Element Index is from here.
  7. A couple of options: You can create a simple color picker by loading a picture of the color space and then using the location of the mouse cursor to recognize the cursor. Here's an example: https://forums.ni.com/t5/LabVIEW/Using-LabView-s-Color-Picker/m-p/576129#M270051 Call a .NET dialog. There might be different types of dialogs. Example: You could possibly implement it using HTML and read the results from that.
  8. You're about to solve JSON decoding.
  9. Thanks for everyoneโ€™s guidance. I ran my tests, and the performance is within an acceptable range for now. That said, if there are any smarter or more efficient approaches I could try, Iโ€™d definitely love to hear them
  10. I am using labview 2020 Labview supports color box control only for squares. I want hexagon or color palatte, color wheel, etc. Is there anyone who produced these gui? Samples S
  11. Yesterday
  12. Well, I see no issues when running XNodes at the run-time, when everything is generated and compiled. What I see is some noticeable lags at the edit time. Say, I have 50 or even 100 instances of one or two XNodes in one VI, set to their own parameters each. When compiled, all is fine. But when I make some minor change (create a constant, for example), LabVIEW starts to regenerate code for all the XNodes in that VI. And it can take a minute or so! Even on a top-notch computer with NVMe SSD and loads of RAM. Anyone experienced this? I've never seen such a behaviour, when dealing with VIM's. Tried to reproduce this with a bunch of Match Regular Expression XNodes in a single VI. Not on such a large scale, but the issue remains. Moreover the whole VI hierarchy opens super slowly, but this I've already noticed before, when dealt with third party XNodes. xn.vi
  13. I kind of liked this idea and wished VIM's could allow for such a backpropagation. Even had a thought of making an idea on the dark forums. But then I played a while with the Variant To Data node. It doesn't play well. It can't determine a sink, if a polymorphic VI is connected or even when a LV native (yellow) node is connected. Borders of structures are another issue, obviously. So, it'd require making two ideas at least: to implement VIM backpropagation and to enhance the Variant To Data node. (As a hack one could eliminate the Variant to Data in their code with coerceFromVariant=TRUE token, but then the diagram starts to look odd and no error handling is performed). If someone still wants the code, shown in the very first post, it's here: https://code.google.com/archive/p/party-licht-steuerung/source/default/source?page=3 (\trunk\PLS-Code\PLS Main.vi). And these are the papers to progress through the lessons: LabVIEW Intermediate I Successful Development Practices Course Manual. Nothing interesting there for an experienced LV'er though. XNodes demonstrated here work a way better, and could be a good alternative (if you're OK with unsupported features, of course). As I tried to adapt them for my own purposes, I decided to improve the sink search technique. It surprised me a bit, that there's still no complete code to walk through all the nested structures to determine a source/sink by its wire. Maybe I didn't search well but all I found was this popup plugin: Find Wire Source.llb. It stops on Case structures though. I have reversed its logic to search for a sink instead of a source and tried to apply recursion, when it encounters a Case structure. Well, it's still not ideal, but now it works in most my cases. There are some cases, when it cannot find a sink, e.g. wire branches with void terms: Too many scenarios to process them all. Nevertheless, this little VI might be useful for someone. You may use it as a popup plugin, of course, or may pull out that Execute Find Wire Destination (R).vi and use it in your XNodes. As an example: Find Wire Destination.llb Already tried such nodes in a work project. I must admit that not all the time back-propagation is suitable, so about 50/50. But when it's used, it works.
  14. ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚
  15. Heathen My go. Last Mod.vi
  16. If you are in a Windows environment, and have many files to process, this is probably going to be faster. There probably are several factors in determining when doing this in .NET is the better solution.
  17. I also realised I messed up my benchmark and the final High Precision Time should be after the sorting. I meant to do this just forgot!
  18. In addition to the LV native method, there are options with .NET and command prompt: Get Recently Modified Files.
  19. That's how I'd do it. Then combine that with the Foreign Key Sort from my Array package, putting the Time Stamps into the Keys, then paths into the Arrays, and it will sort the paths from oldest to newest. Reverse the array and index at 0, or use Delete From Array to get the last element, which would be the newest file.
  20. I believe to have read somewhere that he eventually conceded that it was basically an unsolvable problem for a generic, easy to use solution. But that may be my mental interpretation of something he said in the past and he may not agree with that.
  21. Done some simple testing. On a directory containing 838 files it took 60 ms.
  22. Have you tried this? The `last mod` output should hopefully give you the timestamp of the last modification, and it would then be pretty simple to find the latest. I have no idea what the performance of this would be if you loop over 10000 files. That is something you would just have to try.
  23. Hi everyone, I have a question: Suppose there's a folder containing a large number of PNG images โ€” say, around 10,000 files. What's the best way to get the name of the most recently created or modified image in that folder? Is there a faster method?
  24. Last week
  25. We are on a hiding to nothing as we can't create objects. I abandoned those thoughts over a decade ago (maybe even 2 decades ago ). It is feasible with scripting but so slow and won't work in built applications. The half-way house is to use scripting to make the labview prototypes for typdefs and handlers then load dynamically as plugins but it's a lot of infrastructure just to propagate what are hopefully rare changes. I did play with that (hence my question to hooovahh) but in the end went for a string based solution to avoid it altogether. What happened to AQ's behemoth of a serializer? Did he ever get that working?
  26. The popular serializer/deserializer problem. The serializer is never really the hard part (it can be laborious if you have to handle many data types but it's doable) but the deserializer gets almost always tricky. Every serious programmer gets into this problem at some point, and many spend countless hours to write the perfect serializer/deserializer library, only to abandon their own creation after a few attempts to shoehorn it into other applications. ๐Ÿ™‚
  27. That's the easy bit. It's much easier getting stuff into other forms than it is reconstituting them because we can't create objects and primitives. This is why JSON libraries have very straightforward encoders that can take any type but you have all sorts of awkward VI's for getting them out into LabVIEW again. If you are going to use JSON strings you might as well not use LabVIEW types at all . Add the Network Stream endpoint to it and you're good to go. Getting it back out again is where you will find the problems unless, of course, the device uses strings too (SCPI)
  28. No but that is a great suggestion to think about for future improvements. At the moment I could do the reverse though. Given the Request/Reply type defs, generate the JSON strings describing the prototypes. Then replacing the Network Streams with HTTP, or TCP could mean other applications could more easily control these remote systems.
  1. Load more activity
×
×
  • Create New...

Important Information

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