Download Print this page

Danfoss MCO 305 Design Manual page 80

Hide thumbs Also See for MCO 305:

Advertisement

MCO 305 Design Guide
Next step is initializing: setting parameters, flags,
and variables. For example:
Followed by the main program loop:
main:
...
GOTO main
Sub program areas are defined as follows:
SUBMAINPROG
SUBPROG name
...
RETURN
ENDPROG
Sequential Command Processing
In general a command is processed to the end before a new command is begun. This means that for
position commands the program waits until the target position has been reached.
Exception: If NOWAIT has been set to ON.
Command Run Times
Timing of the GETVLT and SETVLT commands is dependent on the reading and writing capability of the
FC 300. The GETVLT commands are typically 20 ms or faster. The SETVLT command can be rather slow and
timing depends on what is going on in the FC 300.
It is not possible to give a maximum time for a read or write command concerning FC 300 parameters. (It
may take up to 100, or 500 ms, or even more.)
If the command execution times are critical in an application it is possible to measure the run times of a
command sequence under the different operating conditions using the command TIME.
80
__ How to Program __
SET POSERR 100000000
SET 1990 10000
SETVLT 205 50
offset = 0
sync_flag = 0
VEL 100
ACC 100
DEC 100
main:
IF (IN 3 == 1) THEN
/* Go into synchronizing mode, if input 3 = 1 */
ELSE
GOTO main
SUBMAINPROG
ENDPROG
®
MG.33.L4.02 – VLT
is a registered Danfoss trademark
// Parameters
// Flags/variables
// System parameters
GOSUB syncprog
/* If input 3 not = 1, run in speed mode */
GOSUB speedprog
SUBPROG syncprog
IF (sync_flag == 0) THEN
/* synchronize, if not already synchronized */
SYNCP
sync_flag = 1
ENDIF
RETURN
SUBPROG errhandle
WAITI 18 on
/* waiting for digital input 18, clear the error */
sync_flag = 0
ERRCLR
RETURN

Advertisement

loading