-
Posts
2,397 -
Joined
-
Last visited
-
Days Won
66
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by jgcode
-
-
Hello
I was wondering if it is possible to create a Quick Drop plugin with an LLB type structure. Similar to what you can do with the menu items - have a text file that points to the VI to run.
(I hope that makes sense)
This would be cool for distributing code.
Look forward to hearing if this is possible.
Cheers
JG
-
This is a fantastic presentation on the merits of training and certification
Hi ASTDan
The link is coming back broken.
Cheers
JG
-
I don't use forums when I'm supposed to be working, either.
It was just in case the boss was reading it
But I have to say; all these forums help me with my work as well, I don't think I would be as productive, or inspired, without them. But I have to be careful, I could easily chew through an hour without even noticing!
-
Yes NI installer, no automatic prompt responses.
Application settings. I use configuration files to make the system flexible when I'm working on it, but I want less flexibility when it's working in production.
Hey Jim thanks for posting - I am checking it out now over lunch.
May I ask what project SmokeCal is about?
The name sounds very Bondish
-
Here is a visual comparison of the scripting. It may not be everyone's cup of tea but it may serve as a good starting point (or may not!! )
Original Simple Write vs New Simple Write
Original Simple Read vs New Simple Read
Original Array Write vs New Array Write
Original Array Read vs New Array Read
Original MultiDim Write vs New MultiDim Write
Original MultiDim Read vs New MultiDim Read
This release ties up my previous posts of the individual VIs onto a single package.
LVOOP Custom User Scripting For New Simple Accessor VI
LVOOP Custom User Scripting For New Array Element Accessor VI
LVOOP Custom User Scripting For New MultiDim Array Element Accessor VI
Of course none of this changes the functionality much, so it's a nice to do. It's just that it's my preferred style. And if I now don't have to do any work to get this effect than that is great!
Enjoy!
JG
-
Name: LVOOP Custom User Scripting
Submitter: jgcode
Submitted: 16 Nov 2009
File Updated: 03 Jan 2011
Category: *Uncertified*
LabVIEW Version: 2009
License Type: BSD (Most common)
LVOOP Custom User Scripting v1.1.1-1
Copyright © 2009, Jonathon Green; JGCODE
All rights reserved.
Author: Jonathon Green
LAVA Name: jgcode
Contact Info: Contact via PM on lavag.org
LabVIEW Versions:
LabVIEW 2009
Dependencies:
No Dependencies
Description:
Contains Custom User Scripting Hook VIs which are called at the end of their respective scripting processes e.g. New>>VI for Data Member Access...
New scripting includes:
All
- BD control labels to left
- BD indicators labels to right
- BD controls moved closer to case structure's left hand side border after label repositioned
- Case structure expanded downwards and free label placed under error wire with default "Comment"
- FP controls (excluding owning class or error in) labels bolded to match required parameter on connector pane
Array and MultiDim Array Only
- Index/Indices control moved outside case structure inline with other controls
- Data Member control and Index/Indices control switched on connector pane
- Index/Indices control set as required parameter on connector pane
- FP reflects new connector pane order
Other features includes:
- Default save name for Write Method changed from "Write " to "set"
- Default save name for Read Method = "Read " to "get"
Hooks are installed in the (LabVIEW 2009)\resource\Framework\Providers\LVClassLibrary\NewAccessors directory
This package installs the following hooks:-
Scalar Data Member - BaseAccessorScripter\Custom User Scripting For New Simple Accessor VI.vi
1D Array Data Member - ArrayElementScripter\Custom User Scripting For New Array Element Accessor VI.vi
2D+ Array Data Member - MultiDimArrElemScripter\Custom User Scripting For New MultiDim Array Element Accessor VI.vi
See here for more information
All existing hooks will first be moved to a persistant folder (\addons\_JGCODE Toolkits\lvoop custom user scripting\NewAccessors Original).
The packaged hooks will then be installed.
If the packaged scripting does not match your style then they may server as a useful example.
Installation and instructions:
Install the package using VIPM.
At unistall, the packaged hooks will be unistalled and replaced by the original hooks.
Examples:
Open Examples\Test.lvclass
Right click on the Test.lvclass and select New>>VI for Data Member Access...
Select a read and write template for Simple, Array and MultiDim Array .
Inspect the FP and BD of the new VIs created to see the additional scripting.
Save the Simple write method to see the new default save name of "setSimple.vi".
Save the Simple read method to see the new default save name of "getSimple.vi".
Known Issues:
All - If a template name already exists LabVIEW will change it to a default. This will usually occur for arrays where the data member name is not used, but rather the element name of an array.
Array (Read/Write) - Comment is sitting on Index Control's wire
Read - Index control not in line with Index Array function
MultiDim Array (Write) Indicies control not in line with Index Array function
Acknowledgements:
Version History (Changelist):
1.1.1-1 2009 12 22
[New] Renamed packaged, designated old package as conflict
[New] Updated .zip name to include LabVEIW Version (LAVA CR Certified requirement).
[New] Dependencies included in package
[Fix] Removed CLSUIP_LocalizedStrings.vi so as not to distribute NI VIs (LAVA CR Certified requirement).
[Fix] Changed nameing convention to retain capitalisation.
1.1-1 2009 11 27
[New] Added support for when "Include Error Handling Terminals" is unselected
[New] Default save names included. Write: set; Read: get (where is the Data Member Name in camel notation)
[Fix] VIPC file now does not contain packages, it is a list only
[Fix] Removed Quick Drop dependency
1.0-2 2009 11 17
[New] Added VIPC file for dependencies
1.0-1 2009 11 17
[New] Initial release of the code (LabVIEW 2009).
License:
BSD
Support:
If you have any problems with this code or want to suggest features:
please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and search for the LVOOP Custom User Scripting support page.
Distribution:
This code was downloaded from the LAVA Code Repository found at lavag.org
-
You should check and uncheck in the 'shortcut menu activation' event.
Deciding wheter a valued needs to be checked should be stored inside your application. A mnu cannot automagically remember wheter it needs to be checked.
Ton
Ton is absolutely correct
Attached is an example. Run it as before. The principle will be the same for your application - your app must hold the persistent data, then the menu is prepared on the filter event. The menu does not hold the data.
Custom Run Time Menu Control.zip
[LabVIEW8.6]
-
Hi to All,
I need to create a custom shortcut menu that will become checked (or disable) when user click on it. I saw the Set Menu Item Info function in user-menu palets but I don't understand how I can use it. Can somebody tell me how I can use it?
Hi Spaghetti
Love your avatar by the way!!
Yes you will need to use those functions. Attached is an example. Run main.vi and then repeately select Custom Item from the menu to toggle its checked property. You can edit the menu by selecting Edit >> Run-Time Menu (when the VI is not running of course).
[LabVIEW8.6]
-
Hi everyboby,
i have a problem with the Mathlibrary:reflection point.vi because i change the block diagram and i saved the modify, but now i need to come back and i do not remember how was. Someone can help me, and tell me where i can find it?
Thanks
Hi Germi
It not a good idea to change vi.lib VIs and leave them in the same location. Anyways, I did a search for Reflection Point.vi in LabVIEW 2009 and all that got returned was an MGI VI named Bezier Reflection Point.vi.
Are you sure the name is correct?
Cheers
JG
-
-
Can you save it back to 8.6 (at least)?
Hi Jim
I have saved it back to 8.6 and tidied up the release a little. I had to take out the Unit Test Framework VIs for now - I will have another look tomorrow after work. I have included a VI with the disabled case at the moment so you all you have to do is just paste it in.
I will create a OpenG package for this next in the next release as well.
Hope you like it!
Cheers
JG
[LabVIEW8.6]
-
-
I daresay we're looking at the same issue. The is a way to get back to the full edit page somehow ... I think I had to turn off JavaScript and do a couple of force-refreshes in order to get all the AJAXy-ness to go away.
I am using Google Chrome and having the same issue. I can't open the full editor. If remember correctly I could just hover over edit post and it gave me the option of quick edit or full edit (or similar) I really liked that. Non premium members have a time limit to edit posts, but it would be nice if this worked.
Just to confirm - the Use Full Editor button has no function:
-
I've been working for a few days on a vi with no problems. Today I tried to open it again and I got a window showing that components are loading and then it freezes when it tries to load a "create empty matrix array" vi. I have to end the process from the task manager and restart labview. I've tried opening other vis and even previous versions of the one causing the problem and they all work fine.
Hi san_gr and welcome to the forums!
I could open your VI just fine in LabVIEW 2009. The code contains a mathscript node that was empty so I removed it and saved for previous version from LabVIEW2009 to LabVIEW8.2 as you have not stated what version of LabVIEW you where using.
Are you able to open the attached? If so it may isolate the issue somewhat.
[LabVIEW8.2]
<edit>
Under your aviator I see LabVIEW8.6, so I guess this answers one of my questions
</edit>
- 1
-
Damn, can't get into Full Editor? Oh well..
I have updated the Hook.
Changelist
1.1.0-1 2009 11 15
- Fix (Style): Aligned Indices wire on the block diagram as its neater.
Custom User Scripting For New MultiDim Array Element Accessor VI.vi
[LabVIEW2009]
-
Attached is a hook for a LVOOP Custom User Scripting For New MultiDim Array Element Accessor VI. See here for installation details.
Note: The control needs to sit in the same folder as the VI.
You will need to also install my Custom User Scripting For New Simple Accessor VI.
Enjoy!
Custom User Scripting For New MultiDim Array Element Accessor VI.viIndicesArray.ctl
[LabVIEW2009]
PS: See here for an example LVOOP Custom User Scripting For New Array Element Accessor VI.
-
Attached is a hook for a LVOOP Custom User Scripting For New Array Element Accessor VI. See here for installation details.
You will need to also install my Custom User Scripting For New Simple Accessor VI.
Enjoy!
Custom User Scripting For New Array Element Accessor VI.vi
[LabVIEW2009]
-
It works, but it's not as nice as I'd like it.
I don't know if there is a way around this? If LabVIEW itself it blocking execution of the second thread running (or the UI updating) then I don't know if there is a workaround.
I don't have as much as you have. Mine builds the executable and installer then closes LabVIEW and launches the installer. I want to add a function to set file permission on the ini files to restrict editing to admins. I'll be able to post it Monday, but it's not very fancy.
Thats a cool idea to run the installer - (assuming its an NI Installer you are using??) are you able to somehow respond to the prompts so it can install automatically - that would be cool!
Which ini files are you talking about? Are these the "settings" of the application that you own? Or the default .ini file created by LabVIEW?
Look forward to seeing it Monday
-
jgcode,
Works brilliantly, thanks!
Great to hear you like it! You're welcome!!
-
My primary advice if you want to pass the certification (any certification!), learn to present what the examiners want to see.
Great point, thats why I think Int I is a good idea as it expresses how NI would like you to build the app.
But it great to hear you didn't need it to pass! That's cool.
-
Justin's blog post CHANGED MY LIFE! I re-wrote my own interpretation of this earlier this week (I had made an ugly version after reading the post and wanted one that could be shared), but didn't go as far as you did. I can't tell how far you went, however, because I don't have LabVIEW 2009 yet. Can you save it back to 8.6 (at least)? Short of that, could you show me how you managed the timer? My timer keeps time but the interface frequently hangs/freezes when the builder is running.
Hi Jim
Yes, it was a great blog post! It's 2am here, but I will have a look at this tomorrow. I have just upgraded to Windows 7, so I don't have everything installed yet. But I will try to put on 8.6.1 if I have the time (delayed pay-per-view tomorrow) . It should back save ok as the same XML tags are used in 8.6 and LabVIEW 2009. Don't know about 8.5 and I know 8.2 is different.
As you can see from the block diagram, the timer just runs in another thread however, using the NI Build VIs the updating gets blocked (maybe the build runs as a high priority ?? - someone from NI may be able to comment). So it periodically updates. Thats ok cause the idea is I can leave it running and go away from the desk, I really just want to find the total duration.
What else did you add? Are you able to share code or any screenshots?
Cheers
JG
-
I was going to point you to this thread too, but it seems you started that one as well
-
Imitation is the sincerest form of flattery - Charles Caleb Colton (1780-1832)
Firstly I would like to say that I did not originate this idea, I first saw it posted on the JKI Blog by Justin Goeres. However, no code was posted, so I took what was there (GUI screenshot, BD screenshot, explanations etc..), said thank you, and came up with this. Of course I read Joel on Software and other books on (java) build scripts and seen other posts discussing LabVIEW build scripts etc.. but I wanted to make the above point up front as it is going to be very similar, but it was a great blog post about a great idea with a great example and I decided to implement it, use it and share it - with LAVA. So I hope its all ok. Thanks for listening.
Below are some notes on the code:
Since I was going to make this a template (.vit) a put a bit of extra GUI code in it. I wanted a clear visual sign when I came back to my desk that this thing had worked.
Or something had happened to make it fail. I also wanted to know the time it takes to build the project. With classes and libraries the build time can blow out from seconds to minutes (over 10) for some projects. Although 2009 seems much faster than 8.6. So I added another thread for a simple timer.
This script has support for 9.x builds. I found straight away I would get errors if my src code and dist folder where deeply nested in the folder hierarchy on the OS. 9.x solved the ugly build problem of files outside the exe, but it left me with a sour taste as my build frequently stopped due to error. This script solves the problem by transparently build in other folder (e.g. D:\dist) then coping these back to the Project. The only catch is (because reading the file XML tags in the project looks daunting) the 9.x Root path must match the start of the path in the build spec. Because I use the same location D:\dist I add a Project folder for each Project e.g. D:\dist\Project. the all the builds get located under here e.g. D:\dist\Project\application or D:\dist\Project\installer etc..
The architecture of the template is implemented using the JKI State Machine. Which is great for building GUI's quickly.
If you want to copy then edit this build for other projects (I had it as a .vit) then you will need to update the Project Details. The folder structure is hard-coded as this is a standard I use. All folders are relative to the project though. And there are some example files copied to the zip (for the creation of a CD).
I use NI's UTF a lot and this can run tests in the Project automatically. It can even decide to kill the build if tests fail. It is disabled in the distribution in case it is not installed.
Other
The application build Version can be auto-incremented and the installer Version is matched to it.
Support code used can be found in ..\lib. The subVIs are from libraries I use. You may find some reuse options in there.
I have been playing around with an AUTO feature that essentially defines constants for the GUI and therefore this script could be called by something else (e.g. as subVI) for an automated build (e.g. nightly).
I am looking doing the following in the future
Converting the .zip to an ISO so it's ready to burn; Archiving zip if its a release to server, SCC actions,
This code is a start and I would love to see what other people are doing and add to this over time.
Hope you enjoy it.
- 2
-
- Popular Post
- Popular Post
Name: Build Script
Submitter: jgcode
Submitted: 13 Nov 2009
File Updated: 03 Jan 2011
Category: *Uncertified*
LabVIEW Version: 8.6
License Type: BSD (Most common)
Build Script v1.1.0
Copyright © 2009, Jonathon Green; JGCODE
All rights reserved.
Author: Jonathon Green
LAVA Name: jgcode
Contact Info: Contact via PM on lavag.org
LabVIEW Versions:
LabVIEW 8.6
LabVIEW 2009
Dependencies:
jki_lib_state_machine >= 2.0.0
jki_rsc_toolkits_palette >= 1.1
oglib_array >= 2.0
oglib_appcontrol >= 2.0
ogrsc_dynamicpalette >= 0.2
oglib_error >= 2.0
oglib_file >= 2.5
Unit Test Framework (optional)
Description:
Contains a build script for a LabVIEW Project. Use a build script in your development to automate the task of, and avoid errors when, creating deliverables. A sample project is included that creates an application, installer then archive (.zip) for a project. This build script supports the new 9.x build format by building the specs in a high level temp folder (e.g. C:\dist) to minimise errors occurring from the OS exceeding maximum number of characters in path. NI's Unit Test Framework (UTF) is supported or code can be added for other Unit Test APIs (see Unit Test Framwork.png for demo code).
Installation and instructions:
The dist folder contains build.vit and a library (.llb) of support code. See Examples section on how to use code.
Examples:
1. Open example\Project.lvprj
2. Open and run build.vi, VI should complete execution with no errors
3. Once build script has completed explore example\dist to view all builds (application, installer, zip)
4. Unzip zip folder and install application
5. Run the application
6. "Build Works!" dialog should appear to indicate sucessful build
7. Reuse script
a. Use build.vit as starting template for project
b. Edit the project details on the block diagram to match to new project
Known Issues:
No Known Issues
Acknowledgements:
Version History (Changelist):
1.1.0 2009 11 15
[Fix] Code saved to LabVIEW 8.6 on request from LAVA member. Unit Test Framework VIs were removed due to build issue.
[Fix] SubVIs added to a .lvlib within a .llb.
1.0.0 2009 11 14
[Feature] Initial release of the code (LabVIEW 2009).
License:
BSD
Support:
If you have any problems with this code or want to suggest features:
please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and
search for the Build Script support page.
Distribution:
This code was downloaded from the LAVA Code Repository found at lavag.org
- 3
[Discuss] Build Script
in Code Repository (Uncertified)
Posted
Well, heres cheers to LAVA