Hello, friends.
Today I will tell you.
About compressing and decompressing of a digital waveform.
So for that purpose over here in the front panel window, we just right click.
Then just go to the search box.
In the search box.
We just type distal data.
It will take some time.
It depends on your.
System processing.
So as you see over here in the search palette, I just go for digital data.
As you see over here, I got digital data.
It is available in modern waveform digital data.
You can search from here or you just go.
Modern input output.
And over here you just got digital data.
So right now, this is my control.
And over here, you just put your data in form of 0 or 1.
Let's say I just put this data.
It is nine nine.
Then.
I just put.
Eight.
Then I just put.
Seven.
After this.
I just put again seven.
Seven.
Then after this, again, seven.
Seven.
Then I just put.
One.
Then again, one.
One.
And at last in this I just put f so it is my eight bit data over here I just have in this case.
So I just go to my block diagram window over here.
You just need to go to waveform chart and over here in the waveform, just go to digital waveform.
As you see over here, we have two blocks.
One is for Uncompressing and one is for compressing.
So I just select this compress data.
Connect this one.
So in this case, I just drag this.
Control.
I just make it indicator.
So over here, this is my output.
And this is my input.
Digital.
Input data.
Okay.
So I just make it, select it.
Change it to.
Indicator.
So just go to the block diagram window, connect it.
When you just hit on run button.
As you see the input data it takes.
0 to 8 Total nine.
Eight bit data was there when I hit on run button.
As you see over here, only one, two, three, four, five data are available over here.
So by compressing the data over here, as you see this seven seven, seven, seven, 777 is repeated
three times.
And over here, one is repeated.
One is over here.
Over here.
Fifth, sixth and seventh.
We got one.
One.
Okay, so it just take only once.
So as you see at the zero position, we have nine nine again in the output.
We have nine nine.
Then we have first position.
We have 88.
First position.
We have 88.
In the second position we have 77 third, fourth skipped.
Then fifth position.
We have one one again, we have one one in the eighth position we have F Okay, so I'm just dealing
with hexadecimal.
Number.
So right now, I just again go to my blog diagram window.
Go to waveform.
Over here.
Just go to the digital waveform.
If you want to just compress.
Is data.
Over here we have compressed data.
I just connect this one and just make a copy of this again.
This is the uncompressed output.
So in this case, the output should be same.
No, this is equivalent to your input data.
Okay.
So when I just hit on run button, so first you have to connect this.
So when you hit on run button, complete data is available with me.
As you see, this is my uncompressed data and if you want to just plot it also.
Let's.
Take a digital waveform over here.
Go to.
Our data.
Let's connect this.
And when you hit on run button, as you see, you got the.
Data that is available over here.
So as you see over here, we have line zero, line one, line two, line three, line four, line five.
And if you want to just drag this.
Or you want to just increase this.
It is up to you.
So total eight lines are there.
I just go to the data visibility.
In this case, I just x scrollbar.
You just.
Select the data from here.
You just add.
X and Y properties over here.
Otherwise scale.
As you see when I just click on auto scale, total seven 0 to 7, because in this case I have eight
bit data.
The data over here is like this, as you see in this.
This is my line zero.
This is line one, this is line two.
Column wise data is present over here as you see, line zero one, two, three, four, five, six,
seven.
And in the seventh line, last data is my one.
As you see over here in the all the cases, we have one over here.
Okay.
So as you see over here.
So this is how you can plot your data if you want to invert this data.
It is up to you.
So let's just again go to our.
Block diagram window.
And over here, I just again, copy this data right now.
This is connected to the.
Compressed data.
Over here we have compressed data.
And this is.
Let's connect it to over here.
Let's check what happened.
As you see over here.
This is my graph too.
And if you want to just invert this data, you just insert in between.
Not function.
Let's check what happened.
It is not connected because in this case it will convert only single line.
And told me.
You have to convert this data into array form first, then you have to invert this data.
So again, I just go to waveform over here.
I just go to digital waveform if you want to check the digital size.
We just go with this function the size.
I just connect this function.
And over here you just get the number of samples in this case.
Number of samples present in this case.
And over here, number of signals in the particular.
Waveform you just get from here.
So let's just run it once.
As you see, a number of signals are eight and number of samples are nine.
As you see, from 0 to 8, we have total nine samples are there if you just put more samples to it.
As you see, 180 80 is available over here when I just run it, as you see at last, total number of
samples are ten now and the number of signals are again eight.
If you want to just increase the samples, number of signals also in this case, you just need to add
one column over here.
As you see, I just put.
100 column is there.
If you want to add one more over here, just put.
100 is there.
And in this case, as you see, 841 system is there right now.
It is to.
The data is changed over here when I run it.
As you see, the number of samples are ten.
Number of signals are also ten.
And if you want to just delete this particular column, you just need to select this one.
Right click.
And delete row or column options are there.
You just delete column and when again you hit on run button.
In this case, total number of signals are nine and total number of samples are ten.
It is up to you how to use this data.
So this is all about today's lecture.
Thank you.