LabVIEW Idea Exchange

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

I am finding labview execution speed to be extremely slow.  I seem to recall documentation indicating that labview passes all data/variables by value by default.  I think that if labview would default to passing data/variables by reference instead of by value, then execution speeds would greatly improve.  Is there an option that would allow one to change this?

It is not uncommon to have to restrict numeric entries to accept only either odd or even values. It would be nice to be able to specify that behavior, for example in the Data Entry tab of the Properties dialog, so we don't have to write some code to enforce that restriction, with the Response to value outside limits to either round up or down. This would apply to integers only.

 

I do a fair amount of Pipelining and it would be cool if I could Offset the Input Shift Register from the Output Shift Register.

The default would be to keep them aligned but a right - click would give me the option to offset the input or output Terminal. I think it would be bad form to allow crossing the terminals between multiple Shift Registers so the top Input terminal would correspond to the top Output terminal.Offset Shift registers.JPG

 

 

I've recently run into an issue when using external code (ActiveX to be exact) where I needed to explicitly call garbage collection in a similar fashion to how it's done in C# (C Sharp).

The "Request Deallocation" function isn't true garbage collection.

 

A C# example would be:

someComObject = null;

GC.Collect();

 

 

There are situations where it is neccessary to explicitly call garbage collection.

 

 

I Hit on a post today that required a Queue function "work-a-round"

 

The Poster simply wanted to reset the property "Queue.MaxLen" and that property is quite buried.  (and look at the bug in probes on queues where "number of elements in queue" must = "0").

 

One solution was: ReSizeQue.png

 

A better (IMHO) solution would be to drop the "set" method of "Get Queue information" function on the BD and solve the problem with a single call of a vi.lib object.

 

Multi-Threaded Interrupt Management Capabilities in LabVIEW

 

Background

 

            Event interrupt management works well in LabVIEW if ones’ programme is small and developed within a single overall Event Structure, encapsulated within a While Loop.

 

            The problem comes when the software architecture demands a separation between the User Interface management (interrupt) functions and the sequential and looped programme structure (executable) components of the code for modular programming. In this configuration, waiting for Events to occur before code execution, pausing code execution (once started), stopping code execution or even aborting code execution (with the ability to close the application down cleanly prior to code exit) become challenging operations to implement within LabVIEW.

 

            This software architecture design challenge is exacerbated, if branching within the looped programme structure (executable code segment) is also a requirement.

 

Two Key Requirements

 

            Ideally, the following two capabilities, if implemented within LabVIEW would solve all of the aforementioned problems:

 

  1. To be able to interrupt a While Loop, pause it and if appropriate reset the [i] loop index back to zero. If controlled via the Event structure, this would make both Event structures and While Loops compatible with each other, which is not the case today.
  2. To be able to interrupt a Flat Sequence or Stacked Sequence structure and break out at any individual “Frame” in that structure, based upon a specific Event interrupt or even an Abort, which when controlling hardware can be a critical request that requires immediate action! Today, it is not possible to break out of a Flat or Stacked Sequence structure, one has to wait until the complete Sequence has executed.

 

Current Tools

 

            Current LabVIEW, if used with care, can overcome to some extent the current While Loop and Flat Sequence software architecture limitations, but they are very cumbersome to use and require an "eagle eye" and good software tracking and debugging skills!

 

While Loop with Pause and Stop buttons

 

Set Occurrence

 

Wait on Notification (Front Panel activity)

 

A not yet fully complete explanation of the key multi-threaded programming issues is attached. If it requires updating to make it complete, do let me know.

If I press ctrl+f while the root project is highlighted I get the "Find Project Items" window. This is all well.

 

However, if i press ctrl+f on a folder in the project, the "Find Project Window" is also opened, with the same search scope as when the root project is highlighted. To me this is not the expected behaviour. There are two other things that would be more relevant:

1. Perform an project items search (recursive) within that virtual folder.

2. Perform a Find operation such as the one we get when we press ctrl+f on a BD or FP, with the search scope set to "Selected VIs" and with the VIs in the virtual folder (recursively) set as "Selected VIs to Search".

 

My suggestion is case 2, perform a selected VIs seach directly from the virtual folder.

 

 

 

 

Will be good when running an application in debug, keep other LabView project enable and editable, so I can continuous to work under other project waiting the debug stop at break point

I don't think this has been discussed before but apologies if it has...

 

Similar to the 'skip' feature of a step in TestStand (or comments in text based programming languages) it would be nice to be able to disable parts of the block diagram to bypass parts of the code.  I do this often in electronic simulation packages to bypass (route around) parts of a circuit which can be helpful in design or debugging by isolating areas or switching off functionality.  In this way you don't have to delete anything to bypass it.  To show which parts are disabled in the block diagram those parts would be greyed out or ghost.  This of course may also affect controls and indicators which should similiarly be ghost (which has already been suggested to signify hidden controls/indicators).

I guess the alternative is to use case statements with false constants but this can mean creating space and making a mess.

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

I'm a first-time user of labview, but a very experienced programmer in other languages. 

It was impossible for me to find a complete, modifiable list of the changeable properties associated

with an icon on the block diagram.

I kept expecting this to be available when I right-clicked the middle of an icon in the block diagram, or a control on the control panel.  At first I expected to be able to right click connection nodes and get connection properties, as well.

The expectation was initially almost unconscious, so I believe it is deeply ingrained, and might be common in other users.

This is the predominant mode of interaction in MS Windows applications, and I think it can be convenient in other UIs.

If so, Labview would be more intuitive if it leveraged this preexisting user training.

 

I found this behaviour of LabVIEW some months before and till now i didn't get the answer that why am posting here.

 

When i have some controls in the front panel if i press ctrl key and left mouse button and drag between the controls it gets displaced. Is that a short cut key for aligning the items? or does it has any functional use?... I am really puzzled with that behaviour and no body knows the answer (the person i met) for it. If it is a strange behaviour and do not have any proper use then in the next version the architects and champs of LabVIEW can try removing the behaviour.

 

Smiley Wink

 

 

Download All

I often need to build applications and installers that include VIs or .LLBs that have been built  earlier on...but this is a major pain because as long as LabVIEW recognises the file type it will try to link the VI or VIs in the library to the other VIs in the project, it finds conflicts etc. There are ways to come around it yes, but not very elegant ones.

 

Basically what I want is for projects to be able to treat VIs and LLB files as non-LabVIEW files. Just like you can include a text file, a JPG picture or other files in your project and installers I want it to be simple to add "completed" LabVIEW files.

 

One solution could be to have another type of project folder. We have auto-populating folders...perhaps we could have a folder for pre-compiled / to be treated as external sources folder...? In most cases for me LabVIEW could just see that the file does not contain any source code and then treat it as a "dead" file..or at least give you the option to do so (if there is a potential conflict).

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!

Hi,

 

i'm using the german version of LV. Maybe some names are "like a decription" because i don't know the english

names corresponding to my indicators.

 

I'm using a combination field of strings and create the content using a propertie node with "StringsAndValues".

Elsewhere i'm using a propertie node with "Value" to know what selection the user made.

 

The normal way to ceate an indicator is right click, create indicator. But in this case the indicator has the same style

of the element "QueryCode" and doesn't show the value -> it shows the String part. The only way to get an indicator that

shows the value is by using the context menu.

 

Please change that! Whenever a propertie node with "Value" is choosen, right click -> create indicator should create an

indicator that shows the value and not the string or whatever.

 

 

23872iA2CACDD7AE92FD17

Codes in labview are getting bigger and bigger. It's difficult to manage Block Diagram Without zoom out function. even though in normal code we can use state diagram or another features to compact the code .. but when using FPGA .. It's not possible.

 

 

So if Navigation window (CTR ALT N) can edit the diagram or can only copy past , it will be really helpful..

 

These are screen shot of my codes.. it's really been difficult to manage this now.

 

23776iE30321A9FC0BE53A23778i0EC72155D6C56868

 

Regards,

Hitesh Dhola

Currently, if you want to programmatically bind HMI controls and indicators to network URL's you need to first set, at edit time, a fake

URL (example: \\192.168.0.3\cRIO-HPU\'PU.Accumulator_Dump_Valve') since the actual IP address may not be known at edit time.

If you leave the HMI 'unbinded' then the attempt to set the BindingPath properties will result in an error.

It would be nice if you had a generic option called 'late binding' that you could select with the expectation that the exact URL will be set

at runtime.  This would provide an additional benefit where the  PSP driver could wait for a BindingPath to be set before attempting

the first transaction.

The idea is that a single conditional statement could overlap a for loop (or while loop) boundary.  I don't know exactly how to enable the feature in the block diagram but it seems like it could be very useful when you have routines that are different for each case that run both outside and inside the loop passing data between them (see example block diagram).  This can be done right now with two conditional structures but it is just not as clean a solution.

ConditionalOverlapExample.PNG

23428iD0BA4DD79C1603C2

even if name is inside " "

Concat ( ',', a, b) should result in a string a,b This way, block diagram looks better in the case we concatenate many strings together.