Set a substitue value to 1. If that valuses are 0(zero), it is not able to set on the IN_ETHPRM structure.
param
[ in ]
Specify a pointer to IN_ETHPRM structure to store the setting parameter.
The IN_ETHPRM structure is as follows.
typedef struct _in_ethprm {
short reserve01;
short reserve02;
short reserve03;
short reserve04;
short reserve05;
short reserve06;
union {
COMMON_PRM common;
FOCAS2_PRM focas2;
FTPTRANS_PRM ftpTrans;
DTSVR_PRM2 dataServer;
} prm;
} IN_ETHPRM;
typedef struct _common_prm {
char OwnMacAddress[13];
char OwnIpAddress[40];
char SubNetmask[16];
char RouterIpAddress[40];
char DnsServer1IpAddress[40];
char DnsServer2IpAddress[40];
char OwnHostName[32];
char OwnDomain[63];
} COMMON_PRM; /* Common parameter */
typedef struct _focas2_prm {
unsigned long TcpPort;
unsigned long UdpPort;
unsigned long TimeInterval;
} FOCAS2_PRM; /* Parameter for FOCAS2/Ethernet */
typedef struct _ftptrans_prm {
FTP_CLIENT_PRM opposite[3];
} FTPTRANS_PRM; /* Parameter for FTP transfer */
typedef struct _dtsvr_prm {
FTP_CLIENT_PRM opposite[3];
FTP_SERVER_PRM own;
} DTSVR_PRM; /* Parameter for DATA SERVER */
typedef struct _ftp_client_prm {
char HostName[64];
unsigned long ControlPort;
unsigned long Dummy;
char UserName[32];
char Password[32];
char LoginDirectory[128];
} FTP_CLIENT_PRM;
typedef struct _ftp_server_prm {
char UserName[32];
char Password[32];
char LoginDirectory[128];
} FTP_SERVER_PRM
reserve01,..,reserve06
These variables are unable to use.
The input values on these variables are ignored on this function.
prm.common.OwnIpAddress
IP Address
The Ascii string less than 40 characters which is included NULL.
Ex) "192.168.0.100"
prm.common.SubNetmask
Subnet mask
The Ascii string less than 16 characters which is included NULL.
Ex) "255.255.255.0"
prm.common.RouterIpAddress
Router's IP Address
The Ascii string less than 40 characters which is included NULL.
Ex) "192.168.0.253"
prm.common.DnsServer1IpAddress
Dns Server IP Address
The Ascii string less than 40 characters which is included NULL.
Ex) "192.168.0.252"
prm.common.DnsServer2IpAddress
Alternative Dns Server IP Address
The Ascii string less than 40 characters whic ish included NULL.
Ex) "192.168.0.251"
prm.common.OwnHostName
Host Name on CNC
The Ascii string less than 32 characters which is included NULL.
However, max size is 64 characters which is added OwnHostName length to OwnDomain length.
Ex) "cnc"
prm.common.OwnDomain
Domain name
The Ascii string less than 63 characters which is included NULL.
However, max size is 64 characters which add OwnHostName length to OwnDomain length.
Ex) "factory"
prm.focas2.TcpPort
Port number for TCP
Used by FOCAS2/Ethernet
Range 5001,..,65534 or 0
Ex) 8193
prm.focas2.UdpPort
Port number for UDP
Range 5001,..,65535 or 0
Ex) 8192
prm.focas2.TimeInterval
Time interval which is transfered by broardcast frame (Unit:10ms)
Range 10,..,65535 or 0
Ex) 50
prm.ftpTrans.opposite[n].HostName
Host name or IP address which is assigned to FTP server.
The Ascii string less than 64 characters which included NULL.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "ftp.factory" or "192.168.0.250"
prm.ftpTrans.opposite[n].ControlPort
Control port number which is assigned to FTP server.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Range 1,..,65535
Ex) 21
prm.ftpTrans.opposite[n].UserName
User name to login the FTP server.
The Ascii string less than 32 characters which is included NULL.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "user"
prm.ftpTrans.opposite[n].Password
Password to login the FTP server.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "user1234"
prm.ftpTrans.opposite[n].LoginDirectory
Folder name which is able to login the FTP server.
The Ascii string less than 128 characters which is included NULL.
n range 0,..,2
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "/ncdata"
prm.dataServer.opposite[n].HostName
Host name or IP address which is assigned to DATA SERVER.
The Ascii string less than 64 characters which is included NULL.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "ftp.factory" or "192.168.0.250"
prm.dataServer.opposite[n].ControlPort
Control port number which is assigned to DATA SERVER.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Range 1,..,65535
Ex) 21
prm.dataServer.opposite[n].UserName
User name to login the DATA SERVER.
The Ascii string less than 32 characters which is included NULL.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "user"
prm.dataServer.opposite[n].Password
Password which is assigned to DATA SERVER.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "user1234"
prm.dataServer.opposite[n].LoginDirectory
Folder name which can be able to login the DATA SERVER.
The Ascii string less than 128 characters which is included NULL.
n range(0,..,2)
0
:
Connection one
1
:
Connection two
2
:
Connection three
Ex) "/ncdata"
prm.dataServer.own.UserName
User name which FTP client is able to login.
The Ascii string less than 32 characters which is included NULL.
Ex) "user"
prm.dataServer.own.Password
Password which FTP client is able to login.
The Ascii string less than 32 characters which is included NULL.
Ex) "user1234"
prm.dataServer.own.LoginDirectory
Folder name which FTP client is able to login.
The Ascii string less than 128 characters which is included NULL.
Ex) "/ncdata"
Return
EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.
The major error codes are as follows.
Return code
Meaning/Error handling
EW_NOOPT (6)
No option
In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
The following details status will be set onto the member, err_no of ODBERR structure.
20
:
Embedded Ethernet is not available.
22
:
The option board is not available.
23
:
Ethernet Function is not available.
24
:
The DATA SERVER function is not available.
25
:
Buffer mode is not available.
26
:
ATA card is not found.
EW_FUNC (1)
Function Error
The acquisition of the parameter etc. is failed.
In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
The following details status will be set onto the member, err_no of ODBERR structure.
10
:
Reading from File SRAM is failed.
EW_PROT (7)
Protection Error
The writing to the parameter is failed.
In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
The following details status will be set onto the member, err_no of ODBERR structure.
11
:
Writing to File SRAM is failed.
13
:
The DHCP function is effective.
EW_DATA (5)
Data error
In order to get more information for this err_no return value, execute cnc_getdtailerr() function.
The following details status will be set onto the member, err_no of ODBERR structure.
2
:
Out of range.
3
:
Data format error.
The following details status will be set onto the member, err_dtno of ODBERR structure.
1
:
The kind(type) of parameter is wrong.
101
:
prm.common.OwnIpAddress is wrong.
102
:
prm.common.SubNetmask is wrong.
103
:
prm.common.RouterIpAddress is wrong.
104
:
prm.common.DnsServer1IpAddress is wrong.
105
:
prm.common.DnsServer2IpAddress is wrong.
106
:
prm.common.OwnHostName is wrong.
107
:
prm.common.OwnDomain is wrong.
201
:
prm.focas2.TcpPort is wrong.
202
:
prm.focas2.UdpPort is wrong.
203
:
prm.focas2.TimeInterval is wrong.
301
:
The range of host number is wrong.
302
:
DATA SERVER mode is wrong.
3[i+1]1
:
prm.dataServer.opposite[i].HostName is wrong.
In case of i=0
311:The meaning of prm.dataServer.opposite[0](i=0-2)
3[i+1]2
:
prm.dataServer.opposite[i].ControlPort is wrong.
3[i+1]3
:
prm.dataServer.opposite[i].Dummy is wrong.
3[i+1]4
:
prm.dataServer.opposite[i].UserName is wrong.
3[i+1]5
:
prm.dataServer.opposite[i].Password is wrong.
3[i+1]6
:
prm.dataServer.opposite[i].LoginDirectory is wrong.
344
:
prm.dataServer.own.UserName is wrong.
345
:
prm.dataServer.own.Password is wrong.
346
:
prm.dataServer.own.LoginDirectory is wrong.
3[i+5]1
:
prm.ftpTrans.opposite[i].HostName is wrong.
In case of i=0
351:The meaning of prm.ftpTrans.opposite[0](i=0-2)