72
Master Function API Functions
Section 4-4
4-4-3
I/O Data Access Service API Functions
Refreshing Master I/O Data: SCAN_IoRefresh()
Application Range
Open status
Function
Refreshes the all Slave data in the I/O area of the Board’s Master function.
Call Format
BOOL SCAN_IoRefresh(DWORD
Handle
)
Arguments
Return Value
TRUE is returned if the input and output areas of the specified Board’s Master
function were successfully refreshed. FALSE is returned if an error occurred.
Detailed error information can be read with the GetLastError() function.
Description
This function executes data exchange between the I/O areas accessible using
API functions and I/O areas on the Board used for actual communications,
and refreshes these I/O areas.
This function refreshes all Slave I/O areas.
Use the SCAN_GetInData() after this function is completed to get the input
data.
For output data, first execute SCAN_SetOutData() for the required Slaves,
and then execute this function.
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 Slave Input Data: SCAN_GetInData()
Application Range
Open status
Function
Reads the specified Slave’s input data from the Board’s input area.
Call Format
BOOL SCAN_GetInData(DWORD
Handle
, WORD
MacId
, IO_DATA_CTL
*
InData1
, IO_DATA_CTL *
InData2
)
Arguments
Type
Name
Contents
DWORD
Handle
Device handle obtained by SCAN_Open()
Type
Name
Contents
DWORD
DataSize
Amount of data in bytes
Setting range: 0x00 to 0xC8 (0 to 200 bytes)
BYTE
Data[200]
Buffer where data is stored
Type
Name
Contents
DWORD
Handle
Device handle obtained by SCAN_Open()
WORD
MacId
Node address to read
Setting range: 0x00 to 0x3F (0 to 63)
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 ...