![Epson RC700 Скачать руководство пользователя страница 260](http://html.mh-extra.com/html/epson/rc700/rc700_manual_106988260.webp)
3. Operation
248
RC700 / RC90 Option Fieldbus I/O Rev.14
3.3 Using FbusIO_SendMsg
To use FbusIO_SendMsg, install the Fieldbus master board.
FbusIO_SendMsg is used to send an explicit message to a device and return a reply. This
command operates according to the protocol.
The syntax is as follows:
FbusIO_SendMsg
bus
,
device
,
msgParam
,
sendBytes
(),
recvBytes
()
Description of parameter
There are two arrays passed to the parameter. The sendData array contains the data that is
sent to the device in bytes. This array must be dimensioned to the correct number of bytes
to send. If there are no bytes to send, you must use “0” for the parameter. The recvData
array returns the response in bytes. This array is automatically re-dimensioned to the
number of bytes received.
For DeviceNet, you need to initialize the sendData array with the command, class,
instance, and attribute, as shown in the example below. Consult the documentation that
came with the device for the values that can be used. The msgParam parameter value is
always “0” for DeviceNet messages.
Here is an example for DeviceNet and EtherNet/IP:
The following example acquires the information of a device MacID = 1.
' Send explicit message to the device
Byte sendData(5)
Byte recvData(10)
Integer i
sendData(0) = 14 ' Command (GetAttributeSingle)
sendData(1) = 1 ' Class
sendData(3) = 1 ' Instance
sendData(5) = 7 ' Attribute
FbusIO_SendMsg 16, 1, 0, sendData(), recvData()
For i = 0 To UBound(recvData)
Print recvData(i)
Next i
For PROFIBUS DP, you need to specify the service number in the msgParam parameter.
Consult the documentation that came with the device for the services that are supported.
Some services require “0” send bytes. In this case, use “0” for the sendBytes parameter.
Here is an example for PROFIBUS DP:
' Send message to Profibus device
Byte recvData(10)
Integer i
' Service 56 - read all inputs
' sendBytes = 0
FbusIO_SendMsg 1, 1, 56, 0, recvData()
For i = 0 To UBound(recvData)
Print recvData(i)
Next i
Содержание RC700
Страница 1: ...Robot Controller RC700 RC90 Option Fieldbus I O Rev 14 EM198C4088F ...
Страница 2: ...Robot Controller RC700 RC90 Option Fieldbus I O Rev 14 ...
Страница 8: ...vi RC700 RC90 Option Fieldbus I O Rev 14 ...
Страница 12: ...Table of Contents x RC700 RC90 Option Fieldbus I O Rev 14 ...
Страница 74: ...2 Installation 62 RC700 RC90 Option Fieldbus I O Rev 14 17 DeviceNet Slave is connected and the icon appears ...
Страница 165: ...2 Installation RC700 RC90 Option Fieldbus I O Rev 14 153 PCI CIFX 50 RE PCI Express CIFX 50E RE ...
Страница 183: ...2 Installation RC700 RC90 Option Fieldbus I O Rev 14 171 17 EtherNet IP Slave is connected and the icon appears ...
Страница 340: ...5 Maintenance Parts List 328 RC700 RC90 Option Fieldbus I O Rev 14 ...