Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DBTaylor committed Mar 15, 2017
0 parents commit 0c421d2
Show file tree
Hide file tree
Showing 109 changed files with 2,240 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.aliases
*.lvlps
7 changes: 7 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2016, Erdos Miller

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
LV-Scripting
=================

LV-Scripting is an open source LabVIEW library for code generation using VI Scripting. It aims to make the scripting code used in XNodes and other edit-time code generation tools easier to write, more concise, and more readable.

Installation
------------

[The most recent VI Package (.vip) can be downloaded here.](https://github.com/erdosmiller/lv-scripting/releases)

Open the VI Package using [VI Package Manager](http://vipm.jki.net/) and press ***Install***.

In LabVIEW, The LV-Scripting palette can be found in the ***Erdos Miller*** palette.

Learning to Use LV-Scripting
----------------------------

The best introduction to LV-Scripting are the examples provided in the VI Package.

Navigate to LV-Scripting in VI Package manager and press ***Show Examples***. Take a look at Examples 1 through 13 in order to get a feel for how to use the library.

Example
-------

This LV-Scripting code:

![LV-Scripting Code](/images/example-code.png?raw=true)

Generates this VI:

![LV-Scripting Output](/images/example-output.png?raw=true)
83 changes: 83 additions & 0 deletions Scripting.lvproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version='1.0' encoding='UTF-8'?>
<Project Type="Project" LVVersion="15008000">
<Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property>
<Property Name="NI.Project.Description" Type="Str"></Property>
<Property Name="SMProvider.SMVersion" Type="Int">201310</Property>
<Item Name="My Computer" Type="My Computer">
<Property Name="IOScan.Faults" Type="Str"></Property>
<Property Name="IOScan.NetVarPeriod" Type="UInt">100</Property>
<Property Name="IOScan.NetWatchdogEnabled" Type="Bool">false</Property>
<Property Name="IOScan.Period" Type="UInt">10000</Property>
<Property Name="IOScan.PowerupMode" Type="UInt">0</Property>
<Property Name="IOScan.Priority" Type="UInt">9</Property>
<Property Name="IOScan.ReportModeConflict" Type="Bool">true</Property>
<Property Name="IOScan.StartEngineOnDeploy" Type="Bool">false</Property>
<Property Name="server.app.propertiesEnabled" Type="Bool">true</Property>
<Property Name="server.control.propertiesEnabled" Type="Bool">true</Property>
<Property Name="server.tcp.enabled" Type="Bool">false</Property>
<Property Name="server.tcp.port" Type="Int">0</Property>
<Property Name="server.tcp.serviceName" Type="Str">My Computer/VI Server</Property>
<Property Name="server.tcp.serviceName.default" Type="Str">My Computer/VI Server</Property>
<Property Name="server.vi.callsEnabled" Type="Bool">true</Property>
<Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property>
<Property Name="specify.custom.address" Type="Bool">false</Property>
<Item Name="source" Type="Folder" URL="../source">
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="tests" Type="Folder" URL="../tests">
<Property Name="NI.DISK" Type="Bool">true</Property>
</Item>
<Item Name="Dependencies" Type="Dependencies">
<Item Name="vi.lib" Type="Folder">
<Item Name="AddNamedSemaphorePrefix.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/AddNamedSemaphorePrefix.vi"/>
<Item Name="BuildHelpPath.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/BuildHelpPath.vi"/>
<Item Name="Check Special Tags.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Check Special Tags.vi"/>
<Item Name="Clear Errors.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Clear Errors.vi"/>
<Item Name="Convert property node font to graphics font.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Convert property node font to graphics font.vi"/>
<Item Name="Details Display Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Details Display Dialog.vi"/>
<Item Name="DialogType.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/DialogType.ctl"/>
<Item Name="DialogTypeEnum.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/DialogTypeEnum.ctl"/>
<Item Name="Error Cluster From Error Code.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Error Cluster From Error Code.vi"/>
<Item Name="Error Code Database.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Error Code Database.vi"/>
<Item Name="ErrWarn.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/ErrWarn.ctl"/>
<Item Name="eventvkey.ctl" Type="VI" URL="/&lt;vilib&gt;/event_ctls.llb/eventvkey.ctl"/>
<Item Name="Find Tag.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Find Tag.vi"/>
<Item Name="Format Message String.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Format Message String.vi"/>
<Item Name="General Error Handler Core CORE.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/General Error Handler Core CORE.vi"/>
<Item Name="General Error Handler.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/General Error Handler.vi"/>
<Item Name="Get LV Class Default Value By Name.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/LVClass/Get LV Class Default Value By Name.vi"/>
<Item Name="Get String Text Bounds.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Get String Text Bounds.vi"/>
<Item Name="Get Text Rect.vi" Type="VI" URL="/&lt;vilib&gt;/picture/picture.llb/Get Text Rect.vi"/>
<Item Name="GetHelpDir.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/GetHelpDir.vi"/>
<Item Name="GetNamedSemaphorePrefix.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/GetNamedSemaphorePrefix.vi"/>
<Item Name="GetRTHostConnectedProp.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/GetRTHostConnectedProp.vi"/>
<Item Name="Longest Line Length in Pixels.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Longest Line Length in Pixels.vi"/>
<Item Name="LVBoundsTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/miscctls.llb/LVBoundsTypeDef.ctl"/>
<Item Name="lveventtype.ctl" Type="VI" URL="/&lt;vilib&gt;/event_ctls.llb/lveventtype.ctl"/>
<Item Name="LVFixedPointRepBitsTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/fxp/LVFixedPointRepBitsTypeDef.ctl"/>
<Item Name="LVFixedPointRepRangeTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/fxp/LVFixedPointRepRangeTypeDef.ctl"/>
<Item Name="LVNumericRepresentation.ctl" Type="VI" URL="/&lt;vilib&gt;/numeric/LVNumericRepresentation.ctl"/>
<Item Name="LVPointTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/miscctls.llb/LVPointTypeDef.ctl"/>
<Item Name="LVRectTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/miscctls.llb/LVRectTypeDef.ctl"/>
<Item Name="NI_Data Type.lvlib" Type="Library" URL="/&lt;vilib&gt;/Utility/Data Type/NI_Data Type.lvlib"/>
<Item Name="Not Found Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Not Found Dialog.vi"/>
<Item Name="Obtain Semaphore Reference.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/Obtain Semaphore Reference.vi"/>
<Item Name="Release Semaphore Reference.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/Release Semaphore Reference.vi"/>
<Item Name="RemoveNamedSemaphorePrefix.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/RemoveNamedSemaphorePrefix.vi"/>
<Item Name="Search and Replace Pattern.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Search and Replace Pattern.vi"/>
<Item Name="Semaphore RefNum" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/Semaphore RefNum"/>
<Item Name="Semaphore Refnum Core.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/Semaphore Refnum Core.ctl"/>
<Item Name="Set Bold Text.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Set Bold Text.vi"/>
<Item Name="Set String Value.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Set String Value.vi"/>
<Item Name="Simple Error Handler.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Simple Error Handler.vi"/>
<Item Name="TagReturnType.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/TagReturnType.ctl"/>
<Item Name="Three Button Dialog CORE.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Three Button Dialog CORE.vi"/>
<Item Name="Three Button Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Three Button Dialog.vi"/>
<Item Name="Trim Whitespace.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Trim Whitespace.vi"/>
<Item Name="Validate Semaphore Size.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/semaphor.llb/Validate Semaphore Size.vi"/>
<Item Name="whitespace.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/whitespace.ctl"/>
</Item>
</Item>
<Item Name="Build Specifications" Type="Build"/>
</Item>
</Project>
Binary file added images/example-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/example-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added source/examples/Example 10 - Event Structures.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added source/examples/Example 13 - Producer Consumer.vi
Binary file not shown.
Binary file added source/examples/Example 2 - Constants.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added source/examples/Example 5 - SubVIs.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added source/examples/Example 8 - For Loops.vi
Binary file not shown.
Binary file added source/examples/Example 9 - Case Structures.vi
Binary file not shown.
Binary file added source/examples/SubVIs/Create Enqueue Message.vi
Binary file not shown.
Binary file added source/examples/Typedefs/Message.ctl
Binary file not shown.
Binary file added source/examples/Typedefs/State.ctl
Binary file not shown.
Binary file added source/examples/Typedefs/Test.ctl
Binary file not shown.
Binary file added source/library/Case Next Frame.vi
Binary file not shown.
Binary file added source/library/Conditionally Connect Wire.vi
Binary file not shown.
Binary file added source/library/Construct Control Event.vi
Binary file not shown.
Binary file added source/library/Construct Dynamic Event.vi
Binary file not shown.
Binary file added source/library/Construct Static Event.vi
Binary file not shown.
Binary file added source/library/Create Add.vi
Binary file not shown.
Binary file added source/library/Create And Array Elements.vi
Binary file not shown.
Binary file added source/library/Create Array Size.vi
Binary file not shown.
Binary file added source/library/Create Array Subset.vi
Binary file not shown.
Binary file added source/library/Create Build Array.vi
Binary file not shown.
Binary file added source/library/Create Bundle by Name.vi
Binary file not shown.
Binary file added source/library/Create Bundle.vi
Binary file not shown.
Binary file added source/library/Create Case Structure (Boolean).vi
Binary file not shown.
Binary file added source/library/Create Case Structure (Error).vi
Binary file not shown.
Binary file added source/library/Create Case Structure.vi
Binary file not shown.
Binary file added source/library/Create Close Reference.vi
Binary file not shown.
Binary file added source/library/Create Constant.vi
Binary file not shown.
Binary file added source/library/Create Create User Event.vi
Binary file not shown.
Binary file added source/library/Create Delete DVR.vi
Binary file not shown.
Binary file added source/library/Create Dequeue Element.vi
Binary file not shown.
Binary file added source/library/Create Destroy User Event.vi
Binary file not shown.
Binary file added source/library/Create Enqueue Element.vi
Binary file not shown.
Binary file added source/library/Create Equal.vi
Binary file not shown.
Binary file added source/library/Create Event Structure.vi
Binary file not shown.
Binary file added source/library/Create Flatten to String.vi
Binary file not shown.
Binary file added source/library/Create For Loop.vi
Binary file not shown.
Binary file added source/library/Create Generate User Event.vi
Binary file not shown.
Binary file not shown.
Binary file added source/library/Create In Place Element Cluster.vi
Binary file not shown.
Binary file added source/library/Create In Place Element DVR.vi
Binary file not shown.
Binary file added source/library/Create Index Array.vi
Binary file not shown.
Binary file added source/library/Create Invoke Node.vi
Binary file not shown.
Binary file added source/library/Create Merge Errors.vi
Binary file not shown.
Binary file added source/library/Create New DVR.vi
Binary file not shown.
Binary file added source/library/Create Obtain Queue.vi
Binary file not shown.
Binary file added source/library/Create Open VI Reference.vi
Binary file not shown.
Binary file added source/library/Create Or Array Elements.vi
Binary file not shown.
Binary file added source/library/Create Property Node.vi
Binary file not shown.
Binary file added source/library/Create Register for Events.vi
Binary file not shown.
Binary file added source/library/Create Release Queue.vi
Binary file not shown.
Binary file added source/library/Create Replace Array Subset.vi
Binary file not shown.
Binary file added source/library/Create Sequence.vi
Binary file not shown.
Binary file not shown.
Binary file added source/library/Create Static VI Reference.vi
Binary file not shown.
Binary file added source/library/Create SubVI.vi
Binary file not shown.
Binary file added source/library/Create To More Specific Class.vi
Binary file not shown.
Binary file added source/library/Create Typedef Constant.vi
Binary file not shown.
Binary file added source/library/Create Unbundle by Name.vi
Binary file not shown.
Binary file added source/library/Create Unbundle.vi
Binary file not shown.
Binary file added source/library/Create Unflatten from String.vi
Binary file not shown.
Binary file added source/library/Create Unregister for Events.vi
Binary file not shown.
Binary file added source/library/Create Variant to Data.vi
Binary file not shown.
Binary file not shown.
Binary file added source/library/Create While Loop.vi
Binary file not shown.
Binary file added source/library/Event Next Frame.vi
Binary file not shown.
Binary file added source/library/Exit Event Structure.vi
Binary file not shown.
Binary file added source/library/Exit For Loop.vi
Binary file not shown.
Binary file added source/library/Exit In Place Element Array.vi
Binary file not shown.
Binary file added source/library/Exit In Place Element Cluster.vi
Binary file not shown.
Binary file added source/library/Exit In Place Element DVR.vi
Binary file not shown.
Binary file added source/library/Exit Loop.vi
Binary file not shown.
Binary file added source/library/Exit Multi Frame Structure.vi
Binary file not shown.
Binary file added source/library/Exit Structure.vi
Binary file not shown.
Binary file added source/library/Exit While Loop.vi
Binary file not shown.
Binary file added source/library/Get Cluster Element Names.vi
Binary file not shown.
Binary file added source/library/Get Cluster Element Type.vi
Binary file not shown.
Binary file added source/library/Get Controls.vi
Binary file not shown.
Binary file added source/library/Get Event Data In.vi
Binary file not shown.
Binary file added source/library/Get Outputs.vi
Binary file not shown.
Binary file added source/library/Get Tagged Union Info.vi
Binary file not shown.
Binary file added source/library/Get Term Type.vi
Binary file not shown.
Binary file added source/library/Is Tagged Union.vi
Binary file not shown.
Binary file added source/library/Loop Terminal Type.ctl
Binary file not shown.
Loading

0 comments on commit 0c421d2

Please sign in to comment.