I have a novice question regarding the actual size of the GVL files in my project?
I have a GVL file containing different types of variables and structs, that I would like to transfer to another device. Can I see how many bytes of data the file contains, without counting the number of variables and calculating the total file size manually?
Is the a menu or compiler logfile somewhere, or can I eventually see it when I'm online on the device?
I'm currently using CODESYS V3.5 SP14, Patch 2.
One way to get the size is to use SIZEOF() operator. But you have to do it for each GVL variable.
First : STRING;
Second : INT;
Third : ST_Struct;
Then in code somewhere:
GvlSize : UDINT;
GvlSize := 0;
GvlSize := GvlSize + SIZEOF(GVL_Test.First);
GvlSize := GvlSize + SIZEOF(GVL_Test.Second);
GvlSize := GvlSize + SIZEOF(GVL_Test.Third);
//Now GvlSize is the size as bytes
Thank you Quirzo. That will do the job.
But I think it would be a nice feature if 3S were adding some kind of functionality to show the size of GVL/NVL files in Codesys.
Log in to post a comment.