LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

repack values or portion of values

 Hello people

 

 

 

I need to developt a code that reads data from an encoder and a laser distance.

I tryed with repack values module to repack all laser values each 10cm, then gives mean, min and max from packed values, reset and do the same next 10cm and again....but no success.

The readings from laser will be near from 1000 each 10cm.

 

Can some one suggest a easy way?

 

Best regards

cp

0 Kudos
Message 1 of 14
(3,195 Views)
What do you mean repack? Can you show some code?

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 14
(3,187 Views)

Hi Mike 

 

 

In attach is a printscreen from repack values modules, but this only amounts a predefined number of data and what I need is keep data between 0cm and 10cm, then calculate mean, min and max values, do de same between 11cm and 20cm, etc....

 

 

Best regards

cp

0 Kudos
Message 3 of 14
(3,162 Views)
OK, you need to get rid of the express VIs and manage the data yourself. It sounds like what you need is a running average that resets every so often.

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 14
(3,140 Views)

Hi Mike

 

 

From 0cm to 10cm the program needs to store data from a distance laser(maybe in an array, i not familiarized with it), after this segment he calculates mean, max and min, then reset data in array or else, do the same in next 10cm. I expect that the laser each 10cm gives about 1000 readings.

 

In my old program I use the repack values module, because at the first time I count how much readings the laser make in 10cm, then i input this number of readings in repack module, and works more or less.

 

I would to coordinate it with the encoder signal, I can divide the distance with 10 and it can gives a true signal each 10cm but the rest, keeping data each 10cm..... 😞

 

Best

cp

0 Kudos
Message 5 of 14
(3,123 Views)

Here is  a small example of repack values vi

It works, but with a pre-defined number of data points

I do not understand for what is the Data index control? If it is 0 the repack vi counts the 10 data points and gives the output, with other number it does not work.....

 

 

Best

cp

0 Kudos
Message 6 of 14
(3,108 Views)

@cpalka wrote:

Here is  a small example of repack values vi

It works, but with a pre-defined number of data points

I do not understand for what is the Data index control? If it is 0 the repack vi counts the 10 data points and gives the output, with other number it does not work.....

 

 

Best

cp


Peeking under the hood that is the intended behavior and the value of data index should be -1 and never have been exposed to the user.

 

But what intern used Trigger and gate with block diagram constant sentinal values under the hood?   Its nearly write only code

 

Replace that repak with this:

Capture.PNG


"Should be" isn't "Is" -Jay
Message 7 of 14
(3,100 Views)

Hi Jeff

 

Many thanks

 

I try to build this vi in 2010 but I couldnt find all components.

Can you send the vi for 2010 or it is only valid in 2013?

 

Best

cp

0 Kudos
Message 8 of 14
(3,097 Views)
I'm mobile now. The subvi Is data queue pt by pt search pallets and find it easy.

Perhaps another poster would be kind enough to back save it.

"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 14
(3,090 Views)

I found it, thanks

 

CP

0 Kudos
Message 10 of 14
(3,071 Views)