Jump to content

GoGators

NI
  • Posts

    75
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by GoGators

  1. HI

    i m getting an error message "Insane Object at FPHP+34 "PostProcessing_AllChannels.vi":{tdo}{0x800}:FrontPanelDataController (DCO)" in LV8.0 after converting one of the vi's from LV8.6 to LV8.0 . i have no clue about this error message . Can somebody guide me with this?

    I would suggest calling, emailing, or forum posting NI. It is a bug, that occurs when an object(s) does not pass the sanity check. Typically there are some steps they can offer. That or divide and conquer where in the code the error pops up.

  2. Hii,

    No my shift key haven't struck .... still i am facing the problem while updating to Table....

    So I was playing around with Unicode in LabVIEW stuff, and for some controls and indicators you need to append the BOM to the front of the string. In LabVIEW that is typically 0xFFFE to the front of the string. It worked for the tree contro and table. Here is an example. Tell me if it works for you.

    UnicodeTable.vi

  3. It's no secret I've been a bit frustrated by Labview's lack of a mid-level api for object oriented programming.

    I find the lack of certain basic structures to be annoying too.

    I'd prefer to create smaller independent components that provide useful functionality with enough flexibility that the object-oriented developer can extend it to solve their unique problem.

    Ideally each pattern should be easy to digest in under 10 minutes. More complex ones should be allowed later on though.

    1. Would you be interested in using LapDog in your projects?

    Yes.

    2. Are you able to help develop, maintain, and support LapDog?

    Yes

    3. How much time on average do you think you could spend on this project?

    3-5 hours a week. More if the class lines up with a current project.

    4. Given your time constraints and level of knowledge, which role(s) do you think you can fill?

    Consultant/Developer. I'm not cocky enough yet to say Architect.

  4. Hi to ALL,

    How can I determine a shape of a waveform? You know the waveforms could have different shapes, I mean sine, triangle, swatooth and so on. I know the input waveform and I want to build a function that return the shape (as a string or enum data) of the input waveform. How can I do that?

    Take the FFT of the signal. It works out best if you take full periods rather than fractional periods. Then looking at the magnitude of the FFT, you can decipher what it is. Typically with some sort basic algorithm. A sine will have a single tone, a square will look like the sinc(x) funtion, etc.

    Another option is a "matched" filter. Essentially make a filter that will cancel out the all signals except the one you are trying to detect. Typically this is done by finding the impulse response for each of your signals, then convolving them through one by one till you find your match. These work well if you know ahead of time what you are expecting.

    Good luck.

  5. Dear GoGators

    I like your UML approach. So I wanted to check your Tree example code. However in the project one file was missing (TreeObj.lvclass:Message.ctl)

    Could you add this in the zip file? Thanx.

    Just delete message.ctl. It doesn't do anything.

    By the way: Your diagramm look like they were created with StarUML. Correct? Is this your preferred UML tool?

    StarUML is Daklu's suggestion, and I like it so far for the class diagram. There is apost somewhere around here about everyones favorite UML tool.

  6. Do these two approches to by-ref differ considerably?

    Felix

    The main reason why I place the entire object into the DVR instead of just the object properties is because I am working on recursive functions. In particular I call method X on object A. Object A has a ref to the next Object B, so then method X recurses on object B, and so on and so on. If the DVR only encapsulates the data and not the entire object, I don't think you can do that.

    But yes, the casting of DVR references is annoying.

  7. I am so glad you asked these questions because they all are relevant. Because hijacking threads is never a good way to present information, I will start a new thread with what I intend to present.

    <Edit> So I started to repost and realized my code was not yet ready to warrant a new topic. Here are the answers to your awesome input but note that everything is not yet ready so I'll do my best.

    A possible presentation? Was your proposal accepted?

    Yes. For alliance day the systems engineers get to put on some topics of relevance. Mine will involve Machine Control with use of linked lists, trees, and graphs via LVOOP and DVRs.

    -duplicateBranch.vi creates a new branch and adds it as a sibling of the branch it is copied from. What if I want to copy a branch and add it to a different node? Or what if I want to copy a branch and make a new tree out of it? Yup. Can do, but my intention was for configuration editors where that is common. Maybe a better solution is to just duplicate and leave it up to the user whether to add it back on or make it its own tree.

    -readTreeFromFile and writeTreeToFile combine the process of flattening the tree to xml and writing the xml to disk. I (as your api user) want to flatten the tree to xml and store the xml string in memory to support undo actions. Good call. It is there but I should make it more evident.

    -SaveTree and LoadTree each pop up dialog boxes requesting user input. I'm planning on using this api in a remote system where users might not notice a dialog box for days. How can I make it just log an error if the path input isn't correct? Once again, didn't think about that case. I tried to keep the API easy, and missed it.

    -I see a Node class and a Tree class, but some of the Tree vis refer to "Branches" yet have Node inputs and outputs. How is a Branch different from a Node? (The answer, I now realize, is nodes and branches are the same thing. I actually asked myself this question when first looking through the code because I expected different functionality for different terminology.) The goal is to move the API to use the terminology of branches. Nodes should be independent and "floating" and thus rarely used. But branches indicate structure.

    -graftBranch adds a single branch to a single node. graftBranches adds multiple branches to a single node. Where are the methods to add a single branch to multiple nodes or multiple branch to multiple nodes? (That's a trick question... I really don't want those methods. wink.gif I think graftBranches is unnecessary.) Graft branches was added for a specific reason. Assigning IDs (or GUIDs) and then assuring they were unique to the the tree was very costly speed wise. The act of graftBranches would assign IDs at he beginning of the operation to eliminate redundate searches for unique IDs.

    If your example is intended to be reusable code, I think you'll be better off providing a small set of fundamental capabilities and let the users combine those fundamentals into higher level functionality that makes sense to them. Really all the tree needs is three core functions: addNode, removeNode, and copyNode. Good call, but for the presentation I need application rather than "Look what I can do" Those functions are common for a configuration editor, thus they were included.

    </Edit>

    Thoroughly high-jacked now.

  8. Is the bi-directional tree your design? Nice job.

    Yes. I have been through a few iterations trying to make it as best as possible. The latest makes it so you can save the tree in Native LV XML even though it uses DVRs. It works well for making class upgrades due to LV versioning.

    I think the design can be simplified a bit by replacing TreeObj with Labview Object. I'd also consider changing the design to allow tree operations be performed on nodes. Making node a subclass of tree is the most obvious way; I'm not sure it's the best though.

    I thought about it, but it didn't really seem like a node and tree should have the same functionality, more that a tree was an aggregation of nodes. But yes, the overlap did make me consider it.

    I made it for a possible NIWeek Presentation on alliance day on advanced data structures. The linked list is complete, but the graph is taking quite a bit longer.

    Just so I know, is a tree what the purpose of your self-referencing object was going to be used for? I know you mentioned namespacing, so I was kind of interested to hear what that was related to.

  9. Thank you for the quick reply,

    Do you know of any examples of the web service feature? Any example code or howto doc's would be a great help. If it matters I'm using LabVIEW 8.6.1 Professional Development System.

    It is supported in LV 8.6.1.

    Here is the official help: http://zone.ni.com/reference/en-XX/help/371361E-01/lvconcepts/webservices/

    And a decent white paper: http://zone.ni.com/devzone/cda/tut/p/id/7350

  10. In both tree and multicolumn, if you are dynamically adding items make sure to use the "Defer front panel updates" property. The refresh on both is killer, and the deferring seems to make the performance go up quite a bit (in my case 5x for 100 sequential added items).

    Personally the multicolumn is easier to use, but the tree often times makes more logical sense. If it is internal I'd use multicolumn to save time, and tree is it is a requirement.

  11. I have stripped the app down to one indicator with its data socket field hard coded to a valid tag on the server - as simple as you can get. It works on all the machines that can talk to the OPC server and it doesn't connect on any of the other machines ... i.e. the DataSocket LED stays RED.

    Sounds like a DCOM settings problem. If you use Server Explorer or OPC Quick Client, can you connect to it? If not then I would definitely say DCOM setting. Look at the computers that work DCOM setting and try to emulate it on the others.

  12. I'm mostly interested in the last part, that is, creating Libraries and shared variables from the VI programmaticly, but I was unable to find the right components to achieve that (I'll keep trying, though). Can someone guide through the process or point me to a VI that does that?

    Go to the LabVIEW Example Finder and search for 'shared'. The "Create Online Process.vi" example seemed like the most basic to get started, and then there was a more advanced one.

  13. I didn't look at your benchmark, but you could probably implement this yourself by opening a reference to the VI in the relevant class during the first call and then using that reference to run the VI by-ref for all calls. The VI itself will then not need to be DD - you simply need to get the VI's path and open a reference to it.

    That is one possible workaround, but the bonus of DD is that it allows Call Parent method. Without DD it is not allowed thus I can't simply be adding on more and more to the methods.

  14. I was looking for a way to statically call a dynamic dispatch. That or a dispatch once and then reuse many. My use case is that I want to build up a nice hierarchy of inheritance for DAQ devices. During the Acquire method they call their parents methods as well as add their own bit of code. It looks like it is going to work really well except that dynamic dispatch is about 10x slower than static dispatch.

    Since I'm inside the acquisition loop, the DAQ device is not going to be changing classes. It would be nice to dispatch the method on the first call, and from then on continue to use the same method (thus improving performance). Here is my benchmark VIs to compare the speed of dispatch.

    Benchmark.zip

  15. On top of that I was wondering if any has run into the problem of conditional disable structures influencing dataflow. Essentially in other languages when you conditionally disable something (like in C with #if) the code is entirely taken out of the build. In LabVIEW I have seen that the code inside is not built in, but the structure influences dataflow (i.e. structure doesn't execute until all inputs to the structure is ready). If it is not a large enough problem then maybe I won't make a suggestion. No need for Idea Overload.

  16. I was wondering if anyone who attended the CLA conference this week knew if there was a location to find the presentations? I heard there was a good one on error handling that I was interested in. I tried to sneak into a session or two, but work kept me back.

    Edit: Also I was wondering what you guys thought about it. In particular the most useful thing you learned or saw.

  17. These examples are too complex just to try once.

    Sorry about that. The Multiprocess engine was my code. In trying to get it to do everything, the example looses a lot of its simplicity. I believe another way to look at the problem is to think of your application as a plug-in. Tomi wrote an article about LVOOP plugins on expressionflow : http://expressionflow.com/2008/06/02/extending-labview-built-applications-with-lvoop-plugins/

    Just another idea.

  18. Hi,

    So LabVIEW currently doesn't support WPF. But I have figured out a way to put a WPF on a .NET Form (sometimes referred to as a WinForm). Now I need to be able to launch the Form from labVIEW so that I can interact with it. It is the equivalent of launching a VI at runtime (using VI Server) and having two independent VIs running separately.

    Anyone got any ideas? I think my main problem is that when I try to launch the Form with the Show method, it wants me to assign an owner application of the form. Thanks all.

×
×
  • Create New...

Important Information

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