Newsgroups: comp.robotics
Path: brunix!news.Brown.EDU!noc.near.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!usenet
From: a186430@moe.dseg.ti.com (Andrew Cilia)
Subject: Re: Stepper motor board/software
Message-ID: <C8EyD4.5qq@csc.ti.com>
Sender: usenet@csc.ti.com
Nntp-Posting-Host: s809.dseg.ti.com
Reply-To: a186430@moe.dseg.ti.com
Organization: Forest Lane Design Center
References: <9JUN199314090171@lims01.lerc.nasa.gov>
Date: Thu, 10 Jun 1993 16:12:39 GMT
Lines: 86


 Several people wrote asking about the programming of the StepControl board, 
so to give an example, I am posting a section of the script for one of the 
robotic arms that build the board; this arm takes the board from one of two 
landing areas, places it on the test connector, runs the test software, and 
puts it on one of two bins (pass and fail). The arm is a three degrees of 
freedom, with a gripper and various sensors; it uses two StepControl boards
to drive its steppers and the test connector actuators.

The lines with STEPPER script_name  direct the robot to execute a sequence of movements.
The lines with TESTSW board_no sensor_no    interrogate a particular sensor for
its state, returns an errorlevel=1 if the switch is closed.


rem        SCRIPT FOR ARM #2 (TESTING)

BEGIN:

rem        TAKE ARM TO HOME
STEPPER HOME

rem       VERIFY ARM POWERUP SEQUENCE
TESTSW 01 01
IF ERRORLEVEL=1 GOTO ERROR
TESTSW 01 02
IF ERRORLEVEL=1 GOTO ERROR
TESTSW 01 03
IF ERRORLEVEL=1 GOTO ERROR

rem       MAIN LOOP
MAIN:

rem       WAIT FOR BOARD TO ARRIVE, LANDING AREA 1
TESTSW 02 01
IF ERRORLEVEL=1 GOTO PICKUP1

rem       WAIT FOR BOARD TO ARRIVE, LANDING AREA 2
TESTSW 02 02
IF ERRORLEVEL=1 GOTO PICKUP2

GOTO MAIN

rem       GO PICKUP BOARD FROM AREA1
PICKUP1:
STEPPER PICK1
GOTO TESTIT

rem       GO PICKUP BOARD FROM AREA2
PICKUP2:
STEPPER PICK2

TESTIT:
rem       VERIFY BOARD IS ON TEST CONNECTOR
TESTSW 02 03
IF ERRORLEVEL=1 GOTO ERRORTC

rem       RUN TEST SOFTWARE
CALL TESTIT

rem       IF FAIL, TAKE TO REJECT BIN
IF ERRORLEVEL=1 GOTO REJECT

rem       IF PASS, TAKE TO PASS BIN
ECHO BOARD PASS.
STEPPER TOPASS

GOTO MAIN

REJECT:
ECHO BOARD FAILED !
STEPPER REJECT
GOTO MAIN


< Deleted error correction >


Take care,
 Andrew


-------------------------------------------------------------------------------
    Discl: My employer is not connected to Ciliatron in any way, I am!
-------------------------------------------------------------------------------


