-
Posts
1,986 -
Joined
-
Last visited
-
Days Won
183
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by drjdpowell
-
Out of memory error when using Picture Control
drjdpowell replied to Neil Pate's topic in User Interface
That queueing behavior is a know issue with XControls, which are running even when the VI is stopped, so it may have nothing to do with the picture per se. -
I asked a similar question a year ago. I decided on PostgreSQL, though my project that needs it was put on hold.
-
I’m using JSON for test record storage. That can be stored locally, but can also be easily loaded into a JSON-aware database (including SQLite, Postgres and MySQL). Then one can query against particular items in the JSON. I’ve done this with the JSON_tree function of SQLite and it worked quite well.
-
I had a brief look at Orleans last night. Very interesting, but it brings up a warning. Most “actor” programming out there has been developed to handle distributed software-only applications on large numbers of interchangeable servers. Think 20,000 Halo5 players and 2 or 3 Microsoft server farms. We, in LabVIEW, are more likely to be dealing with a small number of not-at-all-interchangeable pieces of physical hardware. We don’t have the option of handling an error by restarting to finish the job on a different server. So the features of Orleans “virtual actors” sounds very interesting, but not necessarily that applicable to hardware-controlling applications. I would still look at Akka if I were not doing LabVIEW.
-
You need to upgrade to the latest 2017 version of VIPM, as that's what I used to build the package.
-
Latest 1.4.4 version adds a set of "Quick Timer" probes. These probes are intended to support rapid identification of slow points in code. They are very simple probes that chart the time since the previous call of any other Quick Timer probe. The time uses the High-Resolution Timer, and the probes are simple enough to execute in roughly 10 microseconds, so one should be able to usefully time sections of code that execute as fast as about 50 uS. Use is very quick, too, as one just adds probes along a chain of actions. Each probe charts the time from the previous upstream probe. Currently there are probes for Strings, Objects, Variants, I32s and the Error Cluster, and you can mix the types. Below I'm using the Object version to time SQLite actions, but I could have put some of the probes on the error wire instead.
-
Not really an “inspiration”, but I do try to study Akka, and it does have similar concepts to Messenger Library, and seems one of the most popular “Actor” frameworks, so if there is a C# version of Akka then that seems a good route.
-
I use the tool from here, which is probably similar.
-
I use Hg, with TortoiseHg client, and Bitbucket to host the central repos.
-
The 1.7 version just added include two significant improvements: — “Segmented Control”, which is an improved “Selection Buttons” with divider bars and better spacing to get a clean look (thanks to Christina Rodgers from NI). Previous version had one-pixel gaps. — Improved buttons (motivated by the techniques discover with the Segmented Control) that maintain a rounded-rectangle boarder in their hover and ON states (the previous version lost its rounded-rectangle shape in those states). This gives a much better look on hover. Also allows the ON state to have its colour changed (also possible with the Segmented Control). It can be a bit confusing learning how to colour these controls. One has to click on the outside boarder to colour the OFF state, and inside the boarder to colour the ON state. Coloring inside the boarder will colour the ON state even when the control is OFF, due to weirdness of the system button’s treatment of colour.
-
SQLite's DATE() function works on text formats, including the text format this library can write, but not the Blob format (which is the LabVIEW binary timestamp). You can easily search by time by calling SELECT COUNT(*) FROM Results WHERE LVTime>=? and LVTime<? and binding the two end times. Bind the end times with the same format that LVTime uses.
-
Hi Max, The actual bug, I think, was that “Step.vi” was ignoring errors outside of 1..99. It has a case structure that only passes those codes to the error-handling subVI (written, originally, because 100 and 101 are not errors). I have changed it so that the extended error codes are now passed (see version 1.7.3 just added to the LAVA CR). I tested it by making a foreign key error and it now works.
-
At some point, when everyone has ridiculously high-res screens, we won’t need antialiasing anymore.
-
FYI, here is a talk I recently gave on creating some of the controls in Flatline.
-
Nice work. Though the problem with using vector-graphic icons in LabVIEW is the lack of antialiasing, especially for small icon sizes. A PNG icon, if kept at original size, looks better.
-
I've run it on an sbRIO (NI Linux). You have to install SQLite first using opkg.
-
Note, the latest version, 1.7.2 just posted, includes a “Load Extended Math Functions” method, which loads an SQLite extension dll that adds a large set of math functions to the very limited set in standard SQLite. The functions are: Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr, padc, strfilter. Aggregate: stdev, variance, mode, median, lower_quartile, upper_quartile. Tested on Windows with LabVIEW 32-bit. Should work with 64-bit as I include the dll compiled with both witnesses, but I have not tested. See the provided example.
-
Ah, so the issue is that an actor both replies with an error message, and publishes one. One possible solution is to say that only one actor should “own" the error. If actor_a asked actor_b to do something, and an error occurs, then actor_a is the one responsible for handling/reporting it. You can do this by changing the error handling case to only publish the error message if their was no return address attached to the original request message. Thus you Reply OR Notify, rather than Reply AND Notify, and there is only one error message.
-
Hi Max, I just use the message translation for errors, as well as other messages. There is more than one way to do it; a simple way is to just register for all errors and relabel the messages. For example, here I launch a "Simple UI" and relabel its error notifications as "Simple UI --> Error". Then, in the case that handles that error (as well as differently-named error messages from other actors, I just attach the message label the the error description, so that the User knows where the error came from. Then, in the case that handles that error (as well as differently-named error messages from other actors) I just attach the message label the the error description, so that the User knows where the error came from.
-
Yeah, but some of your room types are complimentary and some are not. You’d have a kitchen and a bathroom in your house, but not a modern kitchen and a 19th-century kitchen.
- 14 replies
-
- dialog box
- labview
-
(and 1 more)
Tagged with:
-
By "Producer/Consumer”, do you mean the simplest interpretation of “you can have a loop that consumes elements from a queue that are enqueued elsewhere”**, or the application of that in many NI examples of a “Producer” loop that receives Events and send enqueues messages to a second “Consumer” loop (which also enqueues messages to itself), as in the “Queued Message Handler” or “Continuous Measurement and Logging”? It’s the latter architectures I find poor^^. A better architecture is to have a “main” loop that is based on handling Events (the JKI “statemachine” template is a good example), with blocking operation like Dialogs handled in a small, simple, specialized parallel loop, that sends its results back to the main loop. ** A very important concept but not, by itself, enough to be an architecture. ^^ a pet peeve of mine; I’ve actually given talks on weaknesses in these examples (link)
- 14 replies
-
- dialog box
- labview
-
(and 1 more)
Tagged with:
-
Personally I recommend against using NI’s “producer consumer” stuff as a guide. Both your UI loop and your PLC loop need to both produce and consume information.
- 14 replies
-
- dialog box
- labview
-
(and 1 more)
Tagged with:
-
Mine are built in to Messenger Library, the framework I use. A video on them. But separate UI and PLC loops might be a better option for you.
- 14 replies
-
- dialog box
- labview
-
(and 1 more)
Tagged with:
-
You need some kind of parallel structure so your dialog can go on in parallel to your hardware handling. I actually use a special version of dialogs that are asynchronous and send their results back as a message, but the more common way is to have a separate loop of some sort.
- 14 replies
-
- dialog box
- labview
-
(and 1 more)
Tagged with:
-
You can colour it whatever you want. I just copy-pasted the green one a couple of times and changed the colour**. I just wanted to make sure people knew that, as most custom control sets available on the Tools Network are based on PNGs, which cannot be recoloured (and don’t resize well either). I’m trying for resizability and recolourability. I include the “Google style” checkbox, because it is nice and fits well with other Google Icons, but it is not resizable or recolourable, unless you manually swap out the icons with new ones from materialdesignicons.com. **Note: it’s slightly tricky to change the colour, as the checkmark’s invisible containing box blocks the colour tool from affecting the box underneath, unless you click near the edges. Unfortunately, the checkmark isn’t recolourable (it’s a vector graphic imported from LibreOffice).