Jump to content
News about the LabVIEW Wiki! Read more... ×

drjdpowell

Members
  • Content Count

    1,440
  • Joined

  • Last visited

  • Days Won

    103

Everything posted by drjdpowell

  1. drjdpowell

    How do you model this?

    You're a bit late for this conversation, though the topic is still very relevant today.
  2. View File SQLite Library Introductory video now available on YouTube: Intro to SQLite in LabVIEW SQLite3 is a very light-weight, server-less, database-in-a-file library. See www.SQLite.org. This package is a wrapper of the SQLite3 C library and follows it closely. There are basically two use modes: (1) calling "Execute SQL" on a Connection to run SQL scripts (and optionally return 2D arrays of strings from an SQL statement that returns results); and (2) "Preparing" a single SQL statement and executing it step-by-step explicitly. The advantage of the later is the ability to "Bind" parameters to the statement, and get the column data back in the desired datatype. The "Bind" and "Get Column" VIs are set as properties of the "SQL Statement" object, for convenience in working with large numbers of them. See the original conversation on this here. Now hosted on the NI LabVIEW Tools Network. ***Requires VIPM 2017 or later for install.*** Submitter drjdpowell Submitted 06/19/2012 Category Database & File IO LabVIEW Version 2011 License Type BSD (Most common)  
  3. drjdpowell

    [CR] SQLite Library

    Tried inserting png, jpg, and bmp images (by solution 1) and they can be viewed by SQLite Expert Personal, which I use.
  4. drjdpowell

    [CR] SQLite Library

    I think your issue is the multitudes of "image" formats. There are many formats, and many conversion functions, and it is difficult to get things to work by trial and error. The webpage for "SQLite Administrator" indicates it understands JPG format, yet your attached code is converting from JPG to a LabVIEW-only flattened image format. You need to read that JPG image into a LabVIEW string, without converting it into some other format, and insert it. Look into the "Read form binary file"... (I see smithd has beaten me to it).
  5. drjdpowell

    [CR] SQLite Library

    "Seems not to work" is the vagueous description you could give, but I wonder why you aren't just saving your bmp image as a blob, rather than turning it into a LabVIEW image format (and then only storing part of that).
  6. drjdpowell

    [CR] SQLite Library

    What have you tried? Have you looked at the examples?
  7. drjdpowell

    [CR] SQLite Library

    BTW, the SQLite Statement class can be subclassed, and you could easily define your own strict-typed versions of the "Get Column" property nodes. These would just check type before calling the regular function.
  8. drjdpowell

    [CR] SQLite Library

    SQLite differs from other databases in its dynamic type system and philosophy of "best attempt at conversion instead of error". Note though that SQLite is meant as an embedded database, sitting behind an API written in another language. Types are enforceable in that API. I don't recall ever having mixed types in a column, because a table is generally only written to by one subVI, and maybe modified by another one right next to it in the same library/class. I have one client where there are four applications that access the same db files, but they all use the same LabVIEW class for access. The API even stores data points in a scaled format to take up less space, which is transparent to the application code.
  9. drjdpowell

    creating .json file

    No. You haven't given any information about your "normal" text file.
  10. drjdpowell

    creating .json file

    Yes.
  11. drjdpowell

    [CR] SQLite Library

    Save your image files in binary Blobs.
  12. drjdpowell

    OPC UA experience

    I made the Server a Client of itself, in order to get events when true Clients changed things. A bit weird.
  13. drjdpowell

    [LVTN] Messenger Library

    Here is the function I mentioned, BTW:
  14. drjdpowell

    [LVTN] Messenger Library

    View File Messenger Library An extensive library for passing messages between parallel processes. Generalizes the communication method, allowing the message sender to use the method provided by the receiver. Supported communication methods include wrappings of simple queues, user events, and notifiers, as well a more complex channels such as a TCP server and client. In addition, one can configure simple forwarding addresses (“Observers"), which can send messages to multiple destinations, optionally with modifications such as adding a prefix to the message label, relabelling, or substituting a different message. Communication patterns supported include request-reply (asynchronous or synchronous), where the reply is sent to a "reply address" attached to the request, and register-notify, where one process sends a registration message to another in order to subscribe to a series of updates. Also supports scatter-gather, the gathering of replies from multiple senders into an array of messages. An option framework for dynamically-launched VI "actors" is also provided, including example templates, which can be accessed via the Tools menu (from an open Project, select Tools>>Messenger Library>>Create Actor from Template..). An "Actor Manager" debug tool is also installed under the Tools menu. Please note that this package has nothing directly to do with the NI Actor Framework (other than both packages are influenced by the Actor Model). ***Introductory Videos are on a YouTube channel.*** Original conversation on this work is here. Now hosted on the LabVIEW Tools Network (but note that the latest version will often be on LAVA) ***NOTE: latest versions require VIPM 2017 or later to install.*** Submitter drjdpowell Submitted 11/27/2012 Category LabVIEW Tools Network Certified LabVIEW Version  
  15. drjdpowell

    [LVTN] Messenger Library

    Does your receiving actor know the exact reply address that the special sender will use? You can use addresses as unique identifiers with "equals". There is a vi in the palettes that searches an array of addresses for the reply address on an incoming message. Your design is different from ones I'm familiar with, so that may not be a good answer.
  16. drjdpowell

    [LVTN] Messenger Library

    This is Issue 9, the trickiest problem in Messenger Library at the moment. Can you try version 1.10.6, which is in the LAVA-CR (this has been submitted to the Tools Network and is working its way through the process. There is no ideal solution but this is my best attempt. Alternately, you can try renaming your Main:ActorNR to something else (assuming you don't need to launch it but are instead running it directly).
  17. drjdpowell

    [CR] SQLite Library

    The dll should be automatically included in any exe; does that not happen with you? I have not tried using older dlls, but I suspect the would work.
  18. drjdpowell

    SQLite Library

    Version 1.10.0

    8,640 downloads

    Introductory video now available on YouTube: Intro to SQLite in LabVIEW SQLite3 is a very light-weight, server-less, database-in-a-file library. See www.SQLite.org. This package is a wrapper of the SQLite3 C library and follows it closely. There are basically two use modes: (1) calling "Execute SQL" on a Connection to run SQL scripts (and optionally return 2D arrays of strings from an SQL statement that returns results); and (2) "Preparing" a single SQL statement and executing it step-by-step explicitly. The advantage of the later is the ability to "Bind" parameters to the statement, and get the column data back in the desired datatype. The "Bind" and "Get Column" VIs are set as properties of the "SQL Statement" object, for convenience in working with large numbers of them. See the original conversation on this here. Now hosted on the NI LabVIEW Tools Network. ***Requires VIPM 2017 or later for install.***
  19. drjdpowell

    LabVIEW Content Landing Page

    A new video resource is the gdevcon1 videos.
  20. Yes, DQMH is Delacor's framework, and is on the Tools Network, as is Messenger Library (which I wrote).
  21. One loop per device is very scalable, when combined with asynchronous calls to allow an arbitrary number of such loops. The details are a bit tricky, but its the most scalable way to do it, which is why multiple people have generated frameworks to do it more easily.
  22. drjdpowell

    SQLite for OpenG

    They have this Sqlite function https://www.sqlite.org/c3ref/memory_highwater.html. But I haven't implemented it (yet).
  23. drjdpowell

    SQLite for OpenG

    Hello, I’ve been working with SQLite for a logging application and I thought I might offer my SQLite LabVIEW wrapper for possible inclusion in OpenG. There are at least two other implementations out there, both with licensing restrictions, but it would be nice to have this in OpenG as I think SQLite is a major addition to the capabilities of LabVIEW. Below is a zip file; it includes a couple of examples. SQLite LabVIEW.zip LabVIEW 2011. SQLite dll for Windows (32-bit) included. NOTE: more recent version now in the Code Repository. An (incomplete) menu: Here is the block diagram of Example2: There are basically two use modes: (1) calling “Execute SQL” on a Connection to run SQL scripts (and optionally return 2D arrays of strings or variants from an SQL statement that returns results); and (2) “Preparing" a single SQL statement and executing it step-by-step explicitly. The advantage of the later is the ability to “Bind” parameters to the statement, and get the column data back in the desired datatype. The “Bind” and “Get Column” VIs are set as properties of the “SQL Statement” object, for convenience in working with large numbers of them. This package closely follows the SQLite C/C++ interface and is intended to facilitate the execution of SQL scripts, rather than provide VIs that substitute for SQL statements. Thus there are no VIs for creating tables, triggers, etc. The SQLite website provides extensive documentation of SQL and the C/C++ interface. The only differences from the C/C++ interface are: 1) “Reset” and “Finalize” do not return the error code from the previous “Step” (as this would be both unnecessary an confusing in LabVIEW) 2) The default busy timeout for waiting for a database file that is temporarily “busy” due to another connection is set at 5000 ms, rather than 0 ms. 3) I created a “First Step” VI that wraps “Step”, intended to be the first call on Step that actually execute the statement (further calls to Step increment through return result rows). I did this to allow future potential retry logic in “First Step”, and to have a clearer set of VI icons showing the difference between executing a statement and stepping through result rows. As I said, it would be really nice to have an SQLite interface in OpenG. I’ve only just scratched the surface of what can be done with SQLite (see, for example, the “Full Text Search” and “R*tree” extensions). — James
  24. drjdpowell

    [CR] JSONtext

    View File JSONtext Package for working with JSON. Uses high-speed text parsing, rather than building an intermediate representation as with prior LabVIEW JSON libraries (this is much faster). Allows easy working with "subitems" in JSON format, or one can convert to/from LabVIEW types. Uses the new "malleable VIs" of LabVIEW 2017 to convert to any LabVIEW type directly. JSON text makes use of a form a JSON Path notation, allowing easy and rapid access to the subitems of interest. Requires LabVIEW 2017 and install by VIPM 2017 or later. Original conversation about JSONtext. Now on the LabVIEW Tools Network. Copyright 2017 JDP Science Limited Submitter drjdpowell Submitted 08/02/2017 Category General LabVIEW Version  
  25. drjdpowell

    SQLite for OpenG

    I suspect your problem is not using BEGIN/COMMIT or some other way of wrapping many INSERTS in one transaction. Try looking at Example1, which inserts a large number of points.
×

Important Information

By using this site, you agree to our Terms of Use.