-
Posts
1,982 -
Joined
-
Last visited
-
Days Won
183
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by drjdpowell
-
Because I forget to submit to NI. Updating LAVA-CR is quick and instant, and I intend to send to NI later when any bugs are discovered, but then it drops of my radar.
-
https://www.gov.uk/guidance/corporation-tax-research-and-development-tax-relief-for-small-and-medium-sized-enterprises I was thinking of that as an option. The LAVA community one would be version 1.4.1. I’m afraid I’ve checked in some things starting with a switch to 2013; you should ignore those and branch from the last 2011 checkin. I’ll set up a new repo and a new project name.
-
I’m doing a lot of work at the moment on a “JSON 2.0” version, particularly intended to improve performance in common use cases that I’ve encountered. For example, I have a new VI that flattens a Variant directly to JSON text (skipping the Objects entirely) that works on large arrays of numerics about 30 times faster. I’d like to claim R&D tax credits on the work I do on this (which is otherwise unpaid), and to do that the result of the work needs to be owned by my limited company, so I’d like to release the new version under “JDP Science Limited”, rather than “LAVA”. I would put a BSD license on the new version, and properly comply with the BSD license of the current LAVA version. I hope none of the contributors of "JSON LabVIEW” object? The R&D credit would work out to about 30% of charged rate (if I do the tax math right, which is far from obvious). 30% is a lot better than zero.
-
Detect straight lines & their angle on a waveform
drjdpowell replied to Ano Ano's topic in LabVIEW General
I can also recommend Savitski-Golay, which is basically just fitting to a Nth-order polynomial, and estimates multiple derivatives at once. Apply some “straight-line” criteria such as all derivatives beyond the first being “small”. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
You have to outsmart the compiler when performance testing. In your code your constant array is copied at the to-variant step because it is needed at the next iteration. Make a new array for each iteration, like this: tests (Modified to avoid Constant Folding).vi -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Yes, I try not to shoot myself in the foot. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Actually, that is an Actor Model rule ("messages should be immutable"). It’s a rule I sometimes break, but not without pause for thought. Where I have broken the rule I have sometimes had race-condition bugs. The value of rules is not in blindly obeying them, but in understanding why one should be reluctant to break them. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Variants don’t “flatten”. Putting something in a variant doesn’t involve altering or copying the data. They have overhead but I don’t think the size of the data matters. Never use Globals for big data. Globals always copy when you read them. So does any “Get”. Avoid a copy by extracting only the required data inside the structure you are using. So, inside the IPE with a DVR, inside the Action Engine, or inside the message sending code. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
BTW on Action Engines: are they really that simple to pick up for a novice? “Sending a message” seems to me to be a much easier concept than “non-reentrant subVIs with uninitialized shift registers”. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Make it that simple and perhaps I do use Action Engines. Turn the enum into an “(Re)Initialize” boolean, or have the code initialize itself on first call, and you’ll find such things in my code. But none of them will be usable to communicate between code modules like AEs are often used. Logging is a good example of where multiple things can share something without affecting each other. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
I must not be understanding the problem you’re presenting. Perhaps you could explain a AE/DVR solution, and illustrate how it cannot be done by messages. You mention Daklu, who only has LapDog as a reuse library. LapDog is less a messaging framework that your Dispatcher. Dispatcher is an implementation of a “Message Broker” messaging pattern, I believe, so one is making more of a design choice by using it than one would be by using LapDog. My “Messenger Library” is meant as a flexible message passing library, where you don’t need to use the “actor” stuff at all if you’d rather not (most of the examples installed with Messenger Library are simple message passing). Its central messaging pattern is “Request-Reply”. The Actor Framework, on the other hand, is very much intended to be a framework to enforce a certain style of program architecture. One should (I hope) find Messenger Library very useful even if one doesn’t follow similar design principles to me, but it is (deliberately) hard to use the AF in a way not intended by AQ. Perhaps, though, you actually meant “principles” rather than “framework”, as Daklu has written a lot about the “actor-oriented” design principles he follows. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Your kidding, right? Just register on “Total bytes downloaded” and look at the increase (which stops when they finish). Trivial. Edit>> or register a Queue for all the “Throughput” messages and average once every 10 secs. Also easy. And are you really worried about sub-millisecond timing uncertainties on a 10-second average? If so, I think you have those with an AE also, just due to OS jitter. Don’t forget your “Dispatcher". -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Well, the simplest way to do that would be to Register Notifiers (well, NotifierMessengers) for the info one wants and then For-loop over the Notifiers to get your snapshot. I’m not that fast at coding but it’s no faster for me to make an AE. And don’t you have to modify all your data sources to add calls to this new AE? I don’t have to modify any of the data-producing actors, my actors aren’t code-coupled via this subVI and can be reused as is, and some of my actors can be on remote systems (try that last one with your action engine!). How long would it take for a novice? I’m not as positive on the ability of novices to understand action engines (they seem to love Local variables, from my experience) but learning messaging patterns is more of a learning curve. But learning is an investment. Learning messaging is well worth it. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
I have one User Event per “actor”, that basically carry Text-Variant messages. No maintenance at all. The main weakness of polling on “data changed” is that you can miss updates. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
My first thought is “consider doing views of past history for real and use SQLite”, as I’m sure you agree. My second thought is “that sounds trivial to do with the Register-Notify messaging pattern”. Why in the world would you message subsystems to get data in response? This is what I mean by focussing on a few complimentary techniques and learning them very well. SQLite is very complimentary, but if one mixes limited-capability messaging with some similarly simplistic “tag” implementation then you end up with an overly complex result that is weaker than just picking one technique and really understanding it. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Oh yeah, there are quite a few “tag” libraries on NI.com. Using one of those might be better than rolling your own. I don’t use them because they wouldn’t give me anything I can’t do with messages, and they increase the amount of stuff I need to know (gotta know messaging, tags, and how tags interact with message timing). -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Single writer is good. Why “global” then? I generally have data flowing around by messages and locally stored by anyone who needs to store it. The other issue is constantly polling a DVR for changes, versus receiving notification messages only when things change, but for “slow” apps that doesn’t matter much (but it affects your ability to reuse your solution in “fast” apps). -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
What are you “global storage needs”? How many writers are there of each data item? -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Hey, let’s infinite-loop the conversation! I should clarify. Message-handling loops, Action Engines, and by-ref classes can all be used to organize a complex application into subcomponents and control interactions between the subcomponents. The means of interacting may be different, async messages versus sync subVI/method calls, but the purpose of these structures is the same. Because they are different, but used for the same underlying purpose, I would recommend that a developer focus on one. It reduces complexity if you standardize, and allows you to really get competent at the techniques you have chosen. If asked, I would personally recommend using messages over any by-ref techniques, and also not using globally-accessibly things like standard AEs, but it is more important that one pick a technique and get good at it. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Well, even at its most nebulous, “actors” interact by passing asynchronous messages, and are actively handling those messages. “Message-handling loops”, basically. That is significantly different than AE/DVRs, which passively wait to be synchronously called. More specifically, “actors” should follow the Actor Model, and I should probably have used the more generic "Message-Handling Loop” as a thing to compare with Action Engines. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Eh? Where was that in the discussion? I was comparing AE's, DVR-based by-ref objects, and "actors". One can do complex or very simple things with any of them. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Link title is "Passing Arguments by Value and by Reference" Ah, so you’re meaning pass by reference, as applied to arguments to function calls (terminals in LabVIEW), and some of the things we are talking about are not passed as arguments. I’m meaning “act on by reference”, or “having a reference to something”, meaning I have the means of acting on something that others also can act on. I don’t care if the reference is passed as an argument or is statically compiled in (like a Global or a subVI call). -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
That weird design has always mystified me. The editing tools for the IPE structure are also painful. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Yes, I also am not able to identify what you’re using the terms “by reference” and “by value” to mean, so I was trying to rephrase in different terminology in hopes we advance. -
Action Engines... are we still using these?
drjdpowell replied to Neil Pate's topic in Application Design & Architecture
Let’s try a different tack. There is an important difference between situations where one loop can affect another loop operating in parallel (a side effect), and where it cannot. Globals, Locals, DVRs, Queues, Notifiers, FGVs, Action Engines, or the new "Channels” are all means where one can “reach in” and affect a loop while it is running. Data on a wire is not. An interesting talk related to this by AQ: Why Dataflow Works: The Potato and Candy Explanation