Omron FZ4 Series User Manual page 318

Vision sensor
Table of Contents

Advertisement

PutAll
ReceiveData
SendData
SendString
ReadPlcMemory
WritePlcMemory
SetPlcData
GetPlcData
Example
4
Receive 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
'Gets the five data.
ReceiveData "UdpPlcLinkY", 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 "UdpPlcLinkY", data&(), 4*5, ipaddr&(), 4*4
Gets 7ch data from 10ch of the Data register area.
Gets the data from readData().
Dim readData&(256)
Dim data3$(21)
'Gets the data from PLC
ReadPlcMemory "UdpPlcLinkY", 176, 10, 7, readData&()
'Gets the data of the real number type
GetPlcData "UdpPlcLinkY", readData&(), 0, 8, data1#
'Gets the data of the integer type
GetPlcData "UdpPlcLinkY", readData&(), 8, 4, data2&
'Gets the data of the character type
GetPlcData "UdpPlcLinkY", readData&(), 12, 5, data2&
Set data to writeData().
Write in data for 7ch from 10ch of the DM area.
316
Using Custom Command
Reference:
Reference:
Reference:
Reference:
Reference: Begin to read data from designated memory of the PLC (p.251)
Reference: Write in data at designated storage device of the PLC (p.296)
Reference:
Reference:
Output terminal all point output (p.249)
Receive data (p.252)
Send data (p.267)
Sends string (p.268)
Set PLC the write data (p.271)
Gets PLC the read data (p.213)
FZ4 User's Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents