CXA_Datalayer.DL_CreateNode - ACCESS-ERROR

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

Best reply by CodeShepherd

The data layer itself is a broker and not holding any data so the function block DL_CreateNode is not able to add nodes to the data layer but is executing an create function provided by a program. You can check in the data layer viewer in the web interface of the ctrlX OS if an read/write/create can be executed on any node via its metadata.

You can use the "ctrlX OS - PLC" app to add nodes to the data layer see "Publish variables to the Data Layer [DOCU] - [VIDEO]"

You could also use the "ctrlX OS - Key Value Database" app as a provider and send the create command to it.

View original
4 replies