AMiT ATOUCH32 DB-Net communication protocol

Supported device types and versions
Communication line configuration
Communication station configuration
DB-Net initialization
I/O tag configuration
Errors and problems
Literature
Changes and modifications
Document revisions

Supported device types and versions


The protocol supports data acquisition using device from the AMiT company (ADiS modular control system and ART267, ART4000, AMiRiS and AMAP compatible control systems and others) via a DB-Net communication network. Communication requires installation of ATOUCH32 driver to communicate in a DB-Net ATOUCH32 network (you can download it at http://www.amit.cz). Communication was tested and tuned for the ATOUCH32 driver of V2.10, V2.30, V2.40, V2.60, V2.90 and V3.30 versions.

Limitations: The protocol does not support database variables of "own station", i.e. on the computer with ATOUCH32 driver running but allows to read/write variables on process stations. The DB-Net driver can be used by just one application (in our case the process D2000 KOM) at the same time.

When using the older versions of ATOUCH32 V2.x, there must be configured just one communication line for DB-Net communication. ATOUCH32 V3.x versions enable so-called multithreading. It means, you may connect more lines, which will communicate in parallel, to ATOUCH32 and speed up the communication. The driver must be initialized only by one line (see "Init File" parameter, note 2). There is still the rule that all lines must be configured within one KOM process in one computer. This may be used in D2000 V9.00.021 rel.021 and higher.

Communication line configuration


  • communication line category: API.

Communication line parameters

Communication line - configuration dialog box - the Protocol parameter tab.
Parameters defined in the field have effect on some optional protocol parameters. There can be defined the following line protocol parameters:

Table 1

Full name Description Units / size Default value
HW Init File Full path to the file containing the DB-Net configuration.

Note 1:
If the line protocol parameter INIFILE is not specified (empty string), then the station protocol parameters described below must be configured correctly for all stations. The parameters of DB-Net IP can be configured only by "Init File".

Note 2: If you do not want so that the line initialized ATOUCH32 in the multithread mode, use "---", i.e. 3x "minus" character. One line within KOM process must contain the path to the existing init file. It, then, executes the initialization for all other lines.
-

Communication station configuration


  • communication protocol: AMiT ATOUCH32 DB-Net.
  • Station address is the device address in the DB-Net network (value of the item “Station” in the initialization string/file). Neither the configuration nor the network can contain two stations with the same address including the address of "own station".

Communication station parameters

Communication station - configuration dialog box - tab Protocol parameter.
Parameters defined in the field have effect on some optional protocol parameters. There can be defined the following station protocol parameters:

Table 2

Full name Meaning Unit/ size Default value
My Station Address of "own station" (PC with ATOUCH32 driver running) - 31
COM Port COM port used for the communication - 1
COM Speed Communication baud rate. - 19200
Max. Transactions Error Maximum number of consecutive read commands that failed to label the communication with station as failed. The status of station is set on StCOMERR. If the number of failed readings of I/O tags exceeds the double of this value the reading of next I/O tags will be stopped. The purpose is to make fast the communication (the station is considered to be completely inaccessible). - 10
Full Debug High level of line debug messages - trace messages contain details about received values of I/O tags. - False
Enable Matrix Read Reading of matrix variables will be optimised for slow networks (e.g. GPRS). Reading of variables with matrix types (INT MATRIX, LONG MATRIX, FLOAT MATRIX a DBNETTIME MATRIX) will be optimised. If multiple I/O tags share the same WID and type, only a single read request is generated and it incorporates a range of rows and columns of all these I/O tags. - False

DB-Net initialization


When starting, the DB-Net driver requires to get the configuration file or string containing the DB-Net network configuration in particular application. If you use the communication via standard COM port, it is possible to avoid creating the configuration file on disk using the My Station, COM Port and COM Speed station protocol parameters which must be configured for one of the stations.

If the Init File line protocol parameter is specified for a line (at least one), then the My Station, COM Port and COM Speed the protocol parameters will be ignored on all the stations. There will be used the configuration file on the disk which path is defined by the Init File line protocol parameter.
For further information on the file contents see the ATOUCH32 online help.

Example: configuration file contents:

[General]
MyStation=0
UDP.MyPort=222
UDP.MyPassword=111222333

[COM]
Com=2
Speed=38400
Station=1
Station=2
Station=4
Station=13

[COM]
Com=3
Speed=9600
OfsNet=32
Station=33
Station=34
Station=36
Station=45 

[UDP]
Address=192.168.168.1
Password=444555666
Offset=10
Station=10
Station=20
Station=30

[UDP]
Address="segment100.firmaXY.cz"
Password=777888999
Port=333
Offset=100
Timeout=5000
Station=105
Station=106
Station=107

I/O tag configuration


Possible I/O tag types: Ai, Ao, Ci, Co, Di, Do, TxtI, TxtO, TiA, ToA, TiR, ToR.

I/O tag address consists of:

  • WID - numerical name of the variable - it is uniquely within the DB-Net network. Permitted range is 0..65500, the value is allocated by the PSP3 tool or DetStudio.
  • Type - value type of the variable - it can be the INT, LONG, FLOAT types and the INT MATRIX, LONG MATRIX or FLOAT MATRIX types. The INT and INT MATRIX types are 16 bit wide; and if they are configured as Ai, Ao, they are interpreted as signed numbers; and if they are configured as Ci, Co, they are interpreted as unsigned numbers.
    LONG and LONG MATRIX types (32 bit wide) configured as Ai, Ao are interpreted as signed numbers and if they are configured as Ci, Co, they are interpreted as unsigned numbers. The FLOAT and FLOAT MATRIX types are 32 bit float numbers within the range from ±10-36 to ±1038. DBNETTIME is LONG type interpreted as absolute time in DBNet format (number of seconds from 1-1-1980 0:0:0). INT MATRIX can be set for value types of TxtI and TxtO. The row from matrix INT is interpreted as text, each INT element of matrix represents one symbol. INT and LONG types can be represented as relative time - i.e. number of seconds.
  • Row, Column - value position in matrix types, the first row or column has zero value.
  • Row count, Column count - size of matrix. In case of value types TxtI and TxtO there can be set only column count, which is the text length. For another value types the implicit value of row count and column count is 1. If row count and column count exceeds 1, it saves the values of whole matrix or part of matrix into target column of structure.
  • Bit - bit number for the Di and Dout value types. It can be within the range of 0 - 15 for the INT and INT MATRIX types or within the range of 0 - 31 for the LONG and LONG MATRIX types.

Errors and problems


When starting or during the communication, there could be occurred the following error reports. To make the problem identification easier, set the communication tracking at least to the level Monitor (the best is to temporary set Monitor & Disk). When you set the option Monitor & Disk, there will create the file "line_name.LOG" in the application subdirectory TRACE, that will contain all debug and error logs. If the problems still persist, please contact the IPESOFT's technical support.

Error: DB-Net Station Address Error - 'StationName', Address : 'StationAddress'
Solution: Invalid station address - check the Address tab in the communication station configuration dialog box (in the process D2000 CNF) and eventually save the station configuration and restart the process D2000 KOM.
Error: DB-Net Point Address Error - 'PointName', Address : 'PointAddress'
Solution: Invalid I/O tag address - check the Address tab in the I/O tag configuration dialog box (in the process D2000 CNF) and eventually save the I/O tag configuration.
Error: DB-Net ATOUCH32 ERROR - 0xXY - AtchInitFromStringA
Solution: Error when calling the ATOUCH32 function AtchInitFromStringA - check the station configuration and protocol parameters. During start, the process D2000 KOM shows the configuration string pattern (the communication tracing level at least Monitor must be enabled) and check if meet required state.
Error: DB-Net ERROR - CreateSemaphore - ErrNr - Error description
Solution: System error of Windows API call. Restart the operating system.
Error: DB-Net ATOUCH32 ERROR - 0xXY - AtchReqGetVariable
DB-Net ATOUCH32 ERROR - 0xXY - AtchReqPutVariable
Solution: Error when calling the ATOUCH32 functions AtchReqGetVariable or AtchReqGetVariable for reading /writing a DB-Net database variable value. Previous communication tracing logs allow to detect which I/O tag is in troubles and then check its configuration.
Error: DB-Net ERROR - Reading 'PointName' - TNRES=0 !
DB-Net ERROR - Reading 'PointName' - TNRES=1 (reading on progress) !
DB-Net ERROR - Reading 'PointName' - TNRES=Invalid !
DB-Net ERROR - Writing 'PointName' - TNRES=0 !
DB-Net ERROR - Writing 'PointName' - TNRES=1 (reading on progress) !
DB-Net ERROR - Writing 'PointName' - TNRES=Invalid !
Solution: Transaction errors of reading/writing the DB-Net database variable. They couldn't occur.
Error: DB-Net ERROR - Reading 'PointName' - TNRES=4 (station not responded) !
DB-Net ERROR - Writing 'PointName' - TNRES=4 (station not responded) !
Solution: Transaction errors of reading/writing the DB-Net database variable. Station doesn't response because it is switched off, a problem with the communication wire or an configuration error (e.g. wrong baud rate, address or port). The error could occur sporadically, especially at reading.
Error: DB-Net ERROR - Reading 'PointName' - TNRES=4 (station responded) !
DB-Net ERROR - Writing 'PointName' - TNRES=4 (station responded) !
Solution: Transaction errors of reading/writing the DB-Net database variable. The station responded with an error. Probably it is an attempt to read or write the variable, which has no mirror in given device. Check the configuration of corresponding I/O tag and compare it with the log from the AMiT PSP3 software tool.
Error: DB-Net ATOUCH32 ERROR - 0xXY - AtchInitFromFileA
Solution: Error when calling the ATOUCH32 function AtchInitFromFileA. Check if the protocol parameter INIFILE is configured just for one station and is pointed to existing file on disk.

Literature


  • AMiT Atouch32 v3.30 online manual. Revision: 12.07.2011, Document version: 1.34.

Changes and modifications


  • January 23rd, 2004 – added protocol parameter INIFILE and the possibility to configure UDP and MODEM communication.
  • September 6th, 2006 - TxtI, TxtO, TiA and ToA types added. New entry for station and line protocol parameters.
  • January 8th, 2008 - changes in configuration of matrixes, DBNETTIME, target column.
  • May 22nd, 2009 - relation times added.
  • October 25, 2012 - multithread for ATOUCH32.

Document revisions


  • Ver. 1.0 - March 26th 2002 - creating of document
  • Ver. 1.1 – January 23rd 2004 – document corrections after changes in initialization
  • Ver. 1.2 - September 6th 2006 - updating
  • Ver. 1.3 - January 8th, 2008 - updating
  • Ver. 1.4 - May 22nd, 2009 - updating
  • Ver. 1.5 - October 1st, 2009 - parameter "Max. Transactions Error"
  • Ver. 1.6 - October 25, 2012 - updating
Napíšte komentár