Anda di halaman 1dari 4

01.

04

A Appendix

8.10

Diagnostics possibilities for NCDDE access

8.10.1

Test functions on the NCDDE server

Overview
Among other things, the testing functions of the NCDDE server give information on
the local and external variables that were declared in the NCDDE server at the time
the file was created. They are called as follows:
1. Start the NCDDE server in the SINUMERIK 840D MMC-OEM program group
2. Press ALT+TAB to switch to the NCDDE program, i.e. the NC communication
DDE server; an icon is created
3. Click the icon: The following window appears.

Figure 8-2

Standard NCDDE server screen

These functions are mainly intended for debugging in the environment of the
NCDDE server.

Siemens AG, 2004. All rights reserved


Motion Control Information System (FBR) 01.04 Edition

A-63

A Appendix

01.04

Hotlinks
Here a list is created which contains all existing Advise Links (Hotlinks and
Warmlinks). It is organized as a 5-column table with the following meanings:
Table 8-19 Hotlinks

Column About
1
PDU reference
2

Advise Link

Update time

LastError
variable

Variable name

Comments
Internal value: Possible PDU reference for
communicating with the NCK and the PLC
LOCAL
Link to a local variable
REMOTE
Link to an external variable
PILED
Double external Advise Link,
connected to another job.
Time when the PDU was last refreshed, in an
internal time scale for the NCDDE server
LastError value as described in Section 11.7. It is
not necessarily identical to the value reported at the
servers DDE interface, since the last error from
several transactions on one connection can be
queried there.
Variable name according to Chapter 11.

Variables
Shows the variables to which the NCDDE server is linked and where they are
located: "LOCAL" or "PLC/NC".

Snapshot
Pressing this button creates a file named "NCDDE_X.TXT" that contains the status,
hotlinks and variables for the NCDDE server.

DDE test
Pressing this button starts a testing program "DDETEST.EXE" with the following
features
Table 8-20 DDE test commands

Command
Passive
Hotlink
Request
Poke
Execute

Action
None
Start
DoIt
DoIt
DoIt

Meaning
Reset state, no function active
Establish Advise Link
Read variable
Write variable
Execute a service

Specify the installed NC under Service|Topic e.g.: NCDDE|NCU840D.


"DEFAULT_NC" reads the settings from the file "MMC.INI".
The Command function is switched by clicking one of the 5 possibilities
LastError error messages are described in Section 11.7.

A-64

Siemens AG, 2004. All rights reserved


Motion Control Information System (FBR) 01.04 Edition

01.04

8.10.2

A Appendix

Connection status

Variable NcState
The server makes known the state of its connection to the CNC via its local
variable NcState. This variable exists immediately after the server has been
started. It differs from the other local variables of the server only by the fact that it
cannot be modified via the DDE interface.
The variable can have one of the following states:
Table 8-21 Values for the variable NcState

Value
0
1
2
3
4

8.10.3

Meaning
Normal operation
Some failed connections to CNC
All connections to CNC failed
Interpreting the startup file
Server initialization

Troubleshooting

Error acknowledgments by NCK


Error conditions such as lack of resources, access protection violations, incorrect
operating mode, etc., are reported by the NCK via acknowledgments. If the
NCDDE server cannot handle these error conditions, the corresponding
transactions Request, Peek and Execute for the DDE interface are terminated with
an error state, i.e. no result is obtained.

Variable LastError
A detailed diagnosis is provided by the variable LastError which has information
about the last transaction on a connection. It can be read via the Link Item
LastError. Once it has been read, the variable is set to zero. It always shows the
last error registered in the NCDDE server.
The LastError variable consists of 4 bytes, with each byte containing the following
error groups in descending order (high byte to low byte):
Higher-level error class, error source
Error area
Error class
Error code
The meaning of the individual error codes can be found in Section 11.7 under
NCDDE error messages.

Termination of connection to NCK


When the connection fails, the NCDDE server gives a negative acknowledgment to
active Request, Poke and Execute transactions. As long as the connection has not
been reestablished, the execution of further transactions is refused. At the same
time the server tries to resume connection with the NCK. The state of the
connection is indicated in the server's local variable NcState.

Siemens AG, 2004. All rights reserved


Motion Control Information System (FBR) 01.04 Edition

A-65

A Appendix

01.04

Handling Advise Links


If an Advise Link connection to the NCK has failed, the value returned by the
NCDDE server is the character #. Advise Links are restored on the NCK after the
connection has been reestablished.

Insufficient resources in the NCDDE server


If a lack of resources occurs in the NCDDE server, the corresponding DDE
interface transactions are terminated with an error code.

8.11

NCDDE server configurations for network access


...
for development purposes only

A-66

Siemens AG, 2004. All rights reserved


Motion Control Information System (FBR) 01.04 Edition

Anda mungkin juga menyukai