LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the following additions to the attached vi file?

Dear all,
 
after a great struggle and timely advise from dev we wrote this labview program for data acquistion.
 
but there are couple of things need to be done yet and we tried a lot but we couldnt come up with a solution. i listed the two main required changes in the program and request all your experise to help me with this matter. please find the attached program and the changes required.
 
thanks for your time. and any other suggestions that improves the program are welcome.
 
many thanks.
Rishe.
0 Kudos
Message 1 of 8
(2,750 Views)
I modified your vi as as required (I hope). I was not sure about your second requirement: when the loop is stopped, recording is stopped as well, although the Record button may be left ON. I reset this button by using a local variable. You can obtain a similar result by unconditionally resetting the button before starting the loop.
I don't have DAQmx installed for 7.1 so I go a lot of missing vi's, but I guess that you can open the modified vi without problems.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 8
(2,725 Views)

Dear Paolo and all,

sorry for getting back so late and thanks for your modification. i got clear with my second request (resetting the stop button) but i couldnt understand how the modifications you made with the first request will help me. nevertheless i tried to run the program but it doesnt work. may be i didnt say my request clear. ok, here u go i try again.

in the attached vi, the program loads an xls file, which has about 245000 data points, then writes it every 1000 datapoints/sec, starting from data point 1. i used 'delete from array vi' and you used 'array subset vi'. i appreciate the way you got rid of the shift registers. but my question is, once all the data points are written, how could I start to write from data point 1 again, without restarting the program. is it possible?

hope i explained clear this time. may be u already tried to resolve the same issue with ur previous modifications and i didnt understand. if thats the case, can you please explain what i have to do? i tried to run the program with ur modifications but it stops once it wrote all the data points.

many thanks.

Rishe.

0 Kudos
Message 3 of 8
(2,703 Views)
Hi Rishe,
I admit that I did not take into account the DAQmx part of you vi (I simply assumed it was working).
In my modified vi, I rather focussed on extracting the proper data from the array in a continuous mode. Basically I extract portions of the array, each of length 1000, cycling the offset from 0 to the maximum available (if this is still not clear to you, you may check the attached vi to to see how this works).
According to your code, the program loop can finish only on two conditions:
1) the STOP button is pressed
OR
2) there is an error in some DAQmx vi
So, since you did not press the STOP button and more than 1000 data points are written, an error MUST occur in the DAQmx Read or Write.
Unfortunately, I cannot help you very much about this, as I don't have a suitable hardware to do some tests nor enough experience in waveform generation to spot possible problems Smiley Sad.

Paolo

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 4 of 8
(2,697 Views)

Dear Paolo,

thanks for your advice. i think i understand what u said. well not exactly. but i think thats ok. can i ask you one more thing if thats not too much. in the program, u can see the read and write vi are in the loop and the loop runs for every second (1000 data with a sampling rate of 1000). so the display i am looking at updates only every second. If i want the display as a scroll type in waveform chart, in other words, the display should be continous like a stream, then what is the best and easy way of doing that?

thanks a lot mate.

Rishe.

0 Kudos
Message 5 of 8
(2,679 Views)
Dear Rishe,
also if you replace Waveform Graphs with Charts, they would still be updated once per second. To obtain a better look, you should reduce the block size, e.g. to 100.
Setting a Chart History Length of 1000 points, charts would be filled in the first second, then would start to scroll at a 10 Hz frequency.
Sorry for these rather obvious suggestions.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 8
(2,666 Views)
Dear Paolo and all,

thanks for your response and advice. between labview and me everthing is new and nothing is obvious. anyway, i tried your advice but it didnt help. the display still updates for once a second. i can change the number of samples to be collected as 100. i understand it increase the rate of update. but i m looking for something that goes like a stream. something similar to the scroll display in the chart. any inputs??

thanks once again.
Rishe.
0 Kudos
Message 7 of 8
(2,644 Views)
Dear Paolo and all,

i tried to change the program by keeping the read and write vi in two different loops. i update the read loop once ever data and change the displays in to chart. the write loop writes 1000 data points per loop as ui dont need this display to be scrolled. the read display looks fine now. but for some reasons, the write loops starts to run only after the read loop stops. can you please have a look and advice.

many thanks.
Rishe.
0 Kudos
Message 8 of 8
(2,629 Views)