Short instructions using the export functionality for V.E. variables
Procedure based on TwinCAT
- Exporting V.E variables from the CNC using the export command #EXPORT VE[TWINCAT]
- Open the export file with an editor and check for any warnings or errors. These are displayed by a text in the file.
- Importing the export file to the existing PLC project
- 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; - Assign the addresses of the V.E-specific HLI ranges only once as shown in the example of the defined pointer variables
- 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*)