-
Posts
1,973 -
Joined
-
Last visited
-
Days Won
178
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by drjdpowell
-
Should I change the stupid name of “Messenging"
drjdpowell replied to drjdpowell's topic in LabVIEW General
Hi monzue, “Messenger Library†is currently working it’s way through the Tools Network system. That, and a bunch of other tasks, are distracting me from your pm, but I’ll get back to you. -
I (not AF, but similar) set the subpanel option “Allow User to Open Block Diagramâ€. Then I open the block diagram from the subpanel, once the actor’s FP is loaded into it. Even when the actor leaves the subpanel the diagram stays open (this is a bit strange, since I have open block diagrams with no front panel open). Much more convenient that having to use breakpoints.
-
Most likely because you are not wrapping your INSERTs in a “BEGIN†and “COMMITâ€, so they are all separate transaction. Each transaction requires verified writing to disk (to ensure no corruption if the computer losses power), and as hard disks only spin at 50-100 Hz you can only get 10-30 transactions/second. Execute BEGIN before the INSERTs and COMMIT after, then you have only one transaction. See the Examples (Search SQLite in the example finder) to see how this is done. In the latest version of the package (coming out soon) I’ve added “BEGIN†and “COMMIT†subVIs to make this easier. — James Note for other readers: this package is now available on the LabVEIW Tools Network as "SQLite Libraryâ€.
-
UI to handle overview of 8 sites with subpanels
drjdpowell replied to stgranger's topic in User Interface
You can. You must have done something wrong and be attempting to put the same instance in the second subpanel. -
Your Xcontrols instances go idle when you unlock the XControl, thus destroying all their owned references just like any other VI going idle. So I wouldn’t worry about a leak.
-
What do you call a 1 element buffer?
drjdpowell replied to Aristos Queue's topic in Application Design & Architecture
Off topic: Came across the concept of a zero-element queue the other day. Enqueue blocks until another process calls Dequeue, and then they both execute at the same time, passing the element across. -
Should I change the stupid name of “Messenging"
drjdpowell replied to drjdpowell's topic in LabVIEW General
I’m thinking “Messenger Libraryâ€. Inventive, but I don’t want inventive, I want obvious. -
Should I change the stupid name of “Messenging"
drjdpowell replied to drjdpowell's topic in LabVIEW General
I mean the “root loop†needed to do an asynchronous call that is blocked by the User having a menu open. I personally have had little problem debugging shared reentrant actors. I just send them a message to show their front panel. I can even then add probes and restart the program to observe the startup behavior, as the same clone is always reused. No breakpoints needed. But there is a learning curve to this, which I’d rather eliminate by making it possible to have non reentrant actors. -
Should I change the stupid name of “Messenging"
drjdpowell replied to drjdpowell's topic in LabVIEW General
Simplify it to GLUE, as in “I built my application using GLUE." -
Should I change the stupid name of “Messenging"
drjdpowell replied to drjdpowell's topic in LabVIEW General
I’m specifically avoiding “Framework†because it’s meant to be a toolkit that one can take only some elements and not others. Of course, it is really the framework that I use for real-world applications, but it isn’t intended to be restrictive. It also doesn’t require much in the way of OOP skills; I’ve never created a custom message class for an application, and my “Actor†classes are thin shells, with no private data, wrapped around single VIs.** This is basically text-variant messaging between individual asynchronously-called VIs. — James **I’ve recently experimented with a non-class actor design which is just a VI template. This has the advantage that the VI can be set non-reentrant, rather than shared reentrant, making debugging more straight forward. But i haven’t been able to make such an actor avoid the issue of root-loop blocking, which is problematic. -
Should I change the stupid name of “Messenging"
drjdpowell replied to drjdpowell's topic in LabVIEW General
Brainstorming... SendMSG Library (SendMSG.lvlib is my core library, and sending a message is the core function of the entire package) Messenger Library Messaging Library Messengers Couriers Send Message Library Send Message Toolkit SendMSG Toolkit -
Should I change the stupid name of “Messenging"
drjdpowell replied to drjdpowell's topic in LabVIEW General
Yeah, that’s my problem. What was the name you came up with for your framework? -
I’m in the process of getting my “Messenging†package put on the LV Tools Network, and they have politely suggested (as others have) that shouldn’t it be named “messagingâ€, as “messenging†isn’t an actual word. Yes it is a messaging library, but I want a more unique name. Other similar packages use unique names that don’t directly suggest what they are, such as “Alohaâ€, or use longer descriptive names that shorten to acronyms, like “AMCâ€. I also like the focus on the “Messenger†rather than the “Messageâ€; maybe I should call it Messenger? What do you think? Is the “Messenging†name annoying, and should I change it?
-
Strict Variant <-> Numeric conversion
drjdpowell replied to mike5's topic in Application Design & Architecture
Variant to Data will also convert a cluster to an array of Variants; something I did not know for a long time. — James PS> A related idea. -
Strict Variant <-> Numeric conversion
drjdpowell replied to mike5's topic in Application Design & Architecture
Yes, it’s important to note that NI provides a VariantType library, rather than a full Data library like OpenG does. I wish NI would add the necessary VIs to make its library a complete VariantData solution. I’ve been toying with the idea of doing it myself. -
Come on people, review it if you use it.
-
Quick note on possible changes in the next version: We currently have two types of message “notifications†with the “ObserverRegister†helper object: 1) Event —> send the message to all currently registered observers. 2) State —> compare to last notification message, and if different, send to all registered observers —> send the latest notification message to any newly-registering observer. State notifications have more overhead than Events, due to the saving of a copy of the message. But the ability to send a message immediately to new observers is very valuable, eliminating the need to query or repost unchanged state information, removing the worry about the order of startup of different actors, and making dynamic “hookup†of new actors near instantaneous. However, the other feature of State notifications, only sending updates of state change, is more problematic. The reasoning of this feature was to reduce overhead by not sending new messages if nothing has changed, but in day-to-day use I find this isn’t that valuable, and I often actually want all the messages, even if unchanged, because I use them in a Chart/Graph or otherwise have actions that I want triggered regardless. So I am considering changing it so State notifications are always sent. I am also considering making the matching of message labels in the Observer Register be case insensitive. Comments? — James
-
Here it is, for what it’s worth. From 2008, I think, LabVIEW 8.6. It’s rather too complicated for a first time programmer. You should either see if the Example program works on a NE-500 or NE-1000 and just hack that, or use the low-level communication subVI “New Era Pump CommandResponse.vi†along with the New Era manual (which contains the text commands for it). New Era Syring Pump.zip
-
I’ve used New Era NE-500’s before quite successfully and could possibly dig up some code for it.
-
Possible design for stateless notifiers
drjdpowell replied to infinitenothing's topic in Application Design & Architecture
Oh, I missed that case structure (I can’t read VI snipits on my machine). So you are building a Listener history. -
Hi Paul, Are the current LVLIBs the best for the use case of “collections"? If you were to reuse most of your Commands in a modified component in a new project, but with some replacement Command classes, you would not be able to do that, as a Class/VI can only belong to one library. You could reorg things to have a “CommonCommands†library and a couple of “ExtendedCommand for XYZ†libraries, but this requires changing the namespacing of your original project. Aren’t LVLIBs combining too many features into one construct? Also, to all: It may be the case that “Best LabVIEW Practices†will naturally lead to use of Libraries that is non-problematic. But reasonably good LabVIEW practices should produce reasonable good (and reasonably easy) solutions. LVLIBs don’t currently allow that, at least in combination with LVCLASSes.
-
Possible design for stateless notifiers
drjdpowell replied to infinitenothing's topic in Application Design & Architecture
I don’t think you an avoid a history recorded somewhere. Your solution above won’t get notifications that occur between calls to “Wait on Notificationâ€. Though if you were to keep a history of listeners in the Notifier structure (in contrast to the current LabVIEW Notifier that keeps a history of Notifiers in the Wait node), then this might be better, as the list of Wait nodes should be finite, in contrast to the potentially limitless number of Notifiers. -
That’s just it; the LabVIEW IDE is not removing unused functions. The EXE builder might, but not the IDE. It is compiling them and otherwise using them fully. If a C IDE had compile-on-the-fly where it compiled all those unused functions then it might well have performance issues that annoy some C developers. I would be happy for unused library members to appear under dependancies, greyed out to show the compiler is ignoring them.
-
“Type Definition Modified� by who?!?
drjdpowell replied to drjdpowell's topic in LabVIEW General
Wait, never mind, I think it is a Mercurial/TortoiseHg problem (or User error in using it). Reverting back to a month ago, then reverting forward to today fixed the issue. I think the class file wasn’t being reverted correctly. After reading replies: Compiled code cache, of course! Should have thought of that. Reverting far enough back may have triggered a recompile thus clearing the error. Thanks guys. -
I cannot figure this out. I made some changes to the private data of a class that caused the various unbundle nodes to get mislinked when they tried to auto-select the right new elements, leaving several broken methods. No problem, I thought, I will revert to the previous clean copy in Source-code control (using TortoiseHg). However, whenever I reopen the class, the unbundle nodes are still mislinked and VIs are broken! I reverted the entire codebase to a week ago to be sure I had a good copy, and I rebooted the computer — still broken! All my methods, even the unbroken ones say they need to resave because “Type Definition modifiedâ€. My question is: what is modifying my “Type Definitionâ€? It can’t be any of my source code, so what can it be? Where is the change located on disk?