Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by MarkCG

  1. Yep this is pretty much what it is, as shown in that thread. I just made the message name independent of the control name. I also found that sometimes I wanted to associate a particular message name to a particular value of the control. For example: Log button becoming true sends "Start Logging" command, Log button becoming false send "Stop Logging" command. The thing I like about this is that I can handle fiddly "stateful" control logic inside XControls. The Xcontrol has an enum value and I can register a particular enum value to a command specific command message. For example, a
  2. Derp! Ok this should be attached. Yes I have used control refs to do this. Control-Value-Command Registry Example.zip
  3. Hi all, as the complexity of some of the systems I have worked on grew, I found that I could have dozens of user controls in my diagrams, handled by an event structure. Almost all of the case structure cases handled "value change" events and simply enqueue the new value and a "X changed" type command to the appropriate module or remote target. Having 80 cases in an event structure, all doing more or less the same thing seems like it's crying out for refactoring. I came up with attached class in order to capture UI command-value pairs and write them to a network stream, using just o
  4. usconverters.com Several times I have worked with folks decide that the way to build a data acquisition or even machine control system is to take a generic windows PC, install the LabVIEW dev system, and hook up a new and Ebay-ed variety of virtual RS-232 , virtual RS-485, and GPIB device, and maybe a cDAQ chassis to it. Educating them on why this is not a good idea, most of the time, is a never-ending battle which I am not sure I want to even fight anymore.
  5. Network streams or something simpler based like the STM library are well suited to commands from HMI to RT target or status updates and events from the target to HMI. For tag data, where you care only about the last value, unbufferred network shared variables are good. Doing it all as one pipe could be done, sure, it's all tcp/ip under the hood anyways
  6. I never understood the logic behind that causes the "bitfile signature does not match" message that forces recompile if you are opening the fpga reference by build specification or by VI. it caused me great annoyance as I was learning the LV FPGA side of things. The ip address should have nothing to do with it but it seems to, also when you pull a copy of the project from the source code repo it wants a recompile. Why? I think that if the hardware in the project matches the bitfile it should not complain. I just gave up and just open a reference to the bitfile exclusively. With custom f
  7. Yes deployment is a little long when using interactive mode, not too bad now with newer version of LVRT where it only deploys VIs that have changed after initial deploy. The bugginess is annoying but I have figured out how to avoid the crashes in edit time. I'm pretty sure I can reproduce on way to make LV hard crash when editing statecharts, but I wonder if NI would care if I did document it... I also was surprised you couldn't rearrange triggers and static reactions. I just decided I would never rearrange them and deal with it. That's part of the lack of polish for sure. Yes
  8. Thanks for sharing this! Now you got me on an Alan Kay video watching roll. His way of thinking abotu things really resonates with me
  9. I believe this NI addon is very unappreciated. I am using it right now to a production machine with multiple stations for a customer. No specs provided beyond asking "what should it do if X" and boy howdy-- doing things in term of statecharts is had made thinking about the problem and crystallizing the logic an absolute breeze. it is also easy to test the logic encoded in the statechart. Doing the problem in terms of a conventional LabVIEW "state machine" would be much less fun and take longer. There are of course, some bugs as you might expect for such a little used module, some ca
  10. Thank you very much for the advice ! I too had issues with connectivity-- for some reason the sbRIO was connected to the test computer with some weird usb to ethernet converter that kept flaking out. Really annoying and wasted valueable time. I had to bypass it and set up a link-local connection the normal way. The grader claimed that the " The User Interface is not adequatly developed for the UI message Handler, Network Stream to RT, Communication intilization, and error handling." Not really sure how so, as the usual pattern of an event shandler was there, network stream connected wh
  11. I took the CLED and was surprised just how much you were expected to do in a 4 hour test. I did not use a template project as the project file is provided to you.. should I have? I have used cRIO on four different projects and gotten nice reliable systems that keep ticking along for months at a time. This includes writing custom FPGA code. So I was disappointed that I didn't pass. Any tips out there from people who have done it?
  12. It's because the label is aligning itself to the X control, which contains the string control. I have a very similar X control and didn't figure it out how to make the label align perfectly. You could alway hide the label and hand align some text typed directly on the front panel
  13. are you updated to the latest compactRIO support , 14.6? there are problems with that specific module and the 906x series chassis, though it may not be what you are seeing http://digital.ni.com/public.nsf/allkb/EE21CD363EDE58E486257E0E0045C9A8
  14. It tells me I look 47. I blame the Actor Framework for turning my hair gray
  15. I never use enum state machines anymore. Just too much aggravation to edit the enum for me. Any typos are caught pretty quickly by error handling during testing.
  16. This is what I came up with in my work It is somewhat surprising that there is not an FPGA moving average express VI already provided by NI- there are IIR filters. I might even try to figure out scripting so I can create a moving average VI with a given fixed point configuration, window size, and choice of memory implementation.
  17. Hmm, for me, to the contrary everything has worked without a hitch since unseparating source for that particular project-- it solved the deployment problem I was having. It was in 2014 too. I have a feeling cause hiccups when you have dependencies shared by both the windows target and the real time target- for example you have a class that works on the RT side, and a typedef control within that class that gets used somewhere on the windows/HMI side. That's a no-no, disconnect from typedef always if you have too. I don't have conclusive evidence to back it up though. I wish I had a cle
  18. Still not quite there when working with with projects involving different execution targets in same project, like compactRIO. Deployment errors when running in interactive mode on remote target, build problems, forcing recompile doesn't always work. I'd rather just deal with the excess changes in source control than have to do work arounds.
  19. It's got its uses, it's definitely helped me simplify certain problems. Just to not be vague, hardware abstraction classes for communicating to various random instruments and hardware, loading those dynamically according to a config file, is one clear slam dunk for LVOOP to me. There are others. I definitely get very annoyed by the "everything must be a class" philosophy, with vaguely implied benefits of "reusability" or "so we can change it later" (inheritance) being the justification. Using OOP does not necessarily practically imply either benefit IME. If you can already see the who
  20. If you have multiple instances of an application that uses network streams, you can have each EXE give its stream a unique context name by generating a GUID. There is a way to get it via .NET.
  21. I wrote a small application in it just to see what it was about. I was a utility with AF that would launch multiple actors dynamically, to communicate with multiple Real-time PXI units on a factory floor and push some VIs to them. These VIs would then be executed via VI server is parallel on each unit to do a firmware upgrade on some equipment that was attached to one of PXI's serial ports. Having multiple parallel actors running and keeping track of the upgrade process for each unit, which would take 10-15 minute, was really handy. I would keep the child actor queues in a variant hash and loo
  22. Nope, it works regardless of the gap size between elements-- array =[1,10,100,1000,10000,100000] with min =99 and max=10001 works just as well, returning [100,1000,10000] . But be sure to do bounds checking on min and max, so an empty array is returned if they are out of bounds.
  23. "Threshhold 1D array" on the max and min, that gives the max and min indeces. Then grab the array subset based on that. It works only on sorted arrays, which you have.
  24. I like it. There's so many ways you can combine clusters, arrays, classes, and variant hashes.. I can recall at some time or another storing all sorts of data including classes inside variants for name lookup, iterating over arrays of classes containing arrays of classes, making arrays of clusters of arrays, many clustosauruses, etc etc etc etc. Having a generic solution is really useful and hopefully leads to cleaner / easier to interpret code.. What would be very useful too is a way to visit every element in the tree.
  25. Can't agree more with this. I find libraries full of VIs prefixed with the library name really annoying because the unnecessary duplication, and it makes it difficult to pick out the actual VI name when looking at the title bar. And if you are sticking members of different libraries in the exact same folder to where you NEED prefixes, may God help you...
  • Create New...

Important Information

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