![Galil Motion Control DMC-42 0 Series User Manual Download Page 139](http://html1.mh-extra.com/html/galil-motion-control/dmc-42-0-series/dmc-42-0-series_user-manual_3267467139.webp)
Instruction
Interpretation
v1=10
Assign v1
v1=
Return v1
:0000000010.0000
Default Format
v1={F4.2}
Specify local format
:0010.00
New format
v1={$4.2}
Specify hex format
:$000A.00
Hex value
v1="ALPHA"
Assign string "ALPHA" to v1
v1={S4}
Specify string format first 4 characters
:ALPH
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-42x0 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.
Instruction
Interpretation
#RUN
Label
MG "ENTER # OF REVOLUTIONS";n1=-1
Prompt for revs
#rev;JP#rev,n1=-1
Wait until user enters new value for n1
PR n1*2000
Convert to counts
MG "ENTER SPEED IN RPM";s1=-1
Prompt for RPMs
#spd;JP#spd,s1=-1
Wait for user to enter new value for s1
SP s1*2000/60
Convert to counts/sec
MG "ENTER ACCEL IN RAD/SEC2";a1=-1
Prompt for ACCEL
#acc;JP#acc,a1=-1
Wait for user to enter new value for a1
AC a1*2000/(2*3.14)
Convert to counts/sec2
BG
Begin motion
EN
End program
Hardware I/O
Digital Outputs
The DMC-42x0 has an 8-bit uncommitted output port and an additional 32 I/O which may be configured as inputs
or outputs with the CO command for controlling external events. The DMC-4250 through DMC-4280 has an
additional 8 outputs. 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).
Example- Set Bit and Clear Bit
Instruction
Interpretation
SB6
Sets bit 6 of output port
CB4
Clears bit 4 of output port
Chapter 7 Application Programming ▫ 135
DMC-42x0 User Manual
Summary of Contents for DMC-42 0 Series
Page 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...
Page 205: ...CB 50 100 Drawings Appendices 201 DMC 42x0 User Manual...
Page 206: ...Appendices 202 DMC 42x0 User Manual...
Page 207: ...Appendices 203 DMC 42x0 User Manual...
Page 208: ...Appendices 204 DMC 42x0 User Manual...
Page 209: ...Appendices 205 DMC 42x0 User Manual...
Page 210: ...Appendices 206 DMC 42x0 User Manual...
Page 211: ...Appendices 207 DMC 42x0 User Manual...
Page 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...