|
QUESTION:
What do I have to take into consideration when using the DPC2
starting with version SIMATIC NET CD 07/2001?
ANSWER:
Below you can find complemental documentation for programming with
DPC2.
Parameters and options of DPC2 function calls which are not
supported in version 6.0 and 6.1:
- dpc2_initiate
Subnet addressing with Network_Address and MAC_Address is not
possible. Enter the value 0 for the parameters S_Type and D_Type.
The parameter Features_Supported is only supported as return
parameter. The parameters Profile_Features_Supported and
Profile_Ident_Number are not supported.
- dpc2_abort
The parameters Instance, Reason_code and Locally_Generated are not
sent to the station. The return parameter Additional_Detail
contains a default value.
- dpc2_data_transport
The parameters Slot_Number and Index will always be set to value
0. In addition, the return parameters Error_Decode, Error_Code_1
and Error_Code_2 of structure dpc2_error are not supported.
Calling the dpc2_get_event in asynchronous mode
When calling dpc2_get_event in asynchronous mode, the return
value DPC2_NO_EVENT and in parameter *event_type_ptr the value
DPC2_OPEN_EVENT or DPC2_DATA_TRANSPORT_INT_EVENT are shown. What
meaning do these values have?
The functions dpc2_initiate and dpc2_data_transport are carried out
in two steps in asynchronous mode. The message Dpc2_OPEN_EVENT or
DPC2_DATA_TRANSPORT_INT_EVENT appears after running the first
internal intermediate step. The final acknowledgement is returned
in a subsequent dpc2_get_event call (in this case, the return
valuel of the function dpc2_get_event is not equal to
DPC2_NO_EVENT).
Error class DPC2_ERROR_BOARD_ACCESS
A DPC2 function returns the value DPC2_ERROR_BOARD_ACCESS. The
parameter Error_Code of structure dpc2_error contains a detailed
error code that is not described in the DPC2 documentation. A
complete listing of the error codes follows (Hex values):
E_SUCCESS 0x0000
E_RESOURCES 0x012a /* no more system resources */
E_PAR_ERR 0x012e /* wrong parameter */
E_DPRAM 0x0132 /* no more DP RAM */
SCP_RESOURCE 0x00ca /* no more system resources */
SCP_CONFIG_ERR 0x00cb
SCP_ILLEGAL 0x00cd
SCP_PARAM 0x00ce
SCP_DEVOPEN 0x00cf
SCP_BOARD 0x00d0
SCP_SOFTWARE 0x00d1
SCP_MEM 0x00d2
SCP_NOMESS 0x00d7
SCP_USERMEM 0x00d8
SCP_TIMEOUT 0x00db
EUSERMAX 0x00e1
SCP_EINTR 0x00e2
SCP_BOARD_OPEN 0x00e7
SCP_NO_WIN_SERV 0x00e9
EPROTECT 0x00ea /* no licence found */
SCP_DB_FILE_DOES_NOT_EXIST 0x00f0
SCP_DB_FILE_CLOSE_NOT_OK 0x00f1 /* NO_GLOBAL_DOS_MEMORY */
SCP_SEND_NOT_SUCCESSFUL 0x00f2
SCP_RECEIVE_NOT_SUCCESSFUL 0x00f3
SCP_NO_DEVICE_AVAILABLE 0x00f4
SCP_ILLEGAL_SUBSYSTEM 0x00f5
SCP_ILLEGAL_OPCODE 0x00f6
SCP_BUFFER_TOO_SHORT 0x00f7
SCP_BUFFER_1_TOO_SHORT 0x00f8
SCP_ILLEGAL_PROTOCOL_SEQUENCE 0x00f9
SCP_ILLEGAL_PDU_ARRIVED 0x00fa
SCP_REQUEST_ERROR 0x00fb
E_INIT_COM 0x0301
E_NO_HW 0x0310 /* MPI board not found */
E_HW_DEFEKT 0x0311 /* Problem with the hardware */
E_CNF 0x0312 /* wrong configuration parameter */
E_BAUDRATE 0x0313 /* wrong baudrate/wrong IRQ vector */
E_HSA 0x0314 /* wrong HSA configurated */
E_TS 0x0315 /* station adress already used */
E_OCC 0x0316 /* HW_Device alredy used */
E_INT_NOT_PROV 0x0317 /* IRQ not available */
E_INT_BUSY 0x0318 /* IRQ already used */
E_SAP 0x0319 /* SAP deactivate: SAP not used */
E_UNPLUGGED 0x031a /* not remote station found */
E_SYNI 0x031b /* Syni Error */
E_AMPRO 0x031c /* AMPRO 2 System Error */
E_NO_FILE 0x0320 /* DLL/VxD file not found */
E_NO_ENTRY 0x0321 /* loaded DLL has no entry point */
E_VERSION 0x0330 /* version conflict between SMC driver */
E_NO_SMC 0x0332 /* SMC doesn't answer (any more) */
E_ONLINE 0x0380 /* inlernal error with IOCTL Interface */
E_LOGDEV 0x0381 /* Configuration:log.device not in Registry */
E_L2DRIVER 0x0382 /* Configuration:L2DRIVER not in Registry */
E_L4DRIVER 0x0384 /* Configuration:L4DRIVER not in Registry */
E_SYSERROR 0x03FF /* Systemfehler, use GetLastError() */
Error class DPC2_ERROR_EVENT_NET:
A DPC2 function returns the error class DPC2_ERROR_EVENT_NET as
value. The parameter Error_Code of structure dpc2_error contains a
detailed error code that is not described in the DPC2 documentation
(Table 3.2 "Error codes of class DPC2_ERROR_EVENT_NET" in the PDF
file).
A complete listing of the error codes follows (Hex values):
DPC2_NET_UNKNOWN_REFERENCE 0x0006
DPC2_NET_REM_ABORT 0x000e
DPC2_NET_LOC_TIMEOUT 0x0010
DPC2_NET_CONN_REJECT 0x0016
DPC2_NET_NETWORK_ERROR 0x001c
DPC2_NET_NO_RESOURCES 0x0004
DPC2_NET_CONNECTION_DOWN 0x0009
DPC2_NET_NO_RESOURCES 0x0004
DPC2_NET_NETWORK_ERROR 0x001c
DPC2_NET_PROTOCOL_ERR 0x001e
DPC2_NET_RESP_INVALID_REQ 0x0002
DPC2_NET_RESP_BUFFET_TOO_SHORT 0x0008
DPC2_NET_RESP_BUFFET_TOO_LONG 0x000a
DPC2_NET_RESP_ILLEGAL_REQ 0x000c
DPC2_NET_RESP_UNKNOWN_CON_CLASS 0x0012
DPC2_NET_RESP_DUP_REQ 0x0014
DPC2_NET_RESP_NEGOT_FAILED 0x0018
DPC2_NET_RESP_ILLEGAL_ADDRESS 0x001a
DPC2_NET_RESP_ILLEGAL_RB_LENGTH 0x0020
|