Deallocating Array Space; Input Of Data (Numeric And String-Serial Port Only); Input Of Data - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

Deallocating Array Space

Array space may be deallocated using the DA command followed by the array name. DA*[0]
deallocates all the arrays.
Input of Data (Numeric and String—Serial Port Only)

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.
Example- Inputting Numeric Data
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, lenA. (NOTE: Do not include a space between the comma at the end of the input message
and the variable name.)
Example- Cut-to-Length
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.
42 • Chapter 7 Application Programming
#A
IN "Enter Length",lenA
EN
Instruction
#BEGIN
AC 800000
DC 800000
SP 5000
len=3.4
#CUT
AI1
IN "enter Length(IN)", len
PR len *4000
BGA
AMA
SB1
WT100;CB1
JP #CUT
Interpretation
LABEL
Acceleration
Deceleration
Speed
Initial length in inches
Cut routine
Wait for start signal
Prompt operator for length in inches
Specify position in counts
Begin motion to move material
Wait for motion done
Set output to cut
Wait 100 msec, then turn off cutter
Repeat process
CDS-3310

Advertisement

Table of Contents
loading

Related Products for Galil Motion Control CDS-3310

Table of Contents