Jump to content

ShaunR

Members
  • Posts

    4,846
  • Joined

  • Days Won

    291

Everything posted by ShaunR

  1. It is indeed. But it doesn't have to be They could have decided it should behave like Queue's and an Event Reg merely creates a reference to the internal queue. IMO, Darren's nugget is a side effect of an implementation peculiarity (which you have explained in exquisite detail) rather than a philosophical design - a peculiarity I hope never changes .
  2. Oh I don't know. They could delete the registration queues of any registration that referenced the event that was destroyed - they have to delete the registration queue at some point, right?. Luckily, that hierarchy isn't implemented and hopefully it would be too tiresome to implement. I love LabVIEW events. I rate them alongside Dataflow, sliced bread and putting men on the moon.
  3. I fixed the link. Not sure what happened there.
  4. I don't post on the dark-side but I thought Darren's Occasional Nugget 08/07/2023 was a nugget well worth commenting on over here. I have used this behaviour for a very, very long time. Every time I use it, I always have to convince myself that NI will not "fix the bug" like they did with events and tunnels. I always thought it was an anomaly when compared to the other API's-but a very welcome one which, as Darren rightly says, "this behavior makes event programming more straightforward than other APIs". Darren's example may seem a bit contrived and convoluted so I would like to add a real-world, concrete, practical example which would not work correctly without this behaviour. The example (which is one of many that use this behaviour) relies on the "On Status" event being fired after the the event reference is destroyed in the "Close" function. Actually it is fired twice. Once for "Closing" and once for "Closed". If the event on the structure's queue was not retained and actioned after destruction, then the "Closing" and "Closed" events may never reach the loop - it may not terminate. There would be a high probability that a "Closed" status may not be received and it would be a race between the event structure executing and the "Close". A specific "shutdown" event would have to be added and managed - greatly increasing the diagram complexity. (this one reason why "Tunnels" and "Actor Framework" are so complex). But it gets better. Regardless of the Destroy primitives, all data and status' from the "Get" function, in the executed order, are also maintained independent of the speed of execution of the event structure. This means that when in debugging mode we can see all the events' data and execution even after the Destroy function has been executed in the "Close". As Darren has pointed out, a queue reference would not behave in this way and report "Refnum No Longer Valid" making debugging a much more difficult task.
  5. Try asking on a Python forum. This is a LabVIEW forum.
  6. ShaunR

    CRC sub vi

    Uninitialised shift register.
  7. CBOR isn't a protocol so wouldn't fit with ECL. While there are a couple of encoding schemes like Base58 and Base64, they are one-shot enc/dec functions and not really an API. I think you already know what I'm going to say next. The request would fit better Dr Powell's JSONtext (as you suggest) since it' already has the API and just needs to swap out the parser.
  8. Well. I got a rudimentary CoAP API working (over DTLS). It's a much better protocol than MQTT, IMHO. I'm beginning to run out of protocols to implement.
  9. You need to preserve the width (2chars per byte) otherwise your concatenated is incorrect (you have 4 1/2 bytes represented instead of 5 because of the 0x06 - see also the guy that wanted to insert 0's). This is a common "bug" that occurs in drivers.
  10. Tor is a much cheaper solution both in money and resources. Technically, The DNS issue is the IT depts problem. But usually they, all of a sudden, plead ignorance on the topic and can't understand what you are asking for.
  11. Simple, huh? That is a symptom, not the problem. You get that error because if there is a read error (your server shuts down the connection, read timeout or whatever), you still enqueue a message even when there is no data (and you have zero error handling). Wire the error terminal on the "Producer" to the enqueue and it will reveal the real error (probably 66). This will ensure when there is an error, no data is enqueued to the upper loop which should be named the consumer-you have them switched. The TCP read Produces the data and your upper loop Consumes the data.
  12. 4.4.0 released with DTLS and Pre-shared Key support. You can try Phase Shift Keying with it but don't contact me for support.
  13. Your CLFN's are running in the root loop (that's why they are orange). You really need them to be set to "Run in any thread" but for that, your DLL has to be thread-safe. If it is thread-safe then change it. If not, you are stuck with what you have.
  14. I don't think so. this should be (byte) grouped as 28 D5 00 00 B5 70 that's 6 bytes. I expect the last 4 bytes are the value so the first two (28 D5) are some sort of header. 00 00 B5 70 = 46448 so that seems reasonable. So. doing the same for your arbitrary insert... 28 D5 00 00 (but what about the B?) 05 70. since 722288 = 00 0B 05 70 we have [with our arbitrary insert] 28 D5 00 00 0B 05 70. But that means we how have 7 bytes and have a 3 byte header instead of 2. Adding a 0 arbitrarily is not the solution here. You need to look at how you (the human) are understanding the data from the Arduino again.
  15. Apart from the last one, that's pretty much my normal work-flow.
  16. The problem is that what you described is too plausible - solve the symptom rather than the problem and automate the rigmarole work-arounds we normally go through instead of giving us the language construct that is needed. Look what they (not NI) did with C++ and templates
  17. Great idea. I'd prefer the second one with a slight modification - It has the icon (the bulb in your example) but you double click on it to view the suggestion. The suggestions are only displayed if a button in the toolbar is depressed (like the "Retain wire Value"). Oh. And a cancel/close button in the window.
  18. I respectfully disagree. We should be able to use callbacks for DLL's just like the .NET callback node. However, that isn't an AI solved problem which is why I was laughing.
  19. I expect you could hear Marconi's original transmission with that set-up
  20. HTML Help files (manuals). Documentation is by far the greatest resource hog and we should be able to get away from programmer created VI descriptions. But I don't just mean documenting VI's though. I also mean generating API references, menu layouts, including external references and collating examples with descriptive comments about their function and what they demonstrate (from the code in the diagrams). A far better DLL importer. The one we have currently is next to useless for 80% of DLL's. I'd like an AI that can do what Rolf does . It should be able to import the DLL and create the VI's containing CLFN's for complex structures (e.g strings nested in structures), callbacks (he, he), events and error handling.
  21. So I guess you have a Ham Radio licence? It's exactly what my Ham Radio buddy said.
×
×
  • Create New...

Important Information

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