Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by GoGators

  1. Matt Pollock working for NI Sys Eng group did a presentation on JSON RPC in the CLA summit 2 weeks ago. He showed the beginning of the JSON RPC example. If we get some more time we can continue to put it together. Just looked up JSON-WSP. Essentially SOAP or some other RPC. That could be cool but would require making an editor for the specification generator. That could take a while but could be pretty slick. The nice thing about JSON RPC is pretty simple.
  2. Might I make the suggestion. For your command/control I have switched to entirely using Web Services. For streaming of data you can either use the same web service (not really steaming but data on request), or TCP/IP. I make this suggestion because Web Services offer a lot advantages. Advantages: The absolute biggest one for you is connection management. In multiuser applications where users can drop in and off a network building a multiconnection management TCP engine can be very tedious. The web service manages ports and keeps user requests and responses organized for you. Next you get free security if needed. It has mechanisms for authentication and encryption. The last big one is crossplatform. You won't be locked into using LabVIEW on the client side. Hell you could even test your application from a web browser. Disadvantages: In my testing you can only do 20 requests/sec. That is for all users. For command response that typically is not really a limitation. For polling data off the cRIO it might be. The amount of data throughput is actually quite high though. So you can pump many MB of data though the web service. The second biggest disadvantage is that the LV examples are atrocious. We're working on that. In fact my team is working on a side project to make JSON-RPC to work.
  3. NI week approaches. I'm doing a session on "Web Tech for Test and Automation" on Thus @ 2:15. During it I'm going to show off some open source LV Web Service code. If anyone wants to give feedback you can find the reuse code here. Any feedback is appreciated. It requires installing 3 packages and LV 2013 or later. Cheers.
  4. I assume this is on a real-time target because of where the question was asked. User events are supported on real-time targets, but I don't use them that often because of the other options of queues and FIFOs. So you want to have a deterministic loop doing PID, but you want also be able to send commands to it (like setpoint) I assume. I haven't used execution trace to look at it, but using an event structure is going to make it jittery (don't know by how much). Personally I have used RT FIFO of type U8 array with the array size fixed to the largest datatype. The Create RT FIFO has an input where you set the array size. This will decrease any chance of buffer allocations. Also I would use the Timed sequence structure. It puts the loop in a priority thread, but has less overhead than the timed while loop (10% < CPU).
  5. 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.
  6. 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. EDIT: 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. ni_lib_cvt- ni_cvt_web_addon-
  7. Just came across this port. Sys Eng at NI is interested in zeromq and rabbitmq. We've been playing around with both and are considered making an open source library if it fits a need. One of the SEs even built it for the cRIO-9068 platform for alliance day to talk about reuse on NI Linux RT. Don't count us out yet
  8. Could you post your node class? I am not sure how your linked list solution could move both directions if you just embed the next and previous node directly in the current nodes data. A quick picture and I'll have the 'aha' moment. The DVR is just a crutch for not having a pointer, in a problem that I believe requires one. If the problem was unidirectional (top to bottom traversing) I think dataflow is the way to go.
  9. Yeah, when I made that it was entirely a workaround. I experimented with a few solutions and that was the one I liked best. Here is a really basic project that shows how to do what you want and it uses properties to make it look less janky.
  10. You need a DVR tree when you need to do bidirectional operations. That is pretty common when you are modeling a real-world system like Marie is. Think of a family tree. Family Tree class contains all the family members. Essentially you traverse the Family tree until you find the family member you are interested. Then you can query who that member's parents, uncles, children are very quickly. This rocks if you need efficent code on a system that you understand well.
  11. I'm pretty sure since LabVIEW 2009 there has been an HTTP Client in LabVIEW. I found it in LV2010 Data Communication ->Protocols palette.
  12. Depends on you application, but I like using the LabVIEW Web Services. They provide an interface over http which I know IT type people really like. If you want to learn more I would look over help for web services. There are also some examples in the LabVIEW example finder.
  13. I'll yield that you know best. I know x-server has gotten me in the past, but I would not call myself a web-savvy developer. More a dabbler.
  14. I'm not sure if it is that easy. I am pretty sure the web page must be hosted as a static document in the web service. Most modern browsers (Firefox, Chrome, and maybe IE) prevent cross-server requests, which have the potential to be dangerous. I would start by making a hello world HTML document then staticly adding it by following these directions http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/ws_static_content/. Then you can use ShaunR's information. If you really want to do an AJAX call simply I would look over jquery library. That is how I learned basic web page development.
  15. I think those differences come from the fact we have access to both the read/write API of the queue. We only have access to the read portion of the event structure. Using the ActiveX node means we retake the write portion. Once again that is because when the event is triggered the writing potion of the event writes to the queues of all the subscribers event queues.
  16. An interesting API was recently discussed with me. Apparently you can use the ActiveX/.NET register event node to register standard LabVIEW UI events (through UI refnum). Why might this be interesting you might ask? Well for a long time I have thought that the deviation between queues/event structure was unneeded. This suspicion was reinforced when the topic came up in the CLA summit. The queue and the event structure have a lot of overlap. The question is should the two implementations be merged? I've talked with some who think that the event structure is more data flow oriented, but I am not entirely convinced. Just so you can test it, here is some example code I posted to benchmark the callback API (ActiveX/.NET) and the dynamic event mechanism CBvsES.zip
  17. Nice discussion. I would like to add that an easy way to determine a decoupled UI and engine would be if you could test the engine without any UI in the first place. If you have an automated test bench for your engine that does not use VI server to generate UI events then you probably have a loosely coupled UI.
  18. Et al, I had an opportunity that required me to learn VS Silverlight, which in turn meant I had to learn C#. While I was learning good programming style I came across the Observable pattern and framework classes. Very interesting. For those that don't know it here is the wiki. Here is what I think is the most common use case: (1) You have a business model object. The business object is called Observable. The business object consolidates all data that makes up your application into a convenient location. (2) Other pieces of you application (typically other objects) will register/unregister with the business object to request updates when the business object gets updated. The objects that register are called Observers. (3) When the business object changes the Observers are notified and handed relevant information from the business object. (4) The observer takes the relevant info and manipulates it the way it wants. The most common use is for UI. Your business object changes and the UI object which has registered to it takes the new data and displays it in an original way outside the knowledge of the business object. The bonus is a very loosely coupled UI and Data. Just wondering if anyone has attempted?
  19. Not sure about what version you are using, but in LV2010 there are ways to assign NI-Auth parameters to each of the web methods. It is in the web services build under the "URL mappings" section. That is by far the easiest. But the browser would have to have silverlight, which the NI-Auth client uses.
  20. Hi Olivier, I was the SE that put together the DevZone article Supporting Relational Databases in LabVIEW Realtime. I am glad to see someone making a commercial product out of SQLite. The only reason code exists for VxWorks targets is because an intern needed it for his project before going back to college. I cleaned it up for example purposes. I am glad you are supporting Windows and Linux, but it would be very interesting if you also supported real-time targets. As it was previously mentioned, on general purpose OSes, there are typically quite a few options for databases. Although SQLite is light weight and fast, most customers want an enterprise level database connectivity. But when it comes to RT targets, light weight and fast are imperative. That is why SQLite is used heavily in embedded targets (like cell phones), and is very attractive. As a side note, I would test your toolkit on a NI Real-time controller running PharLap (any PXI system). PharLap is a stripped out version of Windows, so the toolkit might work as is. Might be another selling point. VxWorks would require you to look at the code in the article. Cheers
  21. Have you tried the Performance and memory profiler. You can profile the memory and determine which VI sucking up the memory.
  22. Not talking from NI VIewpoint (just a lowly Systems Engineer)- That sounds like an Idea Exchange vote. I will +1 you if you put it there. But realistically the user base would have to be huge. Creating programming abstractions is a large task which needs a large use-case in order to be implemented from a business standpoint. Think about the amount of effort that went into Statechart Module.
  23. Finished presentation prep. I hope ppl love lists, trees, and graphs.

  24. Done and done. Never done a source forge project, but luckily I have been using SVN. I think I added it correctly.
  25. I posted some example code on NI Community that implements linked lists, tree, and graphs using LVOOP and DVRs. It can be found http://decibel.ni.com/content/docs/DOC-12668 . If anyone is attending Alliance Day I have a presentation on it called Applications of Advanced Data Structures in LabVIEW. As a bonus I use the base classes to make a Priority Queue, solve the travelling salesman problem (as much as it can be solved), and find the best path between point A and B. For fun there is also a sudoku solver. I left it community so as anyone can add onto it. If there is a particular problem someone wants to see solved, and it has common uses, give it a request and I might have time to make it before NIWeek. This might also be a start to LapDog.
  • Create New...

Important Information

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