SIEMENS S7 Series
MPI Direct
V1.8
2 | SIEMENS S7 Series MPI Direct
V1.8
SIEMENS S7 SERIES MPIDIRECT ................................................................................. 1
1. SYSTEM CONFIGURATION ..................................................................................... 3
2. SYSTEM SETTINGS ................................................................................................... 4
3. USE EXAMPLE ........................................................................................................... 8
3.1. USE EXAMPLE 1 ............................................................................................................................................... 8
4. CABLE SCHEMATICS ............................................................................................. 12
4.1. MPI CABLE .................................................................................................................................................... 12
5. DEVICE CODE ......................................................................................................... 13
6. TROUBLESHOOTING ............................................................................................. 14
PLC’s Manual | 3
V1.8
1. SYSTEM CONFIGURATION
Connection details between Siemens’ S7 MPI Direct and weMX® are as follows.
CPU Link I/F Communication
Protocol
Example Cable
S7-300 port on CPU unit MPI Protocol Refer to
3.1 Use Example 1
USB to RS485
convertor cable
(Uses FTDI Chipset)
/ 4.1 MPI Cable
■ Connection Configuration
1 : 1 (One weMX® for Android device and one external device) Connection – Connect to MPI Port.
1 : 1 (One weMX® for Windows device and one external device) Connection – Connect to MPI Port.
USB to RS485
Converter cable (Uses
FTDI Chipset)
USB
Connection
4.1 MPI Cable
USB to RS485
Convertor Cable (Uses
FTDI Chipset)
OTG Cable 4.1 MPI Cable
4 | SIEMENS S7 Series MPI Direct
V1.8
2. SYSTEM SETTINGS
Select S7 MPI Direct from weMX® Designer’s connection settings window. Enter COM1(Android)/COM?(check the
COM number in Windows’ Device Manager) into the ‘Connection’ section.
Configure the selected COM Port’s interface according to your external device.
Category Detail
Speed Choose 19200 or 187500
Data Length Fixed value
Parity Fixed value
Stop Bit Fixed value
Flow Control Fixed value
Timeout Fixed value
Retransmission Fixed value
Transmission
Standby
Fixed value
Cycle Delay Fixed value
PLC’s Manual | 5
V1.8
Configure PLC Node Number and HMI Node number of the external device you wish to manage.
Default values are: PLC Noe Number: 2, HMI Node number: 1.
Communication mode
settings button
6 | SIEMENS S7 Series MPI Direct
V1.8
When using weMX Player for Windows, USB to RS485 converter cable driver’s Windows registry value must be
changed to use 187500 baudrate. When doing this, the USB to RS485 converter cable must use FTDI chipset.
1) Type in ‘regedit’ in the Windows’ Run window and click OK.
2) Go to Computer->HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Enum->FTDIBUS.
3) Under FTDIBUS, there can be several values that start with VID. Go to 0000->Device Parameters and
check PortName’s key values to find the value that matches with the Port.
PLC’s Manual | 7
V1.8
4) Double-click FDTIBUS/VIS_???/0000/Device Parameters/ConfigData to open the below window to adjust
the values.
Change it to 10 (hexadecimal)
8 | SIEMENS S7 Series MPI Direct
V1.8
3. USE EXAMPLE
3.1. Use Example 1
Configure weMX® and the external device as described below.
Category weMX® S7-300 Configuration
COM Port COM1 Make following configurations
through the PLC’s
configuration program:
- MPI Protocol
- 187500 baudrate
- PLC Node No.: 2
.
PLC Node Number 2
HMI Node Number 1
Speed 187500
Data Length Fixed value
Parity Fixed value
Device Bit Fixed value
Flow Control Fixed value
Timeout Fixed value
Retransmission Fixed value
Transmission Standby Fixed value
Cycle Delay Fixed value
Configure the communication interface through weMX® Designer.
PLC’s Manual | 9
V1.8
10 | SIEMENS S7 Series MPI Direct
V1.8
External device configuration
Use SIEMETIC S7 STEP7 Software to make configurations. For more info, please refer to PLC’s user manual.
① Create a new project from SIEMETIC Manager.
② Run Insert->Station->SIMETIC 300 Station to add a CPU.
③ Double-click ‘Hardware’ from added SIMETIC 300 Station to open a HW Config window.
④ Add the CPU you wish to use in HW Config.
고정값
PLC’s Manual | 11
V1.8
⑤ Double-click CPU’s MPI/DP to open a Properties window. After that, set Type to MPI, Address to 2, and
Baudrate to 187.5kbps.
⑥ Run ‘Station->Sava and Compile’ from HW Config’s main menu.
⑦ Run ‘PLC->download’ from HW Config’s main menu.
12 | SIEMENS S7 Series MPI Direct
V1.8
4. CABLE SCHEMATICS
4.1. MPI Cable
USB To RS485 Pin No. Pin No. PLC
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
GND
TRXD+
TRXD-
PLC’s Manual | 13
V1.8
5. DEVICE CODE
Devices supported by weMX® are written below. weMX® supports range of addresses that are allowed by the
external device. Please refer to PLC’s user manual to check the range of supported addresses.
Device Type Bit Address Word Address 32
bits
Note
Data Block WORD DB00001.DBX00000.0 -
DB65535.DBX65535.7
DB00001.DBW00000 -
DB65535.DBW65534
H/L
WORD addresses must
be even numbers
Input WORD I00000.0 -
I04095.7
E00000.0 -
E04095.7
IW00000 -
IW04095
EW00000 -
EW04095
WORD addresses must
be even numbers
Output WORD Q00000.0 -
Q04095.7
A00000.0 -
A04095.7
QW00000 -
QW04095
AW00000 -
AW04095
WORD addresses must
be even numbers
Marker WORD M00000.0 - M08192.7 MW00000 - MW08192 WORD addresses must
be even numbers
Timer WORD T00000 - T00255 Read Only
BCD type
Counter WORD C00000 -
C00255
Z00000 -
Z00255
Read Only
BCD type
Timer values use BCD formats. Upper 4 bits determine which unit should be used for reading lower 12 bits.
Value Unit
0 10 ms
1 100 ms
2 1 sec
3 10 sec
Below example is a script that converts Timer and Counter BCD values.
function get_timercounter() {
var timervalBCD = w_uint16("[PLC1]T00000");
var countvalBCD = w_uint16("[PLC1]C00000");
var countval=(countvalBCD>>>12)*1000+
((countvalBCD>>>8)&0xF)*100+
((countvalBCD>>>4)&0xF)*10+(countvalBCD&0xF);
var timerval=((timervalBCD>>>8)&0xF)*100+
((timervalBCD>>>4)&0xF)*10+(timervalBCD&0xF);
var timertype=Math.floor(((timervalBCD>>>12)&0xF));
set_w_uint16("[DISPLAY]USR00010", countval);
set_w_uint16("[DISPLAY]USR00011", timerval);
if (timertype == 0)
set_w_string("[DISPLAY]USR00012", 18 , "unit:10ms");
if (timertype == 1)
set_w_string("[DISPLAY]USR00012", 20 , "unit:100ms"); if (timertype == 2)
set_w_string("[DISPLAY]USR00012", 18 , "unit:1sec");
if (timertype == 3)
set_w_string("[DISPLAY]USR00012", 20 , "unit:10sec");
}
14 | SIEMENS S7 Series MPI Direct
V1.8
6. TROUBLESHOOTING