Short instructions using the export functionality for V.E. variables

Procedure based on TwinCAT

  1. Exporting V.E variables from the CNC using the export command #EXPORT VE[TWINCAT]
  2. Open the export file with an editor and check for any warnings or errors. These are displayed by a text in the file.
  3. Importing the export file to the existing PLC project
  4. Create pointers to structures
    (* Use the generated structure descriptions *)
    p_ve_chan_1 : POINTER TO VE_CHANNEL_DATA_CH_1;
    p_ve_glob      : POINTER TO VE_GLOBAL_DATA_FROM_CH_1;
  5. Assign the addresses of the V.E-specific HLI ranges only once as shown in the example of the defined pointer variables
  6. Integrate read and write access to structures
    p_ve_glob^.VARIABLE_1 := 22;         (*Write access*)
    gl_ar_var_3 := p_ve_glob^.VARIABLE_1; (*Read access*)