-
Posts
1,981 -
Joined
-
Last visited
-
Days Won
183
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by drjdpowell
-
No. Only by custom formatting the numbers into JSON yourself. I often use single numerics, as 7 decimal places is more reasonable looking.
-
Googling suggests PQ should be threadsafe: https://www.postgresql.org/docs/9.1/libpq-threading.html
-
My mistake. There is an SQLite on Linux RT conversation also going on right now and I mixed the two up.
-
SQLite is thread safe unless it is changed from the default "Serialized" mode: https://www.sqlite.org/threadsafe.html
-
It is difficult for me to give good advice without really understanding the project. Some random thoughts: Where are the performance bottlenecks? The first thing I would do is prototype and benchmark the steps and get a feel for what are time-limiting, high-CPU steps. Be wary of designing a complex custom communication pattern "for performance" before you understand what and where the performance issues are. How long does it take to convert your IMAQ image into a DBL array, for example? You might find that effort on a custom queue system is better spent on some other area. Remember that you IMAQdx task is already an asynchronous actor-like thing, with a buffer of images. I often see people placing importance on the loop "taking data" piping that data to an async analysis loop, when really the IMAQdx or DAQmx task is really the one taking data. Also note the design pattern used by IMAQdx Events, where the "Frame Done" event doesn't contain the Image itself, but tells one that an image can be read from a separate queue (ring buffer). If you find you need a custom queue for data, you could consider using this pattern. I'd also try and experiment to see if I could have more than one loop pull different Frames off the IMAQ ring buffer at the same time, as this gets parallelism working as early as possible. If you are working with reference data, either IMAQ images or DVRs, then 75 messages per second is not high, and I personally would just use the standard Messenger Library Actor Event-Notification Messages for passing references to the data, at least at first. Design for simplicity and add complexity only later if your performance benchmarks show value in it.
-
Brute force. I suck at scripting. I add 20-30 more cases every so often. Maximum possible with this method is 255. This VI is part of the "JDP Science Common Utilities" vipm package, BTW, so one doesn't need to install JSONtext to use it. Originated in the conversations on this idea: Convert an Array of Variants into a Cluster. I wish NI would just implement that idea so this stopgap would be unnecessary, so please kudo that idea. I used to use OpenG Variant Tools a lot, but replaced them with the newer NI functions once they became faster (about LabVIEW 2012, I recall) and I had this workaround. The only missing functionality from OpenG is the ability to set the name of data in a cluster (the above SubVI create a Cluster with generic element names; I decided to just live without that.
-
What kind of data and data rate?
-
My own UIs, when I polish them, tend towards mostly white. I could give NI some suggestions on how to improve that UI, but I wouldn't change the basic whiteness. Although my UIs are graph heavy, which I find look better as all white. In a UI whiteout graphs the reasoning is less strong.
-
Theoretically, there are no roadblocks to developing it to work on RT. See the SQLite Library package, which has conditional disables to point to the .so on Linux RT, as an example.
-
Poll: Should the CLA Exam require applied knowledge of OOP?
drjdpowell replied to Mike Le's topic in LabVIEW General
I note that even though I created a framework, Messenger Library, I did not re-architect any existing project using my framework, but instead just used it to add new features to those projects. Then I used Messenger Library for all new projects, armed with actual experience. Trying to rework the entire architecture of a large project sounds very expensive and risky. -
Serial Communication non-reentrant and reentrant
drjdpowell replied to wohltemperiert's topic in Hardware
You could also use a DVR, or similar mechanism, to manage access to a com port, instead of using a non-reentrant subVI. -
Try just taking out the generated column. Those were added recently, in SQLite 3.31.0. If the NI Linux package for SQLite is an earlier version than that then it will throw an error at the Create Table statement. What error was given? The error should have given useful debug info.
-
Any reccomendation for tools to get started with OOP?
drjdpowell replied to Matt_AM's topic in Object-Oriented Programming
You need see past your specific motor types to think what your generic motor needs to do. Is it returning configuration info? That can be JSON, rather than a typed cluster. Or a Variant, or an object of a "config" subclass. My advice is to NOT learn OOP with a Motor Parent class unless you have enough experience with different motor types so that you can form a solid view of what a generic motor does. -
I'll have a read, but that looks a bit more complex than I have the time for. I will just do a simple Messenger-Library-only service discover implementation.
-
Another possible service-discovery design is a central broker; an actor with TCP Server at a known IP/Port that all services connect to to register their location, and to which clients connect to lookup services.
-
A beta version is now posted: https://forums.ni.com/t5/JDP-Science-Tools/UDP-Messengers/td-p/4099792 This is of the UDP comms itself; haven't done a service-discovery implementation yet.
-
https://bitbucket.org/drjdpowell/jsontext/issues/68/report-issue-converting-a-array-of
-
Malleable Buffer (seeing what VIMs can do)
drjdpowell replied to drjdpowell's topic in Code In-Development
Decided to update this to 2020 and release (this is 0.3; I never posted 0.2): jdp_science_lib_malleable_buffer-0.3.0.8.vip -
Note: I've also been thinking about UDP Messenger functionality, and am interested in people's use cases: https://forums.ni.com/t5/JDP-Science-Tools/UDP-Messengers/m-p/4099792#M17 The use case I'm interested in is discoverability on the network. So, allowing actors on different machines to announce their existence (ip address and port) via UDP, so that a TCP Messenger connection can then be established. This could be built in to the new Reconnecting TCP Messengers.
-
Discover LabVIEW tools - Have you tried VIPM.io?
drjdpowell replied to javier_r's topic in Announcements
I don't think they did that. There is a couple of my lava packages on there, but I explicitly uploaded them to VIPM.io -
Strange Behavior Checking Running State of VI
drjdpowell replied to GregFreeman's topic in LabVIEW General
Do you use any DVRs? I believe quite a lot happens when the LabVIEW execution system changes a VI from "running top level" to "idle", including destroying any references created by that VI. Not sure what happens if a DVR that it owns is currently being accessed by another VI; I assume it must wait for the DVR to be released before finishing teh transition to "idle". -
Unfortunately, the NXG Web module lacks both recursion and VIs for determining the data type inside a variant. This makes porting JSONtext to it very difficult.
-
SQLite Library Beta: Parameters in "Execute SQL"
drjdpowell replied to drjdpowell's topic in Database and File IO
Working on Idea (1) https://bitbucket.org/drjdpowell/sqlite-labview/issues/12/add-an-execute-sql-statement-multiple -
SQLite Library Beta: Parameters in "Execute SQL"
drjdpowell replied to drjdpowell's topic in Database and File IO
That's sloppy on my part. Arrays should not be supported at all and that should throw an "Unable to Bind Arrays" error. The code for that is in the Disabled case of "Parse Parameters (Code).vi". I was experimenting with the idea of allowing U8 Arrays as binding as BLOBs, and I seem to have not undone my buggy experimental modification. -
SQLite Library Beta: Parameters in "Execute SQL"
drjdpowell replied to drjdpowell's topic in Database and File IO
That example isn't broken for me in LabVIEW 2020. What happens if you delete the broken wire and reconnect?