BECKHOFF
TwinCAT_PLC_Ethernet
Supported series: Twincat

PLC Settings
Choose Target System→ Search→ Broadcast Search→ choose PLC → Add router→ choose CPU → OK

Route Settings→Add Route Dialog→ Broadcast Search→ choose PLC→ modify Route Name as HMI name → modify AmsNetId as HMI AmsNetId: 192.168.50.154.1.1 (HMI IP + .1.1) → select the option of IP Address→ set HMI IP in Address info→ Add Route

Actions→ Activate configuration

HMI Settings
| Item | Settings | Note |
| Protocol | TwinCAT_PLC_Ethernet | |
| Connection | Ethernet | |
| Port NO. | 48898 | |
| ADS port | 801/811/821/831 | |
| PLC station No. | 1 |
Choose protocol: TwinCAT_PLC_Ethernet

Setting→PLC IP Address→AMS NetId (Fill in according to the actual AMS NetId search by PLC)
How to import the tags
TwinCat 2:
Open TwinCAT PLC Control→ edit program→ save the program in a file → Project → Rebuild all


TwinCat 3:
1. In the TwinCat 3, the settings tab of PLC project, select the TPY File option.

2. Activation configuration

3.Open the project folder to find the *.tpy file

PIStudio Settings
Labels mange→ Import Tag From File→ choose the file whose format is "tpy" in the file →Save

Support Variable Type
| Data Type | PIStudio Data Format | Range |
|---|---|---|
| BOOL | Bit | 0~1 |
| BYTE | 16-bit Unsigned/Binary/BCD/Hex | 0~255 |
| WORD | 16-bit Unsigned/Binary/BCD/Hex | 0~65535 |
| DWORD | 32-bit Unsigned/Binary/BCD/Hex | 0~4294967295 |
| SINT | 16-bit Signed/Binary/BCD/Hex | -128~127 |
| USINT | 16-bit Unsigned/Binary/BCD/Hex | 0~255 |
| INT | 16-bit Signed/Binary/BCD/Hex | -32768~32767 |
| UINT | 16-bit Unsigned/Binary/BCD/Hex | 0~65535 |
| DINT | 32-bit Signed/Binary/BCD/Hex | -2147483648~2147483647 |
| UDINT | 32-bit Unsigned/Binary/BCD/Hex | 0~4294967295 |
| REAL | 32-bit Floating | 1.00E-44~3.40E+38 |
| LREAL | 64-bit Floating | 4.94065645841247e-324~1.7976931348623157e+308 |
| STRING | STRING |