Hi everyone,
I have a ctrlx Drive with built-in ctrlX Core am using ctrlX OS version 2.4.
I am currently trying to create a simple node with the address "test/testbool" and the value datatype Bool, using the functionblock DL_CreateNode.
I copied the implementation from the documentation and adapted it slightly:
PROGRAM DL_test
VAR
m_fbCreateNode : CXA_Datalayer.DL_CreateNode;
m_Execute : BOOL;
m_ValueIn : BOOL;
m_ValueOut : BOOL;
m_address : STRING;
END_VAR
m_address := 'test/testbool';
m_ValueIn := TRUE;
m_Execute := TRUE;
m_fbCreateNode(Execute:= m_Execute, NodeName:= m_address, ValueIn:= m_ValueIn, ValueOut:=m_ValueOut);
IF (m_fbCreateNode.Done = TRUE) OR (m_fbCreateNode.Error = TRUE) THEN
m_Execute := FALSE;
m_fbCreateNode(Execute:= m_Execute, NodeName:= m_address, ValueIn:= m_ValueIn, ValueOut:= m_ValueOut);
END_IF
Unfortunately, the function block keeps reporting the error ACCESS-ERROR.
So far I have only been able to run functionblocks that only have read access to the data layer.
I would appreciate any helpful input.
Thanks
Regards
Thomas