Basics
1 lesson · environment setup (Python·pymodbus·simulator)
Communication
3 lessons · I/O handshake · Ethernet TCP/IP · RS-232
02. I/O Communication
Comm basics · Prereq: lesson 1
I/O communication toggles a single wire ON/OFF so the robot and a partner device (PLC·machine·sensor) exchange signals. The robot turns an output ($DO) on, the partner reads it as input; the partner turns a response on, the robot reads it as input ($DI). This handshake is the foundation of all automation. We classify HIWIN's five I/O types and reproduce one pick-and-place grip/ungrip handshake as a pure-Python state machine.
03. Ethernet TCP/IP
Comm basics · Prereq: lesson 1
Connect the robot and a vision (upstream) system with one LAN cable: the robot sends "take a shot" ({TRIG}) and vision replies "here are the coords" ({X,Y,R}). You confirm by hand that HRSS's COPEN/CWRITE/CREAD/CCLEAR map 1:1 to standard PC socket code. You run a vision server on the PC and a robot Client you write, succeeding at real send/receive/parse.
04. RS-232 Serial Communication
Comm basics · Prereq: lesson 3
RS-232 is the oldest serial link, connecting the robot and a host (PC·PLC) 1:1 with one cable. Lesson 3's CWRITE/CREAD and {}·, packet format carry over unchanged — only the physical layer and COPEN's first argument (ETH→SER) change. We verify the packet framing with pure Python (no port), and practice real serial transfer with com0com virtual COM ports.
MODBUS
3 lessons · basics · Server (robot = slave) · Client (robot = master)
05. MODBUS Basics
MODBUS · Prereq: lesson 1
If RS-232 was point-to-point between two devices, MODBUS is the industrial-standard protocol where one master reads/writes many slaves at the register level. With a PC alone you run a virtual slave and, as master, read/write the four register types (Discrete Input·Coil·Input Register·Holding Register) and Function Codes (01–06,15,16) — confirming you can't write to read-only registers.
06. MODBUS SERVER (Robot = Slave)
MODBUS · Prereq: lesson 5
Lesson 5 handled the four registers individually; this lesson combines them to control the robot. With the robot as Slave(Server) and an upstream PLC·PC as Master(Client), you run the command cycle: "command number → parameters → trigger → motion → response check → reset." This is how a PLC actually moves a HIWIN robot on site, and you also learn to split 32-bit coords·angles into Low/High words.
07. MODBUS CLIENT (Robot = Master)
MODBUS · Prereq: lesson 5
In lesson 6 the robot was controlled (Slave Server). Here the roles flip: the robot becomes a Master Client, actively controlling an electric gripper·other robots·PLCs. With MBC_* commands one robot connects to up to 4 servers at once and reads/writes the four data types. Since Modbus can't carry floats directly, you learn why IEEE754 conversion and SWAP_WORD (byte-order fix) are needed.
Applications
2 lessons · monitoring/debugging · vision·robot·gripper automation cell
08. Monitoring & Debugging
Applied · Prereq: lessons 6·7
The traffic in lessons 6·7 is invisible bytes. When "it doesn't work and I don't know why," the ability to see and decode those bytes by hand is the whole of debugging. On real hardware you use the HRSS/Caterpillar Modbus Monitor; on a PC, Wireshark to capture real Modbus/TCP packets. And to practice without hardware, a hand-decoder unpacks hex frames into human-readable form with automatic verification.
09. Capstone — Vision·Robot·Gripper Automation Cell
Applied · Prereq: lesson 8
The last lesson. We weave the communication pieces — lesson 3 TCP/IP, lesson 6 robot=Server command cycle, lesson 7 robot=Client gripper control, lesson 8 monitoring — into one automation cell. The upstream vision reports part positions (TCP/IP), the robot moves there (Modbus), the gripper picks, places at a target, and goes home. You complete this pick-and-place cell on one PC and measure cycle time.