Randy
Members-
Posts
24 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Randy
-
As the description states, the issue I'm having is with an application I've developed which utilizes class "plug-ins". I've also posted this issue on the main discussion board at NI (http://forums.ni.com/t5/LabVIEW/Get-LV-Class-Default-Value-Error-1498/td-p/1129973) but I thought I'd get it over here as well since from my experience this board is more finely tuned to LVOOP development. In short, the plug-in architecture works fine in development environment or if the plug-in doesn't utilize any hardware drivers (i.e. mxDAQ, Fieldpoint, Serial) in the runtime environment but if I try to load a class which contains a hardware driver in the compiled program it throws a 1498 error. What I've traced this error to is that the class cannot be loaded because it appears to be broken (even though it loads fine in development). I've tried different methods of compiling, including classes, hardware drivers, etc but cannot seem to find a solution. If anyone has any thoughts or has conquered this issue in the past I'd appreciate the wisdom. If you want to get a simple example of what I'm talking about, I attached one to the discussion linked above. Thanks, Randy
-
2,538 downloads
Copyright © 2006, Randy Recob All rights reserved. Author: Randy Recob --see readme file for contact information Description:: An example of utilizing external javascript in Labview. In this example an external javascript is loaded into Labview and it's functions are called to modify an existing XML database/file by adding information passed to the javascript function from Labview. Included in this zip file are the following: CallingJavascript.vi - Example vi users.xml - XML database file users.xsl - Extensible Structure Language for converting XML to HTML users.htm - Webpage for displaying database contents xml.js - External javascript called by Labview and users.htm All files must be located in the same directory. Version History: 1.0.0: Initial release of the code. -
Name: Calling External Javascript Submitter: LAVA 1.0 Content Submitted: 03 Jul 2009 Category: Database & File IO LabVIEW Version: 8.0 Version: 1.0.0 License Type: Creative Commons Attribution 3.0 Potentially make this available on the VI Package Network?: Undecided Copyright © 2006, Randy Recob All rights reserved. Author: Randy Recob --see readme file for contact information Description:: An example of utilizing external javascript in Labview. In this example an external javascript is loaded into Labview and it's functions are called to modify an existing XML database/file by adding information passed to the javascript function from Labview. Included in this zip file are the following: CallingJavascript.vi - Example vi users.xml - XML database file users.xsl - Extensible Structure Language for converting XML to HTML users.htm - Webpage for displaying database contents xml.js - External javascript called by Labview and users.htm All files must be located in the same directory. Version History: 1.0.0: Initial release of the code. Click here to download this file
-
I'm still not able to get this functionality to work, I've tried posting a couple of different labels on the front panel with no success (I've perused the binary file and don't find any mention of the keywords that get coded in the labels). I have been able to make this work putting the tags in the VI description (which I could pull out to the front panel or splash screen) and I thank you for the insight on the fixed length keyword replacement information to allow that but it would be nice if I could just paste a text label on the VI and not have to go through the coding. Any more insight would be appreciated (maybe I'm not finding the correct label). QUOTE (Chris Davis @ Feb 7 2009, 01:45 PM)
-
Thanks, kind of what I was thinking from the research I've conducted...I think we'll move to a panel PC with a full blown OS instead. Thanks again, Randy QUOTE (jgcode @ Nov 5 2008, 04:23 PM)
-
I'm looking at implementing a system that publishes a vi through the labview web server for remote access/control. I'd like to be able to view this webpage on a PDA/Windows CE device and was wondering if there is a runtime deployment for Windows CE that would allow this kind of remote panel type setup since I've needed to install runtime on PC based machines with a similar setup. I'm operating with LV8.6 on the system acting as a web server. Thanks
-
Just a note for those of you who were using the instructions above to automatically add the svn:needs-lock property to labview files before commiting to the repository. I had multiple issues with the setup of the pre-commit hook file in the linked wiki, what turned out to be the problem was some issues with text parsing, I cleaned up the issues that I found (it was a major headache to debug) and am posting the modified coded below, please note that the SVNLOOK and TEMP variables are specific to my installation and may need to be modified for yours. Regards, Randy @ECHO OFFset REPOS=%1set TRANSACTION=%2set SVNLOOK=c:\svnserve\svnlook.exeset TEMP=c:\repository</P> <P>if exist %TEMP%\tempfile%2 del %TEMP%\tempfile%2for /f "usebackq tokens=1*" %%i in (`%SVNLOOK% changed -t %2 %1`) do @if NOT %%i==_D @echo %%j>> %TEMP%\tempfile%2 if not exist %TEMP%\tempfile%2 goto NOFILESADDED for /f "usebackq tokens=*" %%i in (`findstr /E /I /R "\.bmp.$ \.gif.$ \.ico.$ \.jpeg.$ \.jpg.$ \.png.$ \.tif.$ \.tiff.$ \.doc.$ \.jar.$ \.odt.$ \.pdf.$ \.ppt.$ \.swf.$ \.vsd.$ \.xls.$ \.zip.$ \.vi.$ \.vit.$ \.ctl.$ \.llb.$ \.dwg.%CONTENT%#34; %TEMP%\tempfile%2`) do ( %SVNLOOK% propget -t %2 %1 svn:needs-lock "%%i" 1> nul 2> nul if ERRORLEVEL 1 ( echo commit denied, binary files must have property svn:needs-lock >&2 type %TEMP%\tempfile%2 >&2 del %TEMP%\tempfile%2 EXIT /B 1 ) ):NOFILESADDEDdel %TEMP%\tempfile%2EXIT /B 0 QUOTE (jdunham @ Oct 5 2008, 11:54 PM)
-
many different ways... QUOTE (highreel @ May 6 2008, 10:20 PM)
-
When running the attached code in Dev environment, no problems but as soon as the code is compiled the setting of the "VI Name" throws an error. I'm using a template VI and then launching multiple instances but I'd like to name each VI created so that the operator knows which test station the VI is tied to (i.e. "Test Station 1", "Test Station 2"). The code works well up until the setting of the aforementioned property (reference is opened, EFT_Ctrl data is passed and the cloned VI is opened then comes the error). Any ideas on how I can make this work in an executable? Thanks, Randy
-
I've found that working through XML files can be quite tedious in LabView due to the lack of garbage cleanup (each time you open a node, property, etc. you need to make sure you close the reference). I'm currently generating custom XML files on my test systems by calling/passing arguments to an external javascript which has automatic garbage cleanup (will close all references once code has executed). You can see a simple example of what/how I'm doing this here. QUOTE(Phil Duncan @ Dec 5 2007, 08:28 PM)
-
You may want to check out this (xml using javascript) piece of code I put into the repository, it utiilizes javascript to write to an xml file with the msxml active x objects. The benefit of doing this through the javascript interface is the garbage collection built into javascript where as using the msxml active x objects in Labview can be cumbersome due to the continuous opening and closing of references when working through an xml file. While the example is simplistic, with a little investigation you can turn it into a powerful tool for documentation. The following is an example of an xml file being generated on one of my test systems. XML file example QUOTE(Kalmar @ Apr 22 2006, 02:01 PM)
-
A better example one of my system's test results stored in an xml. Download File:post-3040-1165338503.xml
-
Thomas, Glad it helped ...just another example of utilizing external code to read xml files. It's important to realize what the javascript is doing because it is very specific to the XML file you submitted. The vi is loading the javascript code and then calling three functions in the javascript. The first function is loading the XML file that you located through the dialog, the next function is searching the XML for the "//Info/Created" and "//Info/Culture" node values and the third function is stepping through all the "//MeanPublic" nodes and putting the contents of the nodes into a spreadsheet string. This string is then passed to LV where it is put into an array. A better example of calling external javascript and accessing/writing XML files can be found here: http://forums.lavag.org/CR-Calling-Externa...ript-t4977.html Randy
-
Yep, ran with no problems on my PC. Do you have IE5 or above installed on your computer (the activeX object that I'm using in installed with IE5+)? What is the error message you are receiving? Also, make sure that the xml.js file is located in the same directory as the AccessingXMLData.vi, otherwise you can try the attached vi which has the javascript code embedded in the vi. Randy Download File:post-3040-1165249453.vi
-
[CR] Data Repository with INI files (not a Source-Code-Control)
Randy replied to sam's topic in Code Repository (Uncertified)
Here is a VI that utilizes another method for reformating an XML file, this one doesn't care about incoming format since it is not doing the parsing through Labview itself but using the SAX Reader. Download File:post-3040-1164601534.vi Randy -
Try this vi, make sure the javascript file (.js) is in the same directory as the vi. This vi will ask you to locate the xml file and then will import the data from the xml into a couple of arrays. Should demonstrate what you need to do.Download File:post-3040-1164225481.zip Randy
-
Rick, Thinking about it some more you could probably set up the hardware to output a pulse based on an external clock (in this case the encoder signal) which has been divided. For example you could set the encoder as the clock and divide by 2048 so that every 2048th count the output would be generated (the output signal is separately configured). The trick to this is the start trigger for the output signal (your offset value), I'd have to play with the hardware to figure out how to make it work. Randy
-
Hey Rick, Saw your post and thought I'd send you a little help. First I'd read the following application note from NI: http://zone.ni.com/devzone/cda/tut/p/id/5387 What this shows is the ability to configure your counter card to send a signal when the terminal count is reached, you could then couple this with a start trigger on the counter coming from the Z pulse and an start your initial tick count at 2^32-1-(offset). For example if you set your initial tick count to 4294967195 and started the counter from the z-pulse, the counter would roll over at 100 counts from the z pulse, this could be configured according to the NI application to send a pulse to your camera. Hope things are well at QG...keep in touch, this is a great resource for all things Labview. Randy P.S. in this configuration you would need to reset/restart the counter after each output trigger. Depending on how often this is happening you may miss a signal or two in between but you would at least have a repeatable offset from the z-pulse
-
[CR] Calling External Code: Javascript
Randy replied to Randy's topic in Code Repository (Certified)
I do not, this code was meant to be an example of calling external javascript as well as demonstrate a method of accessing/modifying/creating XML documents. While I find this example to be very helpful (and I hope others will as well) it is not meant as a drop in function since it is specific to this example. Work could be done to create a javascript library(s) of functions that might be useful within Labview as a drop in VI but I do not have the time/energy to do such work. If someone else is interested in this development I'm more than willing to aid in the development and show what I've developed for specific applications. -
That's exactly what I'm using for currently, on my test equipment I'm writing results to a network database but needed a local storage in case the network was down. I've attached an example of the XML that I'm using to log our test results. Download File:post-3040-1162909966.xml
-
Another example of access/manipulation of XML files can be seen at the attached link. Instead of creating ActiveX objects in Labview I'm utilizing external javascript to perform the load and insert functions through function calls. This eliminates the need for creation/cleanup of Labview methods/properties (since LV doesn't have garbage collection but Javascript does http://forums.lavag.org/index.php?showtopi...amp;#entry19380
-
File Name: Calling External Code: Javascript File Submitter: Randy File Submitted: 21 Nov 2006 File Updated: 21 Nov 2006 File Category: Database and File IO [turn on word wrap to read clearly] Calling External Javascript V1.0.0 Copyright
-
Hello everyone, Since I've gleemed quite a bit of useful code and information from this site, it is my pleasure to offer what I hope is a useful piece of code to the community. The MSXML toolkit offered through the OpenG site is a really nice implementation of the MSXML DOM Active X object but I've been bothered by the single line format that the "Save XML" vi generates. This single line format makes it near impossible to manually read/edit an XML file if it's been touched by this vi. The vi I've attached has a few lines of code added that will save the XML in a standard "pretty" format (tabbed tree structure). To use simply replace any instances where the previous "Save XML" vi was used with the new vi. Enjoy, Randy Download File:post-3040-1153346994.vi