Rs7

Top  Previous  Next

The communication channels to S7  or AtS7 PLCs can be defined here.

A communication channel is referenced by its name. (normally the name of the relevant PLC)

The name of the communication channel is relevant for the variable names.

 

 

epam-ide-dlg-communication-settings-rs7

 

See also:

Driver settings: DrvParam worksheet
Host parameters: Rs7Hosts worksheet
Variable names

 

Variable addressing

As EPAM always works with symbolic variables, the addresses of the symbols must be entered in the UserVar worksheet in the Address column.

 

Supported address notation

 

Data block

Data type

Abbreviated form

S7 notation

BYTE

DB<x>.<y>

DB<x>.DBB<y>

WORD


DB<x>.DBW<y>

DWORD


DB<x>.DBD<y>

BOOL


DB<x>.DBX<y>.<z>

 

 

Markers

Data type

Abbreviated form

S7 notation

BYTE


MB<x>

WORD


MW<x>

DWORD


MD<x>

BOOL


M<x>.<y>

 

 

Restrictions and special features

 

Byte order problem

S7-compatible PLCs use the Big-Endian format, whilst EPAM (x86) on the other hand uses the Little-Endian format.

The communication driver makes the necessary conversion according to the following schema.

 

Conversion to EPAM type

If a variable consists of a byte address, the VarType is used for the conversion.

 

Example.

Address

VarType

Conversion

DB10.DBB8

WORD

Read 2 bytes, swap bytes




 

 

Conversion according to address type

If a variable does not consist of a byte address, but of a WORD address, for example, the type of the

address is used for the conversion.

 

Example.

Address

VarType

Conversion

DB10.DBW8

WORD

Read 2 bytes, swap bytes




 

STRING

In the S7, the first two bytes of a string variable contain the maximum and effective length of the string. The maximum length must match the data type. The default length for STRING is 80.

 

 

Data types

The following data types correspond:

EPAM

S7

Comment

BOOL

BOOL (Bit) / BYTE

An EPAM BOOL can be defined in the PLC as BOOL as well as BYTE.

BYTE/USINT

BYTE


SINT

BYTE


WORD/UINT

WORD


INT

INT


DINT

DWORD


DWORD

DWORD


REAL

REAL


STRING

STRING


DT

DT

The DT type of EPAM does not recognize [ms] so that the conversion loses accuracy

TIME

TIME