Forum Home › Forums › Communicating with Devices › OPC › OPCUA DA Gateway
Tagged: opcua opcda data type
- This topic has 11 replies, 3 voices, and was last updated 3 weeks, 6 days ago by
Mikhail.
-
AuthorPosts
-
January 20, 2025 at 8:11 am #16040
sperate
ParticipantHi Mikhail,
I’ve configured an OPC DA <=> OPC UA gateway with the help of RapiScada ant it is working great !
But there is one tag that doesn’t work because of a data format.
The tag is considered as a “System.String” in the OPC DA server esplorer but in fact the data shall be passed as a numerical value to get it working.If I force the tag type to be int32 in the tag explorer I can send values from the webpage and the values are passed as
Val = x,xxx.xxx
to the OPC DA server and the server accepts the data and everything is ok.
The problem is when I send values from the OPC UA side, the value is passed like this :Val=0.000, Data=xxxxxxxxxxxx
and it doesn’t work. I mean the server interprets the value as 0 wich is not good.-
This topic was modified 4 weeks, 1 day ago by
sperate.
January 20, 2025 at 8:13 am #16041sperate
ParticipantTrying to add screen captures with no success ..
http://sperate.free.fr/hebergement_images/Command1.png
http://sperate.free.fr/hebergement_images/Command2.png
http://sperate.free.fr/hebergement_images/Command3.pngJanuary 20, 2025 at 9:21 am #16046manjey73
ParticipantHave you tried using input and output formulas?
For example, process your string value using CnlData in the input formula
Also, when writing, you can send CmdData instead of Cmd.January 20, 2025 at 10:24 am #16047sperate
ParticipantI my memory doesn’t fail, Iremember Mikhail told me once that OPCUA input data goes directly to communicator devices (OPCDA servers in my example) without passing throuht RapidScada’s server Tags. Therfore it is impossible to act on their content this way.
January 20, 2025 at 10:58 am #16049manjey73
Participanton Img1, you can see that Val = 0.000 but Data is 363030
And this is the number 600 in the ascii code.
January 20, 2025 at 12:03 pm #16050sperate
ParticipantYes, 600 is the value I wanted to send from OPCUA client. But I cannot force some OPCUA clients to consider the tag as a number (UA Expert for example). And even in the case I try to force the OPCUA client to use a number, the value is still passed as a string with Val=0 and the ASCII data, like the line you pointed out.
The other lines with Val=2500 or Val=600 are sent with “commands” through the web interface as tag values updates and are well received by the OPCDA server.
img4January 20, 2025 at 12:06 pm #16054Mikhail
ModeratorMikhail told me once that OPCUA input data goes directly to communicator devices (OPCDA servers in my example) without passing throuht RapidScada’s server Tags
Hello,
It may depend on the configuration. If you transfer data using Communicator’s data source, it comes directly. If you use Auto Control Module, data can be converted by formulas.January 20, 2025 at 12:07 pm #16055Mikhail
ModeratorFirst of all, you need to receive data correctly. Could you provide screenshots of the settings and received data?
January 20, 2025 at 12:32 pm #16059sperate
ParticipantI have no acces to the server side of the OPCDA. Thus I cannot tell how data is received. The only thing I can notice is that the system responds correctly to the value following the “Val=” statement. In the case of the
Val=0.000 Data=363030
, the system behaves as if it has received the Val=0 value.The only thing I’m a bit sure is that the OPCDA server configuration states that the tag type is “string” and that may be why RapidScada sends ASCII data when comming from OPCUA client even if the tag is configured as a Integer or Double or some other numeric value on the OPCUA client side.
January 21, 2025 at 2:44 pm #16091Mikhail
ModeratorMay be you should convert the data tag to a number and store it in a separate channel.
January 21, 2025 at 6:25 pm #16092sperate
ParticipantFinally it worked !! and in ASCII !
No need to send a numerical value I just had to manually set the data lenght of the string array of the TAG in the device properties (tag selector popup window).
This value defaulted to an array of 1 char. I’ve set it to 5 chars and it worked with the proper data format of the server.January 22, 2025 at 11:01 am #16094Mikhail
ModeratorCool!
-
This topic was modified 4 weeks, 1 day ago by
-
AuthorPosts
- You must be logged in to reply to this topic.