LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a LVM file for a wave form

I have to simulate an ECG wave form at the input. i think i can use read from file option, but don't know how to do that.
 
I had plotted the same in matlab with the below code.
>> x=[0
0
0
0
2
5
8
10
13
14
14
14
12
11
9
7
5
4
2
1
1
0
0
1
1
1
1
1
2
2
2
3
3
3
3
3
3
3
3
3
3
6
11
20
33
51
72
91
103
105
96
77
53
27
5
-11
-23
-28
-28
-23
-17
-10
-5
-1
0
1
2
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
2
2
3
3
4
4
5
6
7
8
8
9
10
10
11
11
12
12
12
13
14
16
18
20
22
24
27
29
31
34
37
39
42
44
47
49
52
54
55
56
57
57
58
58
57
57
56
56
54
52
50
47
43
40
36
33
29
26
23
20
17
14
12
10
8
7
5
3
2
1
1
0
0
0
0];
>> plot (x)
 
Can any one help me in this issue
 
0 Kudos
Message 1 of 15
(5,490 Views)

You just have to use the Read From Spreadsheet as shown below. If you put those values in a text file (without that '>>x=[' and '];' stuff, you'll get a waveform like the other picture shows. Because there is no sampling information, you will have to provide you own dt. This is pretty simple stuff. You should check out the resources for learning some of the LabVIEW basics at http://zone.ni.com/devzone/cda/tut/p/id/5054.

Message Edited by Dennis Knutson on 12-03-2006 07:38 PM

Download All
Message 2 of 15
(5,487 Views)
Thanks for the reply and the link was escellent. i am going through the basic tutorials.
 
By any chance can u forward the VI that was shown in the figure.
 
Thanks
0 Kudos
Message 3 of 15
(5,455 Views)
There are exactly two functions used. One I already mentioned (Read From Spreadsheet File). The other is Build Waveform. You can find the first on your file i/o palette. The other is on the waveform palette (at least in 7.1 or lower). If your vversion of LabVIEW is 8.x, then the icon for Read From Spreadsheet File will look a little different. There is also a handy little search button on the functions palette.
Message 4 of 15
(5,451 Views)
when i am doing this i can see only one ECG wave and when i made the text file with more cut copy paste, it is showing more.... But it is not a continuous wave form.
 
Is there any chance that we can make this wave form get generated continuously.....
 
Like sine wave and all that we already have in build......
Message 5 of 15
(5,444 Views)
i am attaching my work with this so that u can have an idea.
 
Every time it is asking for the file...
0 Kudos
Message 6 of 15
(5,440 Views)

I can't open your VI but if you are getting a prompt for the file to load, then all you have to do is replace the path control with a constant.

It also sounds like you have gaps in the text file or in some way the data is not continuous. You could always do some sort of interpolation. Why don't you attach the text file. That I can read.

0 Kudos
Message 7 of 15
(5,429 Views)
please find attached the text file
0 Kudos
Message 8 of 15
(5,417 Views)

This is what I get when I read the file. I used the same code as what I posted before except I changed the transpose input to false because I had assumed that you would have a single column in the file as the data was shown in your first post. You have a single row instead.

Message Edited by Dennis Knutson on 12-05-2006 03:01 PM

0 Kudos
Message 9 of 15
(5,413 Views)
yes, the wave form is ok, but to get the wave form continuously as in a loop, what should we do.
 
I am using "Read from Spreadsheet (DBL).VI" and i don't know how to configure the same for only taking one file and not asking further till we stop and run again.
 
I tried putting the while loop also but still, it is asking for file each time.
 
Also advice me how you are taking that snap shots from Labview, so that i will also send the function circuit i made (as u couldn't open it, due to version incompatibility - i am using evaluation version of 8.20)
 
 
Thanks
 
0 Kudos
Message 10 of 15
(5,400 Views)