LabVIEW Idea Exchange

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

Its better to disable the functionality of the function keys while a code is running.

 

One incident i came accross is:

     I assigned ESC key for a control and while running the code i wrongly pressed F1 (Which is not assigned to any control) suddenly the Help file started opening and my whole code got hangged. I dont think that some one will need open the help file during code running So its better to disable the original functionality of the function keys just during the code is running.

 

Smiley Wink

After deciding to post an idea for a "parallel" structure, a search revealed the idea for a Parallel Execution Structure has already been proposed by gvholland here

I gave my kudos to this idea because I believe it would be very useful.  In order to make a parallel structure even more useful, I propose adding some features that would make it more convenient for those of us who might use it in code that must execute in parallel for performance and functional reasons.  It has been commented on the other thread that parallel code should be placed in subVI's, and I concur with this view.  However, there are instances where this is either inconvenient or impracticable.  Consider the following example:

 

An application needing to perform simultaneous PID control on 32 channels must execute in parallel (only 8 channels shown for clarity):

 

23998iF3A3D6145B22A221

 

Now quadruple the number channels in this scheme, and you can have a pretty big diagram with lots of wires.  Also consider the routine task of initializing that “clustosaurus”  or “classosaurus” as in this example:

 

24000iDFC8181255144D80

 

We've all probably tried the scheme wherein we put a case structure inside a FOR loop and wired the iteration terminal to the case selector, as in these examples:

 

24002i0E33EE6CA3D6316A

 

24004iB398DF500188AD49

 

That's clean and easy, and allows the user to create instances of the reentrant VI by duplicating cases.  But that architecture forces the vi's or code to execute sequentially.  The new parallel FOR loop can boost performance of these techniques, and create parallelism.  But I would like a basic parallel structure that cleanly handles some routine tasks by adding some useful I/O nodes, ala the InPlace Element Structure.

 

I propose the following structure, or something similar:

 

24006iEFA2DE50585DBE3A

 

This structure is drawn here with some proposed I/O nodes and tunnels.  This is by no means the complete set of I/O that might exist, but rather a starting point.

 

Cluster unbundle/bundle node:

 

 24008iB135E86434F20934

 

This node accepts only “brown” clusters, or clusters of Booleans.  The elements are passed to each frame in corresponding index order, element 0 to frame 0, and so on.  Once added to the structure, a single unbundle/bundle terminal pair appears in each frame. Much like a bundle function that has its center terminal wired, the bundle terminals may be left unwired.  The values of unwired elements remain unchanged.  Any cluster wired to this node must have the same number of elements as the parallel structure has frames.  If not, the wire is broken.

 

Array index/replace node:

 

24010i570ABF83C7044CDA

 

This node auto indexes an incoming array and provides a replace array element node on the right.  Note there is no index value IO as with the IPE, since the parallel structure auto indexes the array and distributes/replaces the elements across the frames.  If an array has less elements than the number frames at run time, the node returns default data for the undefined elements, exactly as an index array function does, but the structure returns a warning or error (I can’t decide which).  The output array would always have the same number of elements as the structure has frames, or the same number of input (can't decide which) .  The replace element node on the right must be wired in every frame, just as a replace array element structure must have all of its exposed elements wired.

 

Cluster unbundle/bundle by name node:

 

24012i2C2666661000FEB0

 

24014i1D92D4684B152FC9

 

This node is tricky, but I decided to take a stab at it anyway.  The node is created and visible on both sides of the structure.  However, unlike the IPE, the unbundle/bundle terminals on either side can be of different sizes and element selections, and can optionally be unused on either side, or both sides, within the individual frames.  Unused terminals appear with the same symbol as the center terminal of a bundle function, as shown in the proposal drawing.  If an element is selected for bundling within a frame, then it is unavailable for bundling in all other frames.

 

Indexing and non-indexing tunnels:

 

24016i58EE71B2884A8F01

 

Non-indexing tunnels function somewhat like they do on a sequence structure.  Input tunnels provide data to all frames, non-indexing output tunnels may only be wired in one frame.  Unlike sequences, however, the data arriving at output tunnels would be free to flow out of the structure immediately, which will seem weird, and violates the "whole structure must complete" convention.  But remember, this is a parallel structure.  Like sparks shooting off the bolts in the monster's neck while it's alive, it's gonna be be weird by default.

 

Indexing tunnels are different.  Like the auto-indexing node, auto-indexing input tunnels distribute the array elements across the frames.  If the array size is smaller than the number of frames, the frames either execute with default data, or the undefined frames don’t execute, and the structure returns an error or warning (help me define this).  Auto-indexing output tunnels behave like output tunnels from case structures; either all frames must be wired, or the tunnel must be configured to use default data if unwired.  Unlike the non-indexing output tunnel, data from this tunnel is not available until all frames have completed execution.

 

Error I/O Nodes:

 

24018iB1B7660563C17E73

 

There are error inputs/outputs for the structure as a whole, and for each individual frame.  The structure error IO is situated in the lower left and right corners, naturally.  The frame input and output terminals can both be optionally hidden or exposed in each frame, and also slide independently of each other up and down the left and right sides of each frame in which they are exposed.  The structure distributes the incoming error among the exposed frame error input terminals, and merges the frame output error values to the structure output terminal, along with any messages generated by the structure itself.

 

So what do you do with this “Frankenstructure”?  Well, here are a couple of the aforementioned examples rewired using this hypothetical beast:

 

24020iFA3810D047850DB3    24024i4CB073DB117956CF

 

 

Of course there could be other cool things, like a CPU core selector for the frames, etc.  Just let your imagination, (or nightmare, depending on how you see it) run wild!

Currently I'm busy with GOOP and I came across the following problem. 

 

I have a validator class. The purpose of this class is to validate data. The validator class as a number of childrens...

 

Validate IP address

Validate string length

Validate inRange number

Validate Alpha

 

The main, validator, class has a function called "valid?" This function has 3 inputs and 3 outputs

 

Inputs:

- Object

- The data that must be validated

- Error

 

Output:

- Object

- Valid?

- Error

 

The children classes must inherit this function and overwrite it. Now the problem is is that each of the above validators have a different datatype which must be validated....

 

Validate IP address has a string as input

Validate string length has a string as input

Validate inRange number has a number as input

Validate Alpha has a string as input

 

Now you might see the problem. To get the children to inherit the function from the main, validator, class the connector pane must be the same as of the datatypes... This means that I have to choose in my main function to use a string or a number as input... This is something that I don't want... I want to be able to select a datatype called "yet unknown datatype" in my main "valid?" function in the main, validator, class. So that I can use any datatype input in my children that is suitable for that implementation. 

 

 

My idea is thus to create a new kind of datatype which sort of represents "any kind of datatype known to labview" which can be used in functions of a main class that are inherited by its children, which are all using a different input datatype.

 

ps. Now you could maybe suggest why not use a variant datatype? Yes this is possible but the problem is;

- I would have to cast the data back

- It isn't very neat programming, the variant solution is in my opinion more a kind of hack to make the code work.

 

pss. Yes but if you would do this... then...

- Yes there are proberbly a few more work arounds thinkable, such as creating two "Valid" VI's one inherited (Valid?), one unique of the child (_Valid?), but these are in my opinion still workarounds and do not really provide the functionality that is needed. Which is pretty common in OOP languages.

 

psss. if anyone knows a better title for this described idea let me know it! 

Enable a Sub VI to launch as a daemon without having to open a reference to it using its path.  The VI Properties page would look like this:

 

21429iB830C4B88A795136

Wait until done would be checked by default, and auto dispose reference would be left false be default.  So instead of parsing the path to the VI on disk and using a method to run it:

21433i0CFC0F873277247C

I just set the correct properties in the VI Properties page and drop the subVI on the block diagram of the calling VI.

Hi,

 

the idea subject says it all. I think this is usefull for multi-level data types with data placed into the parent and its child class (and in the child of the child class ...). To transport the data, you use the parent class. If you want to modify the data inside of a child class, you program a corresponding dynamic dispatch VI or you have to convert the parent class to its child class, modify the data, and convert back to parent. The In Place Element Structure would be nice for the second method.

 

Regards,

Marc

I was just involved in a discussion about a default return value for the dequeue primitive when a different idea struck me.

 

Why can't we define a default value for typedefs.  Especially enums would benefit by having a case reserved for operations where something didn't work as expected and a default value is returned.  Being able to seperate this value from other (normally required) values would be a boon for ensuring data integrity.

 

21307i98E925E66B45E54C

 

Why can't we have the default value set to something we don't normally interpret as being valid?

Issue:

Dynamic Launching of a VI works fine when the plug-in code is launched from the LabVIEW source code.

When the Application was build it fails to launch the VI. Upon debugging I found that I am reusing some of the SubVIs in the plug-in VIs that is part of the EXE. I tried renaming and re-linking of those Vis for the Plug-in VIs it works fine.

 

Solution:

           Similar to Name spacing provided by Lvlib files. Add an additional option in the Exe build spec, to add a name space for the application this will rename all the VIs as "my project:main.vi, My project:test1.VI" etc inside the Exe. This will resolve the naming issue created by the LabVIEW runtime engine. So a plug-in VI can reuse the test1.Vi from the Source code.  

 

 

I have had to jump through hoops to create a .net process or use runas to get portions of code to run

when the end used does NOT have admin privileges.

 

Add Option under VI Properties >> Execution to allow setting the VI to run as admin or another user.

In their current form, Auto-Indexing tunnels only operate on a single dimension of an array.  For example.  If you input a 2D array, through an auto indexing tunnel into a for loop, and display the resulting 1D array in an indicator inside the for loop as below, you will always get the last row.

 

I'd like to see a feature where you can right-click on the tunnel or something, and set it to auto-index by column, instead of by row, and get the last column instead.20773i86B483107F51CD3820775i651136B201680B64

 

It could be as simple as an option in the context menu for the auto-indexing tunnel to say "Index by rows" or "Index by columns"  It gets more complex with 3D 4D and moreD arrays, but you could do something like a submenu flyout that says "Index By Dimension" > "1", "2", "3" etc

 

Loop indexes max out at 2,147,483,647.  It would be nice to have an option to wrap around the loop index instead of having it remain constant, in the event that you have a process that depends on that loop index incrementing.

Include VI that generates timestamp in Excel format something like the one attached  as a standard in timing functions.

Using the LabVIEW 2009 Build Spec (as an example) allows you to add a Destination to a Library which is very handy, as it means you can namespace VIs at build-time.

 

I would like to take this a step forward and then be able to set that new Library as a Sub-Library of another Library that already exists in the Project.

I would then want to be able to set the scope of this Sub-Library as well (relative to its now, Parent).

 

This combined with my Locking State Idea would allow be create a Distribution that would hide and protect a Support VI Library

As the Sub-Library would be Private Scoped (from above) and the Parent Library would be set Locked (does not show Private Members).

 

I currently can implement this using Scripting but it would be nice to have it native.

 

Cheers

-JG

 

 

17619iFB1C3A1375DBE39317621i6935DFDFCA489040

Hi,

 

I need a vi which will convert PNG file to GIF file. i could find a vi which is not in palette, do this. But the output GIF file is in uncompressed format. So the size of the file is very large. And also it is not working when i build the application as EXE.

 

It will be really helpful for me if this feature is included in the next release of LV.

 

Thanks,

Vairamuthu.

-----------------------------------------------------------------------------------------------

It would be beneficial if nodes had the ability to retain data from their previous execution. Along with "Use Default If Unwired" it would save memory allocation and coding time if there was a "Use Current Value If Unwired" selection which would retain the node's value and pass the last executed value. 

 

 Use Current Value If Unwired.PNG

This figure illustrates one application where "Use Current Value If Unwired" would save memory and increase performance instead of using multiple property nodes or local variables for retaining the output data. It would also eliminate extra wiring in every case this node is not used.

Hi,

 

in LV2009 a new set of VIs have been published for working with configuration VIs. They are now part of config.lvlib. But some VIs of config.lvlib are marked private, therefore I cannot use these VIs as Sub-VIs, if the calling VI is not part of config.lvlib. This is bad (at least for me), since I have written some tools to load a configuration directly from a string and not from a file. To do this in LV2009, I need these private VIs, which I cannot use without changing config.lvlib.

 

Therefore I suggest to make all VIs of config.lvlib public. In fact, is there a good reason, why these are private in the first place?

 

Regards,

Marc

I think there should be a way to reinitialize a stacked shift register to the originally initialized value so you can clear out the contents of every iteration all at once.  For example, the code below, implemented with 4 individual shift registers:

 

 multiple shift registers.PNG

 

Could be implemented with 1 stacked shift register with a reinitialize terminal:

 

stacked shift register with reinitialize.PNG 

Classes in LabVIEW are a great step over (and finally, with LV 2009 them start to work...) but there are still two 'holes'

 

Abstract methods. 

It would be great to have the possibility to define abstract methods and interfaces. Now I'm forcing an error into the error out indicator to notify the usage of a method not yet defined but it would be better to make the compiler to recognize the usage of abstract methods during the design time. One way to define abstract methods could be the introduction of a new entry in the 'class menu' and allowing to define them just in term of front panel (block diagram not available).

 

Class duplication.

An object is duplicated on each node, so is not easy to work into parralel loops on the same instance. To use the same instance I have used references, but it is not so easy to use (not as the 'normal' wires) and it hasn't the same performance (working with reference is heavier than working with instances). It would be great to introduce a mechanism that implements the convertion from instance to object, something likes a standard 'getReference' and 'getInstance'.

My apologies if this has already been suggested ...  I've written many VIs with a While loop that has True wired to the Stop terminal, making it a "Do Once" loop.  This is such a common construct (i.e. a VIG) that it might merit its own "structure", something that "looks like" a While loop but has no Stop terminal, no "i" indicator, and is guaranteed to "Run Once".  I think having a unique "look" for this common special use of the While loop would be a useful addition.  Among other things, it would clearly distinguish "purpose" as different than a While construct.

 

Bob Schor

The Get and Set Variant attribute functions are polymorphic on the 'variant' input terminal.

 

Why?

What do you expect of the following code:

Example_VI_BD.png

 

I think allowing this is a bad technique in a 'early typed' language like LabVIEW.

 

Or am I missing something?

 

Ton

I'm not sure if there is already a way to do this, but it'd be nice to have a "References Manager" at run-time so you can watch all kinds of references be created and (hopefully) destroyed when no longer needed. This can apply to file refnums, TCP connection IDs, queues, etc. It would be helpful for debugging large programs and where multiple developers are working on the same project... as well as for the forgetful likes 🙂