Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by smithd

  1. If you really want the pixel values, you can get those (http://zone.ni.com/reference/en-XX/help/370281AC-01/imaqvision/imaq_getpixelvalue/) and then use the imaq subtract with a constant. However: one thing you'll note is that many of the analysis functions have a "mask" input. One route to get rid of the background would be to use a threshold function to get a mask (https://forums.ni.com/t5/Example-Programs/IMAQ-Threshold-Binary-Image-and-Mask/ta-p/3534077) and then feed that mask into, as an example, the histogram function (http://zone.ni.com/reference/en-XX/help/370281AD-01/imaqvision/
  2. .net on labview is windows only If you are only working on windows, .net is a reasonable tool to use. I'm using it for example for windows login functionality. There are DLL calls for that of course, but the .net wrapper is nicer. There are also .net features that don't get exposed very nicely in labview for whatever reason. Iterators can be kind of annoying as one example, and event callbacks are another...but again, easier than a DLL. Both DLLs and .net code block the thread in which they are running, so for highly parallel long-running tasks, .net would be inappropriate. Realistic
  3. Well...thats confusing. It looks like automation open claims to be able to reuse references: " If open new instance is TRUE, LabVIEW creates a new instance of the Automation Refnum. If FALSE (default), LabVIEW tries to connect to an instance of the refnum that is already open. If the attempt is unsuccessful, LabVIEW opens a new instance. " So in the configuration above it shouldn't need to create a new instance. I don't know if it will help, but to get more info maybe try timing the 3 sections of the open function (automation open, then connect, then the subVI at the end which..
  4. In the .net code you have it looks like you aren't actually destroying the objects but I think the labview equivalent is -- equivalent to if you called this in the .net version. My guess is that when you get the connection properties in the screenshot you're leaking a reference which prevents overall destruction of the main connection object thus leading to faster subsequent runs. What happens if you change your first code so that you wait to close the connections until after you open all of them? Does that go fast?
  5. They can be included statically even if you run them dynamically as popups. The normal route I go is to have a static VI reference then a property node to get the name out of that reference, which I then pass to open in order to get a dynamically launchable reference. By using the static VI reference you force labview to build the child into the caller and then you don't have to worry about where the build puts the VI
  6. Both libraries use zero indexing, so you should be able to use the same value for starting register and number of registers in both libraries. The 4xxxx (or 4xx,xxx) is not important at the protocol level. Its difficult verify whats going on because one function has a bunch of constants and the other is dynamic, but I'm assuming when your coworker tested it you've verified that: They have the same IP address and port you have They are using the same holding register start address and length They are hitting the button to make sure it actually reads the holding register r
  7. The DCAF CVT module copies data from the inside of the engine (where data exists on the wire) to the CVT -- so while the core components do not depend on the CVT, that particular package serves as a bridge. As for why the CVT doesn't have a variant type...it was proposed often enough, but somehow never happened I guess. I honestly dont remember why. The CVT includes a set of template functions and a generator for any types you might want, so that would be the solution. If you did a pull request on github I would imagine they'd be happy to accept the change.
  8. at one point NI put effort into this...I never got around to using it but its always been on my list https://forums.ni.com/t5/NI-Labs-Toolkits/LabVIEW-UI-Automation-Tool/ta-p/3521765 The downside is that its clearly abandoned. But if it does what you need..
  9. Drjdpowell's json library has functionality for breaking subclusters apart and all sorts of other useful ways of manipulating the json strings directly. If you can use 2017 its worth a look.
  10. Well, I'd suggest keeping the simulation-related cfg in a separate location such that there is no way to run with simulation cfg even if everything goes bad, but...it looks like this does what you want: https://medium.com/@porteneuve/how-to-make-git-preserve-specific-files-while-merging-18c92343826b (windows instruction in first comment)
  11. Definitely odd, revealing yet another bizarre issue in the land of user events. I will say that technically you are doing it wrong according to the help (which did not change between 2013 and 2017): https://zone.ni.com/reference/en-XX/help/371361P-01/lvhowto/design_case_for_registration/ To "modify" the registration you have to read the wire in from the left hand side inside the case where you modify the registration. Doing that alone with the null ref you had originally did nothing, but adding a registration for a null event did work. My guess, based on this, is that somet
  12. This seems like it would be pretty easy to do using a pre-build step. Is there something you had in mind which isn't solved by this? (Also, on FPGA you can do something like this using VIs to define initial contents of memory) As for the popularity of the idea, I'm actually kind of surprised the idea exchange still has as much activity as it does -- 85 whole kudos this year -- considering nxg. Anyway, some ideas in the same vein: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Conditional-Disable-Symbols-settable-in-Application-Builder/idi-p/924581 https://forums.ni.com/t5/LabVIEW-Idea-Exc
  13. Makes sense. Definitely works on RT*. You'd hear from me right away if that stopped being true . Its definitely slower than using the primitives, but its much easier to use and 90% of my data is so small it doesn't matter. The other 10% is so big (ie images, gigantic arrays) I just use binary. *with the obvious exception of that "make this string control have pretty colors" function and any similar
  14. Thats probably a better plan if you're always sure to use json. Conditionally wrapping json or xml or whatever means handling escape possibilities and when I first made the format I wanted to be open to other payload types. I dont really understand this (or the crc). why use a human editable format if you dont want people to edit it? And more generally, why not let people edit the files? you have to validate the contents anyway, right?
  15. same, although I have some header data stored in ascii\r\n format which includes a payload data version and who wrote the file, when. I manage the ini equivalent of 'sections' by creating a folder hierarchy, and maintain a history of all edits performed on a given file. my little library looks for the newest file (or the file at some specific time) at the specified subpath. For centrally driven config management I use a sql db (sqlite so far) which has basically the same structure of key (=folder hierarchy path segment), value (json string or blob), and activation time, with the add
  16. Yes, JKI got uninstalled for me as well, using the magical web downloader (vs the 20 GB isos)
  17. Actually the memory space issue was the original original reason we moved to dataflow for what eventually became DCAF. Early concepts for that library involved sharing CVT tags between plugins, which got replaced with the calling process being responsible for sharing the values via dataflow. The other big issue is that if you use a global variable, like the CVT, you run into the problem that reads and writes are not coherent for sets of values...that is, if you wish to write the cluster {value=1, time=blah, accurate=true} that would be 2 or 3 separate write actions and a consumer wouldn't nece
  18. The poor AE they had staffing the booth at NI week said it was in memory. I would normally take that with a grain of salt, but when I was evaluating it I don't remember seeing a path input for where to store any kind of database or file, so if it is persistent its a mystery to me. In memory would also make the most sense to me since it asks for a number of elements for each thing you want to store, so it probably just creates a fixed-size buffer. Not all that useful for a long term historical DB. Thats why in my post above I was suggesting some sort of 3rd-party tool for a more permanent stora
  19. I'm familiar with it. My reaction at the time was that it seemed like another black box doing tag based communication via a background service to replace the shared variable black box doing tag based communication via a background service. I'd love for the new black box to be better than the old, but I'm skeptical. It definitely appears to resolve some issues with shared variables (I believe they can be created programmatically), but its not clear how you might integrate it with non-lv applications, time will tell on performance, and time will really tell on usability, reliability, etc th
  20. I believe there is a helper as well in Darren's Hidden Gems package in VIPM, and an example of the usage in the actor framework sample project scripting library.
  21. it sounds doable as long as the top level interface doesnt change and there are no dependencies shared from exe to ppl, especially shared parent classes. Not exactly the same, plug a plugin based application worked well with a static exe and rebuilt ppls, except occasionally the ppl child class and exe parent class would stop agreeing and so nothing would load. So long as you're basically using the exe as a http client and launcher, I think you'll be fine.
  22. Thats actually the easy part, which is why I was thinking about it as an option. The specific help doc is here (https://docs.influxdata.com/influxdb/v0.9/guides/writing_data/) but basically you'd just use the built-in HTTP(s) client library in labview with the url and data string as shown on that page, essentially "my_interesting_measurement,<metadata fields> value=123.456". Also for daq.io, it looked like they had a self-hosted option, so it wouldn't be putting in 'the cloud' so much as a local server at your company.
  23. For DDS, my (admittedly also vague) understanding is that they use the DDS publish subscribe model to develop various tools which consume the data. A concept diagram (ie marketing material) can be found on this page: https://www.rti.com/products/dds and the addon product would be the database integration service: https://www.rti.com/products/dds/add-on-products Looking at it more thoroughly I think its probably way past what you need and geared towards a different use case. As for the OPC UA, you probably wouldnt need a DSC runtime license in that situation, since you're using the separ
  24. A team at NI has created an application engine which may help do what you want: http://ni.com/dcafIts a configurable plugin engine which maps a plugin (for example there is one which polls modbus values at a periodic rate) to scoped data storage inside of the engine and then maps that data out to other plugins (for example a TDMS writer). It can obviously get more complicated as you add custom logic, but I think they've been doing a pretty good job on getting that to be easier as well. If it sounds helpful, the guys working on it are very accessible so just message them or post in that group.
  • Create New...

Important Information

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