Generating the output file (#EXPORT VE)

The NC command #EXPORT VE [..] generates the required data structure for the V.E. variables for the channel in which the command is used.

With multi-channel systems, the NC command must be used in each channel in order to generate the data structure for the particular channel.

The identifier <i> in the filename of the output file is a placeholder for the CNC channel number.

Syntax:

#EXPORT VE [ 3S | TWINCAT | KW ]

3S / TWINCAT

For TwinCAT 2 and the original 3S CODESYS 2.3 PLC environment:

Output file: plc_3s_ve_types_ch_<i>.exp

For TwinCAT 3 and the original 3S CODESYS 3.5 PLC environment:

Output file: plc_3s_ve_types_ch_<i>.xml

Output directory:

  • For TwinCAT, the output path defined in the SystemManager is used to search for NC programs. See: CNC configuration - CNC task GEO - HLI tab HLI - entry box: NC file path
  • For 3S: Directory specified by P-STUP-00020 or as of V3.1.3052.05 by P-CHAN-00403

 

KW

For MULTIPROG PLC environment:

Output file: plc_kw_ve_types_ch_<i>.exp

Output directory: application-specific (P-STUP-00020 or using P-CHAN-00403) as of V3.1.3052.05 and higher

If no output directory is specified in a TwinCAT configuration, the output file is placed in the following directory depending on the TwinCAT version:

This is dependent on the corresponding write authorisations in each directory.

The call of the CNC command #EXPORT VE absolutely requires the specification of the PLC destination system as parameter. The result is named accordingly.

An error message 20509 is output if the parameter is missing.

Programming Example

Generate the output file

#EXPORT VE [TWINCAT] ;Generate V.E. PLC structure for TwinCAT
#EXPORT VE [3S] ;Generate V.E. PLC structure for 3S CODESYS
#EXPORT VE [KW] ; Generate V.E. PLC structure for MULTIPROG from KW

The command can be placed in an NC program or can be executed as a manual block. The command generates a file which is declared in a data structure compliant with IEC 61131-3 for all V.E variables created in the NC channel.

The generated file corresponds to the import/export format for the CODESYS or MULTIPROG development environments and can be imported there directly.

Additional structure declarations are required in the output file.