-
Posts
1,986 -
Joined
-
Last visited
-
Days Won
183
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by drjdpowell
-
-
placement of a fixed maximal number of replicas of the element cluster on FP, and visibility of those needed (will become inconvenient for large numbers);
This will work with very large numbers of elements, if you keep the full set of data as an array and only write the visible portion of the array into clusters (where there need only be 50 clusters to fill the screen). Use a separate vertical slider whose Value Changed event triggers a rewrite of a subarray of data into the clusters, complete with disabling selected controls. One can also change colours or other attributes this way.
-
But libraries don’t need to just be a good capability to have for the very advanced programmer who has learned to use them carefully “when neededâ€. Libraries could be broadly useful at a range of ability levels and for a wide variety of things.
-
1
-
-
I'm with paul on this one. I think I said this earlier in the thread but my group ran into some of the same issues on a project and ended up in a pretty terrible state, with things like the excel toolkit being pulled onto the cRIO. Careful management of dependencies is pretty easy to ignore in LabVIEW for a while but it bites you in the end.
But these aren’t real dependancies. "A calls B which calls C†is a dependency of A on C. “A calls B which is in the same library as X, which calls Y, which is in a library that also has Z, which calls C†is not. I have no interest in managing false dependancies introduced by lvlibs.
-
1
-
-
Suggestion: can the event structure just compare New Value to Old Value and ignore if they are the same? That will filter all duplicates.
BTW, if I were doing this from scratch I would have the 3rd party app set a single (hidden) “Message†control, that would be a cluster of desired control name and control value. The “brat†would pool for new messages and then do Value(signaling) on the named control (which it would lookup in a list created at initialization of all the available controls).
-
I don’t have 2014 and can’t open your VI, but my first thoughts are to type cast the U64 array to an I16 array then do a FOR loop over the number of lines to do the chopping. Why is this data not in I16 in the first place, BTW?
-
Note that a named queue can have multiple independent references to the same queue, while the non-reentrant subVI contains only a single reference.
-
1
-
-
Local means the same application instance, so separate projects in the same LabVIEW should be remote. Though there is probably some sharing going, on given what hooovahh posted.
-
1
-
-
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 find myself in this situation a lot, where I have an Actor that inserts itself into a subpanel. I want to look at what's going on in the Actor Core block diagram.
Typically I'd stick a breakpoint there so that the particular Actor clone's BD will pop up. But in that case, the front panel also opens, which very often leads to buggy behavior or errors when the Actor later tries to stick itself into a subpanel.
Anyone have some workaround suggestions for this? I run into the problem a lot and always slug through somehow but I figure someone's got a better procedure.
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.
-
Hi, Why my software is slow? it need about 1s to insert 10 record. Thanks Boone
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â€.
-
I had assumed that if I had a reentrant VI and had created multiple instances of it, that I could insert each instance into a separate subpanel.
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.
-
1
-
-
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.
-
I’m thinking “Messenger Libraryâ€.
I sort of like Isimud
Inventive, but I don’t want inventive, I want obvious.
-
I'm using non OO based actors and I don't know the issue you are talking about. Are you you talking about when one actor will keep the application from closing? A global shutdown command that is a high priority user event takes care of that for me. One major reason I dislike the official Actor Framework is the reentrant-ness which forces you to other debugging techniques (setting break points in the VI saving, waiting for a clone to be made and stop, then being unable to remove that breakpoint while running)
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.
-
Still I trademark it "Glued Framework", (Global User Event Driven)
Simplify it to GLUE, as in “I built my application using GLUE."
-
first decide if it's a library, Framework or Toolkit (I would suggest it is a framework since you have to write custom messages)
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.
-
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
-
but I have no suggestions.
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?
-
Are you referring to the Index Array under the VArray palette? I'd recommend using a Variant to Data converting the variant, into an array of variants, then you can use the native array functions to index the values out of the array.
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.
-
The OpenG does have feature that the NI lvlib doesn't though, like getting the values of the elements of an array. The lvlib GetArrayInfo.vi only gives the element type of the array. So my code uses OpenG when necessary, and VariantType.lvlib when possible, in order to use as much native NI code as possible.
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.
-
I wondered if anyone, who has used this package in real-world applications, would kindly review it on the Tools Network.
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
individual enable of controls in array
in User Interface
Posted
Here’s a quick example of the cluster method. I did disabling of the string, hiding unused clusters, and also added some colour based on string length. LabVIEW 2013.
Cluster View into Array.zip