98
•
Chapter 7 Application Programming
DMC-1500
JP #LOOP
Continually loop to make back and forth motion
EN
End main program
#COMINT Interrupt
Routine
CI0 Clear
interrupt
JP #STOP,P2CH="0"
Check for S (stop motion)
JP #PAUSE,P2CH="1"
Check for P (pause motion)
JP #RESUME,P2CH="2"
Check for R (resume motion)
EN1,1 Do
nothing
#STOP
Routine for stopping motion
STX;ZS;EN
Stop motion on X axis; Zero program stack; End Program
#PAUSE
Routine for pausing motion
RATE=_SPX
Save current speed setting of X axis motion
SPX=0
Set speed of X axis to zero (allows for pause)
EN1,1 Re-enable
trip-point
and communication interrupt
#RESUME
Routine for resuming motion
SPX=RATE
Set speed on X axis to original speed
EN1,1 Re-enable
trip-point
and communication interrupt
For additional information, see section
Mathematical and Functional Expressions
Mathematical Expressions
For manipulation of data, the DMC-1500 provides the use of the following mathematical operators:
Operator Function
+ Addition
- Subtraction
* Multiplication
/ Division
&
Logical And (Bit-wise)
|
Logical Or (On some computers, a solid vertical line appears as a broken line)
() Parenthesis
The numeric range for addition, subtraction and multiplication operations is +/-2,147,483,647.9999.
The precision for division is 1/65,000.
Mathematical operations are executed from left to right. Calculations within a parentheses have
precedence.
Examples of Mathematical Expressions
SPEED=7.5*V1/2
The variable, SPEED, is equal to 7.5 multiplied by V1 and divided by 2
COUNT=COUNT+2
The variable, COUNT, is equal to the current value plus 2.
RESULT=_TPX-(@COS[45]*40)
Puts the position of X - 28.28 in RESULT. 40 * cosine of 45
°
is 28.28
TEMP=@IN[1]&@IN[2]
TEMP is equal to 1 only if Input 1 and Input 2 are high
Содержание DMC-1510
Страница 6: ......
Страница 18: ...6 Chapter 1 Overview DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 88: ...76 Chapter 6 Programming Motion DMC 1500 Figure 6 7 Motion intervals in the Home sequence...
Страница 90: ...78 Chapter 6 Programming Motion DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 137: ...DMC 1500 Chapter 7 Application Programming 125 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 157: ...DMC 1500 Chapter 10 Theory of Operation 145 THIS PAGE LEFT BLANK INTENTIONALLY...
Страница 160: ...148 Appendices DMC 1500 Card Level Layout...
Страница 178: ...166 Appendices DMC 1500 ICM 1100 Drawing 1 3 4 0 0 4 4 0 2 4 0 7 0 0 4 5 3 7 0 5 7 0 2 8 5 1 0 0 1 0 1 0 7 0 1 0 0...
Страница 180: ...168 Appendices DMC 1500...
Страница 198: ...186 Appendices DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...