6.5 Sample Programs
This section presents sample programs using UDP and TCP sockets.
6.5.1
UDP socket sample programs
Two EN311 modules are mounted, one to Slot 6 and another to Slot 7 on the base. The
program for each module is to be registered as separate program.
• Transmission is performed via Slot 6, Socket 1 (Port number = 3000) ••• Open Æ Send
Æ Close
• Reception is performed via Slot 7, Socket 1 (Port number = 3001) ••• Open Æ Send Æ
Close
• Socket status address of Socket 1: 16 # 7E47 (word address)
(1) Initialization routine
Slot 6
Slot 7
6F8C0904
Local station IP address: 133.113.90.10
Local station message transmission UDP port number: 3000
Local station IP address: 133.113.90.20
Local station message transmission UDP port number: 3001
6.5 Sample Programs
6
119