referenceMethods
ref."method"
assign
Use assign operator to assign a variable to a reference variable:
B&R: myRef ACCESS ADR(variable);
S7: myRef := REF(#variable);
Beckhoff: myRef REF= variable;
INPUT:
variable : TYPE_ANY [1:1]
RETURN TYPE:
TYPE_ANY
Return:
TYPE_ANY
Parameters:
variable : TYPE_ANY
isValid
Use isValid operator to check if reference is set.
B&R: TRUE (test not supported)
S7: myRef <> NULL
Beckhoff: __ISVALIDREF(myRef)
INPUT:
variable : TYPE_ANY [1:1]
RETURN TYPE:
BOOL
Return:
BOOL
Parameters:
variable : TYPE_ANY