Program example
■Opening a connection using parameter settings
When M1000 is turned on, connection No.1 is opened using the parameters set in "External Device Configuration" of module
parameter.
• Devices used
Device No.
SD10680
SD10681
D100
M100
• Program
M1000
SD10680.0 SD10681.0
M100
M101
M101
■Opening a connection using control data settings
When M1000 is turned on, connection No.1 is opened using control data.
• Devices used
Device No.
SD10680
SD10681
D100
M100
• Program
M1000
SD10680.0
SD10681.0
M100
M101
M101
Application
Open completion signal
Open request signal
SP.SOCOPEN instruction control data
SP.SOCOPEN instruction completion device
SP.SOCOPEN
Application
Open completion signal
Open request signal
SP.SOCOPEN instruction control data
SP.SOCOPEN instruction completion device
SP.SOCOPEN
MOVP H0
D100
"U0"
K1
D100
M100
SET
M150
SET
M151
END
MOVP
H8000
D100
MOVP
H200
D102
MOVP
H1000
D103
DMOVP H0A614F0E
D104
MOVP
H1000
D106
"U0"
K1
D100
M100
SET
M150
SET
M151
END
7 SOCKET COMMUNICATION FUNCTION
7.4 Socket Communication Function Instructions
Set execution type/completion
type to 0H
Open connection No.1
Normal completion indication
Error completion indication
Set execution type/completion type
to 8000H
Set application setting area to 200H
(TCP/IP Active open)
Set Own station port number to 4096
Set IP address of the target device to
10.97.79.14
Set target device port number to
4096
Open connection No.1
Normal completion indication
Error completion indication
7
87