Jump to content

SteveChandler

Members
  • Posts

    161
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by SteveChandler

  1. Did you specify the project in the step settings? I am by no means a TestStand expert and am just starting to use it but that got me last week. If that isn't the problem then hopefully someone else will be able to help.
  2. In the while loop try terminating on a Server Closed Connection error. Check for and clear that error (I think it is error 56)
  3. Has anyone ever read Vehicles: Experiments in Synthetic Psychology by Valentino Braitenberg?
  4. Many of you have probably seen this, but for those of you who do not frequent the ni forums, I wrote an Apple][ emulator in LabVIEW. http://forums.ni.com...ary/m-p/2017254 [Edit: I just stripped out the ROMs and posted the code on Sourceforge . https://sourceforge.net/projects/labviewapple2/ Feel free to criticize ] Contains sound <object width="560" height="315"><param name="movie" value="http://www.youtube.com/watch?v=l6rnUHIffOA?version=3&hl=en_US&rel=0"></param><param'>http://www.youtube.com/watch?v=l6rnUHIffOA?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=l6rnUHIffOA?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>
  5. I posted the sprinkler controller here a while ago.
  6. Thanks everybody. I think I have read about the command pattern in the past but never fully understood it. The parts that I did understand must have been stuck somewhere in back of my head because I ended up implementing it. The mini LVOOP Design Pattern KB is awesome! I have never seen those three patterns summed up so concisely like this. jgcode, I am working on something that might end up being cool if I am successful, but mostly I am working on improving my skills. If I ever do anything cool I will definitely share it.
  7. I think that I might take a different approach. The above obviously doesn't work. [Edit: I just saw jgcodes post New LVOOP Design Pattern KB. Is what I am doing below considered the Command Pattern?] What I am thinking is to separate the parent from the children. What used to be the parent in my example will not have any children. Instead I will create another "execution" class that Child A, Child B and Child C inherit from. They will have a dynamic exec.vi that takes the class that used to be the parent as their input. These dynamic VIs will modify the data in that class through it's accessors. I know what I am trying to do is not unique and there is probably a design pattern for this. The dynamic VIs look like this And just for reference here is the "Get Type" VI in the first image.
  8. Because I need to keep the state of the parent for each call to the dynamic VIs. Something similar to this:
  9. I have a class with some attributes. Based on an external integer input I want to execute an algorithm to manipulate the attributes. In the simple example the parent class has a string as it's private data. If the external input is a 0 I want a dynamic VI to store 'Child A' in the private data, 1 stores 'Child B', and 2 stores 'Child C'. The dynamic VIs take no inputs as shown. I got it working. I had the target and reference reversed! I attached the project. Is this the best way to accomplish this type of thing? Children.zip
  10. Thanks both of you. I think I understand. drjdpowell, I am just wiring a constant to the write accessor. All the children look like this I want to select a dynamic VI to execute and modify the parent data based on an index value.
  11. Hopefully the image explains my question pretty well. Can anyone tell me why this doesn't work? What is the correct way to determine which child to cast to based on an external index selection? Do I really need a case structure with the child class constant and a to more specific class for each child?
  12. Do you ever create a control or indicator on a front panel by copying an existing one rather than going to the palette? Maybe you set a bunch of properties on the original and want to copy from that so you don't have to set them again on another control. What is the very first thing you do after copying a new control? You edit the label to give it a new name. But after you make a copy the control is selected and not the label text. This idea is to select the text in the label after making a copy so that it is ready to start typing the new name. About ten percent of the time that I double click the text to select it all I end up turning off size to text. Grr..
  13. I have not had any serious problems since upgrading to LV2011. 2010 would crash on me when doing anything with a lot of classes. But what I did not realize is that if I use a class in a library then all classes get loaded into memory. I have some libraries with a lot of classes in them and now have to think about breaking things up somewhat. Again, it has not proven to be an issue yet but I want to be proactive. I have a development system with lots of horsepower and ram but the applications get deployed on systems with fewer resources. I use the factory pattern to load a preconfigured child class of an abstract parent because I didn't want to load all of the classes. But the parent and children are all in the same library so I guess that defeats the purpose. From a library standpoint it makes sense (to me) to include all those classes in the same library. Do you have any specific guidelines on what goes into a library as far as class hierarchies go? Is there any way this could change? Could it be possible to load pieces of a library without loading the rest? I ask because maybe it is something for the idea exchange. I don't want to post it yet because I don't know if it is a good idea or if it is even doable.
  14. The best way in my opinion is to obtain your CLD. Being able to do that means that you are a pretty good programmer. If that is not an option for you then you can look at the example material and checklists. Do the sample exams and post to the certifications board and ask for feedback.
  15. See this thread on ni.com. Some good comments from Ben and a link to another thread. In those threads you can find links to easily contact your representatives online. A simple "I wish to express my sincere opposition to SOPA and PIPA" is all it takes. Beleive it or not but these politicians actually do not want to piss you off *. They actually want your vote. * although they are not doing a very good job of that with an 11% approval
  16. I really enjoyed the Advanced Architectures class in Austin. Nancy Hollenback is an excellent instructor if you are lucky enough to get her! However advanced is relative and it sounds like you wouldn't get as much out of this as I did. AQ, you should add the Actor Framework to one of the courses! Or maybe a separate class on just that. Maybe at least an excellent webcast like the LVOOP webcast...
  17. Usually learning something new leaves me feeling all warm and happy. In this case, not so much!
  18. That actually makes a lot of sense and is what I thought but... ouch! I have only ever posted original example code, or modified something that I downloaded from there in order to try answering a question. But I don't think many people pay much attention to that.
  19. But what happens with examples that someone creates and posts on ni.com in which they used some OpenG or GPL? Surely that doesn't grant everybody the right to do with it as they please. I think that the laws are suffering from the legal equivalent of code rot. I have heard of tax situations where you have only two choices to make, each of which violates a different regulation. I wish I could remember the details.
  20. If I understand correctly there is no ambiguity on copyright. The creator of the work automatically owns the copyright. The murkyness is in licensing. If I create an original work and post it to the NI forums I own the copyright and grant a perpetual license to NI that allows them to do what they like with my copyrighted work. My only compensation is usage of their site. That seems simple enough. Where it gets murky is when someone uploads something they didn't own the copyright to. What if I upload an example to the forums that uses an open source toolkit like OpenG? Surely it is OK to distribute OpenG code but NI cannot violate the BSD license. That example is too easy. What if it is licensed under something more restrictive that allows distribution such as the GPL? No wonder lawyers always win.
  21. Can't kudo it because it was declined. I see it was pretty popular there and is also popular here on Lava. When I started using LabVIEW I used icons. Once I gained a lot of experience I switched to the more popular small terminals. Later still I switched back to icons influenced greatly by your arguments in the link you provided. There just are not enough controls on any of my diagrams to worry much about the space savings. As for straight wires I just gave up long ago. You can't wire the small terminals to the inputs of a multiply prim without bends for example so it makes no difference in that regard. It is impossible to code in LabVIEW without wire bends so I just quit worrying about it. I do try to limit the number of bends to two at most. Since it is just not possible to avoid wire bends with or without icons that argument doesn't go very far. The only things I know of that you can wire a vertically compressed stack of small control terminals to without wire bends is another stack of indicators or bundle/unbundle by name. You can't wire them straight to adjacent subVI terminals except in one ironic situation. If you deselect view subVI as icon and drag down the nodes so it looks like a bundle by name or more accurately like an express VI. How many people knew you have the option NOT to view a VI as an icon? Does anyone do that? As for quickly identifying if it is a control or a VI, well they just look like controls and I can immediately tell by where they are located. You just get used to a particular style after a while I guess and anything else just looks weird and wrong. There are two situations where I regularly show small terminals. If there is a reason I need to put the terminal in a loop or something or if it is not on the connector pane then I do not show it as an icon. I don't know where I picked that up and just realized that's what I do.
  22. Johnathan, For some reason I never thought of the first one. I will probably go with the last one. I will probably use an INI configuration file that has a parameter for which type of device and it's settings. Awesome.
×
×
  • Create New...

Important Information

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