Result of SIMATIC AX - Manual - PLCopen XML - A command line tool to import PLCopen XML files as ST code. - PLCopen XML,tool

PLCopen XML CLI Tool (plcopen-xml)

Portfolio
SIMATIC AX
Product
PLCopen XML
Software version
1.0.8
Edition
05/2024
Language
English (original)
Package Name
@ax/plcopen-xml
// Source code example and behavior of SIMATIC AX
VAR
  number_1 : INT := 123;
  number_2 : INT := 456;
  ref_1 : REF_TO INT;
  ref_2 : REF_TO INT;
END_VAR

ref_1 := REF(number_1);
ref_2 := REF(number_2);

ref_2 := ref_1; // ref_2^ = number_1 = 123, BUT number_2 is still 456

The reference ref_2 now points to number_1, the value of number_1 is NOT copied to number_2.