-
Posts
4,914 -
Joined
-
Days Won
301
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by ShaunR
-
Or they could have just left it alone ;)
-
It is representative of what it is doing now, maybe, and not nearly as useful. Also yes. If it had worked like that for a decade and I had written code to leverage it, I wouldn't expect it to stop working one day. Notice too, how a shift register, like the event, would restore the behaviour? Lets be clear here. It's not a difference between 2009 and 2017. It is 2017 differs from all versions back as far as [at least] 2009. I thought I had set the time start. anyhoo..... Start at about 8 mins through to about 12 mins.
-
Correct. The behaviour has changed. It used to work similarly as I described (and to the DVR analogy). Now it doesn't.
-
Well. Listen to this for a few minutes It is my sentiments entirely and I get just as annoyed and frustrated as he does with this sort of thing.. I supplied a prototype (DVR ref constant) to the the initialising terminal to fix the datatype and then initialise the DVR (with Create DVR). From my perspective. This is the same as supplying an event refnum to the left hand dynamic terminal and then initialising (registering) the event which is passed to the right hand terminal. In this analogy. The feedback node is hidden under the hood which is why the new registration miraculously appears at the left terminal after re-registering. I think it is just a better analogy than a queue which is also hidden.
-
I didn't say everyone. I said I was not the only one. You may be OK with breaking interfaces because of anal specmanship, but I am not. Behavioural changes have an enormous cost downstream. It wasn't confusing at all and, to be honest, elegant and compact. Not so much now. You chose a bad analogy with queues. Just because there happens to be one, doesn't necessarily mean events should behave like one. A better analogy from my perspective is DVRs. Would you consider this a "bug"? dvr.vi For the purpose of the analogy, the feedback node is hidden.
-
If that were true, then in your example you would also need to pass back the refnum to the right hand event terminal for it to magically appear on the left hand terminal (as Smithd showed) or use a shift register as I did. You also don't need to "pass-through" from the left terminal to the right like you would if it where a queue in a case statement.....and lets not forget "Named Queues". I appreciate your argument but events are a category on their own and your solution still breaks dataflow, by your definition, The fact that they may use queues internally is a hidden implementation detail and kind of irrelevant. It may explain why a decision was made to change the behaviour but doesn't mean it was the right decision. To quote Linus Torvalds I know for certain that I'm not the only one that relie[d/s] on this behaviour. I think I learnt it from Jack Dunnaway in his events presentation. Rule #1. You don't break user space.
-
The register is called later (and should create the queue later if that is internal behaviour). Your synopsis doesn't explain why a shift register works, either since that should also fail. It also doesn't explain why the unregister all events is unrecoverable. It also isn't documented in the 2017 bug fixes, if it is a "bug fix". You have just found a work-around to yield to the new behaviour. I argue that they have broken compatibility, introduced complexity and anomalous behaviour-they broke user space which is rare and unusual for NI.
-
It intuitively should. It is not a null event reference. It is a constant event reference with a null user event refnum (but could be a panel, control or any other) which is obtained by right clicking on the event registration wire and "create constant". It is syntactically identical to the refnum created by the register function. You may argue that it is a "constant" and therefore immutable but that is a different argument altogether - especially when it has behaved that way for a decade.
-
Lets assume I have cheated to save space and complexity by using an event refnum and have inadvertently exploited a bug - which has been "fixed". Using your "technically correct method" should I not be able to register and unregister events at will? evnt4.vi
-
So you can confirm the change in behaviour between all previous versions and 2017?
-
There are several workarounds, one of which I highlighted in the example. The issue is that it is a change in behaviour from previous LabVIEW versions which breaks compatibility
-
That is static registration. Yes it is about the constant refnum which is required for dynamic registration. A real world example of dynamic registration might be registering for the mouse_move event only after the left mouse button has been clicked (register mouse_move during mouse_down) and then de-registering on the mouse up (e.g. moving a window when the left mouse button is held down). To achieve this one has to supply a prototype of the event (the refnum constant) to the left hand terminal as I have shown, otherwise the VI will be broken.
-
So. You can confirm the behaviour has changed between versions?
-
Maybe others have seen this but I only became aware of it recently so I apologise if there is already a CAR for it. The following demonstrates a difference in behaviour between LabVIEW 2017 and previous versions (back as far as 2009, maybe further). The VI registers an event when it starts (in the timeout case) and generates a user event when the Increment button is pressed. The expected behaviour is that the counter will increment by one every time the button is pressed. This is the case for LabVIEW versions prior to 2017. In 2017, the user event is never fired, nor is there an error emitted by the generate user event. To get the VI to operate as expected in 2017; change the event refnum tunnel to a shift register. This seems to indicate that the refnum prototype is stomping on the dynamically allocated reference whereas in previous LabVIEW versions it would not. Note also, that when using the shift register, the cases do not need to be "wired through" as would be expected with similar functionality in a normal case statement. evnt.vi
-
The MDI toolkit uses a "container" to place the panels. In the example which is shipped with the toolkit there is also a limited area (below the controls) however it is transparent. The container area is defined by the "Create Container" VI. You required a more visible container. So one simply creates a VI with the required appearance and supplies the "Container" input of the "Create Container" VI with the VI reference. I used the attached VI to override the default container which is just a blank VI with a decoration. Untitled 2.vi Don't forget to also change the offset rect for the resize event otherwise when you resize the panel, it wont scale along with the panel.
-
Well. An area to place them is trivial. As for "we displace indicators and orders". I'm not sure what you mean. You can rearrange the window order, move them around, tile and cascade them, dock and undock. But you'd have to give more detail on exactly what you mean.
-
MDI Toolkit for LabVIEW? (shameless plug)
-
Displaying a transparent PNG programatically
ShaunR replied to Neil Pate's topic in Development Environment (IDE)
Hardly "rusty". Any software that is still at 1.0.1 after years of use is made of stainless steel People just don't know how to release fully featured and tested software any more. Users have been conditioned to think that software that is continuously updated and fixed can only be good when, in reality, it is a testament to how poor the design, implementation and testing is. -
Many will not like the Handbrake licence.
-
I've been doing C++ recently after a very long time. I'd almost forgotten how much pain is circumvented with LabVIEW case structures. With no multi-line literals (can't just paste a key into a page). No "switch" [case statement] with strings.....period. Case sensitive whether you like it or not. Thank god it's almost over and then I can control it with LabVIEW.
-
Do you remember the "Callbacks" demo that I once posted? You can hook the application or VIs events (eg VI Activation) by injecting your own event into the VI externally. I don't recall there being an event for front panel open, but the VI Activation should fire and you can use the callback to filter for specific criteria (panel visible etc)
-
Indeed. In fact. I've worked at places where whoever breaks the trunk buys pizza for everyone. The "wisdom" you speak of can be stated thus: "You can break a branch and the tree will still grow but if but if you break the trunk the whole tree dies". This is still true for distributed SCC where the staging is effectively an enforced branch. There's a lovely description using the nature/tree analogy for SVN which applies, IMO, to all SCC.
-
Modbus RTU message framing
ShaunR replied to drjdpowell's topic in Remote Control, Monitoring and the Internet
I've written 8 drivers that supported slaves for various companies. The last 6 supported master as well. (Wow. Was the first one really in 1999?) You are able. You are just finally forced to do what smithd and I have already suggested. -
Modbus RTU message framing
ShaunR replied to drjdpowell's topic in Remote Control, Monitoring and the Internet
+1. You scan the bytes as they come it and start parsing when a byte equals the address. If the CRC doesn't check out, you discard. If it does, then pass it up. This method is very robust. -
I agree. There have only been two times that I have thought about upgrading my dev environment from 2009 - when the native JSON primitive came out and when I was given Linux versions of 2012. UX doesn't factor into any of this, for me. I moved to Websockets years ago and haven't looked back, being freed from that particular straight jacket. That's a fair comment. But the rule of thumb is "never update until SP1". The premise being to let everyone else find the bugs and work-arounds as they are not costed or planned for. Experience shows that SP1 is generally more stable than the initial release (evidenced from the known issues and bug fix documents). NI may be changing that but that wasn't the case for 2009 and I still argue that that version is more robust, less buggy and more performant than any of the later versions. Indeed. But here is the rub. I now use other languages for a UI (yields TCPIP segregation). I'm using dynamic libraries for many of the drivers (both in-house and external) and LabVIEW is no longer doing much of the heavy lifting. It has become more of a swappable middleware development choice, albeit with many advantages. My only real requirement is that LabVIEW doesn't break the library interface or TCPIP stack and the prevalence of open source alternatives to NI specific ones is getting better every year. For prototyping it's still, at the moment, the first tool I reach for. My toolkit built over many years means that I already have most "components" I need to do develop industry standard stuff so most of the little tweaks and new features just make me ask myself "do I want to refactor that to take advantage?" Most of the time the answer is "no" since there is no real change (e.g. conditional tunnel) and the current stuff is optimised, proven and robust. On this front I get the distinct impression that at NI; the left hand has no idea what the right hand is doing. AQ recently asked me to converse with some people over there about issues installing LabVIEW.NET (yeah, I know they prefer to call it NXG). Now. I'm not particularly interested in that platform (for obvious reasons) but I can certainly outline the problems I had so said "Sure. Get them to talk to me through Bascamp". For those that don't know. Basecamp is a 3rd party project management platform that partners and toolkit developers are forced to use when communicating with NI. Several tumble weeds go by, then I get an email from someone at NI asking about it so I send them a Basecamp invite (to join the myriad of people at NI already signed up) in case they don't know how it works either (AQ had used Basecamp for a personal project, but never used it for NI communications). I never heard from them again I also had an issue in the past where I was advised to contact NI Support by my NI Bascamp handler ( ). Support wouldn't talk to me because I didn't have an SSP. It was only after further intervention by the handler that they got onto it. We are lucky to have AQ and friends peruse this forum and interact, but customer facing NI systems are set up against them to be effective sometimes. I've probably said this before, or something similar. If you find an excellent applications/sales engineer, get their direct number and hold on to it like a limpet to a rock because you need them to circumvent the systems' barriers. Considering there are known bugs going back to 8.x that still aren't fixed (last time I looked), this is my view too. Even so. It's not good enough to "fix bugs". I need my bug fixed, even if I'm the only one reporting it. That is why I'm leaning more and more to open source solutions because if they won't fix my bug, I will - and I don't care what language it is written in