Jump to content

Feedback Requested: CVTWeb Library "Diagnostics Thinclient"

Recommended Posts

Hi all.  Since the holidays are coming up I might get a week or two to finish up and publish an open source project I've been working on.  I was hoping to get some feedback before I start writing the documentation.


What:  An web interface to the CVT library AND a thin client for easy system staus updates (diagnostics).  I call it CVTWeb.  If you don't know what CVT is here is a white paper, but it is basically just a map data structure.


How:  The updates to LV2013 web services are really nice so they made it way easier to make this library.  That and some HTML, Javascript, CSS and Twitter's Bootstrap makes up the thinclient.  I was also inspired by this websocket post so I added them incase you wanted to push out from the web service.


TODO:  Install the CVT package below then my Beta version CVTWeb package.  Restart LabVIEW.  Go to Tools->Add CVTWeb Service to Project and that will open up a project with examples.  I tried to script the web service into a selected project, but there is no API for that currently in LabVIEW.  So if you want to add it to your own project you need to drag and drop it.  The example project is read-only so that you don't destroy it.  The examples have instructions in them.  I've tried it on Windows, Pharlap, VxWorks, and NI Linux RT, so it seems to work on all those platforms.


Thanks for the feedback and for those in the US Happy Turkey day.



Also this is a large effort I'm undergoing to explain how to make thinclients for embedded projects (a topic I find interesting).  I released this article about a month ago explaining the general theory.  Next I'm going to make a walkthrough on making embedded web interfaces.  Then finally I'm going to publish CVTWeb.  Anything else related that someone thinks needs to be addressed.  I can't promise I get to it, but it is good to know.



Link to comment

I've only read the white-paper, but I think this is a new slant on a very old idea.


In the prehistoric days,(before events and queues) we used to use "Data-pools". We'd have a 2D array global variable as a main repository of all data values and any part of the application could read from it. It was very flexible and very fast and it enabled on-the-fly configuration and was great for debugging. Of course, it had one caveat. - write races. For single writers, multiple readers it was great, but for multiple writers it had issues.. 


For UI updates it didn't matter as all indicators would only read. For controls it also wasn't too much of a problem since you just have 2x2D arrays. One for controls and one for indicators and it was impossible for the user to click 2 buttons fast enough to overwrite. But you could only have one writer updating the read array asynchronously. The next "innovation" (I call it that loosely) to address this was more 2D arrays. One for each writer and a mapping system to map the indicators to the global arrays. As long as the naming remained the same from project-to-project; this worked fine and was reusable. This however had the downside of fixing the implementation. So people would put, say, 10x2D arrays into the global even if they weren't all used since it was rare to have more than 10 asynchronous process. As you increased the number of arrays, things obviously got slower as the execution time is dependent on the size of the global and the data it contains Then. Since most projects are of a similar nature within a company, People used multiple globals of one 2D array and called them things like AI AO, DI, DO. When Queues, events and the like came along, they were abandoned since the new technology required less maintenance and were less rigid..


Looking at your LV2 global storage. It doesn't seem to address the multiple writers (READ/WITE, SET/GET is just as bad as a global, but a lot slower) but apart from that, I think it looks very much like the "Data Pool" idea with LV2 globals instead of real globals.


Am I missing something sneaky?

Link to comment

I was a little confused at first until I relized you were responding to CVT and not CVTWeb addon.  CVT is a concept very similar (if not the same) to what you call Data Pools.  I work on embedded projects mostly, so PLCs typically refer to this data repository as tags.  CVT is definetly not an idea I came up with, as it is more of a concept.  We did focus on speed, usabilty and open source though.


  As you described multiple writers makes tags less safe.  Another issue is data coherency.  That is where you can update tags in parallel processes at times that would be less ideal and cause data corruption.  A simple cases is PID control where you update PID (through CVT) in one loop and determinstically process in the other.  If P gets updated and I and D don't before an iteration of control then your going to have a bad time.  We're working on that :)


The real feed back I needed was on CVTWeb in respsct to web interfaces and thin clients.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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