4 - using the function calls, Chapter objectives, Using open_stddrv() – Rockwell Automation 6001-F2E AB STANDARD DRIVER SFTW User Manual
Page 14: Using the function calls

Chapter
4
4-1
Using the Function Calls
This chapter shows you how to use each of the function calls. It includes
the format and parameters for each function call.
The Open_StdDrv() function call initializes the 6001-F2E Standard
Driver. To open the Standard Driver, use the following format and
parameters:
Format for Open_StdDrv()
The Open function call is shown below:
status = Open_StdDrv(device,0,0,0,
(unsol_msg *)NULL,
0,0,0);
Parameters for Open_StdDrv()
Assign the parameters in Table 4.A:
Table 4.A
Assigning Parameters to Open Communication
Parameter
Type
Description
device[ ] = “KR:0”
char
Assigns a driver type “KR:” and communication channel “0”. The 6001-F2E
Standard Driver supports one 1784-KR communication channel.
(unsol_msg *)NULL,
struct
This is a null pointer for this release.
0
N/A
These parameters are ignored, but you still need to include them in the
function call. Type in a zero for each ignored parameter.
When the Open_StdDrv() function is called, a status value is returned
indicating whether the operation was successful or unsuccessful. Normal
completion is 1. A value other than 1 indicates that an error occurred.
See Appendix D for a list of error codes.
Chapter Objectives
Using Open_StdDrv()