Toshiba STE 58762 - 2-23 -, Program Subexample M1, M2, M3, Program Main Remark *** Sample

Page 37

STE 58762

When calling the subprogram from the main program, write (in the main program) the name of the subprogram and the data you wish to pass over to that subprogram. For example, the corresponding subprogram will have the statement:

PROGRAM SUBEXAMPLE (M1, M2, M3)

The subprogram SUBEXAMPLE will now do whatever it does while treating A as M1, B as M2, and C as M3.

Note that variables changed in the subprogram will automatically change the corresponding value in the main program. For example, if M3 were to change in the subprogram SUBEXAMPLE, C will also change simultaneously in the main program.

Example:

Main program

PROGRAM MAIN

REMARK *** SAMPLE 2 ***

K1 = 15

K2 = 28

SUB2(K1, K2, K)

PRINT K

END

Sub program

PROGRAM SUB2(N1, N2, N3)

REMARK *** SUBPROGRAM NO. 2 ****

N3 = N1 + N2

RETURN

END

In the above example, three arguments are being passed off between the main program and subprogram. Specifically, K1 of the main program is passed over as N1 of the subprogram. Similarly, K2 of the main program is passed over as N2 of the subprogram. The subprogram adds N1 and N2, and puts the result in a variable called N3. When this happens, the value of K in the main program also changes (since K and N3 correspond to each other).

2-23

Image 37
Contents STE Industrial Robot SR Series Robot Language Manual- i - - ii - Preface- iii - Variables and Constants ・・・・・・・・・・・・・・・・ Table of Contents AN Outline of Robot LanguageRemarks and COMMENTS・・・・・・・・・・・・・・・・・ Things not to do When Programming ・・・・・・・・・ Explanation of Robot CommandsThings to Watch OUT for When Writing a PROGRAM・・ Program Examples Programming Hints and WarningsHOW to Read Symbols ・・・・・・・・・・・・・・・ List of Commands ・・・・・・・・・・・・・・・・・Appendix a Appendix B List of Reserved Words ・・・・・・・・・・・・・Robot Movement Chapter AN Outline of Robot Language- 1-1 - Robot movement - 1-2 -Robot Language - 1-3 -- 1-4 - - 1-5 - Types of Commands- 1-6 - - 1-7 - Chapter Writing Programs in Robot Language Program ConfigurationFiles Program- 2-2 - Positional Data- 2-3 - Character SET- 2-4 - IdentifiersS H I B a R O B O T Scalar Data Variables and Constants- 2-5 - - 2-6 - - 2-7 - Vector Data- 2-8 - - 2-9 - - 2-10 - STE System Variables- 2-11 - System Constants- 2-12 - Mathematical Functions- 2-13 - Computational ExpressionsAND, or - 2-14 -- 2-15 - - 2-16 - - 2-17 - - 2-18 - Logical ExpressionsIf J1 then Goto BRANCH1 Else Goto BRANCH2 - 2-19 - LabelsLOOP1 Move P1 Goto LOOP1 Remarks and Comments Move P1 This Command Moves the Robot to P1- 2-20 - Remark this Program WAS Written by MEProgram Declaration Programs- 2-21 - - 2-22 - STE SubprogramsProgram Subexample M1, M2, M3 - 2-23 -Program Main Remark *** Sample Print K END- 2-24 - Library- 2-25 - STE Multitask Processing- 2-26 - - 2-27 - - 2-28 - Global Variable DefinitionGlobal END ProgramDIM D10 AS INT - 2-29 -DIM 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.