question

CH.Lee avatar image
0 Likes"
CH.Lee asked CH.Lee answered

How to transmit String data to the OPC UA server?

I am currently working on a project to connect a Flexsim project to an OPCUA server.

While data values of Boolean or int data types are successfully transmitted to the OPCUA server, I am encountering an issue where string data is not being transmitted.

The server settings have the Sensor tag's data type set to String.

I have verified from the Kepserver manual, which is the OPC server being used, that string data is supported in the form of Null-terminated Unicode strings.

How can I transmit Null-terminated Unicode string values from Flexsim to the OPCUA server?

FlexSim 24.1.0
emulationstringopcuaunicodesensortag
· 7
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

CH.Lee avatar image
0 Likes"
CH.Lee answered

The problem I had was that when I changed the value from Flexsim to Sensor Variable to String data, the OPC-UA server outputs a value such as String 0, or String 1, and it does not change anymore.

At this time, other types of data could be transmitted and received without problems.


This was why I expressed that the question I intended was not the answer.


However, Referring to your answer, when I checked the Sensor Variable value by entering the command in the Script Console, I confirmed that the Sensor Variable value was changed normally to String data, and I determined that there was a problem with the OPC-UA server setting.


Interestingly, when I reduced the length of the character of the device name and removed the space, the String data was sent to the server correctly.


As a result, I was able to find out how to confirm that it was not a problem of Emulation through your answers, and I am grateful that I could get a clue to solving the problem.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.