Library Functions; Clkopen(); Board Open - Omron SYSMAC 3G8F7-CLK12-E Operation Manual

Controller link support boards for pci bus
Table of Contents

Advertisement

Library Functions

4-1

Library Functions

Functions
Function name
ClkOpen
ClkClose
ClkSendFins
ClkRecvFins
ClkWriteDatalink
ClkReadDatalink
ClkGetNetworkStatus
ClkGetRingStatus
ClkSetMessageOnArrival
ClkSetThreadMessageOnArrival
ClkClearMessageOnArrival
ClkGetLastError

4-1-1 ClkOpen()

Function
Call Format
Arguments
Return Value
Description
Supplemental
Information
48
This section describes the library functions used for the Control Link Support
Boards for PCI bus. Refer to Section 3 Creating Applications Using the C Library
for application methods.
Name

Board Open

Board Close
FINS Message Send
FINS Message Receive
Data Link Data Write
Data Link Data Read
Network Status Read
Optical Ring Status Read
FINS Message Reception
Notification Registration to
Window
FINS Message Reception
Notification Registration to
Thread
FINS Message Reception
Notification Clear
Detailed Error Information
Acquire
Opens the application interface and gets a CLK handle.
PCLKHANDLE ClkOpen( BYTE byAppUnitAdr, INT *piRetErr);
Type
Variable name
BYTE
byAppUnitAdr
INT*
piRetErr
A CLK handle is returned if the function ends normally.
CLK_ERROR is returned if the function ends in an error. Detailed error informa-
tion is stored in piRetErr.
Set a value between 1 and 15 for AppUnitAdr. Set 0 when it is not necessary to
set a specific application unit address. An unused unit address will be automati-
cally allocated.
The function will end in an error if a Controller Link Support Board is not
mounted.(Detailed error information = ERR_NO_CLKUNIT: No CLK Unit)
The function will end in an error if a handle cannot be obtained because of insuffi-
cient memory. (Detailed error information = ERR_NO_MEMORY: Memory ac-
quisition error)
The function will end in an error if the unit address specified in the argument is
not between 0 and 15. (Detailed error information = ERR_UNIT_ADDRESS:
Unit address range error)
The unit address is different from the board ID on the Support Board.
It is not normally necessary to specify a unit address when sending a command
from an application running on the computer and receiving a response. Always
specify the unit address when sending a command to the application from an
application running on a computer or from a PLC at a different node.
Function
Opens the application interface and gets
a CLK handle.
Closes the application interface and
releases the CLK handle.
Sends a FINS message.
Receives a FINS message.
Writes data to a data link area.
Reads data from a data link area.
Reads the network status.
Reads the optical ring status.
Makes settings to notify the specified
window with a Windows message when
a FINS message is received.
Makes settings to notify the specified
thread with a Windows message when a
FINS message is received.
Clears windows message notification
when a FINS message is received.
Gets an error code generated when a
CLK library function is used.
Description
Unit address allocated to the application
Error information for ClkOpen()
Section
4-1
Page
48
49
49
49
50
51
51
52
53
53
55
55
Board Open

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac 3g8f7-clk52-eSysmac 3g8f7-clk21-e

Table of Contents