Jump to content

ShaunR

Members
  • Posts

    4,874
  • Joined

  • Days Won

    296

Everything posted by ShaunR

  1. quick straw poll.... What's the difference in behaviour (connected dynamic terminals vs unconnected)?
  2. I'm not really sure what we are arguing about here. I like events as they are (and have said so) and only said that I hope they don't change it the more general view of the LabVIEW API's. If you want me to seethe with indignation about implementations, then talk to me about reading an end of file as an error
  3. 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 .
  4. 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.
  5. I fixed the link. Not sure what happened there.
  6. 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.
  7. Try asking on a Python forum. This is a LabVIEW forum.
  8. ShaunR

    CRC sub vi

    Uninitialised shift register.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. Apart from the last one, that's pretty much my normal work-flow.
  18. 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
  19. 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.
  20. 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.
  21. I expect you could hear Marconi's original transmission with that set-up
×
×
  • Create New...

Important Information

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