Toshiba STE 58762 instruction manual STE Subprograms, - 2-22 -

Page 36

STE 58762

2.8.2 Subprograms

You can call up a subprogram by just writing its name in the main program.

Example:

Here is a main program which calls a subprogram called SUB1.

PROGRAM MAIN

REMARK *** SAMPLE 1 ***

SUB1

END

Here is the subprogram which has been named SUB1.

PROGRAM SUB1

REMARK *** SUBPROGRAM NO. 1 ***

Body of subprogram

RETURN

END

A RETURN command should inserted in subprograms to send control back to the main program. If you forget to write RETURN, SCOL will forgive you and pretend that there is a RETURN command in front of the END statement.

When wishing to pass data between subprograms and the main program, you have to first specify arguments for the subprogram. Arguments are like little "mailboxes" to which values passed between the programs are sent and received. And, before using these mailboxes, you have to put a name on each one so the postman knows whose mail goes where. When writing a subprogram (not a main program), the program statement should be written like this:

PROGRAM <program name> (<names of arguments>)

After writing the program name, write the names of the arguments inside of brackets. Use commas to separate the names of the arguments. (You cannot specify more than ten arguments for a single subprogram.) For example, the main program will have the statement:

SUB EXAMPLE (A, B, C)

2-22

Image 36
Contents Industrial Robot SR Series Robot Language Manual STE- i - Preface - ii -- iii - Table of Contents AN Outline of Robot Language Variables and Constants ・・・・・・・・・・・・・・・・Remarks and COMMENTS・・・・・・・・・・・・・・・・・ Explanation of Robot Commands Things not to do When Programming ・・・・・・・・・Things to Watch OUT for When Writing a PROGRAM・・ Program Examples Programming Hints and WarningsList of Commands ・・・・・・・・・・・・・・・・・ HOW to Read Symbols ・・・・・・・・・・・・・・・Appendix a Appendix B List of Reserved Words ・・・・・・・・・・・・・Chapter AN Outline of Robot Language Robot Movement- 1-1 - - 1-2 - Robot movement- 1-3 - Robot Language- 1-4 - Types of Commands - 1-5 -- 1-6 - - 1-7 - Program Configuration Chapter Writing Programs in Robot LanguageFiles ProgramPositional Data - 2-2 -Character SET - 2-3 -Identifiers - 2-4 -S H I B a R O B O T Variables and Constants Scalar Data- 2-5 - - 2-6 - Vector Data - 2-7 -- 2-8 - - 2-9 - STE System Variables - 2-10 -System Constants - 2-11 -Mathematical Functions - 2-12 -Computational Expressions - 2-13 -- 2-14 - AND, or- 2-15 - - 2-16 - - 2-17 - Logical Expressions - 2-18 -If J1 then Goto BRANCH1 Else Goto BRANCH2 Labels - 2-19 -LOOP1 Move P1 Goto LOOP1 Move P1 This Command Moves the Robot to P1 Remarks and Comments- 2-20 - Remark this Program WAS Written by MEPrograms Program Declaration- 2-21 - STE Subprograms - 2-22 -- 2-23 - Program Subexample M1, M2, M3Program Main Remark *** Sample Print K ENDLibrary - 2-24 -STE Multitask Processing - 2-25 -- 2-26 - - 2-27 - Global Variable Definition - 2-28 -Global END Program- 2-29 - DIM D10 AS INTDIM F5 AS Point

STE 58762 specifications

The Toshiba STE 58762 is a high-performance microcontroller known for its advanced features and robust architecture, making it suitable for a range of applications in automotive, industrial, and consumer electronics. One of the standout characteristics of this microcontroller is its ability to perform complex computations with improved efficiency, thanks to its 16-bit RISC architecture. The RISC (Reduced Instruction Set Computing) design enables faster processing speeds, lower power consumption, and an overall increase in performance.

The STE 58762 integrates a variety of peripherals that enhance its functionality. It includes multiple I/O ports, timers, and an advanced interrupt management system, allowing for seamless interaction with external devices. The integrated analog-to-digital converter (ADC) is particularly noteworthy, enabling the microcontroller to handle real-time data acquisition, essential in applications that require precision and quick response times.

Another significant advantage of the Toshiba STE 58762 is its built-in support for communication protocols, facilitating easy integration into different systems. It supports standard communication interfaces such as UART, SPI, and I2C, which enhance its connectivity with other devices and components. This flexibility makes the microcontroller a versatile choice for designers looking to implement diverse communication methods in their projects.

In terms of memory architecture, the STE 58762 offers an ample amount of ROM and RAM, allowing for sufficient space to store program code and data. This characteristic is crucial for developers who require extensive data handling capabilities in their applications. Furthermore, the microcontroller is equipped with built-in power management features, including sleep and idle modes, that optimize energy consumption during operation.

Overall, the Toshiba STE 58762 microcontroller is characterized by its powerful processing capabilities, extensive peripheral support, and efficient power management. These features make it an excellent choice for demanding applications, providing designers with the tools they need to create innovative and reliable solutions across various industries. As technology continues to evolve, the STE 58762 stands out as a dependable option, ensuring performance and efficiency are met in today’s competitive market. Its reliability and robust features position it as a strong contender in the landscape of microcontroller options available today.