DMC-1500
Chapter 7 Application Programming
•
115
Instruction Interpretation
V1=10 Assign
V1
V1= Return
V1
0000000010.0000
Response from controller with default format
V1={F4.2}
Specify local format
0010.00
Response from controller with new format
V1={$4.2}
Specify hex format
$000A.00
Response from controller in hexadecimal format
V1="ALPHA"
Assign string "ALPHA" to V1
V1={S4}
Specify string format first 4 characters
ALPH
Response from controller in string format
The local format is also used with the MG command.
Converting to User Units
Variables and arithmetic operations make it easy to input data in desired user units such as inches or
RPM.
The DMC-1500 position parameters such as PR, PA and VP have units of quadrature counts. Speed
parameters such as SP, JG and VS have units of counts/sec. Acceleration parameters such as AC, DC,
VA and VD have units of counts/sec2. The controller interprets time in milliseconds.
All input parameters must be converted into these units. For example, an operator can be prompted to
input a number in revolutions. A program could be used such that the input number is converted into
counts by multiplying it by the number of counts/revolution.
Example - Converting to User Units
Instruction Interpretation
#RUN Label
IN "ENTER # OF REVOLUTIONS",N1
Prompt for revs
PR N1*2000
Convert to counts
IN "ENTER SPEED IN RPM",S1
Prompt for RPMs
SP S1*2000/60
Convert to counts/sec
IN "ENTER ACCEL IN RAD/SEC2",A1
Prompt for ACCEL
AC A1*2000/(2*3.14)
Convert to counts/sec2
BG Begin
motion
EN End
program
Programmable Hardware I/O
Digital Outputs
The DMC-1500 has an 8-bit uncommitted output port for controlling external events. The DMC-1580
has an additional eight output bits available at JD5 pins 10-17. Each bit on the output port may be set
and cleared with the software instructions SB (Set Bit) and CB(Clear Bit), or OB (define output bit).
Содержание 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...