Você está na página 1de 8

Programme Debugging

18.1

Programme Debugging with the PLCTOOL Software Workshop

Refer to the document PLCTOOL - Ladder Language Programming Tool.

18.2

Debugging on the CNC

Resident utility 7 is used to manage the PLC application and the link with the PLCTOOL software workshop for file load/
unload.

18.2.1

Utility Access Procedure

Requirements

18

Utility 7 does not have any particular access requirements.


Actions
Select the utilities menu.

UTIL

The CNC UTILITIES menu is displayed.


Select the UTILITIES PRESENT menu.

A menu listing the utilities present in the CNC memory is displayed.


When the UTILITIES PRESENT menu is displayed, it is possible to choose the language in which the utilities will be
displayed.
Type A for English.

Or
Type F for French.

The menu is displayed in the language selected.


Select utility 7.

&

en-938846/6

18 - 3

Display of the main menu, PLC APPLICATION MANAGEMENT.

PLC APPLICATION MANAGEMENT


PLC operation
Monitor and %TS time profile
File management
I/O configuration
Software backup
Animation
- Enter a command (Exit X OFF) ../..

EXIT

Exit from the procedure


Enter the command.
Return to the AXES page.

18 - 4

en-938846/6

CTRL

S
X OFF

Programme Debugging

18.2.2

Monitoring CPU Operation

This function is used to display data concerning operation of the CPU.


Requirements
PLC APPLICATION MANAGEMENT menu displayed.
Actions

Type P for PLC operation.


Display of the PLC OPERATION Menu

18
PLC OPERATION
PLC status: RUNNING
(No error)
TF Activity:
(0-7)
0 0 0 0 0
(8-15) 0 0 0 0 0
TH Activity:
(0-7)
0 0 0 0 0
(8-15) 0 0 0 0 0

0
0

0
0

0
0

0
0

0
0

0
0

Reset saved variables


../..

EXIT

Exit from the Procedure


Press F11.

EXIT

Return to the PLC APPLICATION MANAGEMENT menu

en-938846/6

18 - 5

18.2.2.1

PLC Status

The PLC STATUS field gives information on the CPU status.


The comments that can be displayed in this area are detailed in the table below:
PLC RUNNING Status
Messages

Comment

No error

PLC function operating correctly

Bad I/O bus implementation

Cause:
Unidentified card present
Card missing
Discrepancy between programmed configuration and real
configuration
Watchdog programming error
Corrective action
Check the input/output configuration (see Sec. 18.2.5)
Check the state of %R97F.B (see Sec. 3.8.5)
Check %INI in the user programme (card and watchdog
configuration variables)

Erroneous I/O bus behaviour

Cause:
Link error on the bus
Corrective action
Check the state of bus status signal %Rrc39.B
(see Sec. 3.7.3)
Check the continuity of the fibre-optic ring
Contact NUM CUSTOMER SERVICE

PLC HALTED Status


Messages

Comment

Internal monitor fault

Cause:
Serious internal error
Corrective action
Contact NUM CUSTOMER SERVICE

Application time limit overrun

Cause:
RTC overrun (endless loop in a programme)
Corrective action
Correct the user programme

Unknown PLC error

Cause:
Serious internal error
Corrective action
Contact NUM CUSTOMER SERVICE

18 - 6

en-938846/6

Programme Debugging

Messages

Commentaire

Bad I/O bus configuration

Cause:
Unidentified card resent
Card missing
Discrepancy between programmed configuration and real
configuration
Watchdog programming error
Corrective action
Check the input/output configuration (see Sec. 18.2.5)
Check the state of %R97F.B (see Sec. 3.8.5)
Check %INI in the user programme (card and watchdog
configuration variables)

Erroneous I/O bus behaviour

Cause:
Link error on the bus
Corrective action
Check the state of bus status signal %Rrc39.B
(see Sec. 3.7.3)
Check the continuity of the fibre-optic ring
Contact NUM CUSTOMER SERVICE

Too many boards in I/O bus

Cause:
Too many inputs and outputs for the system
Corrective action
Decrease the number of inputs and outputs cards within the
authorised limits

When installing the customer code


Messages

Comment

Can't read the application

Cause:
Serious internal error
Corrective action
Contact NUM CUSTOMER SERVICE

Errors in module TSi / TFi / THi / SPi /


C code / ???

Cause:
Problems when loading (module too large, not enough space
in the local memory for loading the module)
Corrective action
Decrease the module size
Increase the local memory size
If ???, contact NUM CUSTOMER SERVICE

C module: duplicate export of a symbol

Cause:
Double export of symbols in a C module
Corrective action
Check and edit the C module

Duplicate definition of module TSi / TFi / THi / SPi / Cause:


C code / ???
A module with the same name is present twice in the
application
Corrective action
The user application modules must all have different names.
Correct the user application
If ???, contact NUM CUSTOMER SERVICE
en-938846/7

18 - 7

18

During execution of the user programme


A message is displayed on three lines.
Line 1:

Message text

Line 2:

Indicates the task involved: TSi/THi/TFi/INI

Line 3:

Indicates the module involved: Module: *.*[@ with respect to the module start
address] or Module: ??? [@ with respect to the start of the PLC monitor mapping].

REMARK

Relative addresses with respect to the module start address can only be used for C
modules (*.XCX). The *.MAP file of the C application gives these addresses.

Messages

Comment

User code: divide overflow

Cause
Overflow on a division
Corrective action
Check and edit the module involved
If ???, contact NUM CUSTOMER SERVICE

User code :
@ with respect to the monitor = Illegal address

Cause
Operation on a prohibited address
Corrective action
Check and edit the module involved
If ???, contact NUM CUSTOMER SERVICE

Messages

Comment

Inconsistent user code

Cause:
Use of incoherent functions or symbols in the user programme
User programme incoherent
Corrective action
Check and edit the module involved
If ???, contact NUM CUSTOMER SERVICE

18.2.2.2

Background Task Activity

The activity of the background tasks is displayed by 16 counters associated with tasks %TF0 to %TF15.
Whenever a background task has been totally or partially processed during an RTC cycle, the task counter is
incremented by one. This function is used to display tasks that are dormant, executing, the number of RTC cycles
required for execution of a task, etc.
18.2.2.3

Hardware Task Activity

The activity of the hardware tasks is displayed by 16 counters associated with tasks %TH0 to %TH15. Whenever a
hardware task has been processed, the counter is incremented by one.
18.2.2.4

CPU Command

The commands GO, STOP, and INIT are used to control the machine processor during user programme
debugging.

18 - 8

en-938846/7

Programme Debugging

Requirements
PLC OPERATION menu displayed.
Actions

Enter the selected command. (see table below)


Operation

Command

Comment

Start the machine processor

Type G
for Go

Watchdog set.
User programme runs.

Stop the machine processor

Type S
for Stop

Watchdog reset.
User programme stops.
The state HALTED is displayed on the
screen page.

System initialisation

Type I
for Init

Requires stopping the machine processor.


- Clears all errors,
- Initialises the inputs/outputs.

18

When dissassembling user code (check of function calls)


Messages

Comment

Unknown module name

Cause:
A pointer that was not correctly initialised in a C module has
destroyed a code area.
Corrective action
Identify the C module and make the necessary corrections.

Errors in module INI, TSi, TFi, THi, C code

Cause:
A pointer that was not correctly initialised in a C module has
destroyed a code area.
Corrective action
Identify the C module and make the necessary corrections.

When activating a function call check (PLCTOOL)


Messages

Comment

Illegal access address

Cause:
The address parameter of a Ladder or C function point to an
area other than a data area.
Corrective action
Edit the module involved and correct the function.

No more 512 authoritatives


zones address

Cause:
The application loaded contains more than 512 noncontinguous data areas.
Corrective action
Group the strings and constants so that they follow one
another contiguously.

en-938846/7

18 - 9

18.2.2.5

Resetting Saved Variables

This function is used to reset saved variables (%M).


Requirements
PLC OPERATION menu displayed.
Actions

Enter the command S

PLC OPERATION
PLC status: RUNNING
(No error)
TF Activity:
(0-7)
0 0 0 0 0
(8-15) 0 0 0 0 0
TH Activity:
(0-7)
0 0 0 0 0
(8-15) 0 0 0 0 0
Commands: GO / STOP / INIT
Reset saved variables

0
0

0
0

0
0

0
0

0
0

0
0

../..

EXIT

Enter the command R.

The message Are you sure? (Y/N) is displayed.


Confirm reset by entering Y.

or
Cancel reset by entering N.
Restart the PLC by the command Go.

Exit from the Procedure

Press F11.
Return to the PLC APPLICATION MANAGEMENT menu.

18 - 10

en-938846/6

EXIT

Você também pode gostar