WWW.NNC.IR
Macro Reference
357
8
Appendices
Vision System FH/FZ5 Series
User’s Manual (Z340)
Supported functions
Example
Receive data
Set an IP address and parameter size (*4 integer type domain) in a parameter to use an Ethernet.
Send data
Set an IP address and parameter size (*4 integer type domain) in a parameter to use an Ethernet.
Gets 7ch data from 10ch of the Data register area.
Gets the data from readData().
IoInitialize OK ---
GetPort OK Reference: GetPort (p.542)
PutPort OK Reference: PutPort (p.645)
BusyOut --- ---
JudgeOut --- ---
RunOut --- ---
GetAll OK Reference: GetAll (p.528)
PutAll OK Reference: PutAll (p.643)
ReceiveData OK Reference: ReceiveData (p.651)
SendData OK Reference: SendData (p.696)
SendString OK Reference: SendString (p.698)
ReadPlcMemory OK Reference: ReadPlcMemory (p.649)
WritePlcMemory OK Reference: WritePlcMemory (p.807)
SetPlcData OK Reference: SetPlcData (p.709)
GetPlcData OK Reference: GetPlcData (p.538)
Dim data&(256)
Dim ipaddr&(4)
'Set the IP address of the destination.
ipaddr&(0) = 10
ipaddr&(1) = 5
ipaddr&(2) = 5
ipaddr&(3) = 101
'Gets the five data.
ReceiveData "UdpPlcLinkM", data&(), 4*5, size&, ipaddr&(), 4*4
Dim data&(256)
Dim ipaddr&(4)
'Set the IP address of the destination.
ipaddr&(0) = 10
ipaddr&(1) = 5
ipaddr&(2) = 5
ipaddr&(3) = 101
'Transmit the five data.
SendData "UdpPlcLinkM", data&(), 4*5, ipaddr&(), 4*4