TOP Server with S7 MPI reading Floats
I'm trying to use TOP Server to talk to an Siemens S7-400 PLC through MPI. Everything works fine the only problem I have is trying to read and write registers as real. Can TOP Server do this?
If you are using Dynamic Tags, the problem is just one of adding the '@float' to the end of your addresses. See below for more information.
There are two ways to get data from a device to your client application using the server. The first method and most common method requires that you define a set of tags in the server project and then use the name you assigned to each tag as the item of each link between the client and the server. The primary benefit to this method is that all user-defined tags are available for browsing within most OPC clients (its best to see if your client can browse or import tags from the server before deciding on creating static tags). Additionally, user defined tags also support scaling.
The second method is to use Dynamic Tags. This is when you only create the Channel and Device in the server and you use the PLC address in the client to access the values. The only disadvantage other then scaling when reading dynamic tags is that when the address you request is not the default data type (The default data type for all addresses can be found in the Addressing section of the Driver Help file in the TOP Server) you have to add the @datatype string to the end of the PLC address to change the request to the non-default datatype. More on Dynamic tagging is show below.
Dynamic Tags
The second method of defining tags is called Dynamic Tag addressing. Dynamic tags allow you to define tags solely in the client application. Instead of creating a tag item in your client that addresses another tag item you have created in the server, you need only to create tag items in the client that directly accesses the device driver’s addresses. On client connect, the server will create a virtual tag for that location and start scanning for data automatically.
To specify an optional data type, append one of the following strings after the '@' symbol:
Boolean
Byte
Char
Short
Word
Long
DWord
Float
BCD
LBCD
String
If you omit the data type, the driver will choose a default data type based on the device and address you are referencing. The default data types for all locations are documented in the individual driver help files. If the data type specified is not valid for the device location, the server will not accept the tag and an error will be posted in the event log.
There are two ways to get data from a device to your client application using the server. The first method and most common method requires that you define a set of tags in the server project and then use the name you assigned to each tag as the item of each link between the client and the server. The primary benefit to this method is that all user-defined tags are available for browsing within most OPC clients (its best to see if your client can browse or import tags from the server before deciding on creating static tags). Additionally, user defined tags also support scaling.
The second method is to use Dynamic Tags. This is when you only create the Channel and Device in the server and you use the PLC address in the client to access the values. The only disadvantage other then scaling when reading dynamic tags is that when the address you request is not the default data type (The default data type for all addresses can be found in the Addressing section of the Driver Help file in the TOP Server) you have to add the @datatype string to the end of the PLC address to change the request to the non-default datatype. More on Dynamic tagging is show below.
Dynamic Tags
The second method of defining tags is called Dynamic Tag addressing. Dynamic tags allow you to define tags solely in the client application. Instead of creating a tag item in your client that addresses another tag item you have created in the server, you need only to create tag items in the client that directly accesses the device driver’s addresses. On client connect, the server will create a virtual tag for that location and start scanning for data automatically.
To specify an optional data type, append one of the following strings after the '@' symbol:
Boolean
Byte
Char
Short
Word
Long
DWord
Float
BCD
LBCD
String
If you omit the data type, the driver will choose a default data type based on the device and address you are referencing. The default data types for all locations are documented in the individual driver help files. If the data type specified is not valid for the device location, the server will not accept the tag and an error will be posted in the event log.