This Time i will explain the SizeOF() Function.
It is a function to pass variables inside and get the sizes(in bytes count). SizeOf() is very useful, for example if you can trying to implement a Socket Communication between 2 PLCs.
You work flow may be like that:
Open the connection>send the data >receive the data>close the connection.
Then you need to know how big is the data that get from the devices, and also how many bytes that you are planning to send the devices.
Here is a example,
we define some variables as real,int and array, and also the data to get the result.
Then we call the SizeOf() Function.
Now you can see,
Real data is 32bit and 4 is returned.
Int data is 16bit and 2 is returned.
Int Array is the data with length[0..5], so 6*2=12 , 12 is returned.