Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

To view the LVM data on oscilloscope

Solved!
Go to solution

Hello,

I sampled data using DAQ unit(500hz) and saved that data for around 75 seconds in LVM file.Now, I am trying to plot the saved data(of LVM file) in multisim but could not able to get the whole data plotted.

when the same data is plotted it matlab it shows perfectly of what was saved in LVM for around 75 seconds.

Can someone suggest the corrections to the multisim file so that I can see the total saved data on oscilloscope.

Attachments:It is not accepting the LVM format file so I changed the data file to txt format.

thanks.

Download All
0 Kudos
Message 1 of 12
(7,549 Views)

Hi there,

 

Could you please post the LVM data file, it's gonna be easy for me check. However, for the *.txt file, there is a way to plot on the scope using the "Piece Wise LInear" Voltage source.

PWL1.PNG

 

For the settings of the PWL voltage, you can click the "initialize from clipcoard". Copy all the data file from data.txt that I modified.

PWL2.PNG

 

Run the Simulation, you can see the following plot:

PWL3.PNG

 

Attached are the modified data.txt file I created in Excel and your simulation file using PWL source.

Hope it helps.:-)

Regards,

 

Chen_T
National Instruments
Download All
0 Kudos
Message 2 of 12
(7,538 Views)

Hi Chen_T,

Attached is the origianl LVM file(zip format as the forum is nto acceptong the .LVM format)

I wonder why the signal plotted in Multisim is different from the Matlab plot.can I get some information abotu this.

thanks.

0 Kudos
Message 3 of 12
(7,514 Views)
Solution
Accepted by topic author GoviRe

Hi there,

 

I've checked your .lvm file, it is only one column of the voltage value with the time column empty. Usually, to read the LVM Voltage in Multisim correctly, you should add Segment Headers and X Value (Time) Columns into your .lvm file

For example, you can choose One header only and One column only when you save your Measurement file.

Capture.PNG

 

Given the one column data you provided, using the Piece Wise Linear Voltage Source is also a choice as in my previous post. For your MTALAB plot, the voltage value is plotted against the number of data points (about 3.7 * 10^4) . But on the scope, it is just a time interval displayed. You can use the Transient Analysis to see it's performance over all as shown below.

Capture.PNG

 

This is exactly what you can see in your MATLAB plot.

Hope it helps.

Regards,

 

 

Chen_T
National Instruments
0 Kudos
Message 4 of 12
(7,503 Views)

Hi Chen_T,

I don't know what you did to ge the original plot but when I tired it is not showing the plot it should as you plotted.Attached is the one I tried.

I just copied the data from the your text file(posted in 2nd reply).

To say perfectly, I want to design filters in Multisim which will be feeded with this data as input.For this reason I want to get all the data from the LVM file through LVM or PWL voltage source to feed it to the next filtering stages.

now,I hope you can suggest a better solution for this.

Thanks.

0 Kudos
Message 5 of 12
(7,478 Views)

Hi there,

 

Usually, the two methods above are both OK for your filter input source. If you can create the original LVM file with the header line and time column correctly, the LVM method can be easy to use and maintain.

 

If you cannot have the appropriate .lvm file generated and given my modified .txt file which stores both of the time and value and load it into the Piece Wise Linear source can be also a good way. I've attached the Modified LVM Multisim file for you, you can just build your circuit on it.  

 

Good luck to your filter design!

Regards,

Chen_T
National Instruments
0 Kudos
Message 6 of 12
(7,466 Views)

Hi Chen_T,

Now, I saved that sampled data as you suggested(with header line and time column).But I am still unable to see the correct signal on the oscilloscope using LVM file with LVMVoltageSource because it is only showing a DC waveform(as shown int eh attahced image).

Can you suggest me how to see the correct signal plot on the oscilloscope.

thanks.

Download All
0 Kudos
Message 7 of 12
(7,394 Views)

Hi GoviRe,

 

Thank you for your post. This problem might be due to the LabVIEW Code you wrote. There are two ways to correct this:

 

1. Modify your LabView code, because the number of samples indicated in the header line (100) does not match the actual number of samples in the file. Maybe it's because the "for loops" you use is not that correct, so when you generate the .lvm file, it only shows 100 samples and Multisim only reads the 100 samples. LabVIEW measurement VI still records the sample each time that you trigger it, but with the number of samples incorrectly shown.

 

2. If the above method is hard to modify, you can just change the line "Samples 100" in your .lvm file. Modify the 100 into the actual number of samples you have in this file.

Capture.PNG

 

By the way, you can use either grapher or oscilloscope to view the Voltage. I prefer the grapher in this case, but if you wanna use the scope. My suggestion is that because the delta in Voltage is really small(around 10^-3) if you chose the wrong scale, it looks like DC. So, for Channel A, choose the scale below the 100mV/Div and the Y pos.(Div) -20 something to see the result.

 

Hope it helps.

Regards,

 

Chen_T
National Instruments
Message 8 of 12
(7,388 Views)

Hi Chen_T,

Thanks for your suggestions.I tried the as you suggested but was not able to see the signal waveform either of them( Gapher and scope).I changed the number of samples value to the samples the LVM file acutally contains.

BTW,The samples indicated in the header line (100) only shows the number of samples sampled in 1sec and I think there is no problem with the Labview code.

I really dont know what is the problem with this.Can you help me out in plotting the actaul signal.

 

Download All
0 Kudos
Message 9 of 12
(7,377 Views)

Hi there,

 

As I mentioned before, I still feel that your LabVIEW code only counts the first 100 samples, and Multisim can only read in the 100 samples indicated in the header file of your .lvm file. 

 

Capture.PNG

 

The easiest way to fix it is to change the number of samples in the header file as I can see in your signal_data_2.lvm; however, in this file, you deleted the former header part totally, that is why you cannot see the graphs at all. I've added the missing header lines and made the signal_data_3.lvm for you as the attachment.

 

Also, I include the simulation figures both in the Transient Analysis and the Scope.

If using the Oscilloscope, using the 50mV/Div as the scale for the data you gave me and -76 as the Y position.

Capture2.PNG

 

If using the grapher, set the stop time as 91 seconds. And now you can see all the data displayed.

Capture3.PNG

 

If it is not convenient for you to change the LabVIEW code, this is the easiest method I can come up with so far.

Regards,

Chen_T
National Instruments
0 Kudos
Message 10 of 12
(7,371 Views)