Jump to content

Jason H

  • Content Count

  • Joined

  • Last visited

Community Reputation


About Jason H

  • Rank
    More Active

Profile Information

  • Gender
  • Location
    Seattle, WA

LabVIEW Information

  • Version
    LabVIEW 2011
  • Since
  1. I found a nasty bug where a control that has units associated with it somehow appears to get corrupted. When a corrupted control and a normal control are fed into the equals function, it returns false. It's not limited to controls either, a corrupted and normal constant will return as not being equal. Example vis are attached. labview bug with units example original.vi labview bug with units simple example.vi
  2. I was going to post this suggestion on the Idea Exchange. I think it would be a good way to effectively give us constructors, without all the headaches of a real constructor that AQ has posted about.
  3. Is there a specific reason for that? I'm going to make that accessor vi protected, so that only the children can see it. That way, nothing outside of the object can ever access the entire cluster, but the children still have full access. The only reason the parent even has this data is as a placeholder to be overridden. Also, I think that accessor is only ever going to be used once - in the constructors. I can't think of a reason to use it anywhere else.
  4. I've created a constructor.vi and am forcing all children to override this vi. Inside the parent's private data cluster, I have another cluster called "data for override" and a single accessor can write the entire cluster. That cluster is also a type-def, which is used on the front panel of the child as well. So all I have to do in the constructor is take that cluster and write it to the parent's cluster.
  5. Thanks jgcode. I'm trying to wrap my head around what you're saying here. From what I can tell, national instruments doesn't have any type of constructor built into LVOOP. What you are saying is that to essentially create one and work around that, I can simply create a method inside the class where the object is created that does the initialization stuff. Then when I want to use that object in a program I just plop down the constructor.vi on the block diagram and use it's output terminal as the object instance. I don't put the bare object constant on the block diagram as is typically done. Unless someone here can tell me that this isn't the best way to accomplish what I'm trying to do, I'll try it out and see if it works. Unfortunately I don't think there is a way to "force" someone to use constructor.vi on the block diagram instead of the object constant, so the programmer will have to keep that detail in mind. Also, there is no way to "force" those certain data fields to be initialized in the constructors of each child that I can see.
  6. I'm new to OOP, there may be a common method to solve my problem that I'm not aware of. The problem is this: I have a parent class "CNC table". It contains private data that all CNC tables have, for example, the minimum and maximum ranges for x, y, and z axes. I have have child classes which represent specific CNC tables, say different models. They control the hardware, and when I say "move to point" the proper subvi will be dynamically dispatched to control the hardware. The problem is that each child must have its own unique values for the x, y, and z ranges because different models of table will have different ranges. When I run the parent's "is point in range" function (which is called inside of the child's overridden "move to point" function), I want to read in the child's defaulted values for those specific private data members and compare against those. Optimally, I'd like to override the defaults of those data fields, and require all children to override them. If there was a constructor, I could just read in the defaults off of the child's front panel and then populate the parent's fields, which would be a little more work. However, from what I can tell neither of those are possible. So how can I make sure the parent's private data fields are set appropriately to what the child's defaults are?
  7. Thanks for the response. Based on that I'll just move forward with using the other control and making some things transparent to mimic the native 3d graph. I'll let you file the bug and look for the fix in an updated version, either service pack 2 or LV2011. Let me know if I should file a bug or anything.
  8. First let me say that the new 3d stuff is much better than the old cw graph stuff. One problem I'm having however is the mesh overlay on the 3d graph control when I turn on overlay lines. When I use the 3d surface that comes with the ni helper vi, it looks fine, as it should. However when I use the native 3d graph and turn on overlay lines, the lines are fragmented and appear to be rendered at the exact same location as the plot itself as opposed to on the surface of the plot. The picture and vi below demonstrate what I'm talking about. In the picture, on the left is ni's xcontrol with helper vi. However, I only want the rendering screen and want to make my own custom color bar. To the right is the same plot but the rendering looks different - the overlay lines do not render smoothly like in the first plot. Is there any way to fix this? Thanks 3d graph.vi
  9. I was scheduled to take my CLD tomorrow and, even though I took each of the three practice tests twice (car wash, security system, traffic light), I still wanted to look at them one last time. When I checked, it appeared there were four new exams up: ATM machine Boiler controller Car wash (different) Sprinkler system https://lumen.ni.com/nicif/us/ekitcldexmprp/content.xhtml Good thing I double checked again...
  10. I've been working with the CWGraph3D library for plotting 3D antenna patterns. Overall it works quite well. However, there are a few limitations that I'm not sure can be worked around. The problem is that the rotation is not truly 3D. There are only 2 axes of rotation, not 3. You can see the pattern at every (theta, phi) point, but at any given point, you cannot rotate about that point except for at the poles. For example, you can rotate about the z axis (the poles) but you cannot rotate about the x or y axes. Its difficult to think about unless you have a model in front of you. Another issue is performance. The CWGraph3D performance seems a little sketchy at times, and I don't have low-level control. For example, when plotting a new set of data, the whole control frame goes blank briefly before showing the new plot. With a 3D picture control however, I could just update a single object in the scene. Finally, I would like to import an STL file and overlay it with my antenna pattern to easily visualize what is going on. However, I don't think the CWGraph3D mesh can plot triangles. Perhaps it can but I don't understand how to use it properly. The only problem with using a 3D picture control however is the color map. If I could figure that out then I would have no reason to use the CWGraph3D control other than all the work involved in building up what I need from low-level components. I've attached a picture from my program. Note that the top right corner is an overlaid 3D picture control showing an STL file, and the main plot is a CWGraph3D picture. I want to create something identical but with a 3D picture control. How would I create a color map and grid lines?
  11. anyone who can figure this out? And if its not possible, is there a way to export a CWGraph3D object into a 3D picture control?
  12. QUOTE (Ton @ May 14 2009, 09:24 PM) Thanks, I cooked the openg vi's down to what I need. Here is an example of compressing and decompressing a string.
  13. try this http://www.scicos.org/ScicosModNum/modnum_...web/eng/eng.htm
  14. Could somebody convert the vi's listed here http://zone.ni.com/devzone/cda/epd/p/id/3662 to LV 8.5? I searched around and didn't see any up-to-date vi's and these are exactly what I need.
  15. Good discussion guys, I find it very interesting. I understand the argument for queues and I'm also trying to understand the argument for event structures as well. It seems to me that if you had n event sources, you have two (almost) functionally equivalent options 1) have n queues inside n while loops, or 2) have a single event structure with n cases the benefit of queues is that 1) if they are named they can act as both global variables and detect events (you can also pass data through event structures so I don't know if this is really a difference), and 2) since they are in multiple loops, executing code from events is done in parallel the benefit of event structures is that 1) your code is compacted down to a single structure and is smaller 2) you can write code which does one-off events without having to create a completely new queue just to handle that event-type or going through the hassle of using variants and typedefs 3) the event structure can register events generated by software (eg, front panel controls) With this in mind, perhaps it would be nice to converge the functionality of both so that users can use one or the other depending on their coding styles/application. For example, register events from controls, or indeed any software events, into a queue so that an event structure is no longer necessary for things like GUI control (improving queues). Or, allow named events which are available globally like named queues (improving event structures -- coincidentally, this is exactly what ShaunR and shoneill are asking for). Wouldn't this allow one to, theoretically, use queues and event structures interchangeably? Is there a fundamental reason why there shouldn't be more than a superficial difference between the two? AQ?
  • Create New...

Important Information

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