Jump to content

SteveChandler

Members
  • Posts

    161
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by SteveChandler

  1. I have two devices. One has an RS232 interface and the other has an Ethernet interface. The API is identical. They accept the same commands and return the same responses. The only difference is the hardware interface. I have a parent class with a dynamic Query.vi method which is overridden by a serial child class and an Ethernet child class. The parent has a bunch of static methods that send commands to the query method, parse the results and return the data. Easy stuff. However I can not figure out how to create a dynamic Initialize method since one takes a VISA resource name and baud rate and the other takes an IP address and Ethernet port. Different connector panes. All I can think of is to put both the serial and Ethernet configuration parameters on the connector pane but that seems sick and wrong. The way I am doing things works. I have a static initialize method for each child. But that does not allow me to only load one child class into memory. It's not a big deal and is more of a curiosity.
  2. I have a question. What is the best way to handle multiple instances of a slave? Specifically I want to write a slave loop that does communications with an RS232 device but I have at least two of these devices. What I am not clear on is how best to handle slave responses in my mediator loop. The slaves will send messages on the output queue but how do I differentiate between the slaves so I know who (which instance) sent what? One thing I was thinking is to maybe give the slave loop a name property. The name would be set when the slave is created and become part of the response message name. Cases in my mediator would be something like: SerialDevice:DeviceA:Response SerialDevice:DeviceA:Error SerialDevice:DeviceB:Response SerialDevice:DeviceB:Error
  3. I have been using the LapDogAPI Messaging library along with the Slave Loop pattern posted by Daklu. Recently I have been looking into the Actor Framework and do not yet completely understand it. Conceptually what is the difference? I know there are significant differences in how they are implemented and that the Actor Framwork dynamically launches a reentrant VI. But could the slave loop pattern be considered kind of like an actor framework? The thing I really appreciate about the LDM is it's simplicity. What are the main benefits of the Actor Framework? At the highest level aren't they both just loops with input and output queues with an object as the datatype?
  4. I am just now seeing this today. Congratulations!
  5. I have done this before. The familiar but unlabled blue wire is my mediator loop.
  6. A whole bunch of extra programming IS an ugly solution Less is more. But I know what you are asking and am guilty. I can't really give any specific examples right now.
  7. I still can't find my battery but I will admit that I didn't really look very hard. It isn't under the hood. But I mostly that is an excuse to post this other Prius video. <iframe width="420" height="315" src="http://www.youtube.com/embed/loJ60LOCZaw" frameborder="0" allowfullscreen></iframe>
  8. It only costs $99 for a CLAD exam through Pearson VUE and I don't know if NI gets any of that. It costs $299 for a CLD or CLA exam which lasts four hours. Then there is the time for two engineers to review and grade it. And don't forget the administration. I don't think there is a lot of money to be made in certifications. Maybe there is some profit from the courses to prepare for these exams but I am guessing it is not a whole lot compared to NIs core products.
  9. A developer should be reasonably fast and so should an architect. But coding speed should not be an overly strong indicator of effectiveness. It can take a reasonably skilled programmer 20 minutes to create a moderately complex front panel. That is a big chunk of the four hours and it does not indicate any insight or skill - the "answer" is right on the exam and you only have to copy it. I took the old format exam and thought the complexity was very reasonable but I that NI should add an hour to complete it. With the new format four hours is probably perfect. Having to create everything from scratch (even though the answers were given) put too much emphasis on speed. Looking at the four examples the front panels are somewhat similar in complexity. Now NI can create exams with a wider range of front panel complexity without being unfair.
  10. I don't want to change the subject since I am enjoying this very insightful debate. There are times when a global the perfect solution. I am sure most of you have seen this but for those who may not have. Modified version of this image from Broken Arrow.
  11. It seems that NI has changed the format for the CLD exam. They give you a USB stick with some VIs and controls to get you started. Nice time saver! Saw here. Does anybody know if the CLA exam format has changed? I saw something in the prep guide about classifying requirements which is something I did not have to do on my failed attempt.
  12. Wait. Are you saying the DETT software that I just bought for LV2010 is now included with LV2011?
  13. Top level VI - no controls or indicators at all. Function loops - the thing on the bottom left of the above VI with a big green arrow. The GUI. One of the VIs in the above VI.
  14. Thanks James for the excellent writeup on units. I will definitely consider using them more after reading that. It seems like a pretty powerful thing that I have not been taking advantage of but probably should. Copy and paste error. I fixed the link at the top.
  15. I have not used units much but I see why they are different types. You get a broken wire if you try to multiply volts and temperature but you can multiply volts and amps. Pretty cool stuff for preventing bugs. [Edit: Hah. I told you I have not used units much. I just tried and indeed you can multiply volts and temperature. You end up with a new unit entirely s^-3 m^2 kg A^-1 K. It turns out that 5 degrees Celsius times 6 volts is 1668.9 of whatever those things are. Yea more trouble than they are worth )
  16. I think I can figure out most of it. An example would be helpful especially with the check for add other objects. I will try creating it myself before looking at the example though. I just started playing around with scripting and really want to learn about it. I have had lots of fun writing code that writes code but only with, eh.., scripting languages. It really is too bad that LabVIEW scripting requires the development environment but it is understandable and I gather that this will not change. Yes I am starting to see that. But it is good that there is flexibility in case you want to do something crazy like weird wires. That still blows me away especially with highlight execution.
  17. This discussion about using variants vs. the native datatypes for messaging is continued from the LapDog Messaging Library v2 announcement thread here.
  18. Yes when you start to take into account units there really are a lot of datatypes. But as I said if I need one that is not in my polymorphic VI I just create a new one. I can see how this can end up with many entries over time. But with autoselection I don't think it is a problem. Anybody know the limit to the number of polymorphic entries? I think the select node in scripting is an I32 so there probably is no practical limit. There is one on NI but it is pretty low volume. I was thinking maybe the Object Oriented board here on Lava or something else. [Edit: I created a new thread. I hope this is OK]
  19. Thanks everyone. I can not figure out is how to move a wire segment. I looked at the Joints[] property. It returns an array of clusters containing info on all the segments but it is read only. Is there a way to identify a segment in order to move it, like when you single click on a wire and use the arrow keys?
  20. That is an interesting idea - registering all controls. I use a lot of latching boolean controls so I would have to put all the terminals in one event case to make sure they all got reset. It is interesting and I will keep that in mind. It seems like it could get confusing though. If I have an event for the individual control then there is a frame with the terminal and any code specific to the event. But I can see that for some applications this is useful. I would have never realized you could register all events like that. I would not create a polymorphic instance for temperature and for pressure. I only have the generic types that were not included in the native types library. Since both of those are DBL and I already have that I do not need a new entry. I might have a set pressure and set temperature vi in some module library that use the DBL message and set the name with a constant. But no additional polymorphic instances are necessary. The list is kind of big. I think I have about a dozen or so. But I have it set to automatically adapt so there is no need to worry about a big selection list. If I see a cohersion dot then I know I might need another instance. Edit: Maybe we should move this off of the announcements board
  21. Forgive me but I am just starting to learn about scripting today. I can open a VI, get a reference to the block diagram and to a VI or terminal and move it to a new location. Woo hoo! My question is that when I move a node the wire will bend in the middle. Can I specify where to bend the wire? A picture is worth a thousand words. (One of the best features of LabVIEW)
  22. I have created a bunch of datatypes as I needed them and put them into my own library. I gave up on adding them all to the palette and now my create and get messages are all in polymorphic VIs. Variant is one of them. But I don't like that one because I have to convert the message to the variant subclass then to the datatype. I would rather just add a new entry to my polymorphic VI whenever I need something not already there.
  23. Lava: Where hot ideas flow and solidify into rock solid development practices. I never knew this before but there is something called "Lava Flow Programming" Or rather it is something that I know very well but did not realize there was a name for.
×
×
  • Create New...

Important Information

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