Table of Contents
06/2005
Danaher Motion
ii Rev
E
M-SS-005-03
2. 5
C-FUNCTIONS...................................................................................................................40
2.5.1.
O
BJECT
F
ILES
....................................................................................................40
2.5.2.
P
ROTOTYPE
F
ILE
...............................................................................................41
2.5.3.
S
PECIAL
C
ONSIDERATIONS
...............................................................................44
2. 6
SEMAPHORES ...................................................................................................................45
2.6.1.
M
UTUAL
E
XCLUSION
S
EMAPHORES
.................................................................45
2.6.2.
S
YNCHRONIZATION
S
EMAPHORES
....................................................................46
2. 7
VIRTUAL ENTRY STATION...............................................................................................46
2. 8
OUTPUT REDIRECTION ..................................................................................................47
2. 9
FILE OPERATIONS ...........................................................................................................47
2.9.1.
OPEN
...............................................................................................................47
2.9.2.
OPEN #, INPUT #, CLOSE, LOC
................................................................48
2.9.3.
TELL
................................................................................................................48
2.9.4.
SEEK
................................................................................................................48
3.
PROJECT ...................................................................................................................................49
3. 1
PROJECT STRUCTURE ....................................................................................................49
3. 2
TASKS .................................................................................................................................49
3.2.1.
G
ENERAL
P
URPOSE
T
ASKS
...............................................................................49
3.2.2.
C
ONFIGURATION
T
ASK
.....................................................................................51
3.2.3.
A
UTO
E
XEC
T
ASK
..............................................................................................51
3. 3
PROGRAM DECLARATIONS............................................................................................52
3.3.1.
A
RRAYS
.............................................................................................................53
3. 4
MULTI-TASKING ...............................................................................................................55
3.4.1.
L
OADING THE
P
ROGRAM
...................................................................................57
3.4.2.
P
REEMPTIVE
M
ULTI
-
TASKING
& P
RIORITY
L
EVELS
........................................57
3.4.3.
I
NTER
-T
ASK
C
OMMUNICATIONS AND
C
ONTROL
..............................................57
3.4.4.
M
ONITORING
T
ASKS
F
ROM THE
T
ERMINAL
.....................................................59
3.4.5.
R
ELINQUISHING
R
ESOURCES
............................................................................59
3. 5
EVENT HANDLER .............................................................................................................60
3.5.1.
O
N
E
VENT
..........................................................................................................60
3.5.2.
E
VENT
O
N
..........................................................................................................61
3.5.3.
E
VENT
O
FF
.........................................................................................................61
3.5.4.
E
VENT
L
IST
........................................................................................................61
3.5.5.
E
VENT
D
ELETE
...................................................................................................61
3.5.6.
E
VENTS AT
S
TART
-
UP
.......................................................................................61
3.5.7.
P
ROGRAM
F
LOW AND
O
N
E
VENT
.....................................................................61
3. 6
SETTING UP AXES ............................................................................................................62
3.6.1.
A
XIS
D
EFINITION
...............................................................................................62
3.6.2.
A
XIS
N
AME
.......................................................................................................62
3.6.3.
D
RIVE
A
DDRESS
................................................................................................63