Skip to content

To Create Array With CreateGVLFile()  #6

@sebetci

Description

@sebetci

Can the CreateGVLFile(<param>) method be used to create a *.GVL file by creating arrays other than primitive data types (boolean, integer, double integer, real, etc.) within the Write() method?

public void Write()
{
   ...

   /***************************************
    * Current - GVL file at CODESYS:
    * 
    * VAR_GLOBAL
    *    variable0 : <primitive type>;
    * END_VAR
    ***************************************/
   sRCodesysNetVars.dataTypeCollection.Add(new CDataTypeCollection(<primitive type convertion>, <primite type>));
 
   /***************************************
    * Request - GVL file at CODESYS:
    * 
    * VAR_GLOBAL
    *    variable0: ARRAY[0..10] OF <primite type>;
    * END_VAR
    ***************************************/
   sRCodesysNetVars.dataTypeCollection.Add(new CDataTypeCollection(<collection>, <number of member>, <primite type>));
   ...
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions