LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i need help

 

Hello guys,

I hope you can help me.

 

I want to sum all of price's codes. the input is "cod de bare" which changes while running (manually). I have tried autoindexing the  prices but the output is an array with only one code.

When i run the program i'm changing the value of code (1234,1235, etc) and at the end i want to sum all of the prices for that codes.

 

Thanks !

 

 

 

 

 

 

desktop.png

0 Kudos
Message 1 of 7
(2,873 Views)

best to first parse the string into three arrays first, then do this.

 

 

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 2 of 7
(2,862 Views)

Almost everybody "needs help" here, so please use a more accurate subject next time.

 

Please attach actual code containing typical default values in the controls. Pictures are difficult to debug.

 

You probably want to sum the prices in a shift register initialize with zero.

0 Kudos
Message 3 of 7
(2,857 Views)

the reason youre only getting the value for the first code is because the for loop doesnt know your string is in an array format, it just looks at it like one string. and its using the same full spreadsheet string each iteration.

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 4 of 7
(2,849 Views)

A better and faster solution would be 2 String to array, one for \n and then in a loop for Space. Then you can simply autoindex the row and index out the parts.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(2,743 Views)

if this can help you. i'm interesedonly at the final when while loop runs continuously and i change the "cod de bare". I mean, i want to scan a bare code,thento press one buton from front panel and to sum all the prices for the bare codes.

0 Kudos
Message 6 of 7
(2,734 Views)

later edit:

if you want to run the code, the password for operator "Andrei" is "andrei1".

0 Kudos
Message 7 of 7
(2,731 Views)