Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/20/2015 in all areas

  1. So here is a fun little nugget I worked on over the weekend. At our local user group there was discussions about action engines, and functional global variables. People talked about how a Action Engine, that has several cases like, Init, Read, Write, Close, will have inputs and outputs that just aren't relevant to every method of that VI. So people said how they some times write wrappers to their FGV where each VI is a unique value for their enum. This allows them to delete the unneeded controls and indicators, making for an easier to understand API, where only the important inputs for that method are exposed. So I wrote some code to demonstrate how to accomplish this with scripting. I figured this function might be useful to others. Included in the zip is an example VIG that can be used to demonstrate how it works. FGV Wrapper Maker.zip
    2 points
  2. Why are you initializing an array in your For loop? You want to replace elements; here's a very quick way to accomplish that: Also, you don't need to use (ever) the Stop command; just put all of your logic in the other case.
    2 points
  3. Without an XNode license creating a list of available properties and methods of the XNode and XNode Library classes is difficult. It is similar to having private methods. If you have a private property on the BD it works just fine and you can copy it and use it in other VIs. Luckily NI has scripting functions for doing things like setting property nodes and finding what properties are valid for a specific class. So with the help and collaboration with Jack Dunaway I've made a tool for getting the list of available property and invoke nodes for the XNode and XNode Library classes, and allow you to make those objects. Now not all of the functions will work without a XNode License but I suspect most do. Several abilities in an XNode return a XRef which is a reference to the XNode and is where these properties and methods could come in handy. Also attached is a VI that just has all of the properties and methods for LabVIEW 2013 SP1, but the tool should be able to make any new ones in newer versions as well. But all along we had the power to make these using native LabVIEW tools. Quick Drop has the class browser function, with it you can set the class of objects and the properties of property nodes. So following these steps will create an XNode property: Drop a new property node on the BD. Select the property node. Invoke QD Type "XNode" (without quotes) Press CTRL+B Select the property node Invoke QD Type "State" (without quotes) Press CTRL+Shift+B And lastly this is all very experimental. Using undocumented XNode technology, along with private functions can lead to unexpected crashing and strangeness. But for the most part these properties and methods have some level of documentation just don't be surprised if they don't work right, or don't do what you expect. Create Methods Properties for XNodes.vi All Methods and Properties.vi
    1 point
  4. Several ways. Two for example: in edit mode, click twice on the eighth button, which populates the array. Left click, Data Operation->Make current value default, Save VI.
    1 point
×
×
  • Create New...

Important Information

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