Toshiba STE 58762 instruction manual Library, - 2-24 -

Page 38

STE 58762

When you execute this program, K1 will be passed off as 15 (to N1 of the subprogram) and K2 will be passed off as 28 (to N2 of the subprogram). The subprogram will add these together and call the result (which is 43) N3. The K variable of the main program will also change to 43. The RETURN command will send control back to the main program, and the PRINT K statement will be executed. This will cause the number "43" to be displayed on the teach pendant.

Note that subprograms may not call themselves. Also, should you call a subprogram which is in another file, the controller will not understand you and instead will treat the name of that subprogram as an error.

Note 1) An expression itself, result of vector data expression such as position data and vector data element can be designated as an argument.

Note 2) When a constant is used as an argument, it cannot be substituted into a variable according to a subprogram.

Note 3) For a variable which is an argument to a subprogram, a value should be substituted into the variable before the subprogram is executed.

2.8.3Library

The SCOL language does not allow you to use subprograms which are not in the same file as the main program. However, by putting especially useful subprograms in the library file (SCOL.LIB), you can access these subprograms from all files.

Many useful subprograms have already been inserted in the library file including subprograms to get the system ready and subprograms to operate the hand. Appendix C shows the contents of the library file SCOL.LIB provided as standard on the robot controller system disk.

When writing your own subprogram to add to the library file, enter the program in that file just like you would enter any other subprogram. For information on how to enter a program into a file, refer to the Start-up Manual and the Operating Manual. Be sure to put any newly created files at the very end of the existing library file.

Should a subprogram in the library file and a subprogram in the main file have the same name, the controller will execute the subprogram in the main file (and not the subprogram in the library file). The library is reloaded at program selection.

2-24

Image 38
Contents Industrial Robot SR Series Robot Language Manual STE- i - Preface - ii -- iii - Remarks and COMMENTS・・・・・・・・・・・・・・・・・ Table of Contents AN Outline of Robot LanguageVariables and Constants ・・・・・・・・・・・・・・・・ Things to Watch OUT for When Writing a PROGRAM・・ Explanation of Robot CommandsThings not to do When Programming ・・・・・・・・・ Program Examples Programming Hints and WarningsAppendix a List of Commands ・・・・・・・・・・・・・・・・・HOW to Read Symbols ・・・・・・・・・・・・・・・ Appendix B List of Reserved Words ・・・・・・・・・・・・・- 1-1 - Chapter AN Outline of Robot LanguageRobot Movement - 1-2 - Robot movement- 1-3 - Robot Language- 1-4 - Types of Commands - 1-5 -- 1-6 - - 1-7 - Files Program ConfigurationChapter Writing Programs in Robot Language ProgramPositional Data - 2-2 -Character SET - 2-3 -S H I B a R O B O T Identifiers- 2-4 - - 2-5 - Variables and ConstantsScalar Data - 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 - If J1 then Goto BRANCH1 Else Goto BRANCH2 Logical Expressions- 2-18 - LOOP1 Move P1 Goto LOOP1 Labels- 2-19 - - 2-20 - Move P1 This Command Moves the Robot to P1Remarks and Comments Remark this Program WAS Written by ME- 2-21 - ProgramsProgram Declaration STE Subprograms - 2-22 -Program Main Remark *** Sample - 2-23 -Program Subexample M1, M2, M3 Print K ENDLibrary - 2-24 -STE Multitask Processing - 2-25 -- 2-26 - - 2-27 - Global Global Variable Definition- 2-28 - END ProgramDIM F5 AS Point - 2-29 -DIM D10 AS INT

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.