AS511
AS511
05
Doc. Revision G– March 10, 2008
Contents
INTRODUCTION ........................................................................................................................................................2
TROUBLESHOOTING ............................................................................................................................................ 14
REVISION HISTORY............................................................................................................................................... 17
Page 1/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
Introduction
The AS511 driver enables Serial communication between the Studio system and Siemens devices using the
AS511 protocol, according to the specifications discussed in this document.
This document will help you to select, configure and execute the AS511 driver, and it is organized as follows:
General Information: Identifies all of the hardware and software components required to implement
communication between the Studio system and the target device.
Selecting the Driver: Explains how to select the AS511 driver in the Studio system.
Configuring the Driver: Explains how to configure the AS511 driver in the Studio system, including how to
associate database tags with device registers.
Executing the Driver: Explains how to execute the AS511 driver during application runtime.
Troubleshooting: Lists the most common errors for this driver, their probable causes, and basic procedures
to resolve them.
Revision History: Provides a log of all changes made to the driver and this documentation.
Notes:
This document assumes that you have read the “Development Environment” chapter in Studio’s Technical
Reference Manual.
This document also assumes that you are familiar with the Microsoft Windows NT/2000/XP environment. If
you are not familiar with Windows, then we suggest using the Help feature (available from the Windows
desktop Start menu) as you work through this guide.
Page 2/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
General Information
This chapter identifies all of the hardware and software components required to implement serial communication
between the AS511 driver in Studio and a Siemens devices
Device Specifications
To establish communication, your target device must meet the following specifications:
Manufacturer: Siemens
Compatible Equipment: Siemens S5 Series CPU 943/944/945
Programmer Software: Step 5
For a description of the device(s) used to test driver conformance, see “Conformance Testing”.
Network Specifications
To establish communication, your device network must meet the following specifications:
Device Communication Port: PG port
Physical Protocol: RS232
Logic Protocol: Siemens AS511
Device Runtime Software: None
Specific PC Board: None
Adapters/Converters: None
Cable Wiring: Cable must be compatible with Siemens S5 Series (e.g., PC / RS232 Siemens Converter
6ES5 734-1BD20).
Driver Characteristics
The AS511 driver package consists of the following files, which are automatically installed in the \DRV
subdirectory of Studio:
AS511.INI: Internal driver file. You must not modify this file.
AS511.MSG: Internal driver file containing error messages for each error code. You must not modify this
file.
AS511.PDF: This document, which provides detailed information about the AS511 driver.
AS511.DLL: Compiled driver.
Note:
You must use Adobe Acrobat® Reader™ to view the AS511.PDF document. You can install Acrobat Reader
from the Studio installation CD, or you can download it from Adobe’s Web site.
Page 3/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
You can use the AS511 driver on the following operating systems:
Windows NT/2000/XP
Windows CE
For a description of the operating systems used to test driver conformance, see “Conformance Testing” below.
The AS511 driver supports the following registers:
Conformance Testing
The following hardware/software was used for conformance testing:
Equipment: PLC S5 115U CPU944R
Driver Configuration:
– Baud Rate: 9600
– Protocol: AS511
– Data Bits: 8
– Stop Bits: 1
– Parity: Even
– COM Port: COM1
Cable: PC / RS232 Siemens Converter 6ES5 734-1BD20
Page 4/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
1. From the main menu bar, select Insert Driver to open the Communication Drivers dialog.
2. Select the AS511 driver from the Available Drivers list, and then click the Select button.
3. When the AS511 driver is displayed in the Selected Drivers list, click the OK button to close the dialog. The
driver is added to the Drivers folder, in the Comm tab of the Workspace.
Note:
It is not necessary to install any other software on your computer to enable communication between Studio
and your target device. However, this communication can only be used by the Studio application; it cannot
be used to download control logic to the device. To download control logic to a Siemens S5 Series device,
you must also install the Siemens programming software (e.g., Step 5). For more information, please
consult the documentation provided by the device manufacturer.
Attention:
For safety reasons, you must take special precautions when installing any physical hardware. Please
consult the manufacturer’s documentation for specific instructions.
Page 5/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
For the purposes of this document, only AS511 driver-specific settings and procedures will be discussed here. To
configure the communication settings for the AS511 driver:
1. In the Workspace pane, select the Comm tab and then expand the Drivers folder. The AS511 driver is
listed here as a subfolder.
2. Right-click on the AS511 subfolder and then select the Settings option from the pop-up menu. The AS511:
Communication Parameters dialog is displayed:
Select Settings from the Pop-Up Menu AS511: Communication Parameters Dialog
Page 6/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
5. If you are using a Data Communication Equipment (DCE) converter (e.g., 232/485) between your PC and
your target device, then you must also adjust the Control RTS (Request to Send) setting to account for the
converter. In the Communication Settings dialog, click the Advanced button to open the Advanced Settings dialog:
When the dialog is displayed, configure the Control RTS setting using the following information:
Page 7/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
Attention:
If you incorrectly configure the Control RTS setting, then runtime communication will fail and the driver
will generate a –15 error. See “Troubleshooting” for more information.
You do not need to change any other advanced settings at this time. You can consult the Studio
Technical Reference Manual later for more information about configuring these settings.
6. Click OK to close the Advanced Settings dialog, and then click OK to close the Communication Settings dialog.
The configuration of these worksheets is described in detail in the “Communication” chapter of the Studio
Technical Reference Manual, and the same general procedures are used for all drivers. Please review those
procedures before continuing.
Note:
We recommend configuring operands on the device in sequential blocks in order to maximize performance.
2. Right-click on the AS511 subfolder, and then select Insert from the pop-up menu:
Page 8/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
A new AS511 driver worksheet is inserted into the AS511 subfolder, and the worksheet is opened for
configuration:
Header
Body
Note:
Worksheets are numbered in order of creation, so the first worksheet is AS511001.drv.
Most of the fields on this worksheet are standard for all drivers; see the “Communication” chapter of the
Technical Reference Manual for more information on configuring these fields. However, the Station,
Header, and Address fields use syntax that is specific to the AS511 driver.
Station field: Not used for Serial communication; you can configure the necessary settings in the
Communication Parameters dialog described above.
Header field: Specify the address of the first register of a block of registers on the target device. The
addresses declared in the Body of the worksheet are simply offsets of this Header address. When
Read/Write operations are executed for the entire worksheet (see Read Trigger and Write Trigger
above), it scans the entire block of registers from the first address to the last.
Page 9/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
Where:
– <Register Type> : Siemens register type. Valid values are E or I (Input), A or Q (Output), M
or F (Flag), DB (Data Block), T (Timer) and C or Z (Counter).
– [Data Format] (optional): Format of the data being read or written. Valid values are B (Byte)
and W (Word). This parameter is optional and if it is omitted, then the value configured in
Addressing (Byte or Word) is used by default. (See “Configuring the Communication Settings”
above.)
Note:
The [Data Format] parameter does not apply to DB (Data Block), T (Timer), C or Z
(Counter) registers; These registers are always formatted as Words.
– <Address Reference> : The initial address (reference) of the block of registers configured on
this worksheet. This value always refers to the Byte address number; see following table.
Page 10/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
For descriptions of valid values for the Header field, see the following table:
4. For each table row (i.e., each tag/register association), configure the Address field using the following
syntax…
<Address Offset>.[Bit]
Example — 10, 0.7
Where:
– <Address Offset> : Value added to the <Address Reference> parameter (configured in the
Header field above) to produce complete register address.
– [Bit] (optional): The bit number of the address. Valid values are 0 to 15 for Word-formatted
addresses and Data Blocks, and 0 to 7 for Byte-formatted Inputs, Outputs and Flags.
Page 11/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
For examples of how device registers are specified using Header and Address, see the following table:
For more information about device registers and addressing, please consult the manufacturer’s documentation.
Attention:
You must not configure a range of addresses greater than the maximum block size (data buffer length)
supported by each device within the same worksheet. The maximum data buffer length for this driver is 255
bytes per driver worksheet.
Page 12/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
1. From the main menu bar, select Project → Status. The Project Status dialog displays:
If the Driver Runtime task is set to Manual, then select the task and click the Startup button to toggle the
task’s Startup mode to Automatic.
Page 13/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
Troubleshooting
If the AS511 driver fails to communicate with the target device, then the database tag(s) that you configured for
the Read Status or Write Status fields of the Main Driver Sheet will receive an error code. Use this error code and the
following table to identify what kind of failure occurred.
Page 14/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
1. Communication Parameters
3. LogWin
Attention: when using this driver do not enable the LOG/SERIAL COMMUNICATION on
LogWin, because it can generate communications errors with this drivers.
1. Offset Address
Now it is possible to define an offset address in the Header of the Driver's Configuration.
This new feature is very usefull in cases when it is necessary to do a shift in the address range in
the PLC or if the user needs to realize an on-line driver configuration.
This modification was thought, in principle, for applications that need an on-line change of the
offset-address.
In the former configuration, the user had to define in the HEADER field simply the data-range
and the number of the data-block (DB), if the case.
Ex: Let's define the configuration-table for DB number 5.
Header : DB5
Tag Name : var[0]
Page 15/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
Tip:
You can monitor communication status by establishing an event log in Studio’s Output window (LogWin
module). To establish a log for Field Read Commands, Field Write Commands and Serial Communication, right-click
in the Output window and select the desired options from the pop-up menu.
You can also use the LogWin module (Tools LogWin) to establish an event log on a remote unit that runs
Windows CE. The log is saved on the unit in the celog.txt file, which can be downloaded later.
If you are unable to establish communication between Studio and the target device, then try instead to establish
communication using the device’s own programming software (e.g., Step 5). Quite often, communication is
interrupted by a hardware or cable problem or by a device configuration error. If you can successfully
communicate using the programming software, then recheck the driver’s communication settings in Studio.
If you must contact us for technical support, please have the following information available:
Operating System (type and version): To find this information, select Tools → System Information.
Project Information: To find this information, select Project → Status.
Driver Version and Communication Log: Displays in the Studio Output window when the driver is running.
Device Model and Boards: Consult the hardware manufacturer’s documentation for this information.
Page 16/17
AS511 – Driver Version 11.05
Doc. Revision G– March 10, 2008
Revision History
Revision Version Author Date Description of Changes
First driver version
A 11.01 Roberto V. Junior 30-Jul-1999
Driver available for Windows CE
B 11.02 Roberto V. Junior 19-Apr-2000 Implemented consistence tests when communicating with DBs.
C 11.03 José L. Teodoro 20-Jul-2001 Fixed problems with Windows CE.
D 11.04 José L. Teodoro 14-Nov-2001 Inserted the word order option.
E 11.05 Rafael R. Fernandes 22-Sep-2006 UDrvOpen Modified for SCPortOpen not to be called twice.
F 11.05 Michael D. Hayden 08-Dec-2006 Edited for language and usability.
G 11.05 Eric Vigiani 10-Mar-2008 Added information’s about Timer and Counter.
Page 17/17