LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to thin out the data that is being read 1000 elements at a time.

Hi Ikeda,

 


@ikeda_kaoru wrote:

I have one more question!
I made some improvements based on the program you gave me, but I could not connect the wires.
It is where I connect the 1D array data coming from the FIFO to the Index Array in the For loop.
I am attaching an image and would appreciate your advice.


Unfortunately your image is stucked in virus scan, but I guess you forgot to change the input tunnel mode for the array wire…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 22
(741 Views)

@ikeda_kaoru wrote:

@Yamaeda さんは書きました:

@ikeda_kaoru wrote:

Hi  LVNinja

 

Thanks for your reply!


I have checked the attached program.

I ran the program with 1000 arrays and 198 to extract, but the Array Indexes to extract indicator shows 0,198,396,594,792.

990 should also be output, but why is it not?


Since you also extract index 0 you get a 1-offset issue, which is quite common. Modify the VI like this:

Yamaeda_0-1745311186085.png

(The round towards -inf is to make sure it doesn't round up so you get 1 too many extractions)


Hi Yamaeda

 

I have one more question!
I made some improvements based on the program you gave me, but I could not connect the wires.
It is where I connect the 1D array data coming from the FIFO to the Index Array in the For loop.
I am attaching an image and would appreciate your advice.


Per default an array passing into a For-loop gets Auto-indexed. R-click the little [ ] on the border and turn off Auto-index

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 12 of 22
(723 Views)

@Yamaeda さんは書きました:

@ikeda_kaoru wrote:

@Yamaeda さんは書きました:

@ikeda_kaoru wrote:

Hi  LVNinja

 

Thanks for your reply!


I have checked the attached program.

I ran the program with 1000 arrays and 198 to extract, but the Array Indexes to extract indicator shows 0,198,396,594,792.

990 should also be output, but why is it not?


Since you also extract index 0 you get a 1-offset issue, which is quite common. Modify the VI like this:

Yamaeda_0-1745311186085.png

(The round towards -inf is to make sure it doesn't round up so you get 1 too many extractions)


Hi Yamaeda

 

I have one more question!
I made some improvements based on the program you gave me, but I could not connect the wires.
It is where I connect the 1D array data coming from the FIFO to the Index Array in the For loop.
I am attaching an image and would appreciate your advice.


Per default an array passing into a For-loop gets Auto-indexed. R-click the little [ ] on the border and turn off Auto-index


Thanks for the advice!

It worked.

 

I am trying to save the data (data read 1000 elements at a time) as a binary or CSV file before taking the 198 intervals.

 

I concatenate the x,y,x values of the data using the “Build Array” function and put them into a case structure.

 

How can I improve it so that I end up with 3 rows and 12976128 columns of data to save in the file? (3 rows are x,y,z values, 12976128 columns = 198 x 256 x 256 number of data)

 

Any good ideas would be appreciated.

0 Kudos
Message 13 of 22
(716 Views)

Hi GerdW,


@GerdW さんは書きました:

Hi Ikeda,

 


@ikeda_kaoru wrote:

I have one more question!
I made some improvements based on the program you gave me, but I could not connect the wires.
It is where I connect the 1D array data coming from the FIFO to the Index Array in the For loop.
I am attaching an image and would appreciate your advice.


Unfortunately your image is stucked in virus scan, but I guess you forgot to change the input tunnel mode for the array wire…


Thanks for the advice!
I fixed it and it worked!

 

I am trying to save the data (data read 1000 elements at a time) as a binary or CSV file before taking the 198 intervals.

 

I concatenate the x,y,x values of the data using the “Build Array” function and put them into a case structure.

 

How can I improve it so that I end up with 3 rows and 12976128 columns of data to save in the file? (3 rows are x,y,z values, 12976128 columns = 198 x 256 x 256 number of data)

 

Any good ideas would be appreciated.

The program for the relevant section is attached.

0 Kudos
Message 14 of 22
(712 Views)

@ikeda_kaoru さんは書きました:

@Yamaeda さんは書きました:

@ikeda_kaoru wrote:

@Yamaeda さんは書きました:

@ikeda_kaoru wrote:

Hi  LVNinja

 

Thanks for your reply!


I have checked the attached program.

I ran the program with 1000 arrays and 198 to extract, but the Array Indexes to extract indicator shows 0,198,396,594,792.

990 should also be output, but why is it not?


Since you also extract index 0 you get a 1-offset issue, which is quite common. Modify the VI like this:

Yamaeda_0-1745311186085.png

(The round towards -inf is to make sure it doesn't round up so you get 1 too many extractions)


Hi Yamaeda

 

I have one more question!
I made some improvements based on the program you gave me, but I could not connect the wires.
It is where I connect the 1D array data coming from the FIFO to the Index Array in the For loop.
I am attaching an image and would appreciate your advice.


Per default an array passing into a For-loop gets Auto-indexed. R-click the little [ ] on the border and turn off Auto-index


Thanks for the advice!

It worked.

 

I am trying to save the data (data read 1000 elements at a time) as a binary or CSV file before taking the 198 intervals.

 

I concatenate the x,y,x values of the data using the “Build Array” function and put them into a case structure.

 

How can I improve it so that I end up with 3 rows and 12976128 columns of data to save in the file? (3 rows are x,y,z values, 12976128 columns = 198 x 256 x 256 number of data)

 

Any good ideas would be appreciated.


I forgot to attach the program for the relevant part.

0 Kudos
Message 15 of 22
(708 Views)

Hi ikeda,

 


@ikeda_kaoru wrote:

How can I improve it so that I end up with 3 rows and 12976128 columns of data to save in the file? (3 rows are x,y,z values, 12976128 columns = 198 x 256 x 256 number of data)

 

Any good ideas would be appreciated.

The program for the relevant section is attached.


Nope, you didn't attach any code. All we got is an image: we cannot edit/debug/run images in LabVIEW!

 

Suggestion: instead of saving to a ".bin" file you should use TDMS functions instead! They allow for proper handling of additional information together with your data. (Excel isn't able to handle 12976128 rows or columns!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 22
(689 Views)

@GerdW さんは書きました:

Hi ikeda,

 


@ikeda_kaoru wrote:

How can I improve it so that I end up with 3 rows and 12976128 columns of data to save in the file? (3 rows are x,y,z values, 12976128 columns = 198 x 256 x 256 number of data)

 

Any good ideas would be appreciated.

The program for the relevant section is attached.


Nope, you didn't attach any code. All we got is an image: we cannot edit/debug/run images in LabVIEW!

 

Suggestion: instead of saving to a ".bin" file you should use TDMS functions instead! They allow for proper handling of additional information together with your data. (Excel isn't able to handle 12976128 rows or columns!)

 

 

Thanks for the advice.
I used the TDSM function to get the data. How can I check the data in the file?

The program and images of the relevant sections are attached.


 

Download All
0 Kudos
Message 17 of 22
(664 Views)

Hi ikeda,

 

you REALLY need to learn to create CLEAN code! Use more (or any) subVIs…

 

Example:

 


@ikeda_kaoru wrote:

I used the TDSM function to get the data. How can I check the data in the file?

The program and images of the relevant sections are attached.


You can use the TDMSFileViewer function to load and visualize TDMS data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 22
(659 Views)

When saving binary data, I get the following error.
I do not know the cause and would appreciate your advice.

 

error1.png

0 Kudos
Message 19 of 22
(587 Views)

Hi ikeda,

 


@ikeda_kaoru wrote:

When saving binary data, I get the following error.
I do not know the cause and would appreciate your advice.


Provding an image with mostly Japanese text doesn't help us to help you.

Mind to share English information?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 22
(565 Views)