Jump to content

eberaud

Members
  • Posts

    297
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by eberaud

  1. I see, so long story short, you don't really extract the PNG and feed it to .NET, you rather manipulate the ICO and then feed it to .NET still as an ICO. Correct?
  2. My question is about the piece of code in this screenshot of Read Ico File.vi. You seem to reassemble an .ico file again. Is that what you're doing?
  3. I like to understand the code I'm using instead of just blindly using it "since it works" I'm looking at your Read Ico File.vi. I found a Wikipedia page that describes the format of an .ico file so I understand perfectly what you're doing when you index the bytes coming from it. However I can't find anything that describes the content of a .NET Image Byte Array, so I don't understand what you're doing when you create that array. Can you point me to a web page that would explain this format? Cheers!
  4. Yeah no time to dig through VB code for now. Thanks, I appreciate the help
  5. Looks neat, thanks hooovahh. Now my problem is that it always uses the first (higher resolution) image of my .ico file. I need some code to choose which image to use. The vi.lib\Platform\icon.llb\Read Icons from ICO File.vi VI returns an array of clusters named icon data but those clusters are different from the imagedata.ctl typedef used by your VIs..
  6. Reviving an old thread! It's 10 years later, and the VI rolfk mentioned looks like it hasn't got any love. Any chance you know of an updated equivalent that would support 32 bit depth?
  7. Thanks for all those answers!
  8. Uhm, If I reall y want/need to understand this I guess I need to dig into type descriptors and so on?
  9. I was shocked to see that LabVIEW manages to execute this code properly. Can anybody explain why it works? Aren't clusters and arrays 2 different things?
  10. I second Ned's comment. Moreover I find that most developers naturally associate "True" to "OK" in their minds. But to be fair, my code is probably a 50/50 mix... The most important is to label the indicator such that it is self-explanatory.
  11. It's an example, but there is a an actual real number I can give you when I'll have taken the time to dig into my Excel sheets... Exactly. I don't use Waveforms. Each sample has 3 columns for the time stamp and then X columns for the X channels. So X+3 columns total.
  12. Yes but I'll need a bit of effort to put together something that can be understood easily, since right now it mostly consists of big Excel sheets with raw data. I'll try to post something soon-ish.
  13. I've spent my fair share of time dealing with the Advanced TDMS API to achieve the same thing: decimating the data to plot them in a graph. My benchmarking showed that there is a sweet spot where performing one Read operation for each sample you want to keep (using the Offset hooovahh was talking about) starts being more efficient than performing a single Read operation returning a giant amount of data and then keeping only 1 every 100 samples for example. So I'd recommend looking into that if you go with a TDMS-based solution. And since we are dealing with files on disk: SSD drive!! Forget about HDD, way too slow, your users will have to wait several seconds each time they need to refresh the graphs. And yes, cut the file size by half by using SGL instead of DBL! This only poses an issue for the timestamp since LabVIEW uses DBL. I worked around this by using 3 SGL columns to represent the timestamp. You're on the right track!
  14. Also is "LabVIEW Feedback for NI" the right forum for this?
  15. If most of what you read in that thread is new to you, start with queues. That's really a must-know in LabVIEW, on which many more sophisticated patterns are based.
  16. Well the string selectors listboxes of instrument tuner.vi (Cello Strings, Guitar Strings, and so on) are not related to the ones inside String Selector.vi at all... You need a way to pass their values to String Selector.vi otherwise String Selector.vi will keep using their default value (index 0).
  17. I found the culprit!! Back in the days a coworker of mine had the noble intention of increasing the performance of our application by adding some code that would assign a HIGH priority to its thread in Windows (you can do it manually through the task manager). It took me a while to figure that out, I’ve been stripping code from our application bit by bit, until that little subvi was the only thing remaining! The online documentation does recommend not to modify the priority and warns that unexpected behaviors might occur. So I’m not sure if NI will try to fix anything. But at least you guys should add this to your troubleshooting database so that next time you hear about this symptom you can tell the developer to check this setting. I’m attaching a project that will reproduce the issue very quickly if you set “HIGH PRIORITY”. It will run smoothly all night long if you set “NORMAL PRIORITY”. Closure feels so good, workarounds suck Stop Timed Structure Hang.zip
  18. Wow that's a big deal. Even though he remains chairman of the board, it's still a huge page that is turned in the NI book!
  19. Thanks smithd! I should have mentioned that I'm just running on regular Windows, no RT anywhere. You will probably reply: then why on earth are you using a timed loop? Well back in the days I naively thought that timed loop would be more deterministic and have higher performance, but later on I read that not only is it not more deterministic when run on Windows, it also has additional overhead and end up using more CPU than a regular while loop. Yet we kept it because we liked the possibility to abort, and the fact that we can use the "Actual Start [ i ]" left data node in order to log the time stamp of the actual iteration in our log file. So it seems that you also found stinky stuff with the timed loop eh... Well I might end up getting rid of it altogether, replace it with a while loop, and handle the timing myself...
  20. Bumping this thread as I really would like to see some comments, even if you can't propose any fix. At least I would like to know that I am not the only one who encountered this hang issue. Please
  21. Since the connector panes of a child and its parent need to be exactly the same, you need a way to make the passing of parameters generic: either the path of an INI file, or a variant (the child method will know how to cast it back to a cluster), or a string (XML or JSON)... Keep in mind that the child object will contain both a set of parent private data and a set of child private data. So put any common parameter in the parent private data, and any child-specific parameter in the child private data.
  22. I am experiencing frequent occurences where the Stop Timed Structure.vi hangs. I found online that issue #42CHH33W used to be a possible cause, but it's supposed to be fixed in LV8.2 and I'm using LV2015! I tried hard to identify a pattern for the hanging, and implemented a system based on semaphore that would guarantee that I only abort the loop if it's sleeping (waiting to start its next iteration). If it's awake, I simply rely on a Boolean to exit the loop. Even now it still hangs sometimes. Getting a little frustrated here Anybody has experienced such scenario before? Do you think I should try the suggested workaround (putting Stop Timed Structure.vi in a another timed loop that is in sync with the timed loop I want to abort)? What does "in Sync" really mean? Thanks
  23. Again, thanks Smithd. I will keep troubleshooting this issue later. For now I have another issue which is even worse: the "Stop Timed Structure.vi" itself hangs quite frequently and I can't figure out why. This is getting quite frustrating and I'm on the edge of giving up... Anybody knows what could be causing it? I 100% guarantee that the timed loop itself is running when the call to the "Stop Timed Structure.vi" occurs. The name is correct, and most of the time it works fine, but after a few dozens of cycles (a cycle being start timed loop and abort timed loop 1s later), the "Stop Timed Structure.vi" hangs, with no possibility to recover. So this is worse than any error message EDIT: I started a new thread for this purpose, please reply there instead of here.
  24. Our software now periodically run into critical errors where some resources (most likely DVR) are not released, and many components simply hang. I am highly suspicious that it comes from the Abort Timed Loop function. There are many operations inside the loop that function as pairs (open/release DVR in an IPE, dequeue/enqueue elements,...) and I want to be sure that one operation won't be performed without its counterpart also being performed. If we're unlucky and the abort occurs just after opening a DVR and just before releasing it, is it possible that the DVR dies? The reason for the abort is not too shorten the duration of an iteration, which is always pretty short, but rather to force the loop to stop if it's just sleeping and waiting until it's time to perform its next iteration. At this point the only acceptable solution I see would be to use a semaphore: the loop would acquire it when it starts a new iteration and release it when the iteration is done (before going back to sleep). The code sending the abort would only do so when the semaphore is available. Am I on the right track?
×
×
  • Create New...

Important Information

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