-
Posts
4,897 -
Joined
-
Days Won
297
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by ShaunR
-
-
13 hours ago, Rolf Kalbermatter said:
On Linux systems the ELF loader tries to search all the already loaded modules (including the process executable) for public functions in its export tables and only if that does not work will it search for the shared library image with the name defined in the linker hints and then try to link to that.
And that's another big reason why ECL won't be available in Linux. It was ok when it used the NI binaries but the switch to standard OpenSSL binaries means that the CLFN usually loads system wide binaries (even if you define a path) and there is no way for LabVIEW to use "RTLD_DEEPBIND".
-
On 11/17/2023 at 2:25 PM, codcoder said:
Both your links were good. I've found the second one, but the first was new to me. But you are right to assume that I'm looking for something less abstract. At least, that is what I want to create here—a cooking recipe of sorts.
The problem with test stand is it tries to be all things to all people. IMO, simplifying is best. I haven't used TS for quite a while but when I did, I offloaded all tests to LabVIEW and just used it basically as a script. I had a VI with command/response capabilities (via TCPIP) which meant that TS sequences were a list of operations and just sent strings to execute tests and take measurements. One nice side-effect of the TCPIP meant that you could also execute tests remotely so an operator didn't even have to be sitting next to the machine the tests were running on (quality engineers loved that they could run tests and calibrate from their desks instead of going out to the machine).
- 1
-
17 hours ago, hooovahh said:
I knew of the malaphor only because my wife does it all the time, but then insists her phrase is the way people always say it.
I had a girlfriend like that. It turned out that her father used mix metaphors for comic effect but she didn't realise and thought it was the correct metaphor. When she said "everyone says it like that" what she meant was "my family says it like that"
- 2
-
32 minutes ago, Neil Pate said:
I am pretty sure Rolf knows it is not any kind of criticism.
Not that so much but he might be right and I've been using an eggcorn for my entire life.
- 1
-
14 minutes ago, Bryan said:
I'm just now hearing of the word 'eggcorn' as well. The definition sounds like something that I have often done intentionally while talking with friends for comedic effect.
A malapropism is similar but more common for comedy because it doesn't need to make sense in context (so it's easier and funnier).
-
14 hours ago, Neil Pate said:
@Rolf Kalbermatter I know you did not mean this, but I love it!
I love Rolf's eggcorns. I never point them out because he knows my language better than I do.
- 1
-
1 hour ago, Rolf Kalbermatter said:
Of course it looks familiar.
it was meant tongue in cheek and specifically chosen because you've done it a million times (probably). I wonder what the forum mark-up is for that?
-
39 minutes ago, Rolf Kalbermatter said:
Easy typecasting in C is the main reason for a lot of memory corruption problems, after buffer overflow errors, which can be also caused by typecasting. Yes I like the ability to typecast but it is the evil in the room that languages like Rust try to avoid in order to create more secure code.
Typecasting and secure code are virtually exclusive things.
Don't have that problem with dynamic typing.
Typecasting is the "get out of jail" card for typed systems. This one seem familiar?
linger Lngr={0,0}; setsockopt(Socket, SOL_SOCKET, SO_LINGER, (char *)&Lngr, sizeof(Lngr)); DWORD ReUseSocket=0; setsockopt(Socket, SOL_SOCKET, SO_REUSEADDR, (char*)&ReUseSocket, sizeof(ReUseSocket));
-
3 hours ago, Neil Pate said:
Would you want to write a driver for your GPU with a language that does not offer strict typing?
Oddly specific. I would want a method of being able to coerce to a type for a specific line of code where I thought it necessary (for things like precision) but generally...bring it on. After all. In C/C++ most of the time we are casting to other types just to get the compiler to shut up.
They broke PHP with class scoping. They are now proposing breaking it more with strict typing. Typescript is another. It's the latest fad.
-
14 minutes ago, Neil Pate said:
I am not against your idea of adding a bit of love to the events implementation.
Actually. your particular problem is that the variant type is only a half-arsed variant type. It's easy to get something into a variant, but convoluted and unwieldy to get them out again. I think "Generics" were supposed to resolve this but they never materialised.
I shake my head with the recent push in the software industries to strict type everywhere. Most of the programming I do is to get around strict typing.
-
16 hours ago, Neil Pate said:
Not for me though, my low level messaging uses events and that is just waaaaay to much drama to have separate events for every message. I wrap it up a layer with typedefs though, just the data is transported in a variant.
If only there were a way that one could use strings to define the event. We could call them, let me see, "Named Events"?.
-
There is a "best practices" document (this too) but I suspect you are looking for a less abstract set of guidelines.
- 1
-
13 hours ago, smarlow said:
This implementation would mean the data for the "callback" has the same type as the dynamic event. But if you use a cluster or class, it would be easy enough to separate the calling data from the return using sub-clusters. Copies of the calling data would be in the return, but that would be relatively harmless.
We have the Start Asynchronous Call for creating callbacks in LabVIEW. There are a couple of issues with what you are proposing in that callbacks tend not to have the same inputs and outputs. What we definitely don't have, at all, is a way for implementing callbacks for use in external code (in DLL's). While what I'm proposing *may* suffice for your use case, it's the external code use case where LabVIEW is lacking (which is why it makes Rolf nervous ).
-
37 minutes ago, Rolf Kalbermatter said:
That's because I don't have a solution that I would feel comfortable with to share. It's either ending into a not so complicated one off for a specific case solution or some very complicated more generic solution that nobody in his sane mind ever would consider to touch even with a 10 foot pole.
It's only software One isn't constrained by physics.
-
16 minutes ago, Rolf Kalbermatter said:
Unfortunately one of the problems with letting an external application invoke LabVIEW code, is the fundamentally different context both operate in. LabVIEW is entirely stackless as far as the diagram execution goes, C is nothing but stack on the other hand. This makes passing between the two pretty hard, and the possibility of turnarounds where one environment calls into the other to then be called back again is a real nightmare to handle. In LabVIEW for Lua there is actually code in the interface layer that explicitly checks for this and disallows it, if it detects that the original call chain originates in the Lua interface, since there is no good way to yield across such boundaries more than once. It's not entirely impossible but starts to get so complex to manage that it simply is not worth it.
It's also why .Net callbacks result in locked proxy callers in the background, once they were invoked. LabVIEW handles this by creating a proxy caller in memory that looks and smells like a hidden VI but is really a .Net function and in which it handles the management of the .Net event and then invokes the VI. This proxy needs to be protected from .Net garbage collection so LabVIEW reserves it, but that makes it stick in a locked state that also keeps the according callback VI locked. The VI also effectively runs out of the normal LabVIEW context. There probably would have been other ways to handle this, but none of them without one or more pretty invasive drawbacks.
There are some undocumented LabVIEW manager functions that would allow to call a VI from C code, but they all have one or more difficulties that make it not a good choice to use for normal LabVIEW users, even if it is carefully hidden in a library.
None of that is a solution though; just excuses of why NI might not do it.
-
56 minutes ago, Rolf Kalbermatter said:
And that is almost certainly the main reason why it hasn't been done so far. Together with the extra complication that filter events, as LabVIEW calls them, are principally synchronous. A perfect way to make your application blocking and possibly even locking if you start to mix such filter events back and forth.
Should LabVIEW try to prevent its users to shoot themselves in their own feet?
No of course not, there are already enough cases where you can do that, so one more would be not a catastrophe. But that does not mean that is MUST be done, especially when the implementation for that is also complex and requires quite a bit of effort.
We've had these arguments before. I always argue that It's not for me to define the implementation details, that's NI's problem.
We already have blocking events (the Panel Close? greys out the "Lock Front Panel" checkbox because it's synchronous). The precedent is already there.
What I think we can agree on is that the inability to interface to callback functions in DLL's is a weakness of the language. I am simply vocalising the syntactic sugar I would like to see to address it. Feel free to proffer other solutions if events is not to your liking but I don't really like the .NET callbacks solution (which doesn't work outside of .NET anyway).
-
14 hours ago, smarlow said:
Do you mean like a return from a dynamic event?
Not really, although I suppose it is in the same category as what I would propose. I mean more like the "Panel Close?" event.
The callback would be called (and an event generated). You would then do your processing in the event frame and pass the result to the right hand side to pass back to the function (like the "Discard?" in the "Panel Close?" event).
Of course. Currently we cannot define an equivalent to the "Discard?" output terminal. They'd have to come up with a nice way to enable us to describe the callback return structure.
-
15 hours ago, Rolf Kalbermatter said:
So LabVIEW falls through the cracks regularly.
Indeed. However, NI *should* have been aggressive in correcting that.
15 hours ago, Rolf Kalbermatter said:On the other hand is your statistic website also not quite consequent. I would consider Delphi also more the IDE than a programming language. The language would be really (Object) Pascal.
I agree. Lazarus is the Open Source equivalent and I use a variation called CodeTyphon. But it highlights that even if LabVIEW is considered "vendor software" it should be on those lists as it is more of a programming language than HTML/CSS (as you point out). There could be no argument against inclusion, IMO.
-
16 minutes ago, Rolf Kalbermatter said:
It's obvious that LabVIEW always has been a minor player in comparison to these programming languages.
LabVIEW never seems to even be listed on programming statistic websites. I refuse to believe (also) that LabVIEW has less programmers than, say Raku. Hopefully Emerson will aggressively promote LabVIEW on these kind of sites to raise visibility. NI failed to do so consistently.
-
12 hours ago, smarlow said:
All I know is that if they don't do something to make it a more powerful language, it will be difficult to keep it going in the long run. It was, in the past always a powerful choice for cross-platform compatibility. With the macOS deprecating (and eventually completely removing) support for OpenGL/OpenCL, we see the demise of the original LabVIEW platform.
I for one would like to see a much heavier support for Linux and Linux RT. Maybe provide an option to order PXI hardware with an Ubuntu OS, and make the installers easier to use (NI Package Manager for Linux, etc.). They could make the Linux version of the Package Manager available from the Ubuntu app store. I know they say the market for Linux isn't that big, but I believe it would be much bigger if they made it easier to use. I know my IT department and test system hardware managers would love to get rid of Windows entirely. Our mission control software all runs in Linux, but LabVIEW still has good value in rapid application development and instrument bus controls, etc. So we end up running hybrid systems that run Linux in a VM to operate the test executive software, and LabVIEW in Windows to control all our instruments and data buses.
Allowing users the option to port the RT Linux OS to lower-cost hardware, they way did for the Phar Lap OS would certainly help out, also. BTW, is it too much to ask to make all the low-cost FPGA hardware from Digilent LabVIEW compatible? I can see IOT boards like the Arduino Portenta, with its 16-bit analog I/O seriously eating their lunch in the near future. ChatGPT is pretty good at churning out Arduino and RaspberryPi code that's not too bad. All of our younger staff uses Digilent boards for embedded stuff, programming it in C and VHDL using Vivado. The LabVIEW old-timers are losing work because the FPGA hardware is too expensive. We used to get by in the old days buying myRIOs for simpler apps on the bench. But that device has not been updated for a decade, and it's twice the price of the ZYBO. Who has 10K to spend on an FPGA card anymore, not to mention the $20K PXI computer to run it. Don't get me wrong, the PXI and CompactRIO (can we get a faster DIO module for the cRIO, please?), are still great choices for high performance and rugged environments. But not every job needs all that. Sometimes you need something inexpensive to fill the gaps. It seems as if NI has been willing to let all that go, and keep LabVIEW the role of selling their very expensive high-end hardware. But as low-cost hardware gets more and more powerful (see the Digilent ECLYPSE Z7), and high-end LV-compatible hardware gets more and more expensive, LabVIEW fades more and more
I used to teach LabVIEW in a classroom setting many years ago. NI always had a few "propaganda" slides at the beginning of Basics I extolling the virtues of LabVIEW to the beginners. One of these slides touted "LabVIEW Everywhere" as the roadmap for the language, complete with pictures of everything from iOT hardware to appliances. The reality of that effort became the very expensive "LabVIEW Embedded" product that was vastly over-priced, bug-filled (never really worked), and only compatible with certain (Blackfin?) eval boards that were just plain terrible. It came and went in a flash, and the whole idea of "LabVIEW Everywhere" went with it. We had the sbRIOs, but their pricing and marketing (vastly over-priced, and targeted at the high-volume market) ensured they would not be widely adopted for one-off bench applications. Lower-cost FPGA evaluation hardware and the free Vivado WebPack has nearly killed LabVIEW FPGA. LabVIEW should be dominating. Instead you get this:
I've always been suspicious of Google Trends because it doesn't give context. The following is C++ but I refuse to believe it's marching to oblivion.
But it's fun to play with
- 2
-
16 hours ago, Antoine Chalons said:
a couple of times I was happy to find some unfinished project to use as a starting point (toml, zeromq, rabbitmq, redis)
Happy? Or do you mean grateful for small mercies? You wouldn't have been happier with a documented and example laden product that you can ask questions about and actually works?
No. There is too much of this thinking around nowadays and it annoys the hell out of me. We (programmers generally) used to be better than this. The rigor and community that made OpenG tools is definitely gone now. I'm not quite sure who is to blame for this mindset creeping in but it's just not good enough BTW. I also get just as annoyed with "Beta" releases or, as I call it, "Still Not Working".
Oh well. Back in the private toolkit it goes. Maybe one day I'll get around to it but it's clear that even if I did release it to the community as-is, it'd just be the spawning point for variants which, quality wise, would be just as bad, if not worse.
-
52 minutes ago, hooovahh said:
I disagree. Large amounts of my code online have never required my support.
It's happened with me several times. I don't like speaking in these absolutes. These half finished projects have been extremely valuable to me over the years, way more valuable then having nothing. Often times I will take the code, polish it, add features, then post it online. Not as perfect but so someone else could add to it if they ever wanted. A community that only shares perfect code shares nothing.
Different philosophies that we probably will never agree on.
But in this particular case; I have working code with no known bugs and the price for using it is for someone to take responsibility and ownership of it.
-
Support is always necessary.
1 hour ago, hooovahh said:And if I'm unwilling to improve them someone else can make the changes.
That never happens. It's why there are so many half-finished and buggy projects on github. If I'm not prepared to release and support it, I'll either find someone that can or not release at all. What you've never had, you don't miss-right? One day I might get the energy and time-window, but don't hold your breath.
1 hour ago, hooovahh said:I have had a need for a dynamic or ribbon looking interface which is why I made one using the 2D picture control.
Both xControls use the 2d picture control for the button/tab bar. You can add buttons/pages either at design or run-time. Where things might be different of how one envisages these things working is that the buttons are, in essence, callbacks. Pressing a button invokes a VI (which is why it's called the Execution toolbar) but most of the features are around managing the buttons/panels. Both the toolbar and tab bar work very similarly that way (tab bar obviously shows the VI in a sub panel).
They are pretty feature complete. I suppose the tab bar could add an optional close icon but I never needed it. Hmmm. Maybe I'll add that now
.... perhaps not
-
15 hours ago, Rolf Kalbermatter said:
I'm fairly sure his believes will be proven right. What it will bring in terms of new features will be anyone's guess.
I like your optimism. Maybe you are right.
Emerson Reports Fourth Quarter and Full Year 2023 Results; Provides Initial 2024 Outlook
Interestingly, Europe seems to be their biggest growth.
NI drags its feet...
in LabVIEW General
Posted