Jump to content

abuch06

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Posts posted by abuch06

  1. i was using textscan in Matlab

    yea Labview throws an exception before it even begins reading in the file. Can anyone post a screenshot of a VI that would read in that kind of file using the commands in Labview 8.0.1?

    this is what i have in Matlab

    fprintf('Working');

    totalData = textscan(fid, formatStr, 10000,'delimiter','\t', 'headerlines', startPoint);

    while ~isempty(totalData{1}) %continue processing until no more data is read

    for C=1:sizeChannels+1 % across each channel

    for L=1:max(size(totalData{1,C})) % down each row

    if C==1

    time_counter = time_counter+1; %adds up to find total time of test

    elseif totalData{C}(L)>outofbounds(C-1) || totalData{C}(L)<(-outofbounds(C-1))

    out_of_bounds_matrix{C-1}(1,count(C-1)) = totalData{1}(L); %adds time and value to out of bounds array

    out_of_bounds_matrix{C-1}(2,count(C-1)) = totalData{C}(L);

    count(C-1)=count(C-1)+1;

    end

    end

    end

    fprintf('.');

    totalData = textscan(fid,formatStr,10000,'delimiter','\t'); %reads in 10000 pieces at a time

    end

  2. Sorry... i cant post a copy of my vi because my work has some sort of firewall up...

    Its a tab delimited file and has voltage readings for each channel with respect to the time column. Its just a regular ASCII file, so I can open it up in notepad and read through the data. The problem only occurs with the larger files, because the Read from Measurement File Express VI can only read in relatively small files. The file looks exactly like this, starts with the names of the channels, then moves to data and channels:

    FAIRING_NOSE

    FAIR_FWD_BOLT_1ST

    FAIR_FWD_BOLT_2ND

    S2_SEPARATION

    S3_TVC_BATTERY

    FAIR_BASE_JOINT

    PAYLOAD_SEP_1ST

    PAYLOAD_SEP_2ND

    0.000000 0.004883 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

    0.000200 0.000000 0.000000 0.000000 0.000000 -0.004883 0.000000 0.000000 0.004883

    0.000400 -0.004883 -0.004883 -0.004883 -0.004883 0.000000 0.000000 0.000000 0.000000

    0.000600 0.000000 0.000000 -0.004883 -0.004883 -0.004883 -0.004883 0.000000 0.000000

    0.000800 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

    0.001000 0.000000 -0.004883 0.000000 0.004883 0.000000 0.000000 0.000000 0.000000

    The first column is time in seconds. It goes on for about an hour, so the file ends up being pretty big.

  3. I need to read in files over 1GB and the exress read VI doesn't cut it anymore. The algorithm in MatLab that I used to use to read in files like this worked pretty well; read in 10000 pieces of data, processed, then spit it out. I have the OpenG lib and I tried some of the read data file VI's that are in there, but they all sent out garbage. Where there was supposed to be a zero the VI would return 2.65487E-28 or something like that... The data is not complicated: first column is relative time and the other columns are channels of data.

    Any suggestions? Thanks...

  4. Yea I understand everything that you said... the only problem is that my program can only fix annotations that already exsist. If i click on the graph and "add annotation", then run the program, it works fine. But sometimes I need to add 5, or 10, or 20. It depends on the data I send it. I want the program to read in a number of annotations to create, then create them on its own.

    I know how to read in the "Annotation List" property and set all of the things available: Name, lable visible, plot # and so on. the program does that fine.

    AH i just got it... thanks for the help!!

  5. I'm having issues all over the place... I think my company put up a block on posting things on the internet, which means I have to somehow find the answer to this problem by explaining it rather than showing you. It's not difficult and I feel retarded about it but I can't figure it out:

    i can easily explain whats on the vi. its a simple nested for loop with two array feeding into it. one is a time array the other is an array with values for 26 channels at each of those times. inside the for loops the array is indexed and there is a inequality sign checking to see if the value goes over 2. if it does... i want the program to create a seperate 3D array: channel, value, and time. if it doesnt go over 2 then i want the program to disregard the value and continue. simple enough? i tried creating the array inside the case structure after it checks the value... but when the case is false, the tunnel still requires an output.

    biggest issue: array coming out of the for loop has a different size than the one going in and it needs to be based completely on the values in the array going in and they change everytime on every channel.

    thanks

  6. Thanks for the help with the graphs... I'm gonna get working on some sort of toggle system.

    As for the other question, for some reason this forum wont let me post screenshots or vi's... i dont know why. Heres an attempt at copying and pasting a screenshot:

    if that didnt work... i can easily explain whats on the vi. its a simple integrated for loop with two array feeding into it. one is a time array the other is an array with values for 26 channels at each of those times. inside the for loops the array is indexed and there is a inequality sign checking to see if the value goes over 2. if it does... i want the program to create a seperate 3D array: channel, value, and time. if it doesnt go over 2 then i want the program to disregard the value and continue. simple enough? i tried creating the array inside the case structure after it checks the value... but when the case is false, the tunnel still requires an output.

    thanks

    i meant nested not integrated... sorry kinda tired

  7. Thanks for the reply:

    I'm going to revisit the cursor option; I attempted it once before but got too frustrated (I'm still a total beginner).

    I tried stacking the plots instead of overlapping them, but I have 26 different channels I need to display, and possible more in the future for this application. I need to be able to view them all together. Is there a way to overlap the graphs 2 at a time and stack the couples?

    Another question with the program... I need to be able to build an array that cuts out values from a previous array. The previous array is 3D, first two dimensions are channel and values, the 3rd dimension I assigned a 1 to the values I want to keep and a 0 to the ones I want to cut. I cut out the values with a case structure inside a nested for loop but when the case is false it still requires an output. I tried using the "default" output, but that just pads the areas that i want to cut out with zeros... I know there has to be a way to do this, but I'm just not seeing it.

  8. sorry im really new at this... it says on the forum that ive been using labview since 2006; total lie... I've been using it for about 4 weeks lol.

    i didnt know that you could change the size of clusters! that worked perfectly, thanks for the help!

    for some reason the forum wont let me post the vi... is there a common reason for this or am i doing something wrong?

    another problem with my program: i cant get the x-axis to read more than 2000 pieces of data in at a time... after that it dumps the info and continues. anyway to change this? right now im using property nodes to control the x-axis and im feeding in the amount that i want but it always displays 1 to 1999 for some reason.

×
×
  • Create New...

Important Information

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