LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiplying columns in a listbox and inserting results into an unused column in the same listbox??

Hi,
 
I am using a listbox that extracts information from 2 different colums. The information in these column is converted to a number using a string to number function. I want to multiply the information in each cell of a column with it's adjacent cell and put the result into an unused column in the listbox.
 
ie column 1, row 1 = 200, column 2, row 1 = 3 and i want to multiply these 2 cells together and put the result in column 3 row 1 and basically fill down from there depending on whether there is information present in cells.

The attached file is a subVI in my project and it passes into it the property node -> item name into the array controls.
 
Can someone show me how to do this? Any help would be most appreciated.
0 Kudos
Message 1 of 10
(3,472 Views)
All you have to do is insert a multiply and wire the arrays up to the input terminals. The fancy word is "polymorphism" what it means is that most of the basic operations will handle a variety of input datatypes. You can perform am element-by-element multiplication by wiring up two arrays. You can multiply an array be a single value by wiring up an array and a scalar. You can even multiply clusters if they both have the same structure and contain nothing but numeric data.

Keep this in mind and when every possible handle array data as arrays.

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 2 of 10
(3,466 Views)
Thanks it worked!!

but......

I tested it using an indicator and the appended array will not allow me to pass it back to the main VI and write it to the multicolumn listbox. It's saying that the appended array is of 3 dimesions and the listbox property node -> item name is a 2D array.....what has happened?

I have attached the file again

0 Kudos
Message 3 of 10
(3,462 Views)

What Mike said. Also, you don't need 2 input arrays for this if you are just multiplying columns of 1 listbox. Just pass in the Item Names and pull out the columns in the sub VI, like so:

Message Edited by Marc A on 06-22-2007 09:12 AM

0 Kudos
Message 4 of 10
(3,459 Views)

Hai,

Here is the vi that resolves the problem.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 5 of 10
(3,452 Views)
Hi thanks for your reply but you must have a new version than me and i cannot open the file....could you do a screen capture instead so i can see what you have done. thanks
0 Kudos
Message 6 of 10
(3,450 Views)
Here is the code cleaned up a bit more, in V8.0. Is that good?

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 7 of 10
(3,447 Views)
Sorry but there was no attachment in your last post
0 Kudos
Message 8 of 10
(3,442 Views)
The picture I posted is the same as the VI that was posted, I just used arrays instead of the listbox because that's how your original VI was.
0 Kudos
Message 9 of 10
(3,439 Views)
Thanks peoples you all helped me out heaps!!! Got it working nice 🙂
0 Kudos
Message 10 of 10
(3,435 Views)