➄
Basic 6250 Features
73
COMPUMOTOR 6250 SERVO CONTROLLER
ACCESS RUN
Access menu: If you press the
GO-BACK
function key at the default menu (second
half), the 6250/RP240 will go back one additional level to the access menu. The
access menu allows entry of the user definable RP240 password (
DPASS
). At this
access menu level, only the run menu is allowed if the correct password has not
been entered. The default password is
6250
. If the password is modified with the
DPASS
command, the access menu then becomes the new default menu (the
password must then be entered to get to the original default menu).
Function Key
Description
ACCESS
Allows entry of the RP240 password
RUN
Go to the
RUN
menu
6250 REV: 92-013471-01-1.0 6250
DSP REV: 92-013472-01-1.0 DSP RP240
Rev display: If you press the
REV
function key at the default menu (second half),
the 6250/RP240 will display the current 6250 and DSP software revision levels.
Pressing the
RP240
function key displays the RP240 software revision level.
Confirm RESET
YES NO
Reset menu: Allows you to reset the 6250 (same as entering the
RESET
command).
Function Key
Description
YES
Perform reset of 6250
NO
Return to default menu (second half)
Host Computer Operation
Another choice for a user interface is to use a host computer and execute a motion program
using the RS-232C serial interface. A host computer may be used to run a motion program
interactively from a BASIC or C program (high-level program controls the 6250 and acts as a
user interface). A BASIC program example is provided below.
10 ' 6000 Series Serial Communication BASIC Routine
12 ' 6000.BAS
14 '
16 ' **************************************************************
18 '
20 ' This program will set the communications parameters for the
22 ' serial port on a PC to communicate with a 6000 series
24 ' stand-alone product.
26 '
28 ' **************************************************************
30 '
100 '*** open com port 1 at 9600 baud, no parity, 8 data bits, 1 stop bit
110 '*** activate Request to Send (RS), suppress Clear to Send (CS), suppress
120 '*** DATA set ready (DS), and suppress Carrier Detect (CD) ***
130 OPEN "COM1:9600,N,8,1,RS,CS,DS,CD" FOR RANDOM AS #1
140 '
150 '*** initialize variables ***
160 MOVE$ = "" ' *** commands to be sent to the product ***
170 RESPONSE$ = "" ' *** response from the product ***
180 POSITION$ = "" ' *** motor position reported ***
190 SETUP$ = "" ' *** setup commands ***
200 '
210 '*** format the screen and wait for the user to start the program ***
220 CLS : LOCATE 12, 20
230 PRINT "Press any key to start the program"
240 '
250 '*** wait for the user to press a key ***
260 PRESS$ = INKEY$
270 IF PRESS$ = "" THEN 260
280 CLS
290 '
300 '*** set a pre-defined move to make ***
310 SETUP$ = "ECHO1:ERRLVL0:LH0,0:"
320 MOVE$ = "A100,100:V2,2:D50000,50000:GO11:TPE:"
330 '
340 '
400 '*** send the commands to the product ***
410 PRINT #1, SETUP$
420 PRINT #1, MOVE$
430 '
500 '*** read the response from the TPE command ***
510 ' *** the controller will send a leading "+" or "-" in response to the TPE command to
520 ' *** indicate which direction the motor traveled. ***
530 WHILE (RESPONSE$ <> "+" AND RESPONSE$ <> "-") ' *** this loop waits for the "+"
540 RESPONSE$ = INPUT$(1, #1) ' *** or "-" characters to be returned
550 WEND ' *** before reading the position ***
560 '
570 WHILE (RESPONSE$ <> CHR$(13)) ' *** this loop reads one character at a time
580 POSITION$ = POSITION$ + RESPONSE$ ' *** from the serial buffer until a carriage
590 RESPONSE$ = INPUT$(1, #1) ' *** return is encountered ***
600 WEND
610 '
620 '*** print the response to the screen ***
630 LOCATE 12, 20: PRINT "Position is " + POSITION$
640 '
650 'END