![background image](http://html.mh-extra.com/html/omron/devicenet-3g8f7-drm21-e/devicenet-3g8f7-drm21-e_operation-manual_743611095.webp)
78
Slave Function API Functions
Section 4-5
IO_DATA_CTL Structure
This structure defines the data format used when accessing the Board’s I/O
areas. This structure is used in the SCAN_GetInData(), SCAN_SetOutData(),
SCAN_GetSlaveOutData(), and SCAN_SetSlaveInData() functions.
Specify the read data size or write data size under DataSize.
Reading Master Output Data: SCAN_GetSlaveOutData()
Application Range
Open status
Function
Reads output data from the Master from the Board’s Slave function output
area.
Call Format
BOOL SCAN_GetSlaveOutData(DWORD
Handle
, IO_DATA_CTL *
OutData1
,
IO_DATA_CTL *
OutData2
)
Arguments
Return Value
TRUE is returned if the specified output data was read successfully. FALSE is
returned if an error occurred. Detailed error information can be read with the
GetLastError() function.
Description
The Board’s Slave function output area will not reflect in the most recent
outputs from the Master unless this function is executed after SCAN_
SlaveIoRefresh().
Specify NULL as the output data 2 storage buffer address if only one I/O con-
nection is used with the Slave function.
Specify the output data size from the Master when using the Slave function
(OUT size) as the data size for the IO_DATA_CTL structure. The output data
read from the Master is stored in the data storage buffer of the IO_DATA_CTL
structure.
Writing Master Input Data: SCAN_SetSlaveInData()
Application Range
Open status
Function
Writes input data to the Master to the Board’s Slave function input area.
Call Format
BOOL SCAN_SetSlaveInData(DWORD
Handle
, WORD
MacId
, IO_DATA_
CTL *
InData1
, IO_DATA_CTL *
InData2
)
Arguments
Type
Name
Contents
DWORD
DataSize
Amount of data in bytes
Setting range: 0x00 to 0xC8 (0 to 200 bytes)
BYTE
Data[256]
Buffer where data is stored
Type
Name
Contents
DWORD
Handle
Device handle obtained by SCAN_Open()
IO_DATA_CTL*
OutData1
Buffer address where output data 1 is stored
IO_DATA_CTL*
OutData2
Buffer address where output data 2 is stored
(NULL when not used.)
Type
Name
Contents
DWORD
Handle
Device handle obtained by SCAN_Open()
IO_DATA_CTL*
InData1
Buffer address where input data 1 is stored
IO_DATA_CTL*
InData2
Buffer address where input data 2 is stored (NULL
when not used.)
Summary of Contents for DeviceNet 3G8F7-DRM21-E
Page 1: ...OPERATION MANUAL Cat No W381 E1 02 3G8F7 DRM21 E DeviceNet PCI Board ...
Page 2: ...3G8F7 DRM21 E DeviceNet PCI Board Operation Manual Revised July 2005 ...
Page 3: ...iv ...
Page 5: ...vi ...
Page 29: ...12 Preparation for Operation Section 1 8 ...
Page 67: ...50 PC Watchdog Timer Management Function Section 3 11 ...
Page 115: ...98 Maintenance API Functions Section 4 7 ...
Page 131: ...114 Remote I O Communications Characteristics Section 6 1 ...
Page 145: ...Index 128 ...
Page 147: ...130 Revision History ...