X POS[N]=
Print X position
Y POS[N]=
Print Y position
XERR[N]=
Print X error
YERR[N]=
Print Y error
N=N+1
Increment Counter
#DONE
Done
EN
End Program
De-allocating Array Space
Array space may be de-allocated using the DA command followed by the array name. DA*[0] deallocates all the
arrays.
Input of Data (Numeric and String)
Input of Data
The command, IN, is used to prompt the user to input numeric or string data. Using the IN command, the user may
specify a message prompt by placing a message in quotations. When the controller executes an IN command, the
controller will wait for the input of data. The input data is assigned to the specified variable or array element.
An Example for Inputting Numeric Data
#A
IN
“
Enter Length
”
, lenX
EN
In this example, the message “Enter Length” is displayed on the computer screen. The controller waits for the
operator to enter a value. The operator enters the numeric value which is assigned to the variable, lenX.
Cut-to-Length Example
In this example, a length of material is to be advanced a specified distance. When the motion is complete, a cutting
head is activated to cut the material. The length is variable, and the operator is prompted to input it in inches. Motion
starts with a start button which is connected to input 1.
The load is coupled with a 2 pitch lead screw. A 2000 count/rev encoder is on the motor, resulting in a resolution of
4000 counts/inch. The program below uses the variable len, to length. The IN command is used to prompt the
operator to enter the length, and the entered value is assigned to the variable len.
#BEGIN
LABEL
AC 800000
Acceleration
DC 800000
Deceleration
SP 5000
Speed
len=3.4
Initial length in inches
#CUT
Cut routine
AI1
Wait for start signal
IN
“
enter Length(IN)
”
, len
Prompt operator for length in inches
PR len *4000
Specify position in counts
BGX
Begin motion to move material
AMX
Wait for motion done
SB1
Set output to cut
WT100;CB1
Wait 100 msec, then turn off cutter
JP #CUT
Repeat process
Chapter 7 Application Programming
•
157
DMC-40x0 User Manual
Содержание DMC-4040
Страница 17: ...DMC 4080 Layout Figure 2 2 Outline of the of the DMC 4080 DMC 40x0 User Manual Chapter 2 Getting Started 8...
Страница 19: ...DMC 4040 Dimensions Figure 2 5 Dimensions of DMC 4040 DMC 40x0 User Manual Chapter 2 Getting Started 10...
Страница 20: ...DMC 4080 Dimensions Figure 2 6 Dimensions of DMC 4080 Chapter 2 Getting Started 11 DMC 40x0 User Manual...
Страница 54: ...Chapter 3 Connecting Hardware 45 DMC 40x0 User Manual...
Страница 55: ...DMC 40x0 User Manual Chapter 3 Connecting Hardware 46...
Страница 56: ...Chapter 3 Connecting Hardware 47 DMC 40x0 User Manual...
Страница 73: ...Figure 4 1 GalilTools DMC 40x0 User Manual Chapter 4 Software Tools and Communication 64...
Страница 185: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 7 Application Programming 176...
Страница 205: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 10 Theory of Operation 196...
Страница 220: ...Step 2 Remove ICM For DMC 4040 Proceed to Step 3 Configure Circuit Appendices 211 DMC 40x0 User Manual...
Страница 222: ...Step 2 Remove ICM s Appendices 213 DMC 40x0 User Manual...
Страница 232: ...DMC 4080 Steps 4 and 5 Step 4 Replace ICM s Appendices 223 DMC 40x0 User Manual...