Short-form instructions
Short-form instructions using the export functionality on V.E. variables
Procedure based on TwinCAT
- Export the V.E. variables from the CNC with the export command
#EXPORT VE[TWINCAT]
- Open the export file with an editor and check for any warnings or errors. These are displayed in a text in the file.
- Import the export file into the existing PLC project; this requires access to the HLI
- 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; - 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); - 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*)