Create Opc Ua Serveur c# with custom structure Slot|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Create Opc Ua Serveur c# with custom structure Slot
Avatar
julien MARTIN
Member
Members
Forum Posts: 6
Member Since:
03/06/2024
sp_UserOfflineSmall Offline
1
03/19/2024 - 03:30
sp_Permalink sp_Print

Hello,

I would like to create an Opc Ua server with a customized structure:

<UADataType NodeId="ns=1;i=3003" BrowseName="1:SlotType">
<DisplayName>SlotType</DisplayName>
<Description>Slot Type</Description>
<References>
<Reference ReferenceType="HasEncoding">ns=1;i=5001</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5003</Reference>
<Reference ReferenceType="HasEncoding">ns=1;i=5002</Reference>
<Reference ReferenceType="HasSubtype" IsForward="false">i=22</Reference>
</References>
<Definition Name="1:SlotType">
<Field DataType="Int16" Name="ProductId">
<Description>Product Id</Description>
</Field>
<Field DataType="String" MaxStringLength="2" Name="ProductName">
<Description>Product Name</Description>
</Field>
<Field DataType="Int16" ValueRank="1" ArrayDimensions="3" Name="Location">
<Description>Location</Description>
</Field>
<Field DataType="Int16" ValueRank="1" ArrayDimensions="3" Name="Rotation">
<Description>Rotation</Description>
</Field>
<Field DataType="Int16" ValueRank="1" ArrayDimensions="3" Name="Dimension">
<Description>Dimension</Description>
</Field>
</Definition>
</UADataType>

I want a Pus folder with a PuIn Object inside, containing a list of 24 slots of type slotType.

I've tried to generate the model with UaModel or Ua Model eXcekerator Pro.
I can't create this c# server with the OPCUa Foundation library. In the case of UaModel, the nodes don't seem to be present and with UMX, the slot list is not initialized.

I tried to create the IEncodable object directly, but the client doesn't decode it.

Do you have a simple example of how to do this?

Thanks in advance.

Avatar
julien MARTIN
Member
Members
Forum Posts: 6
Member Since:
03/06/2024
sp_UserOfflineSmall Offline
2
03/20/2024 - 05:34
sp_Permalink sp_Print

I managed to make my server with UaModel and the ua sdk unified Automation. how to convert it with the Opc Ua Foundation sdk.

Here is the github for the repository : https://github.com/julienMarti...../DemoOcpUa

Thanks in advance.

Best regard

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 51
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855