-
Posts
1,973 -
Joined
-
Last visited
-
Days Won
178
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by drjdpowell
-
Hmm, your right, I seem to have a misunderstanding of what this package is for; it does state that it is to allow deployment of the list of VIs without the Vision Runtime license. Yet I felt sure that I needed this in a past project to access a key VI in development mode without Vision. Must have just needed it for an EXE. Thanks for the help.
-
Is anyone familiar with what functions are included with the Vision Common Resources download. This link seems to indicate a long list of functions, many of which don’t show up for me (for example “IMAQ Copyâ€). Is this link wrong (or is there something wrong with my machine)?
-
Can Event Structures Handle Big-Data Display Updates?
drjdpowell replied to AlexA's topic in User Interface
Just to be clear, I’m talking about using a Message User Event created by the receiving module, instead of a Message Queue, and passed to other modules so they can send messages. This is different that the archetypal User Event, which is created in the sending process and passed to other modules so they may choose to register. The later is usually a separate User Event for each strictly-type message, while the former uses a weakly-typed message like the Lapdog message objects you are using. Using a Message User Event is interchangeable with using a Message Queue, and avoids the extra work of sending messages from a separate event-structure loop. I don’t really understand why your “File IO” actor is displaying “Microscope Images”, but if it needs to do UI work like that, then why not use an event structure? -
Can Event Structures Handle Big-Data Display Updates?
drjdpowell replied to AlexA's topic in User Interface
Didn’t you already have that problem? If your “Do Action A” event sends a “UI—>CTRL:Do Action A” message to your second loop, nothing will actually happen till it finishes with “Somebody->CTRL:Do Long Running Action B”. -
Can Event Structures Handle Big-Data Display Updates?
drjdpowell replied to AlexA's topic in User Interface
I routinely use User Events to receive messages in anything that is a UI component, and often in things that aren’t a UI component (so I can give them a ‘debug’ UI if needed). To me, the topmost loop you have is redundant; it does nothing other than stream the Event Queue into the Message Queue, with no ability to do any actual work (since it doesn’t have access to any state information) and it requires you to write lots of extra build-and-parse message code. Pointless. -
Does LabVIEW really suit for OOP?
drjdpowell replied to Maxwell_Peng's topic in Object-Oriented Programming
I wouldn’t think this is central to OOP. And I would tend to say there is good reason to NOT share things in this way, keeping objects with a single “owner” and doing “Sharing” via asynchronous messages. If you do want to share, use a DVR. -
Terminals and local variables don’t use the UI thread, and are asynchronous to the Front Panel controls they represent (unless you set the “Synchronous” option). Property and Invoke nodes do execute in the UI thread.
- 6 replies
-
- timed loop
- optimization
-
(and 1 more)
Tagged with:
-
There is no direct way to write a cluster. Partly this is because there is no direct one-to-one correspondence between LabVIEW and SQLIte types; in particular, a LabVIEW string can be either text of binary (SQLIte Text and Blob types). Note that it is relatively easy to wire a long set of “Get Column” into a corresponding cluster bundle (or an unbundle into the corresponding “Bind”). That is part of the reason for making “Get Column” and “Bind” property nodes.
-
Whatever timing method you choose, you will get the maximum flexibility by making it a separate loop from your actual periodic task. Have the separate timing loop signal the main loop handling the task via some messaging method such as a User Event. That way the main loop is not constrained by the timing technique; the OP’s process could be reading data every 15 sec AND saving to disk every 5 min AND updating some UI element every 500 ms (by using three external timing loops). And as a message-handler, the main loop can accept (and immediately act on) other messages than just “stop”. Meanwhile, the dedicated timing loop can be made a reusable component (as it only does timing).
-
Why would he be handling mouse-move events in his data collecting loop? Handle that somewhere else. Any finite timeout is unreliable if there can be repeated events; your 100ms timeout would fail during a mouse move. The only reliable timeouts are 0, −1, and a timeout recalculated after each event based on the previous time the timeout case executed. Added later: actually, 0 isn’t that reliable either.
-
Use an Event Structure with a 15,000 ms timeout, registered for the Value-change event of the Stop button.
-
GOOP Development Suite v4.5 is released
drjdpowell replied to spdavids's topic in Object-Oriented Programming
An ‘empty’ object in LabVIEW is just the default constant of that wire type. So you can just ask if your ‘Dough’ is not equal to the default ‘Dough’ constant. -
PRAGMA synchronous = OFF
-
Unloading VI From Subpanel
drjdpowell replied to GregFreeman's topic in Application Design & Architecture
Also, isn’t this unnecessarily complicated. You already are keeping track of the communication references to these subcomponents; now your going to have to keep track of the VI refs of their VIs (plus whatever mechanism you use to get the VI refs to the top-level subpanel owner). An “Insert into the attached subpanel” message is trivially simple. -
Unloading VI From Subpanel
drjdpowell replied to GregFreeman's topic in Application Design & Architecture
Why does each VI have a copy of the subpanel reference? I would just have the top-level owner of the subpanel just send send the subpanel ref to the chosen subView, after calling “Remove VIEW”. The receiving subView would call “Insert VI” as part of handling the message, but wouldn’t bother saving the reference. -
LV Dialog box holds Open VI Reference
drjdpowell replied to eberaud's topic in Application Design & Architecture
Getting the ref with “Open VI Ref” is blocking, but increasing the size of the pool when needed does not, so there isn’t a need to prepopulate the clone pool. On my benchmarks adding an extra clone is about 1000us, while reuse of a clone in the pool is about 100us (LabVIEW 2011). -
LV Dialog box holds Open VI Reference
drjdpowell replied to eberaud's topic in Application Design & Architecture
As a word of warning to anyone reading this, be aware of the issue of Root Loop blocking by things such as the User opening a menu. Safety-critical code must never be dependent on Root-Loop blocking functions, such as “Open VI ref” or “Run VI”; the User can open a menu then walk away. If in doubt, test it by opening a menu and leaving it open just before your critical code executes. If it doesn’t execute until you dismiss the menu then you have the problem. The simplest fix is to open necessary references once at the start of the program, and use the ACBR node instead of the “Run VI” method. -
LV Dialog box holds Open VI Reference
drjdpowell replied to eberaud's topic in Application Design & Architecture
I would suspect it is a “Root Loop” issue. I know that Open VI Ref can require LabVIEW’s Root Loop, and this loop is blocked by the User opening a menu. Perhaps a LV dialog also blocks root loop? BTW, if it is Root Loop, then a method used to get around this problem is to use a single reference to a pool of clones to do all asynchronous running of VIs. Then the ref is only acquired once, before any action that blocks root loop can happen. The latest Actor Framework’s “Actor.vi” is an example of this. -
"Rebundling" into class private data.
drjdpowell replied to GregFreeman's topic in Object-Oriented Programming
I don’t have a consistant plan, but I usually tend to assume it modifies the object (or could at some future point be changed such that it modifies the object). If I’m sure it doesn’t (and never will), then I consider removing the object output, which is the clearest indication you can have that you aren’t changing the object. One can also use the IPE structure to unbundle, instead of a private accessor method as you are using. Then one is required to connect up the output. Connecting the output never hurts. -
That might be best, and easy to do. Also easy to do (just one abstract class with two empty methods). I would have the “to” and “from” methods deal in JSON Value objects rather than a cluster in variant; the User can always call the Variant to JSON methods if they want, and they have the option of using the direct JSON methods as well. — James
-
Feedback Requested: The LabVIEW Container Idea
drjdpowell replied to Chris Cilino's topic in LabVIEW General
Have a look at JSON LabVIEW in the CR, as it is uses another container-like structure so might be similar (or not, as I haven’t looked at your code). Is your Container by-ref or by-value? Looks like by-ref as you have “Create”, “Destroy” and “Copy” methods. -
The repo is now under “LAVAG”. I don’t no why your palettes are different I’ve just noticed that I have TWO “JSON API” palettes under “Addons”, the one with two items, and full set that you see. I’ll try and investigate.
-
The VIPM package includes a palette with only the two polymorphic Get/Set VIs. Are you creating a different VIPM package?
-
What palettes are you looking at? My JSON API palette only has two items (the Get and Set polymorphic VIs).