Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This driver provides the software interface and communication protocol between Xpanel and Siemens Simatic S7 PLCs. It supports the following families of Siemens Simatic S7 system:

  • S7-300 CPU via the communication card CP343-1 IT

  • S7-400 CPU via the communication card CP443-1 IT

 Communication Setup: Xpanel

Create a new device

 

To create a new device, select [Tools] → [I/O Devices] or click on the (blue star) icon in the main toolbar. The ‘I/O Device Configuration’ dialog box will pop up. Click the [New Device] button to open the ‘I/O Device Selection’ dialog box.

Image Added

I/O Device Name: Give a device name. This name will be used in the tag configuration window of the database accompanied by the ‘Station Name’.

Select a device type

 

After selecting the [Ok] button on the previous step, the ‘Ethernet Communication Configuration’ dialog box will pop up.

Image Added

In this window, select ‘SIEMENS S7 Ethernet’ as the ‘Device Type’ and ‘TCP’ as the protocol. This driver only supports the TCP/IP protocol stack. See the Communication Configuration section for more information.

Create a station

Move to the [Station] tab of the ‘Ethernet Communication Configuration’ dialog box. In this dialog box, all the connected PLC stations can be configured and registered to the Xpanel.

Image Added

Each field can be configured as follows:

Station Name: STN_1

Give a name to the PLC. This name will be used in the database window accompanied by the ‘Device Name’.

Station Type: S7 (no other type can be selected).

Network ID: This network ID is a combination of the CPU’s rack and slot number.

Image Added

This ID must be given by a decimal number with the following format: 000..714

IP Address: Give the IP address of the PLC with a dotted-decimal format.

Socket Port Number: 102

Do not change the default number (102). This number is a TCP/IP port that is opened by the PLC for communication service.

16Bit Data Swap: This option swaps bytes of all word- or double word-sized data.

The following diagram shows an example of byte swapping.

Image Added

Almost all of the data types will be influenced by this option except INT8 / UINT8 / BCD8 / UBCD8.

32Bit Data Swap: This option swaps words of all double word-sized data.

The following diagram shows an example of word swapping.

Image Added

INT32 / UINT32 / BCD32 / UBCD32 / FLOAT data type values will be influenced by this option.

Fixed Xpanel Socket Port / Xpanel Socket Port No.:

If this option is checked, Xpanel only uses the port defined in the "Xpanel Socket Port No."  field for connection with the PLC. Otherwise (unchecked), Xpanel will change the port at every TCP connection or communication error.

This option is provided for Xpanel to deal with various TCP port management ways of PLC. Some PLCs have a limit on the number of TCP services. In that case, this option can be useful.

The default setting of this option is the unchecked state.

Comm. Error Message Pop Up: When this item is checked, Xpanel displays a communication error message box for every Rx and Tx error. Otherwise (unchecked), Xpanel does not display a message for communication errors. This message box will close automatically after a few seconds.

See the Communication Configuration section for more information about the remaining parameters.

Address Notation

The address of a tag in Xpanel has the following format:

Tag Type

Format

Example

Analog

[Symbol][DB Number,][Address]

DB1,1

Digital

[Symbol][DB Number,][Address].[Bit Number]

DB1,2.7

  • [DB Number,]: decimal number (0..65535) followed by a comma (,). It is used in the data block (DB) addressing only. For other types of memory, this field must be omitted.

  • [Address]: decimal number (0..65535).

  • [Bit Number]: decimal number (0..7).

The following table shows the list of devices that can be referenced in the Xpanel database.

Symbol

Description

Word Notation

Bit Notation

Type

Access

PI

Peripheral Input

PI001

PI001.7

Analog/Digital

R/W

I

Input

I002

I002.7

Analog/Digital

R/W

Q

Output

Q003

Q003.7

Analog/Digital

R/W

M

Memory

M004

M004.7

Analog/Digital

R/W

DB

Data Block

DB01,01

DB01,01.7

Analog/Digital

R/W

T

Timer

T005

-

Analog

R

C

Counter

C006

-

Analog

R

The device T and C (timer and counter) must be defined as the “UBCD16” data type for normal data manipulation. The following picture shows the data type configuration window of the Xpanel database.

...

Communication Cable Wiring

Connect through the Ethernet HUB

...

Direct connection

...