ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data transfer in for loop

Why does the program not jump into the second for loop? Why is there no data in the element? See Atachment
 
Thanks for your answers
0 Kudos
Message 1 of 6
(3,888 Views)
Try Executed Highlighting (the ligh-bulb),  and see that the shift register is unitialized an uses an array of 0 elements.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 6
(3,877 Views)
Hi Irrenhaus,

and there are some more mysteries in your code:
1) you don't need the small inner for loops (those doing the minus/square/sqrt operation) - you can calc directly with arrays!
2) What's that square/sqrt operation? Replace it by an absolute function!
3) Now you should only have one for loop in your code: When there is an auto-indexing input you don't need to wire the loop count input (at least when the autoindexing should control the loop!)

Message Edited by GerdW on 07-19-2007 01:46 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(3,871 Views)
Can you explain the algorithm you are trying to implement?
0 Kudos
Message 4 of 6
(3,848 Views)

This code should be the implementation of a simple kmeans. Input dada is time and current measurement over one day and we want to cluster into about 7 clusters over the day. Output should be the mean level of the clusters.

Pleas help me.... Smiley Sad

Thanks!!!

0 Kudos
Message 5 of 6
(3,832 Views)
Something along the lines of http://en.wikipedia.org/wiki/K-means_algorithm perhaps?
 
I would have never guessed from your code.
 
Where does the data enter the code??? Since you have a simple time series, do you only need a 1D kmeans?
 
Sorry, I don't have time to look into this, but maybe others will have some suggestions.
 
(RIght now your code runs forever using 100% CPU, while doing nothing useful ....)
0 Kudos
Message 6 of 6
(3,823 Views)