Short-form instructions

Short-form instructions using the export functionality on V.E. variables

Procedure based on TwinCAT

  1. Export the V.E. variables from the CNC with the export command
    #EXPORT VE[TWINCAT]
  2. Open the export file with an editor and check for any warnings or errors. These are displayed in a text in the file.
  3. Import the export file into the existing PLC project; this requires access to the HLI
  4. Create pointers to structures
    (* Use the generated structure descriptions *)
    p_ve_chan_1 : POINTER TO VE_CHANNEL_DATA_CH_1;
    p_ve_globe : POINTER TO VE_GLOBAL_DATA_FROM_CH_1;
  5. Cyclically update the pointers to the structures
    (* Provide pointers to structure(s) *)
    p_ve_chan_1 := ADR( pVE[1]^.addr^.AHLI_UNS32_Data);
    p_ve_globe := ADR(pVEGlob^.addr^.AHLI_UNS32_Data);
  6. Integrate read and write access to variables
    p_ve_globe^.VARIABLE_1 := 22; (*Write access*)
    gl_ar_var_3 := p_ve_globe^.VARIABLE_1; (*Read access*)