VB.NET and Siemens OPC and Structures/UDTs

rblunt

Member
Join Date
Nov 2013
Location
Canada
Posts
35
I have downloaded the examples from Siemens. I'm kind of left with a few questions, but my biggest right now is can you work with udts via OPC.

I have made a udt in the S7 that is like this:

udt named POINT
2 members
x as real
y as real


udt named SHAPE
2 members
ShapeType as string
Points as array of POINT[3600]

So in PLC I made a DB 10 that holds information for 1 SHAPE, named it ThisShape for simplicity

So in PLC I can refer to it with
ThisShape.ShapeType = 'Circle1' or ThisShape.ShapeType = 'Square3'
ThisShape.Points[1].x = 50
ThisShape.Points[1].y =94

Can I read DB10 via OPC and put it into a VB.NET STRUCTURE?

Or does DB10 come into VB.NET and then I need to slice it up programmatically to put it into a STRUCTURE?
 
I haven't done much OPC Client programming, so I'm not sure. However, it might help others if you list which S7 PLC and OPC server you are using. If you are accessing the data symbolically, you might be able to do what you want. If you are using absolute addressing, then you will probably have to break it up programatically.
 

Similar Topics

Friends, Simple question. Is it possible to access S7 project tags as OPC items in S7-PLCSIM Simulation environment & Simatic Net ? (Everything...
Replies
3
Views
10,716
I am working in a site with 8 PLCs Siemens S7 connected to each other through the Ethernet. for our new project I want to install an OPC server to...
Replies
8
Views
11,833
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
3
Views
30
Hello Guys, I want to establish profinet communication between siemens plc and my system using python programming. Which python lib can i use to...
Replies
12
Views
360
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
178
Back
Top Bottom