LabVIEW Idea Exchange

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 
Post an idea

I've made my own copy of the actor framework to implement some changes that I really needed. Because of this I cannot really share code easily and my framework branch is not automatically updated. The changes that I've made could be made without overwriting the framework if only the framework was more open.

(a bit of what you can do with the changes are listed in brackets)

 

Creating more functionality for actor framework classes should be done through children of the classes in the framework. The way the framework is setup makes it impossible to add functionality to some classes:

- Message Priority Queue

- Message Enqueuer

- Message Dequeuer

- Message Queue

These classes are all obtained with a class constant internally in the framework.

I would really like it if we could have a class input to all these so we can implent additional queue functionality and have this input as part of either an actor dynamic method inside of the Actor.vi that the constants are read from or an input to the launch VIs.

[Magic can be done with enqueue in front combined with batch message children and public scoped read self enqueuer --> self propagating message array]

 

Changing functionality through dynamic dispatch is the way it's meant to be done. But most of the Actor framework VIs are static dispatch. Vi's that I'd like to make dynamic are:

- Launch Actor Core.vi (and probably all the other launchers as well)

- Actor.vi

- Send Message and Wait For Response

- Send Batch (Or change the class constant to a control

[adding a counter to an actor child would be easy with a dynamic dispatch of Launch Actor Core]

 

Heavy use of access scopes makes some actions impossible (as intended). I'd like to have the following changed to community scope and added as friends to the Message class:

- Read Self Enqueuer

- Read Caller Enqueuer

[Messages that flush the queue, view the queue status enqueues them self on the queue and so on can be made]

 

And lastly but surely the most controversial is the change of pre launch init from non-reentrant to reentrant.

Yes by doing this and launching an actor from within the vi will crash your program. But doing it as is will result in a deadlock anyway. The protection of making it non-reentrant is extremly weak! I'd rather have some warnings. What you gain is that the actor that you are launching and the nested actors that it will launch from the pre launch init can share their private data during launch! This is extremely useful with actor shared notifiers, DVRs and so on. Note that you can do this halfway by launching from the actor core.vi however the data will only be shared up in the hierarchy not throughout the entire hierarchy... which is bad/sad.

 

I hope you'll look into at least some of this to enable a more dynamic usage of the framework for advanced users.

 

Although I expect that it will take a while before this is implemented I would like to add the request so NI can start thinking about it.

 

As you might have noticed that Microsoft announced a few things on Microsoft build 2015.

 

Aside from the hololens and windows 10 for the raspberry pi they both share 1 common factor. They both run "Universal apps" (see http://www.engadget.com/2015/01/21/windows-10-makes-microsofts-dream-of-universal-apps-come-true ).

 

So it would be great if we can run LabVIEW programs as a "universal app" and run our code on all windows 10 devices..

It's not secret that .NET or ActiveX object on front panel appears to be child window of NI container clipping window, which itself is a child of front panel window. When there's only one object in the container on FP, it is easy to get its window handle (HWND) by calling GetTopWindow or simply by iterating through all child windows of FP. This handle has to-one correspondence with automation refnum on block diagram. But when there are several .NET/ActiveX objects on the panel, it's impossible to identify their handles with refnums on BD.

 

The way of handle obtainment could be implemented by any of the following methods:

 

1.

Autorefnum To HWND.vi

 

2.

 Window Handle Property

(or let it be private property, being activated with special *.ini key)

 

3.

MgErr AutoRefNumToHWND(refNum, hwndp); - this variant is analogue of LabVIEW Manager function FRefNumToFD, where refNum is automation refnum of .NET/ActiveX object (type LVRefNum) and hwndp is pointer to child window handle (type HWND *).

 

Probably many people may consider this idea unimportant, but when it comes to drawing different shapes, displaying text, copying window content etc., my suggestion may be very relevant.

 

This should work!! I know there are workarounds and I have used them but it would be much easier.  

atsrefdsfads.png

 

On Windows, you can define environment variables that auto expand to known directories. There are some variables that are already defined by the system. For example, %TEMP% automatically expands to c:\Users\<username>\AppData\Local\Temp OR WHEREVER THE USER MOVED TEMP DURING INSTALLATION. That's the important part .That makes it possible to write %TEMP%\abc as a symbolic path that works regardless of how the system gets reconfigured.

 

Users can define their own environment variables, and those get expanded when used in a path in the command line or Windows Explorer (the text entry region at the top of an Explorer window). On Linux and Mac, it is the equivalent of using $VARIABLENAME/abc, where VARIABLENAME is some user-chosen name.

 

[admin edit] Added background information on environment variables, and updated title to use the word "Environment" instead of "Environmental".

We have developed an external DLL that is called from LabVIEW using CLFN. I have noticed a weird behavior regarding DLL detaching (unloading).

Scenario 1
I have 2 VIs calling the DLL. I run them and then close all of them. In this case, the DLL is detached when the last VI is closed.

Scenario 2
However, if I create project containing the same VIs as in scenario 1, when I close all the VIs after running them, the DLL stays loaded until I close the project.

This behaviour does not seem correct. I think LabVIEW should behave the same in both cases.

What do you think?

Sara

 

[admin edit: I changed the idea title per user request. The original title was "DLL shouldn't stay loaded when all the VIs calling it are closed".

Add a LabVIEW application method or property that would allow us to set the object of the context help so that we can specify a VI from a tree based browser (much like the Project Window does).

 

https://lavag.org/topic/9167-context-help-for-a-vi-without-loading/?p=54820

 

With LINQ (Language-Integrated Query) becoming increasing prevolant in .Net programming, more and more classes are using <T> Generics.

Unfortunately, LabVIEW does not support Generics, which limits the Methods and Classes available when importing .Net Dll's.

 

Take the following code:

 

namespace GenericsTest

{

   public class GenericList<T>

      {

      void Add(T input) { }

      }

 

   public class NonGenericList

      {

      void AddNoT() { }

      }

 

   class TestGenericList

      {

      private class ExampleClass { }

      static void Main()

            {

         // Declare a list of type int.

         GenericList<int> list1 = new GenericList<int>();

         // Declare a list of type string.

         GenericList<string> list2 = new GenericList<string>();

         // Declare a list of type ExampleClass.

         GenericList<ExampleClass> list3 = new GenericList<ExampleClass>();

            }

      }

}

 

When importing this to LabVIEW

 

GenClass.PNG

 

Notice that I can only see the "NonGenericList" Class as LabVIEW fails to destruct the "GenericList" Class.

One solution to this problem may to treat generics as Method/Constructor inputs, allowing the developed to choose the Generic Type.

LeCroy oscilloscopes do have a decicated area of the user interface for customization. The custom space can be used by an ocx-ActiveDSO PlugIn that is registred on the instrument.

This kind of ActiveX-Control can do far only be built by some VC and VB compilers.

 

It would be very nice to build now such a CustomDSO PlugIn for a LeCroy oscilloscope by LabVIEW.

 

With regards

Peter

 

 

Tameq Schweiz GmbH

+41 56 535 74 29

It is common, in writing reusable code, to handle arbitrary clusters in variants.  To access the elements of the cluster, one wants to convert the cluster into an array of variants containing the individual items.  After access, one needs to convert the array of variants back into the original cluster.

 

There are several examples of packages that use this on NI.com and in the LAVAg.org Code Repository.  They mostly use functions for working with Variant Clusters from OpenG; however, these can be quite slow.   Recent LabVIEW versions have had the ability to do much of the functions quicker, however, there is a very imortant missing native ability: to convert an Array of Variants into a Variant Cluster.

 

The other direction, Cluster to Array of Variants, works like this:

Array of Variants to Cluster.png

But trying to reverse the process breaks:

Array of Variants to Cluster.png

 

So my idea is make the second image work; make an Array of Variants interchangable with a Variant Cluster in the "Variant to Data" LabVIEW primative. The interchangability should apply to contained subclusters/arrays also.  The matching of array to cluster elements can be by cluster order rather than element name.

 

This would greatly aid the performance of reuasable packages that operate on arbitrary clusters.

A version control system is a must these days, but rearranging project files in LabVIEW is a nightmare without integrated support.

 

The correct way to do things is in LabVIEW rather than the file manager to save creating headaches and conflicts in LabVIEW.

The correct way to do things to maintain subversion history and minimise headaches related to subversion is in the file manager using subversion tools (e.g. TortoiseSVN).

 

So without subversion integration, we are damned either way.

 

Please provide a way we can get this support without doubling the cost of all our licenses by upgrading to Professional for this one feature (management will never go for it) . Please consider adding it to cheaper versions, or at least make it available as an optional addon for a reasonable price.

As software versioning becomes more and more popular also the automatic building of source code becomes more and more interesting.

 

Right now in our company we are using GIT and JENKINS for C-code material as our versioning and automatic build tool. As soon there is something being checked in and pushed to the main repository the builder gets notified and tries to build your source code having the output available somewhere.

 

As we are having many users around the globe these tools obviously run on a virtual machine or server somewhere.

 

Right now there is no option in buying the application builder seperatley and control it via command line. The only option is to put a complete development environment on there which is useless and a waste of money.

 

My request would be to sell the application builder seperatley for these purposes OR figure out an alternative way for doing this in a professional and neat way.

 

some usefull links:

http://jenkins-ci.org/

http://git-scm.com/

When you hit build, you can't edit code. Build takes a while, sometime hours. 

 

We would like to separate the compile process and free the editor, or target another pc/ip to offload compilation.

 

I would like a right-click option where a folder of packed libraries waiting to be compiled are queued and scheduled e.g 6pm or weekends and Labview is open. 

 

My colleague Bosko G has something on the latter (attached) and came up with the request. I am sure others have thought about something similar but I couldn't find a post addressing it directly. To be clear, the request isn't for a 3rd party cloud farm alone but also something we can setup on intranet PCs/Servers.

 

Thanks. 

 

Pavan 

Direct to PDF reporting is an extremely important feature to provide customers.  It cannot be relied upon that the customer has MS Word or the like installed.

There are a couple of LV PDF toolkits supplied by developers.  However, the problems with these include that they are (a) not updated or well-supported (b) buggy (c) have out-dated dependencies such as .Net 2.0 (d) restrictive licencing for deployment.

Good reporting tools are essential and NI should develop and support a direct to PDF toolkit.

Can we have some report generation that is Microsoft Publisher specific as this would be more useful than word or excel. Or a more generic format that could be used by different publishers. Or a generic print file that is more adaptable to the page size and position on the page. LabVIEW desktop publisher?? This is because the only way to print at the moment is via word or excel or by printing the front panel which can be a bit hit and miss in different versions of Windows.

When working with large projects with many VIs I often find myself rewriting portions of the 'find and replace' feature that already exists as part of my VI Analzyer for overnight code-checks on the server...

 

It would be really neat if the existing find and replace logic available via the dialog was wrapped up into some simple API to allow for searching:

  • for full/partial matching text
  • VI path to subroutine...

 

if it had parameters to suppress dialog popups for passwords & not-found-subVIs, that would be really helpful for running searches headlessly.

 

The API could return just a 1D array of paths to SubVI's where instances were found, or if it was really nice, the VI references?    I'd be content if just the 'find' side of the equation was implemented..I could take any manipulations from there.  I can see that there might be a dependency on VI Scripting to accomplish the search, and I'd be OK with an API that only works on a machine with a dev license... Especially if the 'replace' side of things was implemented somehow...

 

-E

 

 

If you have mulitple versions of LabVIEW installed, some of them show up in the "Open With" menu, but regardless of which item you select, the VI will always open in whichever version of LabVIEW was opened most recently.

 

Example: if I opened a legacy VI in LabVIEW 2009, closed that version of LabVIEW completely, and opened another VI using the "Open with" menu and selected LabVIEW 12..., LabVIEW 2009 is relaunched and is unable to open the VI because it should have launched in LabVIEW 2012.

 

 

OpenWith.png

The current workaround is to add all installed versions as options in the "Send to" menu, but this is not nearly as intuitive as using "Open with" would be.

 

It would be very useful if we could have same QuickDrop PlugIn with the same shortcut depending of the selection object that we have made in "Block Diagram" or in "Front Panel".

 

For example:

- Imagine "Ctrl+C" short cut, this would be useful for lots of QuickDrops that comes to my mind.

  • Copying to clipboard a bundle by name text.
  • Copying to clipboard a unbundle by name text
  • Copying to clipboard a selected case.
  • etc....

Hi,

 

building a large project consisting of several executables and an installer is no problem when using the AppBuilder API.

But a quite time-consuming task is to open all build specifications to update the build path or the file  versions.

E.g. opening the build specification of an installer containing several executables can take up to a minute even on an up-to-date pc.

 

So I suggest to enhance the AppBuilder API with property/method nodes to manipulate the "often-to-be-changed" properties. An example is attached below.

 

Regards,

 

Bastian

 

AdvancedAPI_lvie.png

Hi,

 

i have an idea to use for labview for vehicle navigation display on ENC charts. it will be very useful as developing sensor interfacing and acquiring data from navigational sensors (GPS , accelerometer, gyros ) is a lot easier in Labview but then displaying it properly using ENC charts for mapping purpose is still a question mark in Labview.

 

i would like to refer some companies (global mapper etc) which are developing SDK  and activex control for C# etc but no support for labview.

provide a means to see dotnet or externall dll documentation in Labview

 
Ie
        /// <summary>
        /// the file location where the data is to be logged.
        /// </summary>
        private string _path;
        /// <summary>
        /// the file location where the data is to be logged.
        /// </summary>
        public string Path
        {
            set { _path = value; }
        }
 
 
ie to be able to see the following
the file location where the data is to be logged.
when the property node is touched In labview