Hướng dẫn kết nối PLC LOGO Siemens
Xem Video hướng dẫn kết nối Vbox với PLC Logo Siemens (bên dưới)
Supported Series: Siemens Logo 0BA0, 0BA1 series
V-BOX Settings
Items | Settings | Note |
Protocol | Siemens LOGO | |
Connection | Ethernet | |
Port No. | 102 | |
PLC station No. | 2 |
Address List
Number | Address Type | Data Type | Range | DB Address | PLC Address |
1 | RTC | Word | 1-7 | DB1.DBX984.0 | 0x001ec0 |
2 | VB | Byte | 0-1469 | DB1.DBX0.0 | 0x000000 |
3 | VD | Double Word | 0-1466 | DB1.DBX0.0 | 0x000000 |
4 | VW | Word | 0-1468 | DB1.DBX0.0 | 0x000000 |
5 | NAQ | Word | 1-32 | DB1.DBX1406.0 | 0x002bf0 |
6 | NAI | Word | 1-64 | DB1.DBX1262.0 | 0x002770 |
7 | AM | Word | 1-64 | DB1.DBX1118.0 | 0x0022f0 |
8 | AQ | Word | 1-16 | DB1.DBX1072.0 | 0x002180 |
9 | AI | Word | 1-16 | DB1.DBX1032.0 | 0x002040 |
10 | I | Bit | 1-64 | DB1.DBX1024.0 | 0x002000 |
11 | Q | Bit | 1-64 | DB1.DBX1064.0 | 0x002140 |
12 | M | Bit | 1-112 | DB1.DBX1104.0 | 0x002280 |
13 | NI | Bit | 1-128 | DB1.DBX1246.0 | 0x0026f0 |
14 | NQ | Bit | 1-128 | DB1.DBX1390.0 | 0x002b70 |
15 | V | Bit | 0-14697 | DB1.DBX0.0 | 0x000000 |
PLC Settings in LOGO Software:
Click [Tools]--[Ethernet Connections],shown as below.
Set Ethernet connection parameter. IP, Subnet Mask, shown as below.
TSAP set: The value set by local TSAP is the remote TSAP set in HMI. PLC's remote TSAP is the opposite, shown as below.
Download Project: Click "Address book" to add the IP address to be downloaded (fi."Detect" to check whether the IP address can be detected. Then click “ok”, and the system will prompt that PLC will be "STOP" mode. Click “YES” to start download.
V-BOX Communication Settings
Set PLC IP in [IP Address] settings;
TSAP setting
- The initialization script needs to set the source TSAP address and the target TSAP address, otherwise the communication will not be successful.
You can copy the following script into V-net directly.
function init.main()
addr_setword("@W_0#HSW1200",8192) -- Set the source TSAP address
addr_setword("@W_0#HSW1201",4096) -- Set the destination TSAP address
end
Note:
The name of the test script must be “init”, 8192 and 4096 are the data used for the test, there is no HSW address in the register option, but you can directly set the value of the corresponding address through the code.
✎Note:
- Communication port configuration:
- Continuous length needs to be set to 0.
- Integration interval needs to be set to 1. (no change may result in data errors)
- Set Port and Device Station NO.
- Other set as defaulted.
- Notes on the use of registers:
- Register VD: Use only registers that are multiples of 4, such as 0, 4, 8, etc.
- Register VW: Use only registers they are multiples of 2, such as 0, 2, 4 etc. (Using an odd-length register may result in data errors, such as 2 3 4 )