Jump to content


  • Posts

  • Joined

  • Last visited


zero-tolerance's Achievements


Newbie (1/14)



  1. QUOTE (PaulG. @ May 20 2009, 01:03 PM) That did the job. Thanks
  2. Hi there. This should be a simple solution but I don't seem to get it working. Attached is just an example that based on the users choice, the graph can have two or one plot. But what I need it to do is whenever the second plot kicks in, I need it to be at specific colour, e.g. only green. Changing the line width of the second plot works fine, but the colour doesn't seem to respond, its always plotted as black, not matter what value I choose for it. The first plot is always red, thats fine because I made the changes on the properties of the graph, but I can't choose the colour for the second plot. Any help is appreciated Thanks Kas
  3. QUOTE(Michael_Aivaliotis @ Oct 10 2007, 10:07 PM) I allready did that but the sort array function only works by looking at the first "character" where in my case would be a number i.e. 123 "CD Name". So it sorts it out based on the numbers that are at the beginning of each element of the array. But in my case I want to sort them based on the "CD Name" but when sorted I still want to keep the ascociated number that goes with it. I have somehow managed to do this but I'm not too happy with the way I have done it. I'm thinking that there must be a much better way of achieving the same results. The attached program is an example of what I'm woring on and its on two versions of LabView (8.5 and 8.2). Please ask if you need for version 8.0. Any help appriciated. Thanks
  4. Hi I'm trying to make a program that can sort out this text file alphabetically. The example is as follows:<BR><BR>I have a list of all my CD where they are each placed on my CD case holder. For easy finding each CD slot on the case has a number from 0 to 500. So I have made a lit of all my CD's using excell. So when I'm looking for a CD I look for the name on my list (which is sorted alphabetically) and then just check the number next to it. My list looks something like this: 126 <Tab> Big Bear 125 <Tab> Panorama 173 <Tab> Small Bear etc.... The Above Example is alphabetically in order depending on the CD name and not on the number next to it. I have allready made a program that automatically searches the list based on CD name and adds the new CD with the number next to it on the text file, but when I add the new Name it is not appearing alphabetically, i.e. I can put the list on the ascending order based on the number but not based on the CD name. Any help appriciated Thanks
  5. Hi I'm trying to make a program that can sort out this text file alphabetically. The example is as follows: I have a list of all my CD where they are each placed on my CD case holder. For easy finding each CD slot on the case has a number from 0 to 500. So I have made a lit of all my CD's using excell. So when I'm looking for a CD I look for the name on my list (which is sorted alphabetically) and then just check the number next to it. My list looks something like this: 125
  6. QUOTE(Tomi Maila @ Mar 4 2007, 12:15 PM) I see, sorry for my previous post. Now, what I am trying to do : I get a list of readings from a Lock-in-Amplifier and I plot the graph. the amount of points that I normally read are around 4000. But for the sake of simplicity here I'm only using around 320 readings (i.e. points). 1) When this 320 points are plotted, the graph looks like the 2 graphs on the left (see uploaded picture). But, the problem is that everytime you try to repeat the experiment the Maximum and the Minimum points on the graph never appear at the same spot. i.e. if the same experiment is carried out again, the Min. and Max. will definetly be shifted by 10 or 15 points to the right or the left. Now, to come around that problem I wrote the LabView code so that it counts the amount of points from the CENTRE (I mean the centre between the Min. and Max.) to the right of the graph and the left. Now, whichever side of the graph has more points means that the Min. and Max. position is shifted on the opposite side. The next step my software does is cut the amount of readings that are needed from the side that had more points so that the CENTRE point (between Min. & Max.) lies in the middle of the graph. 2) In the very end when the above point is completed, the segment size (i.e. the size of the graph) is reduced to the nearest smaller number that has a factor of 5, and factors of 2 or 3. This is the number of points used in a Discrete Fourier Transform (DFT) to obtain the spectrum. From the spectra of measurements with and without a sample, refractive index and absorption coefficient can be found (this is done on the "Data Calculations.vi"). 3) The final changes that I do to the graph before applying the DFT calculations (i.e. the FFT in the PC) I take the mean of the graph. Since the majority of readings that are taken from the Lock-in-Amplifier can sometimes be greater than zero or less then zero, and in that case I try normalise this issue by taking the mean of the whole graph (i.e. adding all the elements together), and dividing the result with the number of points (i.e. No. of elements), where in this case its 321, and finally subtracting this results from each element of the array that was used at the beginning. Maybe I don't need to apply the "3)" point at all, but this is as far as I have gone. But, when I apply point "3)" its as if its not there, and the reason for this (as explained on the previous posts) seems to be this DC components that are the same. All the three points are done under the "ZPD Balance.vi" VI. This VI uses another subVI called "Frequency calculation.vi". The main reason that I am actually implementing point "2)" is so that I can find the fundamental frequency of the graph. If anyone has an idea of how to find the fundemental frequency from MY data than please share the idea with me. Sorry for making it long but I just wanted to explain my issue as clear as possible. The program "Calculations testing.zip" uploaded by me on the prevous post does all of this. All you have to do to run the program is: 1) double click on the "Main" VI, then just specify the path or the 2 TXT files. Make sure that the right file is chosen, and finally press RUN.
  7. QUOTE(tcplomp @ Mar 4 2007, 11:04 AM) So I'm guessing this is it, I mean I can't resolve the issue? Because I know the change is very very small but nontheless this very small change is probably costing me the accuracy of the main results at the end. And if you have seen the shape of the signal, then all I'm trying to do is make sure that the signal lies around the "0" position of the "Y" axis. So, all I do is find the mean of the signal, and subtract that mean from every single element of the original signal (i.e. array).
  8. I have two similar DBL arrays that I am feeding to the FFT function. The answer however is exactly the same. even though both of the input arrays are similar the answer shouldn't be the same. Actually the only thing that changes after the FFT is carried out is the first element of the array, and the rest of the elements are all the same. An example of what I mean by this is given below, as well as part of my program that I have implemented. Any suggestions to why does FFT give out the same answer to both cases? Anything is appriciated Thanks
  9. I managed to do the program, but I'm not sure if there is a better way of doing it. I have attached the program that does exacly what I need it to do. Any advise is appriciated. Thank you all again for the help.
  10. QUOTE(Mikkel @ Mar 1 2007, 07:13 AM) A Very quick and easy solution. Thank you, I never thought of doing it that way. QUOTE(Mikkel @ Mar 1 2007, 07:13 AM) 2) Uhh. Lost me there haha, sorry for bad explanation. The list of numbers shown on the previous post is only a list that decide what should the size of an incomming array be. For example, If I have an array that is of size 80 or 81, as soon as it goes through the list of numbers, the size of This array will be droped down to 60. Because the next smallest number on the list other than 80 is 60, so the size of the array that was at the beginning 80or 81 is droped down to 60. This means that 20 of it elements are deleted. I hope this is a better explanation. Thank you
  11. Sorry guys but I need some more help. Last night I was trying to do 2 things that I couldn't accomplish AGAIN: 1) From all the numbers that are generated (as above) there are some duplicates. i.e. the integer "0" is repeated a few times etc. And I am trying to remove them since I only need 1 copy of every digit. The problem I am facing here is that the duplicate elements are not next to each other inside the array, for example number appears on index 1 of the array and then the same number on index 30 again etc. 2) Final problem is the averaging. Out of all the numbers I have on the array (i.e. the big list of numbers generated) if I input an array with size 4000, it will go through the list of numbers and the size of the same array on the output should be 3920 on the output. So the last 80 elements of the array are discarded. So, what I am basically trying to do is resize the input array based on the array sizes that are available on the table (i.e. the big list of numbers generated). So the input array was 4000 and the same size is also available on the table, but the next size smaller that 4000 that is available on the table is 3920, so thats the size the input array should choose to take on the output. The above I couln't accomplish all night yesterday, so again any help is appriciated. Thank you in advanced.
  12. Thats amazing, thank you both, it actualy works. Thanks again.
  13. Hi everyone. I just have a part of a program that that is written in Python that I don't understnd whats happening. I need to built a LabView code that does just that. I have completed most of the program but this part of it I don't quite understand. I have uploaded this in TXT format so everyone can have a look. The code is not long and probably is not hard to see whats happening but for the moment I haven't got a clue what did the previous person try to do with this part of his python code. My understanding is that he is multiplying 5 with the values [1,2,4,8,16,32,3,6,9,12,24]. Then 2 multiplyed by [1,2,4,8,16,32,3,6,9,12,24] then 3 by [1,2,4,8,16,32,3,6,9,12,24] and finnaly removing any duplicate values that come out. If so, then what is the commented part in BOLD telling: K1 = [i*5 for i in range(20)] # 5, 10 ... 95 K = [] M = [1,2,4,8,16,32,3,6,9,12,24] for j in range(len(M)): for i in range(20): K.append(K1*M[j]*i) Any help is appriciated. Thanks in advanced.
  14. Thanks for the reply, but I'm actually using something known as "State Memory" to create the Arrays and finally I'm creating a 2D array from all of the results that I have and Saving it on users choice. I'm posting the example just incase someone else needs it. Thanks again for your reply Download File:post-4068-1163116683.zip
  15. Hi everyone, I am trying to save the data that I have in an array into the file format as shown below. The input array only contains numbers on it but it is on a string format. The words and the writting that is shown in the attachment must be added to the file automatically. Is there a way of doing so. The problem is not just writting into a file but also being able to load the data i.e. the numbers that are saved into the file and input that into a string array just as it was at the beggining before the array was saved into the file. Would anyone ahve an idea of how to do around this problem at all. the atached file can be opened using Notepad thanks in advanced Download File:post-4068-1162989372.txt
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.