
4
Using
Tool
FZ4 User's Manual
Using Custom Command
319
Dim data&(256)
Dim ipaddr&(4)
'Set the IP address of the destination.
ipaddr&(0) = 10
ipaddr&(1) = 1
ipaddr&(2) = 1
ipaddr&(3) = 101
'Gets the five data.
ReceiveData "UdpPlcLink", data&(), 4*5, size&, ipaddr&(), 4*4
Send data
Set an IP address and parameter size (*4 integer type domain) in a parameter to use an Ethernet.
Dim data&(256)
Dim ipaddr&(4)
'Set the IP address of the destination.
ipaddr&(0) = 10
ipaddr&(1) = 1
ipaddr&(2) = 1
ipaddr&(3) = 101
'Transmit the five data.
SendData "UdpPlcLink", data&(), 4*5, ipaddr&(), 4*4
Gets 7ch data from 10ch of the DM area.
Gets the data from readData().
Dim readData&(256)
Dim data3$(21)
'Gets the data from PLC
ReadPlcMemory "UdpPlcLink", 130, 10, 7, readData&()
'Gets the data of the real number type
GetPlcData "UdpPlcLink", readData&(), 0, 8, data1#
'Gets the data of the integer type
GetPlcData "UdpPlcLink", readData&(), 8, 4, data2&
'Gets the data of the character type
GetPlcData "UdpPlcLink", readData&(), 12, 5, data2&
Set data to writeData().
Write in data for 7ch from 10ch of the DM area.
Dim writeData&(256)
'Set the data (123.45) of the real number type.
SetPlcData "UdpPlcLink", writeData&(), 0, 8, 123.45
'Set the data (20) of the integer type.
SetPlcData "UdpPlcLink", writeData&(), 32, 4, 20
'Set the data (OMRON) of the character type.
SetPlcData "UdpPlcLink", writeData&(), 36, 5, "OMRON"
'Write in data for 7ch from 10ch of the DM area.
WritePlcMemory "UdpPlcLink", 130, 10, 7, writeData&()
Acesst 1.0 6251194
Summary of Contents for FZ4 Series
Page 1: ...User s Manual Cat No Z318 E1 02B Vision Sensor FZ4 Series...
Page 38: ...1 Before Operation 36 Setting Operation Mode FZ4 User s Manual 1 CPU 2 CPUs FZ4 11 H11 only...
Page 330: ...4 Using Tool 328 Remotely Operating the Controller Remote Operation FZ4 User s Manual...
Page 566: ......
Page 648: ...8 Appendixes 646 Manual Revision History FZ4 User s Manual...
Page 654: ...652 FZ4 User s Manual...
Page 655: ......