Beckhoff TwinCat
Beckhoff TwinCat
Beckhoff TwinCat
Help
© 2010 Kepware Technologies
1 Beckhoff TwinCAT Driver Help
Table of Contents
1 Getting Started
................................................................................................................................... 3
Help Contents .......................................................................................................................................................... 3
Overview .......................................................................................................................................................... 3
2 Device Setup................................................................................................................................... 4
Device Setup .......................................................................................................................................................... 4
Symbolic Settings
.......................................................................................................................................................... 5
Setting Up an AMS
..........................................................................................................................................................
Remote Connection 7
3 Automatic Tag
...................................................................................................................................
Database Generation 11
Automatic Tag
..........................................................................................................................................................
Database Generation 11
4 Optimizing Beckhoff
...................................................................................................................................
TwinCat Communications 12
Performance ..........................................................................................................................................................
Optimization 12
5 Data Types Description
................................................................................................................................... 13
Data Types Description
.......................................................................................................................................................... 13
6 Address Descriptions
................................................................................................................................... 14
Address Descriptions
.......................................................................................................................................................... 14
Symbolic Tag..........................................................................................................................................................
Based Addressing 14
Tag Scope .......................................................................................................................................................... 14
Addressing Atomic
..........................................................................................................................................................
Data Types 15
Ordering of TwinCat
..........................................................................................................................................................
Array Data 16
7 Error Descriptions
................................................................................................................................... 17
Error Descriptions
.......................................................................................................................................................... 17
Error Codes .......................................................................................................................................................... 18
Address Validation
.......................................................................................................................................................... 20
Address Validation
......................................................................................................................................................... 20
Device Address
.........................................................................................................................................................
<address> contains a syntax error 21
Data type.........................................................................................................................................................
‘<type>’ is not valid for device address '<address>' 21
Array size.........................................................................................................................................................
is out of range for address '<address>' 21
Address '<address>'
.........................................................................................................................................................
is out of range for the specified device or register 21
Driver Error Messages
.......................................................................................................................................................... 22
Driver Error
.........................................................................................................................................................
Messages 22
Unable to.........................................................................................................................................................
load '<dll>' 22
Unable to.........................................................................................................................................................
import from '<dll>' 22
Port open.........................................................................................................................................................
failed with Error Code '<#>' 22
Driver Status ..........................................................................................................................................................
Error Messages 22
Device Status
.........................................................................................................................................................
Error Messages 22
Device '<Device
.........................................................................................................................................................
name>' is not responding 23
Unable to synchronize with configuration file '<file name>' on device '<device name>' due to memory
allocation .........................................................................................................................................................
error 23
Unable to.........................................................................................................................................................
perform Beckhoff compatibility on device '<device name>' due to memory allocation error 23
Unable to.........................................................................................................................................................
gather runtime information for device '<device name>'. Reason '<reason> 23
Read Error Messages
.......................................................................................................................................................... 24
Read Error .........................................................................................................................................................
Messages 24
Unable to.........................................................................................................................................................
read tag '<address>' on device '<device name>'. Error Code '<#>' 24
Unable to read tag '<address>' on device '<device name>'. Tag data size of '<size>' bytes(s) exceeds
actual data.........................................................................................................................................................
size of '<size>' byte(s) 24
Unable to.........................................................................................................................................................
read tag '<address>' on device '<device name>'. Address bounds exceeded 24
Unable to.........................................................................................................................................................
read tag '<address>' on device '<device name>'. Memory allocation error 25
Contents 2
Unable to read tag '<address>' on device '<device name>'. Actual data type is not compatible with tag of
type '<data.........................................................................................................................................................
type>' 25
Unable to.........................................................................................................................................................
read tag '<address>' on device '<device name>'. Runtime file is not valid 25
Unable to.........................................................................................................................................................
read tag '<address>' on device '<device name>'. Symbol not found in file 25
Unable to read tag '<address>' on device '<device name>'. Bekchoff TwinCAT DLL(s) necessary for
runtime are.........................................................................................................................................................
not loaded 26
Unable to.........................................................................................................................................................
read tag '<address>' on device '<device name>'. Tag does not meet filtering requirements 26
Write Error Messages
.......................................................................................................................................................... 26
Write Error.........................................................................................................................................................
Messages 26
Unable to.........................................................................................................................................................
write to tag '<address>' on device '<device name>'. Error Code '<#>' 26
Unable to write to tag '<address>' on device '<device name>'. Tag data size of '<size>' bytes(s) exceeds
actual data.........................................................................................................................................................
size of '<size>' byte(s) 27
Unable to.........................................................................................................................................................
write to tag '<address>' on device '<device name>'. Address bounds exceeded 27
Unable to.........................................................................................................................................................
write to tag '<address>' on device '<device name>'. Memory allocation error 27
Unable to write to tag '<address>' on device '<device name>'. Actual data type is not compatible with tag
of type '<data
.........................................................................................................................................................
type>' 27
Unable to.........................................................................................................................................................
write to tag '<address>' on device '<device name>'. Runtime file is not valid 28
Unable to.........................................................................................................................................................
write to tag '<address>' on device '<device name>'. Symbol not found in file 28
Unable to write to tag '<address>' on device '<device name>'. Bekchoff TwinCAT DLL(s) necessary for
runtime are.........................................................................................................................................................
not loaded 28
Unable to.........................................................................................................................................................
write to tag '<address>' on device '<device name>'. Tag does not meet filtering requirements 28
Unable to.........................................................................................................................................................
write to tag '<address>' on device '<device name>'. Tag access is Read Only 29
Automatic Tag ..........................................................................................................................................................
Database Generation Messages 29
Automatic.........................................................................................................................................................
Tag Database Generation Error Messages 29
Unable to.........................................................................................................................................................
generate a tag database for device '<device name>'. Reason: Memory allocation error 29
Unable to generate a tag database for device '<device name>'. Reason: Beckhoff TwinCAT DLL(s)
necessary.........................................................................................................................................................
for import are not loaded 29
Unable to.........................................................................................................................................................
generate a tag database for device '<device name>'. Reason: Device returned error code '<#>' 29
Unable to.........................................................................................................................................................
generate a tag database for device '<device name>'. Reason: Device is not responding 30
8 Technical Notes
................................................................................................................................... 30
Technical Notes
.......................................................................................................................................................... 30
TwinCAT Memory
..........................................................................................................................................................
Warning 30
TwinCAT Time..........................................................................................................................................................
Slice Notes 31
Index 32
2
3 Beckhoff TwinCAT Driver Help
CONTENTS
Overview
What is the Beckhoff TwinCAT Driver?
Device Setup
How do I configure a device for use with this driver?
Address Descriptions
How do I reference a data location in a Beckhoff TwinCAT device?
Error Descriptions
What error messages does the Beckhoff TwinCAT driver produce?
Technical Notes
Where can I find technical notes for the Beckhoff TwinCAT Driver?
Overview
The Beckhoff TwinCAT Driver is specifically designed to communicate with a Beckhoff TwinCAT software system. The
Beckhoff TwinCAT software system turns any compatible PC into a real-time controller with a multi-PLC system, NC axis
control, programming environment and operating station. TwinCAT replaces conventional PLC and NC/CNC controllers
as well as operating devices with:
open, compatible PC hardware
embedded IEC 61131-3 software PLC, software NC and software CNC in Windows NT/2000/XP/Vista, NT/ XP
Embedded, CE
programming and run-time systems optionally together on one PC or separated
connection to all common fieldbuses
PC interfaces are supported
data communication with user interfaces and other programs by means of open Microsoft standards (OPC, OCX,
DLL, etc.)
www.kepware.com
Beckhoff TwinCAT Driver Help 4
TwinCAT PLC
TwinCAT PLC was conceived as a pure software PLC. It allows up to four virtual PLC CPUs on one PC, with each
running up to four separate user tasks. TwinCAT PLC includes both the programming environment and the run-time
system. Under the CE operating system and the embedded operating systems for the series BX and BC controllers, only
TwinCAT run-time is available. Program modifications are implemented via network-capable powerful communication
with the run-time system.
Device Setup
Communication Protocol
ADS API
Supported Devices
Beckhoff TwinCAT PLC
BC9xxx Coupler Controller
BX9xxx Coupler Controller
Request Timeout
This parameter specifies the amount of time that the driver will wait for a response from the device before giving up
and going on to the next request. Long timeouts will only affect performance if a device is not responding. The default
setting is 1000 milliseconds. The valid range is 100 to 30000 milliseconds.
Retry Attempts
This parameter specifies the number of times that the driver will retry a message before giving up and going on to the
next message. The default setting is 3 retries. The valid range is 1 to 10.
Device IDs
The Device ID is a specific ADS-AMS Net ID. Every PC on the network can be uniquely identified by a TCP/IP address.
The ADS-AMS Net ID is an extension of the TCP/IP address and identifies a TwinCAT message router, such as
"255.255.255.255.1.1". TwinCAT message routers exist on every TwinCAT PC and on every Beckhoff BCxxxx bus
controller.
Important: On Windows Vista and above, User Account Control (UAC) must be turned off before a remote connection
may be configured with the Beckhoff TwinCAT Remote Manager Utility. If the remote connection is created before UAC
is disabled, the configuration settings will be created in an incorrect location (resulting in poor performance).
Note: For more information about the AMS messaging protocol, please consult Beckhoff's help documentation.
Port Number
The ADS devices in a TwinCAT message router are uniquely identified by a number referred to as the ADS-PortNr. The
TwinCAT System Manager supports four different TwinCAT PLC runtime systems at ports 801, 811, 821, and 831. The
default port is 801. Other supported ports include port 800 for BC9xxx and BX9xxx series controllers and port 301 and
302 for additional tasks.
www.kepware.com
5 Beckhoff TwinCAT Driver Help
Note: Users must allow the TCP port number 48898 (AMS port 801) on the firewall if planning to connect remotely to
an ADS/AMS router. If not, the system will not work reliably and may stop.
2. A Static Tag is created in the server with Default as its assigned data type.
Symbolic Settings
Import Method
The generated server tags are based on the tags defined in the Beckhoff TwinCAT device. There are two database
import methods that can be used to create a tag database: Upload Symbols from Device and Upload Symbols from File.
Note: At this time, tags and symbols can only be uploaded from a TwinCAT soft PLC. They cannot be uploaded from a
hardware BC/BX controller.
Symbol File
This parameter specifies the exact location of the .tpy file from which tags will be imported. BC9xxx and BX9xxx models
must include this file for a runtime database.
Caution: Checking Auto-Synchronize will reflect changes to the runtime, regardless of whether or not the new
configuration has been pushed down to the device. Users should ensure that the device is using the same .tpy file as
loaded in the server project; otherwise, inaccurate data could be obtained.
Note 1: Tag database changes will not appear in the server until Automatic Tag Generation is performed.
Note 2: The BC9xxx and BX9xxx models only support database creation from a .tpy file.
www.kepware.com
Beckhoff TwinCAT Driver Help 6
Example:
bMemFlag AT%MX0.0:BOOL; (*~(OPC:1:Visible to OPC Clients)*)
Example:
bMemFlag AT%MX0.0:BOOL; (*~(OPC:1:Visible to OPC Clients)(OPC_Filter:Memory Access)*)
Combination Usage
Each of the comments described above can be combined for greater contol over the filtering and assignment of OPC
Read/Write item properties.
Only Import Variables Marked for OPC + Respect OPC Read/Write Item Properties
Variables will only be imported and visible during runtime if "OPC:1" is defined in the comment field. Upon being
imported, corresponding tags will be assigned the appropriate Read/Write access rights.
Syntax:
(*~(OPC : 1 : <remark>)(OPC_PROP[0005] : <Item Access Rights> : <remark>)*)
Example:
www.kepware.com
7 Beckhoff TwinCAT Driver Help
Only Import Variables Marked for OPC + Filter + Respect OPC Item Properties
A variable with this comment will only be imported and visible during runtime if "OPC:1" is defined in the comment field
and if the filter string found in the comment section matches the filter set in Device Properties. Corresponding tags will
be assigned Read/Write access rights once they are imported.
Syntax:
(*~(OPC : 1 : <remark>)(OPC_Filter : <filter string> : <remark>) (OPC_PROP[0005] : <Item Access Rights> :
<remark>)*)
Example:
dwTemperature:DWORD; (*~(OPC:1:Visible to OPC Clients) (OPC_Filter:Memory Access) (OPC_PROP[0005]:1:
Read Only)*)
Example:
(*This is my OPC Item Description~(OPC :1:Visible to OPC Clients)*)
1. Open the Start menu. In the OPC Server Directory, locate the Utilities folder.
2. Double-click on TcAmsRemoteMgr.exe.
3. By default, TwinCAT constructs the AMS Net ID from the TCP/IP address of the local PC using an extension of
www.kepware.com
Beckhoff TwinCAT Driver Help 8
Note: This procedure must be repeated for all remote TwinCAT PLCs. The host computer must be added in the same
way as the remote computers on each of the remote computers.
6. After all the settings have been entered, confirm by pressing OK.
www.kepware.com
9 Beckhoff TwinCAT Driver Help
1. Click on the TwinCAT system service icon located within the notification area of the toolbar. Select Properties to
open the TwinCAT System Properties dialog box.
3. Read or modify the desired AMS Net Identifier in the AMS Net ID field. By default, the TwinCAT installation
constructs the AMS Net ID from the TCP/IP address of the local PC with an extension of .1.1 as if it were a sub-net
mask for field busses, target bus controllers or etc. The AMS Net ID can be freely chosen, however.
www.kepware.com
Beckhoff TwinCAT Driver Help 10
4. When an ADS device's services are called upon in the network, its AMS Net ID must be known. By inserting the
target PC, TwinCAT can establish the connection between the TCP/IP address of the target PC and the AMS Net ID of
the target message router address.
5. Similarly, in order to create an AMS connection between a multiple computers, the remote computers must also be
known to each another. To do so, click TwinCAT | Properties | AMS Router. The AMS Net ID is composed of the
TCP/IP of the local computer plus the suffix .1.1. The AMS Net ID is based on the TCP/IP address, but the relationship is
not entirely fixed.
Note: This procedure must be repeated for all remote computers. The host computer must be added in the same way
as the remote computers on each of the remote computers.
www.kepware.com
11 Beckhoff TwinCAT Driver Help
Note: For more information about the AMS messaging protocol, refer to Beckhoff's help documentation.
www.kepware.com
Beckhoff TwinCAT Driver Help 12
6. Select the Database Creation tab and utilize as instructed in Database Creation Settings.
Note: At this time, tags and symbols can only be uploaded from a TwinCAT soft PLC. They cannot be uploaded
from a hardware BC/BX controller.
Note: All tags, including global and program, will be imported and expanded according to their respective data types.
Note 1: The program will not generate the .tpy file again until the project has been cleaned. Clicking Project | Rebuild
All, however, will always regenerate the .tpy file.
Note 2: The .tpy file is located in the same directory as the project's .pro file.
4. Enter or browse for the location of the .tpy file previously created.
7. Select the Database Creation tab and utilize as instructed in Database Creation Settings.
Note: Online tag generation for PLC projects that contain Step-Transitions will produce Boolean tags for each step.
The tag describes whether the state is active or inactive. Offline generation will not produce Step-Transition tags.
Performance Optimization
Optimizing Communications
With any programmable controller there are unique ways for optimizing system throughput, and the Beckhoff TwinCAT
Driver is no different from the rest. The Beckhoff TwinCAT driver has been designed to optimize reads and writes. For
tags of all data types, requests are grouped into a single transaction. This provides drastic improvement in performance
over single tag transaction. The only limitation is on the number of tags that can fit in a single transaction.
www.kepware.com
13 Beckhoff TwinCAT Driver Help
While the Beckhoff TwinCAT driver is fast, there are a couple of guidelines that can be used in order to control and
optimize the application and gain maximum performance. Our server refers to communications protocols like Beckhoff
TwinCAT as a channel. Each channel defined in the application represents a separate path of execution in the server.
Once a channel has been defined, a series of devices must then be defined under that channel. Each of these devices
represents a single Beckhoff TwinCAT controller from which data will be collected. While this approach to defining the
application will provide a high level of performance, it won't take full advantage of the Beckhoff TwinCAT driver or the
network. An example of how the application may appear when configured using a single channel is shown below.
If the Beckhoff TwinCAT driver could only define one single channel, then the example shown above would be the only
option available; however, the Beckhoff TwinCAT driver can define up to 100 channels. Using multiple channels
distributes the data collection workload by simultaneously issuing multiple requests to the network. An example of how
the same application may appear when configured using multiple channels to improve performance is shown below.
www.kepware.com
Beckhoff TwinCAT Driver Help 14
Note: For a description of TwinCAT-platform specific data types, refer to TwinCAT Data Types.
Address Descriptions
The following table summarizes the valid addressing formats in the server.
Note: For information on how elements are referenced for 1, 2 and 3 dimensional arrays, refer to Ordering of Array
Data.
Tag Scope
Global tags are Beckhoff TwinCAT variables that have global scope in the controller. Any program or task can access the
global tags, which use the following notation:
. <tag name>
Program Tags
www.kepware.com
15 Beckhoff TwinCAT Driver Help
Program tags are identical to global tags, except that a program tag's scope is local to the program it is defined in.
Program tags follow the same addressing rules and limitations as global tags. The only difference is that program tags
are prefixed with the following notation:
For example, Beckhoff TwinCAT variable tag_1 in program prog_1 would be addressed as prog_1.tag_1 in a Client/
Server Tag address.
Note: These are a few of the many addressing possibilities involving structures. These are shown here only to provide
an introduction to structure addressing. For more information, refer to the Beckhoff TwinCAT documentation.
www.kepware.com
Beckhoff TwinCAT Driver Help 16
INT/UINT
Client/Server Word, Short Word, Short
Data Type
Client/Server INTTAG INTARR[0]
Tag Example
DINT/UDINT
Client/Server DWord, Long DWord, Long
Data Type
Client/Server DINTTAG DINTARR[0]
Tag Example
REAL
Client/Server Float Float
Data Type
Client/Server REALTAG REALARR[0]
Tag Example
LREAL*
Client/Server Double Double
Data Type
Client/Server LREALTAG LREALARR[0]
Tag Example
TIME
Client/Server DWord, Long DWord, Long
Data Type
Client/Server TIMETAG TIMEARR[0]
Tag Example
STRING
Client/Server String String
Data Type
Client/Server STRINGTAG/8 STRINGARR[1]/80
Tag Example 0
www.kepware.com
17 Beckhoff TwinCAT Driver Help
array [0, 2]
array [1, 0]
array [1, 1]
array [1, 2]
array [2, 0]
array [2, 1]
array [2, 2]
Error Descriptions
The following error/warning messages may be generated. Click on the link for a description of the message.
Address Validation
Device Address '<address>' contains a syntax error
Data type '<type>'is not valid for device address '<address>'
Array size is out of range for address '<address>'
Address '<address>' is out of range for the specified device or register
www.kepware.com
Beckhoff TwinCAT Driver Help 18
Unable to perform Beckhoff compatibility on device '<device name>' due to memory allocation error
Unable to gather runtime information for device '<device name>'. Reason '<reason>'
Error Codes
The following sections define error codes that may be encountered in the event log of the server. Refer to the Event
Log section within the Server Options chapter of the server help file for detailed information on how the event logger
works.
www.kepware.com
19 Beckhoff TwinCAT Driver Help
www.kepware.com
Beckhoff TwinCAT Driver Help 20
Address Validation
The following error/warning messages may be generated. Click on the link for a description of the message.
www.kepware.com
21 Beckhoff TwinCAT Driver Help
Address Validation
Device Address '<address>' contains a syntax error
Data type '<type>' is not valid for device address '<address>'
Array size is out of range for address '<address>'
Address '<address>' is out of range for the specified device or register
Possible Cause:
A tag address that has been specified statically contains one or more of the following errors:
Solution:
Re-enter the address in the client application.
Possible Cause:
A tag address that has been specified statically has been assigned an invalid data type.
Solution:
Modify the requested data type in the client application.
Possible Cause:
A tag address that has been specified statically is requesting an array size that is too large.
Solution:
Re-enter the address in the client application to specify a smaller value for the array or a different starting point.
Possible Cause:
A tag address that has been specified dynamically references a location that is beyond the range of supported locations
for this device.
Solution:
Verify that the address is correct; if it is not, re-enter it in the client application.
www.kepware.com
Beckhoff TwinCAT Driver Help 22
Possible Cause:
A software component necessary for communications with the Beckhoff TwinCAT AMS message router cannot be loaded
from '<dll>'.
Solution:
Re-install the server and then try again.
Possible Cause:
A software component necessary for communications with the Beckhoff TwinCAT AMS message router cannot be loaded
from '<dll>'.
Solution:
Re-install the server and then try again.
Possible Cause:
A software component necessary for communications with the Beckhoff TwinCAT AMS message router cannot be loaded
from '<dll>'.
Solution:
Re-install the server and then try again.
www.kepware.com
23 Beckhoff TwinCAT Driver Help
Result:
If tag was being read:
The Read operation will not be performed and the tag will be invalidated.
Possible Cause:
1. The connection between the device and the host PC is broken.
2. The named device may have been assigned an incorrect AMS Net ID address.
3. Device CPU work load is too high.
Solution:
1. Verify the cabling between the PC and the PLC device.
2. Verify that the AMS Net ID address given to the named device matches that of the actual device.
3. If this error occurs frequently, decrease the tag group scan rate to reduce the work load on the PLC CPU.
4. Increase the cycle time interval under Task Configurations in TwinCAT PLC Control.
Unable to synchronize with configuration file '<file name>' on device '<device name>'
due to memory allocation error
Error Type:
Warning
Possible Cause:
Memory required to synchronizing with .tpy runtime file could not be allocated. The original uploaded file will continue
to be used.
Solution:
Close any unused applications and/or increase the amount of virtual memory. Then, restart the server and try again.
Possible Cause:
The memory required for device tags to meet Beckhoff compatibility could not be allocated.
Solution:
Close any unused applications and/or increase the amount of virtual memory. Then, restart the server and try again.
Unable to gather runtime information for device '<device name>'. Reason '<reason>'
Error Type:
Serious
Possible Cause:
The cause depends on the error reason returned.
Solution:
The solution depends on the error reason returned.
www.kepware.com
Beckhoff TwinCAT Driver Help 24
See Also:
Error Codes
Unable to read tag '<address>' on device '<device name>'. Error Code '<#>'
Error Type:
Warning
Possible Cause:
1. The cause depends on the error code(s) returned.
2. TwinCAT does not support a read command for error code 1793 and TwinCAT version 2.10 (Build 909) or older.
Solution:
1. The solution depends on the error code(s) returned.
2. For error code 1793 and TwinCAT version 2.10 (Build 909) or older, users should update TwinCAT to the latest
version. For instructions on how to do so, contact Beckhoff.
See Also:
Error Codes
Unable to read tag '<address>' on device '<device name>'. Tag data size of '<size>'
bytes(s) exceeds actual data size of '<size>' byte(s)
Error Type:
Warning
Possible Cause:
A read request for the specified tag failed because the controller's tag data type is smaller than the requested data
type.
Solution:
Change the tag's data type size to a size that is smaller than or equal to the ones available on the controller.
Unable to read tag '<address>' on device '<device name>'. Address bounds exceeded
Error Type:
Warning
Possible Cause:
www.kepware.com
25 Beckhoff TwinCAT Driver Help
The controller's tag size is smaller than the requested data size.
Solution:
Ensure that the requested data size matches the address size in the controller.
Unable to read tag '<address>' on device '<device name>'. Memory allocation error
Error Type:
Warning
Possible Cause:
The memory required for the read request could not be allocated.
Solution:
Close any unused applications and/or increase the amount of virtual memory. Then, restart the server and try again.
Unable to read tag '<address>' on device '<device name>'. Actual data type is not
compatible with tag of type '<data type>'
Error Type:
Warning
Possible Cause:
1. A read request for tag '<address>' is unable to be cast.
2. A read request for tag '<address>' corresponds to an unsupported data type.
Solution:
1. Change the tag's data type to one that is supported.
2. Contact Technical Support so that support can be added for this type.
Note:
The data type of a item in the server should match the data type for the controller address that it references.
Unable to read tag '<address>' on device '<device name>'. Runtime file is not valid
Error Type:
Warning
Possible Cause:
1. There is no file loaded into the project.
2. The file loaded does not have a valid *.tpy extension.
3. The file has been modified outside of TwinCAT PLC Control.
Solution:
1. Ensure that there is a valid .tpy file loaded into the project.
2. In TwinCAT PLC Control, rebuild the project and load the new .tpy file into the project.
Unable to read tag '<address>' on device '<device name>'. Symbol not found in file
Error Type:
Warning
Possible Cause:
The tag '<address>' cannot be found in the .tpy file.
Solution:
1. Ensure that the correct .tpy file is loaded into the project .
2. Ensure that the correct tag '<address>' is entered.
www.kepware.com
Beckhoff TwinCAT Driver Help 26
Unable to read tag '<address>' on device '<device name>'. Beckhoff TwinCAT DLL(s)
necessary for runtime are not loaded
Error Type:
Serious
Possible Cause:
A software component necessary for communication with the Beckhoff TwinCAT AMS message router cannot be loaded
from '<dll>'.
Solution:
Re-install the server and then try again.
Unable to read tag '<address>' on device '<device name>'. Tag does not meet filtering
requirements
Error Type:
Warning
Possible Cause:
A read request on tag '<address>' does not meet the filtering requirements defined on the controller.
Solution:
Ensure that the controller is filtering the tag. Then, correct the filter string spelling.
Unable to write to tag '<address>' on device '<device name>'. Error Code '<#>'
Error Type:
Warning
Possible Cause:
1. The cause depends on the error code(s) returned.
2. TwinCAT does not support a write command for error code 1793 and TwinCAT version 2.10 (Build 909) or older.
www.kepware.com
27 Beckhoff TwinCAT Driver Help
Solution:
1. The solution depends on the error code(s) returned.
2. For error code 1793 and TwinCAT version 2.10 (Build 909) or older, users should update TwinCAT to the latest
version. For instructions on how to do so, contact Beckhoff.
See Also:
Error Codes
Unable to write to tag '<address>' on device '<device name>'. Tag data size of
'<size>' bytes(s) exceeds actual data size of '<size>' byte(s)
Error Type:
Warning
Possible Cause:
A write request for the specified tag failed because the controller's tag data type is smaller than the requested data
type.
Solution:
Change the tag's data type size to a size that is smaller than or equal to the ones available on the controller.
Possible Cause:
The controller's tag size is smaller than the requested data size.
Solution:
Ensure that the requested data size matches the address size in the controller.
Unable to write to tag '<address>' on device '<device name>'. Memory allocation error
Error Type:
Warning
Possible Cause:
The memory required for the write request could not be allocated.
Solution:
Close any unused applications and/or increase the amount of virtual memory. Then, restart the server and try again.
Unable to write to tag '<address>' on device '<device name>'. Actual data type is not
compatible with tag of type '<data type>'
Error Type:
Warning
Possible Cause:
1. A write request for tag '<address>' is unable to be cast.
2. A write request for tag '<address>' corresponds to an unsupported data type.
Solution:
1. Change the tag's data type to one that is supported.
2. Contact Technical Support so that support can be added for this type.
www.kepware.com
Beckhoff TwinCAT Driver Help 28
Note:
The data type of a item in the server should match the data type for the controller address that it references.
Unable to write to tag '<address>' on device '<device name>'. Runtime file is not valid
Error Type:
Warning
Possible Cause:
1. There is no file loaded into the project.
2. The file loaded does not have a valid *.tpy extension.
3. The file has been modified outside of TwinCAT PLC Control.
Solution:
1. Ensure that there is a valid .tpy file loaded into the project.
2. In TwinCAT PLC Control, rebuild the project and load the new .tpy file into the project.
Unable to write to tag '<address>' on device '<device name>'. Symbol not found in file
Error Type:
Warning
Possible Cause:
The tag '<address>' cannot be found in the .tpy file.
Solution:
1. Ensure that the correct .tpy file is loaded into the project .
2. Ensure that the correct tag '<address>' is entered.
Unable to write to tag '<address>' on device '<device name>'. Beckhoff TwinCAT DLL
(s) necessary for runtime are not loaded
Error Type:
Serious
Possible Cause:
A software component necessary for communication with the Beckhoff TwinCAT AMS message router cannot be loaded
from '<dll>'.
Solution:
Re-install the server and then try again.
Unable to write to tag '<address>' on device '<device name>'. Tag does not meet
filtering requirements
Error Type:
Warning
Possible Cause:
A write request on tag '<address>' does not meet the filtering requirements defined on the controller.
Solution:
Ensure that the controller is filtering the tag. Then, correct the filter string spelling.
www.kepware.com
29 Beckhoff TwinCAT Driver Help
Unable to write to tag '<address>' on device '<device name>'. Tag access is Read Only
Error Type:
Warning
Possible Cause:
The write request on tag '<address>' does not meet OPC properties as defined on the controller.
Solution:
Change the tag properties defined on the controller to Read/Write access.
Unable to generate a tag database for device '<device name>'. Reason: Memory
allocation error
Error Type:
Warning
Possible Cause:
The memory required for database generation could not be allocated. The process was aborted.
Solution:
Close any unused applications and/or increase the amount of virtual memory. Then, try again.
Unable to generate a tag database for device '<device name>'. Reason: Beckhoff
TwinCAT DLL(s) necessary for import are not loaded
Error Type:
Warning
Possible Cause:
A software component necessary for communications with the Beckhoff TwinCAT AMS message router for database
generation cannot be loaded from '<dll>'. The process has been aborted.
Solution:
Re-install the server and then try again.
Unable to generate a tag database for device '<device name>'. Reason: Device
returned error code '<#>'
Error Type:
Warning
Possible Cause:
The cause depends on the error code(s) returned. The process has been aborted.
Solution:
www.kepware.com
Beckhoff TwinCAT Driver Help 30
See Also:
Error Codes
Unable to generate a tag database for device '<device name>'. Reason: Device is not
responding
Error Type:
Warning
Possible Cause:
1. The connection between the device and the host PC is broken.
2. The named device may have been assigned an incorrect AMS Net ID address.
3. Device CPU work load is too high and has caused the process to be aborted.
Solution:
1. Verify the cabling between the PC and the PLC device.
2. Verify that the AMS Net ID address given to the named device matches that of the actual device.
3. If this error occurs frequently, decrease the tag group scan rate to reduce the work load on the PLC CPU.
4. Increase the cycle time interval under Task Configurations in TwinCAT PLC Control.
Technical Notes
For more information on specific aspects of the Beckhoff TwinCAT PLC, refer to the Technical Notes listed below.
3. Double-click on Workspace.
5. The window on the right should now contain a Symbol Download box. Select Dynamic Symbols.
www.kepware.com
31 Beckhoff TwinCAT Driver Help
Note: The router memory size is set to 2048KB by default. The size can be increased to a maximum of 32768KB.
3. Double-click on Task Configuration, and then expand Task Configuration at the top of the middle window.
4. Select Standard.
5. In the Task Attributes tab, change the Interval value within the Properties box.
www.kepware.com
Index 32
Index -R-
Read Error Messages 24
-A-
Address '<address>' is out of range for the
-S-
specified device or register 21
Setting Up an ADS Remote Connection 7
Address Formats 14
Address Validation 20
Addressing Atomic Data Types 15
Automatic Tag Database Generation 11
-T-
Automatic Tag Database Generation Error Tag Scope 14
Messages 29 Technical Notes 30
TwinCAT Memory Warning 30
www.kepware.com
33 Beckhoff TwinCAT Driver Help
-W-
Write Error Messages 26
www.kepware.com