Jump to content

Search the Community

Showing results for tags 'scripting'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Software & Hardware Discussions
    • LabVIEW General
    • LabVIEW (By Category)
    • Hardware
  • Resources
    • LabVIEW Getting Started
    • OpenG
    • Code Repository (Certified)
    • LAVA Code on LabVIEW Tools Network
    • Code In-Development
  • Community
    • LAVA Lounge
    • LabVIEW Feedback for NI
    • LabVIEW Ecosystem
  • LAVA Site Related
    • Site Feedback & Support
    • Wiki Help

Categories

  • *Uncertified*
  • LabVIEW Tools Network Certified
  • LabVIEW API
    • VI Scripting
    • JKI Right-Click Framework Plugins
    • Quick Drop Plugins
    • XNodes
  • General
  • User Interface
    • X-Controls
  • LabVIEW IDE
    • Custom Probes
  • LabVIEW OOP
  • Database & File IO
  • Machine Vision & Imaging
  • Remote Control, Monitoring and the Internet
  • Hardware

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Company Website


Twitter Name


LinkedIn Profile


Facebook Page


Location


Interests

Found 20 results

  1. I put together a simple xnode to relabel event registration reference wires that feed into dynamic events of event structures. With the increasing use of event based messaging systems, I found myself manually changing the name of event registration references to clarify the event name when multiple event registration references were used in an object. I did this by manually creating a cluster constant on the build cluster before the dynamic registration terminal on the event structure and renaming each registration reference. Being a lazy programmer, this seemed tedious after a few times so I decided to attempt to create an Xnode to accomplish the same thing faster. This video shows the "problem" and the potential solution using the xnode: Re-Label Xnode - Event Registration Here's another example showing another use case with ShaunR's VIM HAL Demo code: Re-Label Use Case ShaunR HAL Demo This may have been done before or there may be an easier way to do this, but I wanted to throw it out here to see if there's any interest and to see if people will try it out and give feedback. I've found it works best using quick drop for initial use (highlight wire, CTRL-Space,type re-label, CTRL-I, type new name in dialog) and for replacing or renaming an existing instance on the diagram (highlight existing xnode, CTRL-Space, type re-label, CTRL-P, type revised name in dialog). You can also use directly from the palette, but I found much faster from quick drop and also seen a couple crashes replacing through the pallete. The Double Click ability is also a work in progress. Its purpose is to allow you to quickly rename the relabel with the same dialog box, but when it executes it breaks the wire on the output connection. You can still re-wire it to the event structure, but you will have to open the Event Structure Edit Events menu to get the event to "Re-link". Something I'm trying to avoid. The Xnode generated code is simply a pass through wire with the output terminal renamed to the label of your choice. This seems to update attached event structures. - B sobosoft_llc_lib_diagram_tools-1.0.4.1.vip
  2. Hi everybody, While I was having some time to develop new scripting stuff i wondered "would it be possible to add somme scripting stuff in the VI toolbar ? " (the one with run, run-continuously, abort, police stuff and so on). My point is to add kind of a combobox that populate with every events in the current vi for a control when clicking on it. And of course show the effective event and make it blink when selecting it in the combobox. The scripting part is almost done but i now come to the real problem : "How can I add this piece of code in the VI toolbar ?" I know i can create either a Quidrop Plugin or a shortcut menu plugin but they don't fit the way i wan't to use this plugin. I asked some NI guy that told me the only options where the one above but I can't imagine that LabVIEW is not in some way developed around a "plugin architecture" so if any of you as plunge deep into LabVIEW's files and know where and how to achieve this goal it would be really nice Thank's everybody and I hope my question was clear.
  3. Hey guys, I'm trying to do some scripting on a Realtime-VI wich uses the FPGA Interface "Read/Write Control". I open a Reference to a VI containing a Read/Write Control, and when scrolling through the BD-Objects I find it with the class-name "nirviReadWriteControl". I used the "to more specific class"-VI to check wich class i can cast it to, and i tracked it down to be child of the GObject->Node Class. But i can't cast it to any of the childs offered in the class specifier constant. I also found out, that the "nirviReadWriteControl" is a xnode. I have never worked with those, is there a way to access theyr methods (I think they're called "abilities" for xnodes)? The goal of the application is to make the Read/Write Control display all available FPGA FP-Elements, and connect Controls/Indicators to them. There is the same Problem with the "Open FPGA Reference"-Node (Classname "nirviOpenFPGA"). I really hope somebody dealed with the xnodes a bit and can help me programmatically controlling them! Best, Trip
  4. After reading this LabVIEW Idea exchange request: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Provide-a-better-way-to-implement-a-polymorphic-VI/idi-p/920487 I was inspired to create VI macro(s) to attempt to address the problem mentioned in the request. Attached is my first attempt and I'm looking for feedback since I know people here have strong opinions. The benefit of this method is that a single vim (or 2 could replace a polymorphic VI with over 48 separate VIs....unless I'm missing something. I know that VI macros are not officially supported by NI, but that hasn't stopped us from using unsupported features before. Some people have probably already done something like this, but I couldn't find an example. To use the files, unzip them and copy them all to your \LabVIEW (version)\user.lib\macros\ directory. Create the directory if it does not exist. For example: C:\Program Files (x86)\National Instruments\LabVIEW 2014\user.lib\macros\ And as described in the wait-ms-with pass through post below, modify your LabVIEW.ini file to have the following ExternalNodesEnabled=True and Optionally XNodeWizardMode=True http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Wait-ms-with-error-pass-through/idc-p/3178218#M31820 Open the Example Changed.vi and review. Changed Example.zip
  5. Hi, i am trying to automate building a code, deploying it on an RT target and rebooting the target. I've got everything working but I do have a dialog box saying that the connection to the target was lost popping up. I would like to disable this notification during my process and re-enable it after. Anyone has an idea how to do this? I tried the "suppress Project Dlgs" invoke node of the target but it does not work. I changed the target Tags to prevent the "periodic check of the responsiveness of teh RT protocol" but that did not work either. I found this invoke node for the project that us called SuppressChangeNotification. I am not sure if that would do it since it could just be change of the content of the project not changes in the state of a target in the project. But the problem is, since it is part of the SuperSecretPrivateSpecialStuff the inputs are not documented and it needs ItemIDs of the notification that will be suppressed. Anyone know what those IDs are? or has a better way to suppress that diakog box? thanks, Pierre-Yves
  6. Hey Guys, I am a student of Masters in Mechatronics and have a project relative to creating ExNodes in Labview to recreate the PID Controller. I come from a Mechanical background and have very minimal knowledge with LabVIEW. I tried learning how to script (as I read that it is important to know how to script to learn to create ExNodes) but am finding difficulty in that as well. I wanted to know if someone could take time and explain me step by step on how to script on LabVIEW and also create ExNodes so that I can learn to create the PID Controller algorithm on LabVIEW. If you guys could also help me with author names to books which help me learn LabVIEW from the start to end, it would be great. Hoping to read positive responses soon. Regards Abhinav
  7. Rookie question here. I'm getting lazy and don't want to click the cleanup diagram button when I'm debugging generated code in the Xnode. Is there a way to clean-up the Xnode diagram with scripting? I tried putting some cleanup commands on the diagram reference in generate code ability, but I'm guessing the code is not actually generated until after this VI is completed. Or maybe I'm doing something wrong. Is there another ability that can run after the code is actually generated where I can cleanup the diagram for debugging purposes?
  8. does anyone know if the code for the Edit Format String dialog box is written in LabVIEW and is it available somewhere in the LabVIEW directory?
  9. Hi all, I'm trying to programmatically create and modify LVClasses. So far, I've managed to do the following via LabVIEW scripting: Create a new LVClass Save the new LVClass to disk Make one LVClass a subclass of another Create property definition folders My next step is to create class methods (static dispatch for now), but I'm stuck. I can't figure out how to add an LVClass control/indicator to a VI. I tried the following, but LabVIEW complained, "Type mismatch: Object cannot be cast to the specific type". I can't find any other LVClass-related items in the list. I tried to figure out what I should pass to New VI Object.vi, by querying an existing static dispatch VI as follows: Apparently, the FP elements I want are called "LabVIEWClassControl", and they have a ClassID of 102. However, "LabVIEWClassControl". isn't available in the list. When I wired 102 into New VI Object.vi, I was told "The specified object was not found." How do I programmatically drop an LVClass control/indicator into a VI? More fundamentally, how do I script a new static dispatch VI? Thanks in advance!
  10. I am working on a tiny debugging tool. Say, we have a 2 vis, A.vi and B.vi. A.vi calls B.vi in multiple places on the BD. B.vi is being executed now. I would like to get the reference to the node on the block diagram of A.vi of a particular B.vi being executed right now (It may be paused, or just running). Same way as we get clickable "stack trace" drop-down list on a breakpoint. How can I accomplish it? A.vi BD: 1. If B.vi is reentrant, I could have used clone #. But if B.vi is not reentrant? 2. I can easily get an array of nodes of type "subVI" on A.vi BD. But the node does not have any property to show it's state (reserved, running, idle, bad etc). 3. Each VIRef of each subVI node has different numerical value. However, I was not able to find a VI property that would give me the distinction between a running VI and a reserved one. 4. I enabled supersecretprivate key in the ini file, but still no methods/properties I can use.
  11. Hi, I'm working on a build server to be launched from Jenkins and a plugin to smooth the use of Jenkins with LabVIEW. I hope to post some results soon! One problem I am having. I wanted to distribute the build server as source code as it will enable additional features in the development environment over a built EXE. To aid the process, rather than distributing multiple versions and have to create a new distribution for every version. The problem with this is that when it tries to exit, unless it is in the version it was created in (2011) it prompts for a save. I'm sure I saw some option somewhere to sliently close LabVIEW without a save dialog but cannot find it anywhere! Was I dreaming or is there something in Scripting/Super Secret Stuff which could do this? Cheers, Mac
  12. FPGA Scripting is now generally available. FPGAScripting.zip
  13. Hi guys! I'd like to have my XNode to behave differently when the input is a (strict) typedef but also differently according to the typedef path (or name) if any. In a regular VI, this is easily done by extracting the path of the typedef: Terminal>Control>TypedefPath, but in Xnodes it's another story! So far I managed to get the regular type in the 'AdaptToInputs' ability (which is the common use of this ability!) and to see if it is a typedef or not by reading the properties of the control in the 'GenerateCode' ability. But in this last ability VI, an error occurs when I try to obtain the TypedefPath (Error 7). This error apparently occurs in Xnodes and especially Express VIs when "one of the internal paths is hard coded incorrectly" Is there a limitation due to the XNode or else? I guess that I could get around the problem by scripting the owning VI and retrieve the typedef of the control connected to the XNode directly but it would be quite cumbersome and ugly. Any thoughts on the subject?
  14. Hypothetically, if one created a LabVIEW executable that used a remote application reference to interact with the LabVIEW IDE, how much of the scripting function set would work? I've already discovered "New VI" doesn't work, but what about the non-creative functions, such as programmatically showing a block diagram, traversing the block diagram, inspecting nodes and other objects etc.? It seems to me that it should be ok to perform inspection, just not manufacture, right? So why are a load (if not all) of the scripting methods denied when attempted from a remote interface?
  15. Hello, Does anyone know how to get progress when building an EXE with Application Builder API? I am using the code below to automate my work and it would be nice to see a progress bar like when you build your application from the LV Project. I've found a VI called "Create progressbar events.vi" but I don't know what it does and how to use it. Thanks a lot for help. Matthias.
  16. Hi. I have this 'Error & Warning' toolset with a functions and a controls palette: The controls palette contains only a single control, basically a subVI dropping its contents on the front panel when dragged there. That contents is two error clusters so I don't have to visit the control palette twice to get those (there are a small number of additional changes to these controls, mainly label and caption formatting to match GPower style). When dragged and dropped I have this on the FP: When dropping these it'd be nice if some additional stuff happened, like they automatically got wired to the correct connectors on the conpane (if they are available), maybe they placed themselves more conveniently than where you just happened to drop them etc. Now, I have been wrecking my brain about how to do make them do this. If I turn them into XControls it could probably be done, but I'd hate to turn something as fundamental as the error cluster into a proprietary XControl and litter those all over my (and other people's) VIs. I can't seem to get anywere with scripting on this one - the VI isn't being run when it spills its contents when dragged from the palette. Do you have any ideas, or is this too much work? I could maybe register some internal LV app event when the 'Error & Warning' toolset gets installed (it's a VIP), but that seems like a lot of work. Cheers, Steen
  17. Hello LAVA, First time poster here, so I'll do my best with background. This situation also happens to be my first exploration of scripting LabVIEW Classes. I am starting with my simplest use case, and scaling as I see some success. I am simply trying to add an existing VI to a newly created class, and facing a strange message when opening the class that I have created. I have attached a snapshot of my code, BD.png The code runs without error, and creates a class in the specified directory with the correct name. What's strange is that when I open the newly created class to view its contents I see the following message: I have tried this same set of events using the LAVA host LVClass API, and face the same error message when opening the class. When I use property nodes to investigate the class members, the VI I have added is listed as a member. I went so far as compare the raw "XML" of a LabVIEW class I created manually in the project explorer to my scripted class, and the property configuration for the class appears identical. For this initial test, I am ensuring that the file I am adding is in the same directory as the class I am creating. The error dialog above occurs after a file search window appears, or I elect to ignore 'missing' items. I am posting here to see if anyone has experienced this behavior, or perhaps my inexperience in this area has lead me to overlook a fundamental part of adding items to a class. I appreciate your time, am happy to provide any additional information, and look forward to your responses. System Specs: LabVIEW 2012 32-bit, Windows 7 64-bit
  18. I have been re-factoring and cleaning up some old code for packaging into reuse libraries. After doing several common edits to each file, I decided to automate the process a bit. The result was a simple tool to adjust the controls, panel positions, connector pane, add error clusters and comments. I decided to share it here so others could borrow some of my ideas and suggest more. As it is, this is saving me a lot of editing time. I hope you find it helpful too. Prep for reuse.zip -John One improvement I would like to make is for it to scan all open VIs in all application instances on the machine. Right now, it must run in the same app instance as the target VI. Any ideas how to get references to all app instances active on a target machine?
  19. A while back AQ issued a request to finish some code located in <resource>\Framework\Providers\LVClassLibrary\NewAccessors The with great power come great responsibility line always stuck in my head and it was on my to-do list however, it took me a while to look at it (plus my scripting skills have improved slightly since then ). Basically the code operates on a Class which has other Classes as Data Members (composition) and allows the end user to create an API that wraps the required Data Member methods (delegation): I have now finished off the existing code and bolted on a UI and included it with LVOOP Assistant. I made this a separate thread for a few reasons (not discussed here). Feedback on this feature would be really appreciated. I thought I'd put it out for testing and to get feedback. The aim of this tool is to speed up development. This wasn't my first choice in how to design the GUI etc... integrating it into the current LVOOP GUI's that ship with LabVIEW would be grand, but these are locked. So this way was by far the easiest for me. My next mission is to see if I can get this natively included with LabVIEW Instructions: Class A contains other Classes as Data Members Nesting of Data Members (stored in clusters) is also supported Public methods are may be selected In this case Class B is Friends with A - which means A can have B's community-scoped on their block diagram Private and Protected scoped methods are not supported as Private would break Protected is not logical as LabVIEW does not allow a Child as a Data Member of a Parent The script is accessed through the Project Provider by right-clicking on a Class (that contains data members) and selecting LVOOP Assistant >> Create Element Wrappers The GUI will appear and allow the end user to select the Data Member that will be worked on as well the methods that will be wrapped Public methods and green, Community methods are blue Click a method to check/uncheck it, or use the buttons to batch check/uncheck etc... In the example Data Member 2 is chosen - which is an instance of Class B, which has the following methods Clicking OK creates the following methods for Class A What is happening from a scripting perspective is that Class B's method is copied Converted to a Class A method Class A's BD is cleared, then the method is delegated to Class B. Here is a demonstration (no sound) <!-- copy and paste. Modify height and width if desired. --> <object id="scPlayer" width="957" height="652" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/d749a41d-0411-46de-a9ac-2df37c6dc6f9/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/d749a41d-0411-46de-a9ac-2df37c6dc6f9/jingswfplayer.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/d749a41d-0411-46de-a9ac-2df37c6dc6f9/FirstFrame.jpg&containerwidth=957&containerheight=652&content=http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/d749a41d-0411-46de-a9ac-2df37c6dc6f9/LVOOP%20Assistant%20-%20CEW.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LVOOP%20Assistant/media/d749a41d-0411-46de-a9ac-2df37c6dc6f9/" /> Unable to display content. Adobe Flash is required.</object> Enjoy! -JG Example Code in LabVIEW 2011 cew example_LV2011.zip
  20. [LabVIEW 2011] Howdy If you probe a LVOOP Object it tells you the Actual Data Type e.g. the wire maybe that of a parent, but it will display the child's name if the child ran on that wire. Is there a way to get the Actual Data Type of an LVOOP Object at edit time from a terminal input reference / wire reference (assuming the VI has been run and the wire has been 'executed' on). There is a datatype property for the terminal but it just returns the parent class in the above use case. I managed to locate this control which is part of the probe (<resource>\dialog\NI.LVClass.Probe.NameStr.ctl) hoping to find the complete probe and see the code - still searching tho: Cheers! -JG
×
×
  • Create New...

Important Information

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