Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Even correct writing of the value to the Siemens S7 controller returns an error

34 views
Skip to first unread message

Kamil

unread,
Oct 15, 2024, 9:11:51 AM10/15/24
to open62541

I am using Open62541 v1.4.6 for the PC connection to the Siemens S7 controller. I have happily managed to establish a bi-directional connection (albeit not without minor niggles).

My question is,  should I be able to rely rely on the status returned by the  UA_Client_writeValueAttribute() function in this case? I would like to use this status as follows:

UA_StatusCode write_sts = UA_Client_writeValueAttribute(client_, node_id, &opc_val);
if(write_sts != UA_STATUSCODE_GOOD) {
     // Handle error
}


However, the function always returns
UA_STATUSCODE_BADINTERNALERROR (0x80020000) error, even though I can read the stored value  correctly from the controller.

Has anyone had a similar experience? I don't know whether to continue to wrestle with the subject or rather look for a workaround.

Kamil

unread,
Oct 15, 2024, 9:55:11 AM10/15/24
to open62541
Hi,

I am using Open62541 v1.4.6 as a client to connect my PC to a Siemens S7 PLC. Happily, I have managed to establish bi-directional communication (but not without some minor niggles).
My question is, when communicating with the S7, should I rely on the status returned by the UA_Client_writeValueAttribute() function when writing data to the controller? I would like to make use of this status like this:

UA_StatusCode write_sts = UA_Client_writeValueAttribute(client_, node_id, &opc_val);
if(write_sts != UA_STATUSCODE_GOOD) {
     // Handle error
}

but it is always equal to UA_STATUSCODE_BADINTERNALERROR (0x80020000), even when the value being written correctly appears in the PLC.

Has anyone had a similar experience? I don't know whether to keep struggling with this or look for a workaround.




Julius Pfrommer

unread,
Nov 3, 2024, 4:34:54 PM11/3/24
to open62541
Please set the logging to DEBUG or TRACE and paste what you get.
Regards, Julius
Reply all
Reply to author
Forward
0 new messages