Download Print this page

Danfoss MCO 305 Design Manual page 82

Hide thumbs Also See for MCO 305:

Advertisement

MCO 305 Design Guide
Debugging
Development
Messages -> Log file can be used to start the logging of messages to a file. Note that "Stop
logging" will be enabled if logging has been started.
Click on Development
The line number and an error description are outputted to the communications window. The cursor is auto-
matically placed at the exact position of the syntax error and the program stops at this point.
The Syntax Check produces a debug file in addition to checking the syntax. This file will be called "temp.ad$".
Click on Development
compiled and a debug file is produced, the program is loaded into the FC 300 and all executable program
lines are marked by blue dots. Now, also the respective menu items are activated. Please see the section
Debugging on page 58 for more details.
Interrupts
In general there are four types of interrupts:
ON INT
ON PERIOD / ON TIME
ON COMBIT / ON STATBIT
ON PARAM
General Processing of Interrupt Procedures
After every internal APOSS command a query is made whether an interrupt event has occurred. It is impor-
tant to remember that with every internal APOSS command the compiler creates a command in APOSS
machine code.
Thus, for example, a simple command such as:
POSA (target + 1000)
is broken down into the following APOSS machine code:
MOVE target to register 101
MOVE immediate 1000 to register 102
ADDREG register 102 plus register 101 to register 101
POSA axis to register 101
Furthermore, for commands which take longer (such as DELAY or WAITAX) the program constantly checks
whether an interrupt event has occurred. If this is the case, the command is interrupted and continued once
the interrupt has been processed.
NB!:
Do not use WAITT in connection with interrupts since the waiting process starts again after the
interruption.
Use of Variables within Interrupt Procedures
The example above with the "APOSS machine code" clearly shows that it is necessary to use the utmost
testcare when assigning variables within interrupt procedures.
If, for example, in the main program the following assignment is made:
target = target + value - 1000
this is broken down into a series of APOSS machine code commands and the intermediate results are stored
in temporary registers. Only at the end of the sequence is the result stored in "target".
82
__ How to Program __
Syntax Check. The program will be aborted as soon as a faulty command is found.
Prepare Singlestep and the program opened is prepared for the debug mode: It is
Interrupt at the edges of an input
Interrupt after a certain period of time
Interrupt when Bit n is set
Interrupt when a parameter n is changed
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark

Advertisement

loading