-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value Min/ Max Range or limit #4686
Comments
What you are searching for is imho the OPC UA DataType Range, see here: |
@mlang-de |
|
@mlang-de but can see when using this
|
Imho you do not check the return value from _UA_Server_addVariableNode. |
@mlang-de okay it works fine .. But can i set these values in information model. xml? |
Yes. For builtin type it could like this: <Value>
<uax:String>1.0.0</uax:String>
</Value> But a Range is a structured DataType so it should like this. <UAVariable DataType="Range" ParentNodeId="ns=1;i=6022" NodeId="ns=1;i=6023" BrowseName="EURange">
<DisplayName>EURange</DisplayName>
<References>
<Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=6022</Reference>
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
</References>
<Value>
<uax:ExtensionObject>
<uax:TypeId>
<uax:Identifier>i=885</uax:Identifier>
</uax:TypeId>
<uax:Body>
<uax:Range>
<uax:Low>0</uax:Low>
<uax:High>100</uax:High>
</uax:Range>
</uax:Body>
</uax:ExtensionObject>
</Value>
</UAVariable> I never test this with open62541, but in theory it should work. |
okay great thank you .. 1 last question may be you can answer . |
What do you mean with "own data"? <UAVariable Sensor address ="101010" DataType="Range" ParentNodeId="ns=1;i=6022" NodeId="ns=1;i=6023" BrowseName="EURange"> looks wrong. For example <UAVariable DataType="String" ParentNodeId="ns=1;i=5001" NodeId="ns=1;i=6007" BrowseName="2:ManufacturerUri">
<DisplayName>ManufacturerUri</DisplayName>
<References>
<Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5001</Reference>
<Reference ReferenceType="HasModellingRule">i=80</Reference>
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
</References>
</UAVariable> |
@mlang-de : I mean e.g, I have 50 nodes each node has node Id but with node Id i have to send somedata e.g. 101010 for heat sensor address 1010102 for temperature sensor. Data of both nodes is in Float but I need to send 101010 or 1010102 . How can I put this data xml. |
Imho this is not part of an XML. In an XML only default/initial values should be defined. |
@mlang-de |
Imho you have to implement this by your own with the data source callbacks and is not part of the open62541 server and no way to "define" this within the XML. The XML describes the information model no implementation logic. |
okay thank you :) |
Description
Background Information / Reproduction Steps
Is there anything like 'Range' with a min- or max-value available ?
How can I set from the out-side or cleint ? that each varibale have maximum or minimum value is that ?
e.g
Node : XYZ ; DT Int32
min 10- max 100
other min and max values could be discarded
Used CMake options:
Checklist
Please provide the following information:
UA_LOGLEVEL
set as low as necessary) attachedThe text was updated successfully, but these errors were encountered: