LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arrayeditor assistance

Hi  Forum ,
   We're  building a sequencer into an existing Labview 5.0 Vi to automate our testing and processing. Our main Vi calls various non-LV programs from disk and runs tests and processes results from various samples for X amount of time. We have been doing this manually. Automating will be accomplished based on following table events. In this table, we can have an unlimited amount of instructions to follow. We'd use this table to control everything in the main Vi.  We are basically tied to using the LV5 version of this Vi.
   Let's say that we want to insert an  "event " (one row can consist of up to 120 scalar values in 6 discrete arrays ) somewhere into the middle of the table. It would not be efficient to have to completely redo the whole table each time we want to add or delete an event in the middle of the table (i.e. split table into 2 subsets, then insert a new row or delete an old one).   We need to be able to update,  insert, replace  or  delete an entry anywhere in the table also. LV 6/ 7  has array blocks for editing an entire row: replace, delete or  insert , which is perfect for what we want to do. For our situation editing in rows works.
   An "arrayeditor.vi " for our sequencer was designed and tested with LV6 /7 and does the required complete row replace, delete, and insert as needed. This Vi was put together using "Replace Array Subset",  "Insert into Array", and "Delete from Array" functions. The primary functional app we have, without the sequencer feature, is based on LV5.0.  Up till now, we've had to perform the steps that we are doing in the "table" manually. We can't try to use different versions of LV to try to patch things together.  Saving the test LV6 .0 "arrayeditor.vi" to LV5  format  does not work, because these particular array  editing functions of LV6/7 do not exist in LV5.
   We do not want to upgrade the app to LV6 or LV7, because  the main app works perfectly and FAST in LV5.   The overall app/project size in LV5 is small too, when you consider the size of the runtime engines in anything the later LV's offer.   When we've tested  LV6/LV7 versions, we've found such to be way too large for our needs. We have limited memory restrictions in the computer board running the main app.
   We've checked out two previous forum postings that talked about array building or editing, and looked at the very old LV5.0 tutorial example of replacing a line/row of data, and seen that one utilizes a strategy of splitting an array into 2 subsets or uses a table and functions from later LV versions that don't exist in LV5.0.  These posted examples, messageid39731 and
messageid22518, really don't completely emulate/duplicate the LV6/7 equivalents mentioned above.
   What we need are one to one LV5.0 equivalents of the LV6/7 functions of these three array editor blocks:  "Replace Array Subset",  "Insert into Array", and "Delete from Array" for entire rows. These three functional blocks are the exact ones that we've verified will solve our problem.  If we knew exactly what was "inside", specifically the procedures followed within these blocks we could emulate/build such using components from LV5.0 functions.    Does anyone have the the actual block diagrams of what is in the function for the three  blocks "Replace Array Subset",  "Insert into Array", and "Delete from Array" for entire rows in LV6/7?   If  we could get that, we would be happy to do up LV5 equivalents and post for folks to use.
   Lastly, does anyone know how to remove all the extras from the LV6/7 runtime modules that are never used - to strip these down to bare minimums for JUST what is needed for a particular app?

THANKS. Charlott

Message 1 of 9
(3,474 Views)

Hi Charlott,

Unfortunately, there is no way to access those array functions' block diagrams because they don't exist! In fact, they are literally "LabVIEW functions" (denoted by their yellow color), which means that they are the basic building blocks in LabVIEW and therefore do not have block diagrams associated with them. You can think of them as atoms in physics, while VIs are more like molecules (a collection of functions and other VIs).

The good news is that you can do anything (well almost :)) in LabVIEW! You should be able to build the same functionality of those array functions in LabVIEW 5 without seeing any block diagrams, though it will take a little work. I would recommend reading about those functions in the LabVIEW 6/7 Help, and then trying to implement them in LabVIEW 5 from there. And once you have them built, I would definitely encourage you to post those functions here so that others can benefit! If you have any questions along the way, I (and I'm sure others too) would be happy to help.

Also, just a little forum advice: Next time you post, try to cut down the length! There was quite a bit of unnecessary detail in this one, and it can sometimes be a deterrent to prospective answerers 😉

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(3,448 Views)

For what its worth, I liked the length of your post. You gave complete information--including what you are wanting to do and why. I would much rather read a long post than get the all too common:

"My code returned an error XXX, what's wrong?"

Don't worry about the length... It was just fine...

Mike


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 3 of 9
(3,441 Views)

Oh yes, about your problem!

I am assuming that you are wanting to leave the original code as untouched as possible. BUT how about changing the data structure to be a 1D array of clusters where the cluster contains a 1D array of values. You could manipulate things GUI-wise such that it would look almost the same, but when replacing a "row" you are really only replacing a single element in a 1D array -- which even V5 could do...

Accessing the data in a row would be very similar to what you are doing now, except instead of an indexer with two input indices, you'd have a 1D indexer followed by an unbundler and a second 1D indexer.

Just thinking,

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 9
(3,442 Views)
HI,

As to the block diagrams, I should restate that  -- basically all I am asking for is what is in the exact steps performed for the three LV7 array editing functions of "Replace Array Subset", "Insert into Array", and "Delete from Array" for entire rows

The documentation does not tell us what steps, in what order, are being performed in these functions and that is what is needed.  With a complete description of  what/how each particular function 'block' is working in LV7, I could write the LV5 version.   I don't think I'm asking for proprietary code, am I?

THANKS!
Charlott

0 Kudos
Message 5 of 9
(3,431 Views)

Well, algorithms often are proprietary and protected by patents or copyrights.

The functions are not written in LabVIEW but in whatever text language NI uses. I believe it's C++ now. You might be able to find some generic algorithms for array manipulation on the Internet and I know there are lot of books available for C/C++ algorithms. Using the Index Array and Build Array, you can probably come with similar functions but I suspect that to get the same sort of performance as the features in new versions of LabVIEW, you'll need to create a C/C++ DLL just like NI.

Message 6 of 9
(3,426 Views)

I also liked your long post.  Too often I find short posts where the answer to the question is, "Can you explain more what you are trying to do so that I can help you?"  Your post gave the needed details.

I suspect that the code behind the functions is proprietary and is not based upon functions available in LV5.  The suggestion by mikeporter appears to be a good workaround. 

0 Kudos
Message 7 of 9
(3,417 Views)
Hi Dennis,

Thanks for the reply.   I am pretty sure that what we are looking for is something way less significant than the algorithms themselves. 

That is, when I say I want to know what is done step-by-step, I am talking about questions like:  Is the first step, the first action one takes, to initialize the array?   I don't need to have the actual code that 'does' the action, but rather the information that it is done and in what sequence with other actions.   

If the first step is looking to see what the largest value will be for doing the initialize array, then what happens if we don't want to have any particular value, but rather want the whole array or 1D or 2D to be dynamic?  These are all issues that seem to have been addressed 'inside' these three simple labview7 functions.  I have a hard time believing that what I would consider theoretical or 'thought-process' steps are proprietary.

It sure seems like knowing how a control, function or block works is important and could influence the overall understanding of LV and improve the applications built.

Charlott
0 Kudos
Message 8 of 9
(3,389 Views)
Hi Mike,

Thanks for the suggestion.  We will be looking at this option more closely!

Charlott
0 Kudos
Message 9 of 9
(3,388 Views)