Beruflich Dokumente
Kultur Dokumente
Author Jens Nasholm Sean Ju Daniel Saputra Dave Sidery Peter Geagea Trevor Hudson Peter Geagea Trevor Hudson Peter Geagea
Date 25/08/98 26/2/99 January 1999 03/03/99 30-03-99 10/5/99 12-10-99 1/11/1999 20-08-01
Comment Editing earlier written specification Add/Modify Modified Final Testing section Modified Final Testing section Minor modifications Testing after fixing Added support for REAL and STRING data types Testing after fixing Addition to section 2.5.2
Contents
1.
4
4 4 4 5 5
5 5 6
6 6
2.
USER INTERFACE
2.1 Introduction 2.2 Driver Name 2.3 Boards Form
2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 Board Type Address IO Port Interrupt Special Opt
7
7 7 7
7 7 7 7 7
7
7 7 7 7 8
8
8 8
8 9
9 10
2.8 PROTDIR.DBF
10
TWINCAT.DOC
20-08-01
10
10 11
Remapping Driver Specific Errors Driver Error Help Debug Messages Stats Special Counters Hints and Tips
11 11 11 11 11 12
3.
REFERENCES
3.1 References
13
13
TWINCAT.DOC
20-08-01
1.1 Introduction
This section defines the types of I/O Devices that are targeted by this driver.
TWINCAT.DOC
20-08-01
User Application
ADS DLL
ADS DLL
ADS DLL
ADS DLL
ADS DLL
TwinCat PLC Server
ADS DLL
TwinCat CNC Server
ADS DLL
User App. Server
ADS DLL
The Automation Device Specification (ADS) defines a device and field bus-independent interface. This reduces effort, both when integrating devices in an automation system because a standard interface is available and also when developing new devices because the interface has already been defined and realised. Diverse ADS services are defined, split into Requests, Indications, Confirmations and Responses. The Citect driver uses the ADSDLL.DLL supplied by Beckhoff. The Citect driver opens a connection to the local AMS Message Router using the ADSDLL.DLL. The ADSDLL.DLL then forwards all requests from Citect to the AMS Message Router that transports the message to the correct TwinCAT PLC Server. The AMS Message Router includes an interface for TCP/IP which means that messages can be forwarded over any LAN or WAN network.
TWINCAT.DOC
20-08-01
1.5.3 Software Setup A standard installation of TwinCAT including the ADSDLL.DLL functionality is necessary. When TwinCAT is installed it will by default use the TCP/IP address configured on the PC and add 1.1 to end of it as the AMS Net Id, with this configuration Citect have to be configured as mentioned in 5.4.5. The AMS Net Id is a 6 byte address, similar to a TCP/IP address, which each TwinCAT system will have. The AMS Net Id is unique for each networked PC. The AMS Net Id will be used by Citect to connect to the selected TwinCAT system, see 5.4.5. Citect and TwinCAT have to be on the same computer to make communication with local/remote TwinCAT systems possible. A user supplied PLC program must be configured in the TwinCAT system and if this program is not valid, the PLC program will not be compiled and Citect will not be able to communicate with TwinCAT. Once the TwinCAT Soft PLC is installed, the procedure for starting the TwinCAT system is as follows: 1. Double click the Devices icon located in the Windows NT Control Panel. 2. Four TwinCAT devices should be listed here. The Startup Type should be set to Automatic for each one. Start any devices that are not yet started. Close the window, and close Control Panel. 3. Click the small TwinCAT icon located in the Windows Task Bar Systray. 4. Select System and then Start 5. Click the TwinCAT systray icon again, and select PLC Control 6. Open the user defined TwinCAT PLC Control program. 7. From the Online menu, select Login . Click OK to Rebuild All if prompted. 8. From the Online menu, select Run
TWINCAT.DOC
20-08-01
2. User Interface
2.1 Introduction
This section defines how the user will see the driver. This relates directly to how the Citect forms need to be filled out and any special INI options. For the kernel, the debug trace messages and the Stats.Special counters are documented.
2.3.2 Address Citect requires the address of 0 for successful compilation 2.3.3 IO Port Not used. 2.3.4 Interrupt Not used. 2.3.5 Special Opt Not used.
TWINCAT.DOC
20-08-01
2.4.5 Special Opt Here is where the AMS Net Id should be entered. The ID number has the following format, x.x.x.x.y.z. This number refers to the AMS Net Id specified in the TwinCAT System Properties. If the TwinCAT is on the local computer the Local Computer AMS Net Id should be used, for TwinCAT systems in a network the AMS Net Id specified in the Remote Computers should be used. For easy configuration in TwinCAT the first four digits x.x.x.x in the AMS Net Id can be the TCP/IP address of the local/remote computer, i.e. 207.10.131.202 The two last digits y.z is information used in the AMS Net Id by the TwinCAT system. These two digits have to be the same as configured in the AMS Net Id of the local/remote computer. If the AMS Net Id for the local/remote computer is set to 207.10.131.202.1.1 the Special Option field has to be set according to the example below. x y z a decimal value between 0 255 a decimal value between 0 255 a decimal value between 0 255
Example, -AMS207.10.131.202.1.1
FILTER
TWINCAT
TWINCAT.DOC
20-08-01
IO Device Type Inputs Inputs Inputs Inputs Inputs Inputs Outputs Outputs Outputs Outputs Outputs Outputs Memory Memory Memory Memory Memory Memory Where: I Q M [.b]
Citect data format IXx.b IBx[.b] IWx[.b] IDx[.b] IRx ISx QXx.b QBx[.b] QWx[.b] QDx[.b] QRx QSx MXx.b MBx[.b] MWx[.b] MDx[.b] MRx MSx
Citect data types DIGITAL BYTE INT,UINT LONG REAL STRING DIGITAL BYTE INT,UINT LONG REAL STRING DIGITAL BYTE INT,UINT LONG REAL STRING
Description/Special Usage/Limitations/ Valid Ranges x = byte no.(0-64511) , b = bit no (0-7) x = byte no.(0-64511) , b = bit no (0-7) x = word no.(0-64510 even no. only) , b = bit no (0-15) x = double word no.(0-64508, every 4th address only), b = bit no (0-31) x = real no. (0-64508, every 4th address only) x = starting byte no. (0-64511) maximum string length = 255 characters x = byte no.(0-64511) , b = bit no (0-7) x = byte no.(0- 64511) , b = bit no (0-7) x = word no.(0- 64510 even no. only) , b = bit no (0-15) x = double word no.(0- 64508, every 4th address only), b = bit no (0-31) x = real no. (0-64508, every 4th address only) x = starting byte no. (0-64511) maximum string length = 255 characters x = byte no.(0- 64511) , b = bit no (0-7) x = byte no.(0- 64511) , b = bit no (0-7) x = word no.(0- 64510 even no. only) , b = bit no (0-15) x = double word no.(0- 64508, every 4th address only) , b = bit no (0-31) x = real no. (0-64508, every 4 address only) x = starting byte no. (0-64511) maximum string length = 255 characters
th
Refers to inputs on the TwinCAT system Refers to outputs on the TwinCAT system Refers to Memory variables in memory on the TwinCAT system Refers to optional bit requests
Note. Only even address numbers are accessible when using INT or UINT data types, and only every fourth address is available if LONG or REAL data types are used. Also optional bit requests can only be refered to from Citect.
TWINCAT.DOC
20-08-01
IX%U(0,0,64511).%u(0,0,7) IB%U(0,0,64511).%u(0,0,7) IW%U(0,0,64510).%u(0,0,15) ID%U(0,0,64508).%u(0,0,31) IB%U(0,0,64511) IS%U(0,0,64511) IW%U(0,0,64510)%/2 ID%U(0,0,64508)%/4 IR%U(0,0,64508)%/4 QX%U(0,0,64511).%u(0,0,7) QB%U(0,0,64511).%u(0,0,7) QW%U(0,0,64510).%u(0,0,15) QD%U(0,0,64508).%u(0,0,31) QB%U(0,0,64511) QS%U(0,0,64511) QW%U(0,0,64510)%/2 QD%U(0,0,64508)%/4 QR%U(0,0,64508)%/4 MX%U(0,0,64511).%u(0,0,7) MB%U(0,0,64511).%u(0,0,7) MW%U(0,0,64510).%u(0,0,15) MD%U(0,0,64508).%u(0,0,31) MB%U(0,0,64511) MS%U(0,0,64511) MW%U(0,0,64510)%/2 MD%U(0,0,64508)%/4 MR%U(0,0,64508)%/4
0 0 0 0 1 1 2 3 3 4 4 4 4 5 5 6 7 7 8 8 8 8 9 9 10 11 11
0 0 0 0 8 7 1 4 2 0 0 0 0 8 7 1 4 2 0 0 0 0 8 7 1 4 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input Bit Input Bit Input Bit Input Bit Input Byte Input String Input Word Input Double Word Input Real Output Bit Output Bit Output Bit Output Bit Output Byte Output String Output Word Output Double Word Output Real Memory Bit Memory Bit Memory Bit Memory Bit Memory Byte Memory String Memory Word Memory Double Word Memory Real
2.8 PROTDIR.DBF
TAG TWINCAT FILE TWINCAT BIT_BLOCK 2048 MAX_LENGTH 2048 OPTIONS 0xcf
TWINCAT.DOC
20-08-01
10
2 10 (millisecond) 0 0 30 (seconds)
2.10 Remapping
Not supported.
TWINCAT.DOC
20-08-01
11
8 9 10
Total number of times a Int write instruction is issued Total number of times a Real read instruction is issued Total number of times a Real write instruction is issued
TWINCAT.DOC
20-08-01
12
3. References
3.1 References
TwinCAT ADS-PLC.DOC Index and groups.DOC Description of the API to the ADSDLL.DLL (German) Description of how to use indexes and groups in the ADSDLL.DLL
TWINCAT.DOC
20-08-01
13