Write value in DataLayerNode with NodeName 255+ characters

Hi everybody,

I want to write a (LREAL-)variable on the DataLayer via PLC-App (V2.2.0) using DL_WriteNode.

The variable is located in the OPC-UA Client part and is running on another OPC-UA Server (thats why I have no influence on the length of the path). See the DataLayer access in the picture below:

 

Yet the copid NodeName (sadly) has more than 255 characters (e.g. see below):

opcuaclient/OPC_UA_Server_KUKA/i=85/ns=2;i=5001/ns=7;i=5000/ns=7;i=5004/ns=8;s=ns=7%3Bi=5004??krlvar:/R1/CUSTOMER/OPCVARIABLEN/ns=8;s=ns=7%3Bi=5004??krlvar:/R1/CUSTOMER/OPCVARIABLEN#ApproachPath[]/ns=8;s=ns=7%3Bi=5004??krlvar:/R1/CUSTOMER/OPCVARIABLEN#APPROACHPATH[10]/ns=8;s=ns=7%3Bi=5004??krlvar:/R1/CUSTOMER/OPCVARIABLEN#APPROACHPATH[10].A1

Is there any chance to write the variable via PLC? Can I use another function? Is there a workaround? Am I missing sth.?

I have no issue writing the variable directly from the DataLayer.

Thx for the support 🙂

 

Best reply by CodeShepherd

It seems you are working with test versions of the OPC UA client app. Could you please confirm the version number?

How does your code look like for writing? What is the error that your DL_WriteNode is giving back when you try to write?

We did some tests with the example out of the CXA_DataLayer library using address strings up to 370 character and writing via DL_WriteNode was working fine. Beware that the data type of the value that should be written needs to fit to the target data type. Further more the address string variable needs to be big enough to be able to hold the complete string (standard string = 80 characters, string(1024) = 1024 characters). Please also do a complete download when data types are changed.

View original
2 replies