Home
Paper - Asee peer logo
Contents
1. BEQ STAA BRA SAMEU3 LDAA CMPA BEQ STAA BRA RTIEND RTI NTSAME LDAA JSR LDAA JSR LDAB RTILOOP PSHB LDD LSRD STD PULB BCS LDAA TFLG2 40 TFLG2 FLAG RTIEND READINP U3 LASTUS3 SAMEU3 LASTU3 NTSAME UA LASTUA RTIEND LASTUA NTSAME PI OUTPUT OUTPUT 16 UA UA OUT 1 0 Point X to Buffer Area First Zero Flag RTI Permission to READINP Go Get a Character Store the Character in Buffer Point to Next Buffer Char Was Char a RETURN If RETURN Char then Finish Past End of Buffer If Not Excessive Length Loop End Permission READINP to RTI Too Many Characters ERROR End Permission for RTI READ Repoint X to Start of Buffer Load a Buffer Character Point to Next Buff Character Is the Operation a READ If Not a READ then Try WRITE This is a READ Operation Was the Operation a WRITE If a WRITE then Go There It was Not a R or W Get the Flags Set to Clear RTIF Flag Clear Flag Test RTI Permission Flag If FLAG 0 then RTI Read U4 U3 Look at U3 Is U3 Same as Last Time If Same Branch If Not Same then Make Equal Branch to Not Same Part Look at U4 Is it the Same as Before If Same End RTI Store New U4 to Last U4 Something Changed End RTI Beginning of Response Send it Get the for the Response Send it There are 16 Lines to Read Save B Get Both U4 and U3 Shift Right into Carry CY Store Back the Double Byte Restore B If CY 1 then Branch CY Must
2. Have been a Zero Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education Ol vZOL 6 abed JSR OUTPUT Send Loaded 0 to Host BRA BTLP Continue to RDAL1 OUT 1 LDAA 1 CY 1 So Send a 1 to Host JSR OUTPUT Send the 1 BTLP DECB Count down the 16 Bits BNE RTILOOP If Not Zero Yet then Do Again LDAA CRETN Load a RETURN lt CR gt JSR OUTPUT Send CR RTI KKK KKK KK He He He KK RAK KK RK KK RRA KK RRA ko kc RRA KK ke k k k kk ke ke ke KKK k k k k kkk kk k k k k k SUBROUTINES x x k k k k k k k X KKK KKK kk He He He He He ehe kk ke H He kk ke ek ko kk k He He He He e e ke kc ke k k ke ko kc ke ke ke keke kk k k k k kkk k ORG D000 This program module is used to allow the Host Computer to write to the Robots It is executed when a W Character is found as the first element in the IBUFF WRITE LDAA 0 X Get Next Character INX Point to Next Character CMPA Is the Character a BNE WRT1 If Not a Write All then Brch JMP WRTALL A Write All Command WRT1 CMPA A Check Lower Range BHS WRT2 A or Higher is OK JMP ERROR Below A is Not OK WRT2 CMPA D Check for the D Computer BLS WRT3 D or Less Is OK JMP ERROR Above D is Not OK WRT3 STAA COMPT Put A D in COMPT Location LDAA 0 X Get Next Character INX Point to Next Buffer Element WRT4 CMPA 1 Channel 1 4 Compare to 1 BHS WRT5
3. of multiple controllers where the combined operation of the robots can be brought to a simple software level using an easy to learn control language To do this requires a small degree of both rudimentary hardware and assembly language microcontroller software RSAIDS represents a model which can be modified as needed to meet these minimal requirements Sample software and hardware interfacing schematics are provided in Appendix A as a final design or a base for further development RSAIDS Communications with Host The hardware for support of the RSAIDS software functions can be virtually any of the readily available prototype board systems that support the Motorola MC86HC11 family of microcontrollers Most of the industry s available board systems for these widely utilized MCUs have built in RS 232C ports Also these board systems have most if not all of their pins made available for interface to user developed I O devices Schematics are provided in Appendix A showing a suggested approach to both input and output interfacing This interface hardware is all that is needed to connect the basic MCU to the robot controller logic Both of these circuits can be implemented via a printed circuit board or using wire wrap technology Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education c v40L 6 oBeg The RSAIDS built in RS 232C serial inter
4. 1 or More is OK JMP ERROR ERROR if Below 1 WRT5 CMPA 4 Compare to 4 BLS WRT6 4 or Less is OK JMP ERROR ERROR if Above 4 WRT6 STAA CHANL Record Channel Value for Later LDAA 0 X Get Next Buffer Element INX Point to Next Buffer Element CMPA L Is it a LOW BEQ WRGOOD LOW is OK CMPA H Is it a HIGH BEQ WRGOOD HIGH is OK JMP ERROR Not HIGH or LOW WRGOOD STAA HILOW Store as H or L JSR POSIT Make DC_MSK and BA_MSK LDAA HILOW Get HILOW H or L CMPA L Is HILOW L BEQ MKLOW If So then Make Bit LOW MKHIGH LDAA DC_MSK HILOW Must have Been H ORAA DC_BYT Make Bit High STAA DC_BYT Store Back in DC_BYT LDAA BA_MSK Get B amp A Mask Byte Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education LL 7ZOL 6 abed ORAA BA_BYT Make Bit High STAA BA_BYT Store Back in BA BYT BRA WRTIT Go Write It MKLOW LDAA DC MSK Get DC Mask Byte COMA Make 1 s Compliment ANDA DC BYT Make Bit Zero STAA DC BYT Store Back LDAA BA MSK Load Next Bit Mask COMA 1 s Compliment ANDA BA BYT Make Bit LOW STAA BA BYT Store it Back WRTIT COMA Compliment Before Output STAA PORTC Put BA BYT to PORTC BSR STB BA Strobe PORTC to ul LDAA DC BYT Load Next Byte COMA Compliment Before Output STAA PORTC Store it to PORTC BSR STB DC Strobe PORTC to u2 JSR WRT BUF Original Command to Host JMP BEGNLP Finished Echoing Input Back This routine
5. BASIC Pascal C C or Assembly language It is the desire of the authors to see a universal package written perhaps in Visual BASIC that will provide a simple visual interface for the user Considerations for such software either as a platform or just a simple program created by the user must include several major considerations First Write Commands require as long as 20mS from the time that a command is sent to the RSAIDS unit before the actual lines are pulled high or low on the controllers Returning information such as the command itself that was issued or data from controller outputs error messages etc must be input into the host language to obtain the full features of the RSAIDS unit This too takes up to 20mS Each character send serially takes about 1 2mS on average to go to from the host computer Changes in the outputs from the controllers issue a command in the form of I XXXNXXXNXXXNXXXNK lt CR gt as explained above This data string will require capture and interpretation to analyze what bit or bits have changed For this type of capture an Event Driven software will prove to be far superior to languages that have to Poll the host input status with the R lt CR gt command Commands can be given too fast from a fast host For example if you need a low to high to low pulse sent to input number 1 on a certain controller Data have been lost in this process because the host language sent the commands too fast for the RSAIDS to c
6. Session 2260 Robotics Synchronization And Information Distribution System RSAIDS Gary R Boucher Reza Sanati Mehrizy Associate Professor Associate Professor gboucher pilot lsus edu sanatire uvsc edu Alfered L McKinney Afsaneh Minaie Professor Associate Professor amckinney pilot lsus edu minaieaf uvsc edu College of Sciences School of Computer Science and Louisiana State University in Engineering Shreveport Utah Valley State College Shreveport LA 71115 Orem Utah 84058 Abstract Since our schools do not offer an engineering program we teach robotic technology within our computer science curriculum In the process of teaching robotics technology to students at a graduate or undergraduate level it becomes necessary to synchronize more than one robotic arm for the purpose of demonstrating the interaction between robots commonly found in industrial settings There are several approaches to doing this The simplest approach is to connect the two machines with hard wiring This requires the operator to connect outputs of one machine to the inputs of another Perhaps the reverse will be also necessary in connecting the outputs of the second robotic controller to the first Another method of synchronization involves the use of expensive industrial quality programmed controllers using ladder logic to evoke responses from the affected robots based on certain inputs Most Computer Science and Computer Technology students are not familiar with such
7. TAA LDAA ORAA STAA CLR CLI STACK S50C PORTD DDRD S0C DDRD PORTA PORTC DDRC 60 PORTA PORTA DDRC DC_BYT BA_BYT READINP U4 LASTU4 U3 LASTU3 RTISER 00EC PACTL 03 PACTL TMSK2 40 TMSK2 TFLG2 40 TFLG2 FLAG Set the Stack Pointer Set PD2 and PD3 to High Store in PORTD Get Data Dir for D Make PD2 and PD3 Output Store New Directions A 00 Strobes to Zero A FF Port C to Zeros Make All Pins on C Output Strobe Mask for A Make PA5 and PA6 High Clear Strobes for Output PORTC is now Input Only Output Status Bytes Get Initial Values Make Last the Latest Make Last the Latest Address of RTI Service Rewrite Vector for RTI RTI Control Register Make RTI 32mS Store it Back Set RTII to 1 Mask Needed Store it Back Get RTI RTIF Flag Clear it Store it Back RTI Permission Flag Allow Interrupts RTI Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education 6 40L 6 oBeg Beginning of Program Loop BEGNLP LDX CLR INC ILOOP JSR STAA INX CMPA BEQ CPX BNE CLR JMP FNLOOP CLR LDX LDAA INX CMPA BNE JMP NOTRD CMPA BNE JMP BADW JMP IBUFF FLAG FLAG SCINPUT 0 X 0D FNLOOP IBUFF 20 ILOOP FLAG ERROR FLAG IBUFF 0 X R NOTRD READ W BADW WRITE ERROR RTI Service Routine RTISER LDAA ORAA STAA TST BEQ JSR LDAA CMPA
8. acter Read All Channels If Not a then Branch Otherwise Read All Check Lower Range A or Higher is OK Below A is Not OK Check for the D Computer D or Less is OK Above D is Not OK Put A D in COMPT Location Get Next Character Point to Next Buffer Element Channel 1 4 Compare to 1 1 or More is OK ERROR if Below 1 Compare to 4 4 or Less is OK ERROR if Above 4 Record Channel Value for Later Load Contents into U3 and U4 Make DC MSK and BA MSK Get Mask Byte And with DC Memory Location Store May or May not have a 1 Get BA Mask Byte AND it with U3 s Data U3 or U4 May Have a 1 Test A for Setting Flags Go Load a Zero Load the 1 Go Send a 1 Load the 0 Go Write it as a Response Do the Whole Thing Over module is activated by an input of R followed The successful response to the Host is Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education vLv40L 6 abed R 00010110100101110101 where the left most 0 is A1 and the right most 1 is D4 RDALL LDAA R Get the R for the Response JSR OUTPUT Send it LDAA Get the for the Response JSR OUTPUT Send it JSR READINP Go Read Input into CD_BYT BA_BYT LDAB 16 There are 16 Lines to Read RDALOOP PSHA Store A and B PSHB LDD U4 Get Both U4 and U3 LSRD Shift Right into Carry CY STD U4 Store Back the D
9. apture them serially and respond Delay routines are needed in some cases to allow the programmer to first send the command to go High and wait for a prescribed number of milli seconds before the line is pulled Low again Likewise the controller can output data high and then low fast enough that the RSAIDS can not catch either or both of the transitions Considerations vary from one host computer to another and from one type of host software to another Perhaps in the future an enterprising student will obtain a Special Problems credit for designing a host software user friendly platform for this application Results and Conclusions The capability of the RSAIDS unit has been demonstrated with the use of multiple SCORBOT ER Vplus robot arms and a controller operated turntable Microsoft Visual Basic was used to send and receive commands to the RSAIDS unit This proved viable but the Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education G vZ0l 6 oDeq conclusion of both faculty and senior level student programmers was that any viable software program capable of sending and receiving via the RS 232C serial port should be usable The fact that Visual Basic is an event driven language allows for a great deal of latitude in asynchronously generated events From the above facts and personal experience with the use of the RSAIDS unit it was jud
10. controllers but do possess a well based knowledge of several computer languages The third approach and the topic for the RSAIDS approach is to use a microprocessor to control the synchronization of the robotic arms The main problem with this third approach is the fact that microcontrollers or microprocessors such as the MC68HC11 series used in the RSAIDS are difficult to program in assembly language without prior experience Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education L F40L 6 ebed The RSAIDS which we have developed has an assembly language program that translates signals between the robotic controllers and a Host computer The RSAIDS is capable of synchronizing several robotic arms using a single Host computer All that is necessary for communications between the host and the separate controllers is the knowledge of a primitive set of communications instructions understood by the RSAIDS unit This unit has been designed and constructed for around 100 00 This paper elaborates the design construction and application of RSAIDS in details including hardware and software requirements in details Communications with Robot Arm Controllers There are two main methods for input and output of information to most robotic controllers There exists a serial channel associated with the controllers which allows data input and outpu
11. e of Output LDAB 16 After There are 16 0 s or 1 s WRLOOP LDAA 0 X Get The First O or 1 INX Point to Next Char in Buffer CMPA X Don t Care Operator BEQ BIT_OK Don t Care is OK CMPA 0 Is the Char a 0 BEQ BIT OK If So it is OK CMPA 1 Is the Char a 1 BEQ BIT OK If So it is OK JMP ERROR A Char was NOT 0 or 1 BIT OK PSHA Save A amp B for Later PSHB XGDY Exchange D and Y LSRD Shift Output Info into CY BCS BMB1 If CY 1 Set XBIT 01 CLR XBIT If Current Data 0 then XBIT 0 BRA XFOUND Finished with XBIT Determine BMB1 CLR XBIT XBIT 1 Start With XBIT 0 INC XBIT XBIT 1 XFOUND XGDY Current Data Back in Y PULB Restore A amp B PULA CMPA X Was it a Don t Care BNE NOTANX If NOT an X Branch LDAA XBIT Was an X Look at XBIT NOTANX RORA Right Most Bit of ASCII into CY ROR DC BYT CY Into MSD of DC BYT ROR BA BYT LSB of DC BYT Into MSD of BA BYT DECB One Char Processed Decr B BNE WRLOOP Branch if B Not Zero Get Another LDAA 0 X Check for RETURN at End CMPA 0D Is it a RETURN lt CR gt BEQ WROK If so GOOD Finish JMP ERROR Was Not a RETURN at End Bad WROK LDAA DC_BYT Get Loaded Byte for D amp C COMA Compliment STAA PORTC Send it to Port C JSR STB_DC Strobe it Out LDAA BA_BYT Get BA Byte COMA Compliment STAA PORTC Send it to Port C JSR STB_BA Strobe it Out JSR WRT_BUF Success Write the Command to Host JMP BEGNLP Do it All Over Again This subroutine writes out the contents of the input buff
12. ection for C DDRD EQU 1009 Data Direction for D BAUD EQU 102B Baud Register 9600 SCCR2 EQU 102D SCI Control Register 2 PACTL EQU 1026 For A7 direction OPTION EQU 1039 Option Register RTIVECT EQU 00EB RTI Vector Location TMSK2 EQU 1024 RTI Enable Bit TFLG2 EQU 1025 RTI Flag Bit Register OUTPUT EQU SFFAF Send Byte Out INPUT EQU SFFAC Input Char or 0 STACK EQU SO1FF Stack Pointer BUFFALO EQU E000 Buffalo s Starting Location CRETN EQU 0D Carriage Return ORG 0000 Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education 9 v40L 6 oDeq RAM Variables Section FLAG IBUFF COMPT CHANL HILOW DC BYT BA BYT DC MSK BA MSK U4 U3 LASTU4 LASTU3 XBIT RMB ORG 1 20 1 1 1 1 1 1 1 1 1 1 1 1 B600 Indicator for RTI System Input Buffer for Commands Computer Designator A D Channel 1 4 High Low for Writing H L Byte for D amp C Output Byte for A amp B Output Mask Byte for R W on D amp C Mask Byte for R W on B amp A Tri State Data Read Tri State Data Read U4 s Contents On Last Read U3 s Contents On Last Read Used With Don t Care States This Subroutine does an Init to the System INIT LDS LDAA STAA LDAA ORAA STAA CLRA STAA COMA STAA STAA LDAA STAA CLR CLR CLR CLR JSR LDAA STAA LDAA STAA LDD STD LDAA ORAA STAA LDAA ORAA S
13. er after a successful command execution WRT BUF LDX IBUFF Point X to Start of Buff WREPLY LDAA 0 X Get Byte from Buffer JSR OUTPUT Send it to Host Computer Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education ElL vZOL 6 abed CMPA BEQ INX BRA WEIN RTS SCINPUT JSR TSTA BEQ RTS 0D WFIN WREPLY INPUT SCINPUT Was the Byte a RETURN If Last Byte Sent a RETURN Point to Next Buffer Element Do it Again This subroutine reads a char from INPUT in BUFFALO If there is no char then INPUT returns a zero which causes this sub to loop and look for a non zero character The execution stays here till a character is entered Buffalo Input Was there an Input If No Input Branch Finished This is the read module of the program This is both for single reads and Read Alls READ LDAA INX CMPA BNE JMP RD1 CMPA BHS JMP RD2 CMPA BLS JMP RD3 STAA LDAA INX RD4 CMPA BHS JMP RD5 CMPA BLS JMP RD6 STAA JSR JSR LDAA ANDA STAA LDAA ANDA ADDA TSTA BEQ LDAA BRA RZRO LDAA RD7 JSR JMP This program by a RETURN 0 X RD1 RDALL A RD2 ERROR D RD3 ERROR COMPT 0 X 1 RD5 ERROR 4 RD6 ERROR CHANL READINP POSIT DC_MSK U4 U4 BA MSK U3 U4 RZRO 1 RD7 0 RETURN BEGNLP Get Next Character Point to Next Char
14. face is connected directly or with the use of a null modem to the host computer s serial adapter usually on COMI or COM2 Most computers come with this capability via a male DB 9 connector on the back panel Some newer computers without built in RS 232C capability may require a Universal Serial Bus USB adapter to convert to the serial protocol The RSAIDS unit is setup to communicate at a fixed 9600 Baud This can be changed but only by those experienced in communications with the Motorola BUFFALO Monitor system found in the MC68HC711E9 processor chip on the RSAIDS Faster speeds should consider the serial cable length and the possibility of data corruption seen with fast baud rates and long cabling The protocol for transmission via the RSAIDS is 8 bit no parity with one stop bit This is standard for most modern communication applications Hardware Connection to Controllers Although numerous configurations may exist for interfacing the RSAIDS unit to the robot controllers the prototype used two inexpensive and readily available DB 25 connectors to carry the I O logic lines to and from the enclosure housing the unit Each DB 25 can be the connection point for several multiple wire cables going to the robot controllers It is suggested that these cables use breakout boxes at their ends to facilitate connection to the controllers Pins are provided on the controllers for screw terminal connection It should be noted that active low input outp
15. ged by the investigators to be a successful tool for student application to real time robotics control Availability of Technical Information The authors possess assembly language listings files and other technical materials which can be disseminated freely to those interested in development of their own RSAIDS or similar unit The authors welcome inquiries and requests Bibliography 1 Motorola Inc MC68HC11 Reference Manual Motorola Inc 1991 2 Eshed Robotec Ltd ACL Advanced Control Language Reference Guide for Controller A 4th Edition January 1995 3 Eshed Robotec Ltd SCORBOT ER Vplus User s Manual 3rd Edition pp 3 5 through 3 10 February 1996 4 Barry B Brey Microprocessors and Peripherals Hardware Software Interfacing and Applications Second Edition Merrill Publishing Company Columbus Ohio page 272 1988 Biography Reza Sanati Mehrizy is an associate professor of the Computing and Networking Sciences Dept at Utah Valley State College Orem Utah He received his MS and PhD in Computer Science from University of Oklahoma Norman Oklahoma His research focuses on diverse areas such as Database Design Data Structures Artificial Intelligence Robotics and Computer Integrated Manufacturing Afsanaeh Minaie is an assistant professor in the Computing and Networking Sciences Department at Utah Valley State College She received a B S M S and Ph D all in Electrical Engineering from Univers
16. h the lt CR gt character the RSAIDS is ready for use There are four types of commands that can be sent from the host to the RSAIDS These are listed below Write Single Output Shown by Example WB2H lt CR gt This Writes from the Host to controller B s input 2 a logic High Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education 0L 6 eed WA3L lt CR gt This Writes from the Host to controller A s input 3 a logic Low If the above commands are of the correct syntax they will be echoed back including the lt CR gt at the end If not accepted the echo back to the host computer will be E lt CR gt for Error Read Single Input Shown by Example RC1 lt CR gt This is a command to Read output 5 from controller C RA3 lt CR gt This requests a Read of output 7 from controller A If the command was accepted the return will bea X lt CR gt where X is either a 0 ora 1 If the command was not accepted the return will be E lt CR gt Write All Shown by Example W 1011001001011101 lt CR gt This writes all outputs at the same time The first 1 following the is for controller A s input 1 The next bit a 0 goes to controller A s input 2 The fifth bit from the is a 0 which sends a Logic Low to controller B s input number 1 The right most bit a 1 writes a logic High to controller D s input bit numbe
17. ity of Oklahoma in 1981 1984 and 1989 respectively Her current interests are in computer architecture digital design and computer interfacing Alfred L McKinney is professor of Computer Science at Centenary College of Louisiana He received a B S in 1959 and a M S in 1961 from Louisiana Tech University and a Ph D in Mathematics from University of Oklahoma in 1972 Gary R Boucher is an associate professor of physics at Louisiana State University in Shreveport He received a B S M S and Ph D in Engineering from Louisiana Tech University Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education 9 7Z01 6 oBeg Appendix A MC68HC711E9 MCU Note 5 Volt Power and Ground to All ICs 74AHCT244 n gt ED E gt a 2 E E E Er E gt e E gt Eo E p To Serial Interface RSAIDS Basic MCU Input System Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education L F10L 6 e6eg MC68HC711E9 a z o 2 o 4 o a 2 3 o CA2 C02 Note 5 Volt Power and Ground to All ICs To Serial Interface RSAIDS Basic MCU Output System RSAIDS ASM OPT c Equates Section PORTA EQU 1000 Port A PORTC EQU 1003 Port C PORTD EQU 1008 Port D DDRC EQU 1007 Data Dir
18. ons Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education GL v40L 6 ebed POSIT LDAA COMPT Computer A D SUBA A Computer A 0 B 1 C 2 D 3 LSLA Multiply A By 4 LSLA LDAB CHANL Load Channel Byte 1 gt 4 SUBB 1 Channel 1 0 2 1 3 2 4 3 ABA A Now has Number of Mask Shifts TAB B Now has Mask Shifts LDY 0000 Zero Y ABY Y has of Mask Shifts CLRA Zero D CLRB INCB D 0001 SHIFTS CPY 0 Is Y 0000 BEQ EDSHF If Y 0 then Finished here LSLD If Y lt gt 0 then Shift D Mask Left DEY Decrement Y BRA SHIFTS Do Again Till Y Zero EDSHF STD DC MSK Store D in DC MSK and BA MSK RTS Subroutine to send whatever is in A to the Host Computer followed by a Carriage Return only RETURN JSR OUTPUT Send the Character LDAA S0D Carriage RETURN JSR OUTPUT Send CR RTS This is a catch all for all errors This is not a subroutine but a common program segment After any error the program vectors back to BEGNLP where another command is processed ERROR LDAA E Error Indicator to be Returned JSR RETURN Send It JMP BEGNLP Do It Again Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education 9L 7Z0L 6 abed
19. onstantly If there is any change in any controller output the RSAIDS sends a response to the host This Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education vv10L 6 abed response is in the form of the serial string I XXXNXXXNXXXNXXXNK lt CR gt which is received by the host Thus each time one or more controller outputs change the host sees the change without polling the RSAIDS Ifa certain controller output goes High and then Low the I type string will be sent twice to the host once when the line goes High and the other when the line falls Low The X characters represent controller output Al through D3 The N characters represent Don t Care values because as stated earlier they are not connected to the RSAIDS Event driven software takes this I type I is for Interrupt command and does what is necessary when the change occurs and nothing when there is no host input change Design Factors for Host Computer Software Much care must be taken on the part of the student endeavoring to write robotic control software If there are 4 robots to be interfaced there will have to be 5 programs in all to synchronize the operation desired Four will be ACL language programs and the fifth will be the host computer program The host program requirements are flexible and may be written in numerous languages including Visual BASIC Quick
20. ouble Byte PULB Restore A and B PULA BCS OUT_ONE If CY 1 then Branch OUT_ZERO LDAA 0 CY Must Have been a Zero JSR OUTPUT Send Loaded 0 to Host BRA RDAL1 Continue to RDAL1 OUT ONE LDAA 1 CY 1 So Send a 1 to Host JSR OUTPUT Send the 1 RDAL1 DECB Count down the 16 Bits BNE RDALOOP If Not Zero Yet then Do Again LDAA CRETN Load a RETURN lt CR gt JSR OUTPUT Send CR JMP BEGNLP Do the Big Loop Again This routine enables the strobes for U3 and U4 one at a time and records the information in U3 and U4 These locations correspond to the ICs Tri State Devices that capture the information READINP CLR DDRC Makes C Input on ALL Pins LDAA PORTD Get D Port ANDA SFB Make PD2 Low STAA PORTD Store it Back in Port D PSHA Save Port D Bits For Later LDAA PORTC Capture Information for A amp B COMA Compliment for Controller STAA U3 Store A amp B in U3 Memory Location PULA Get Port D Info Back in A ORAA S0C PD2 and PD3 High Disable U3 U4 STAA PORTD Store Back in Port D ANDA SE7 Make PD3 Low Enable U4 STAA PORTD Store it Back LDAA PORTC Get U4 Data COMA Compliment for Controller STAA U4 Store it in U4 LDAA PORTD Get PORTD with Strobes ORAA 0c Make PD2 and PD3 High Disable STAA PORTD Store it RTS This subroutine takes COMPT and CHANL and fills memory locations called DC MSK and BA MSK with a single 1 in one of the 16 bit positions of this Double Variable This is used for both WRITE and READ Operati
21. r 4 After each Write All the entire string of 18 characters is echoed back to the controller followed by a CR If there is an error only E lt CR gt will be echoed back to the host Read All Shown by Example R CR This command returns the following string to the host computer R XXXXXXXXXXXXXXXX CR The first X represents controller A s output 5 The second X represents output 6 from controller A Since there are only three inputs to the host from each controller the 4th 8th 12th and 16th X has no meaning and must be ignored Later modifications to the RSAIDS could enable a 4th controller output host input if more connection wiring is provided beyond what exists currently In the event that the syntax was incorrect the standard E lt CR gt will be returned to the host computer Note The first four outputs of each controller are relay type outputs and are numbered 1 through 4 These are reserved and not connected to the RSAIDS Rather controller output 5 6 and 7 are used to return information to the RSAIDS The software and thus commands provided with the RSAIDS unit consider these controller outputs host inputs to be numbers 1 2 and 3 Thus the operator must be aware that controller output number 5 is actually seen as input number 1 to the host There is one type of command used to send controller output information to the host without any type of prompting The RSAIDS looks at the outputs from the controller c
22. strobes the information just previously written to the C Port into Ul or U2 STB BA SEI Prohibits I Type Interrupts LDAB PORTD Get Tri State Strobe Byte ORAB S0C Disable Both Strobes STAB PORTD Write It Back LDAB SFF For DDRC STAB DDRC Make All PORTC Pins Output LDAB PORTA Get PORTA Strobes ORAB 40 Make PA6 HIGH STAB PORTA Store Strobes Back ANDB SBF Make Bit PA6 LOW STAB PORTA Strobe Bit Now Zero Again CLR DDRC Sets PORTC to INPUT CLI Lets Interrupts Occur Again RTS This routine strobes the information just previously written to the C Port into U1 or U2 STB_DC SEI Prohibits I Type Interrupts LDAB PORTD Get Tri State Strobe Byte ORAB S 0C Disable Both Strobes STAB PORTD Write It Back LDAB SFF For DDRC STAB DDRC Make All PORTC Pins Output LDAB PORTA Get Strobes ORAB 20 Make PA5 High STAB PORTA Store it ANDB SDF Make PA5 LOW STAB PORTA Strobe Bit Now Zero Again CLR DDRC Sets PORTC to INPUT CLI Lets Interrupts Occur Again RTS This program module writes 16 0 s or 1 s to the entire system Proceedings of the 2004 American Society of Engineering Education Annual Conference amp Exposition Copyright 2004 American Society for Engineering Education cL v40L 6 abed Example To write to all 16 outputs enter the following command or a variant W 1011000101111010 lt CR gt The first 4 bits are for Computer A The second 4 are for Computer B etc Al 1 A2 0 A3 1 A4 1 WRTALL LDY DC_BYT Current Valu
23. t to and from a host computer This can be a viable alternative to communication and synchronization with these systems However this requires a substantial amount of programming by the student to achieve synchronized operation of multiple robots The student also can use the simple ON OFF digital input and output interface via the front terminal connectors found on the controllers These connectors represent the most widely used approach where the student can make direct electrical connection between the controller devices In the robotics lab students use the Advanced Control Language ACL provided by the robot vendor to write robotic control programs This language has a built in set of I O functions that allow the setting and clearing of output bits and the reading of input bits Input information can be tested in IF statements to branch or hang at one certain location in the program until the bit is either set or cleared to allow the program to proceed to the next step In short bits can be set and tested under ACL program control in an easy and straightforward manner The Purpose of RSAIDS Wiring two or more controllers together using cabling often meets with limited success as the student must master both the control language along with the proper methods of wiring the controllers This problem of wiring is multiplied when over two controllers are to function in synchronization RSAIDS is an approach to greatly facilitate connections
24. ut is present on all controllers Thus if the controllers input is 0 Volts the input is considered logic HIGH For 5 Volts the input is considered logic LOW This is taken into consideration in the RSAIDS software and reversed so that logic 1 in the ACL software at the controller site is a logic 1 at the Host Power Connection to the RSAIDS The RSAIDS prototype unit runs on 9 Volts DC This power is supplied by a standard plug in power module as used by many modern electronic devices There is no power switch on this RSAIDS unit If re initialization is required the operator simply unplugs the power from the 9 Volt wall power adapter cord where it goes into the power plug on the RSAIDS then reinsert the cord into the RSAIDS a second or two later Although this is somewhat more inconvenient than using a reset button there are few times that reset of the RSAIDS has been required RSAIDS Communication Commands The command interface between the RSAIDS unit and the host computer is simple and straightforward When the RSAIDS unit is powered up internal software initializes the serial communications port of the device This initialization requires the issuance of a single Carriage RETURN lt CR gt character from the host Therefore the RSAIDS will not be in communications mode before this character is received It is thus the responsibility of the host to provide this character after the power up of the RSAIDS After power up and initialization wit
Download Pdf Manuals
Related Search
Related Contents
Microsoft MN-150 User's Manual CTP_003_CatalogoTecnico_COM ESTILO.indd GE AGF18DA Air Conditioner HP V5061h User's Manual 1 GIGRAC 300/600 Technical Manual NanoPhotometer P-Class PVC Installation and User Manual - Gigaset PEGASUS D LN SECRET® Copyright © All rights reserved.
Failed to retrieve file