MCIO 1-5

Motion Control & IO

Deterministic

No matter how fast is the bus, two parallel devices receive the same risining edge at identical time.

0. Remote login

$ mstsc

1. Networking

141.52.97.224

administrator

1. 1. Create project

File -> new -> project -> TwinCat XAE prject(XML format) -> input file name & ok

Solution Explorer -> double click "system"-> choose target -> search(Ethernet) -> broadcast search OR enter ip

set address info to IP Address

Add route & login

1. 2. PLC project

Solution Explorer -> TwinCat -> SPS -> (right click) add new item -> standard plc project -> enter name: code_X-> OK

Solution Explorer -> TwinCat -> SPS -> code_X -> POUs -> MAIN (PRG)

input_code -> (Header) TwinCAT -> active configuration -> login -> start

2. TWINCAT IO

create IO

Solution Explorer -> TwinCat -> I/O -> device -> add new element -> select EtherCAT -> EtherCAT master -> OK

Assign hardware

  • If the device are connected to CX5140 directly, then they are PCI.

  • If the device are connected to CX5140 by LAN, then they are LAN.

Solution Explorer -> TwinCat -> SYSTEM -> select target -> click CX35CD

Click TwinCat/IO/Devices/Device 1(EtherCAT) -> adapter -> click SEARCH -> PCI!!!-> click BLUE CONFIG MODE

Right click Device 1(EtherCAT) -> scan

Then, you will find device

Code

build solution!!

Parts

EL2008 output

https://www.beckhoff.com/english.asp?ethercat/el2008.htm

EL1819 digital input

https://www.beckhoff.com/english.asp?ethercat/el1819.htm

Bind IO to variable

click channel N -> right-click output -> change link -> select variable

Hardware changes - Rescan

Right click Device 1(EtherCAT) -> scan -> copy before / after -> activate configuration

Last updated

Was this helpful?