Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Invalid data type for node, please check your input
November 15, 2022
1:43, EET
Avatar
Alex.Anikstein
New Member
Members
Forum Posts: 2
Member Since:
November 15, 2022
sp_UserOfflineSmall Offline

I recently downloaded the android app (v2.9.1) and I seem to be unable to write to my variables. In the Prosys OPC UA Browser on my laptop, I am able to write to them if I manually specify the data type “Double”, and from the error message the app gives me (“Invalid data type for node, please check your input”), I suspect I am supposed to specify my data type there, too, but I can’t see how to do so.

I separately downloaded a different mobile client (from a 3rd party) and when I tried to write, that app specifically called out/assumed that I was writing as a double, and it was successful. So I know that I can write to variables through Prosys software (on my laptop), and I know I can write through apps on my phone (through the 3rd party app), but I can’t seem to put it together to write from the Prosys app.

November 15, 2022
17:33, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Does the variable have a proper value when you are writing and what is the DataType of the respective Node?

In general, the client writes the values in the DataType defined by the server. if you need to specify the DataType in Browser, it means typically that the server is not doing that right. And I am afraid that the Android Client does not enable custom data type definition when writing values to overcome this.

November 15, 2022
20:17, EET
Avatar
Alex.Anikstein
New Member
Members
Forum Posts: 2
Member Since:
November 15, 2022
sp_UserOfflineSmall Offline

I’ll be honest, I’m new to this, so I apologize if my answers do not correctly address your questions..

As far as I can tell, the DataType is simply showing as “BaseDataType”–from this, should I assume that means that the server is not properly identifying it? I am able to read the values correctly/accurately, if that counts for anything (though I suspect…not particularly). The variable I am writing to should be able to accept a double and is a valid input, but any value I attempt to write (“0”, “1”, “0.0”, “1.5”, etc.) simply give the same error.

I can’t see a way to attach a picture, so to describe two screens by text:
When I try to write to a variable, I get the “Write value” popup, which prompts me for “New value:” and then has a field I can type into, followed by “Cancel” and “Write” buttons. I am not sure how to verify if it has a “proper value when I am writing”, as I’m not certain how to verify if my value is “proper”–it definitely is a valid value for the variable to take, and when I try to write to it, the variable is showing a reasonable value at that time, too.

When I view the attributes of the variable, it shows:

AccessLevel————-CurrentRead
ArrayDimensions——-Null
BrowseName————{A value, I believe not relevant}
DataType—————–BaseDataType
Description—————
DisplayName————{A value, I believe not relevant}
Historizing—————-false
Min.SamplingInterval–0.0
NodeClass—————-Variable
NodeId———————ns=2;s={A value, I believe not relevant}
UserAccessLevel——-CurrentRead
UserWriteMask———-
Value———————–{The correct value, currently an integer}
ValueRank—————-Any
WriteMask—————–

(Dashes added for clarity. No values show as “negative”/start with dashes, and a few lines do not seem to show a response)

The two things that jump out at me are the “BaseDataType” (which may be incorrect/might need to return Double?) and the AccessLevel/UserAccessLevel of “CurrentRead” (which might imply that it is not intended to be written to? Though again, the same variable can be written to from the desktop app if I specify write as double).

November 15, 2022
23:02, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 960
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, the server is not obviously correctly configured.

If DataType is Double, it should in fact accept all values. If it requires Double, it should use DataType=Double. As you have noticed, UA Browser is clever enough to allow you to choose the actual datatype that is being written. I am afraid that the Android Client at the moment simply writes the value as string, expecting that it’s valid as well.

AccessLevel should also be configured with CurrentWrite bit set, if it allows writes, but it seems that the server does not really care about that. It just gives wrong information.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
26 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 124

pramanj: 86

ibrahim: 74

rocket science: 65

kapsl: 57

Sabari: 51

gjevremovic: 49

Xavier: 43

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 1749

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1323

Posts: 5649

Newest Members:

WalterFOUNC, datafastproxiespx01, LenkaLok, seoninet, justinevillanuev, namtrott5457, DonaldWibip, AlfredoEthix, andreidla, everangel7021

Moderators: Jouni Aro: 960, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 860, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 222, Lusetti: 0

Administrators: admin: 1