Professional Documents
Culture Documents
ID : 5223
Related Information
This section shows how to create a program using the teach pendant, with a simple example.
When creating and editing a program, turn the operation mode to Manual.
Related Information
Related Information
Related Information
Scope of Variables
What is PacScript
Configuration of PacScript
PacScript generates execution programs based on the user created program file. This execution
program is called "task". Various actions and process are available by executing the tasks.
RC8 series manages files like general personal computers do. You can create multiple program files
and manage them in folders.
Name of file (file name) as follows managed by RC8 series must be based on naming convention.
Program Files
A file for describing PacScript program. You can execute this file as a task. General program
files, supervisory task program files and panel program files are included.
Header file
A file for describing Macro definition. File extension is ".h".
Other files
BMP files used on the panel can be managed.
The PAC language has regulations for identifying various elements in a program. This chapter
provides an explanation of these regulations. Names that express commands, variables, functions,
labels and programs follow the conventions described below.
The first letter should be a character of alphabet [a to z].
The second-to-last character should be alphabet [a to z], number or "_ (underscore)".
These are case-insensitive."Test01", "test01" and "TEST01" are recognized as identical
characters.
Only one-byte characters are available.
The maximum number of characters that can be used for a name is 64.
Reserved word cannot be used for a name.
PacScript
***.pcs
program
256 in total
Header file ***.h
A section of a program that repeats a specific motion can be put out of the program and called if
required.
The method of putting this section in the same program is called a subroutine. If this section is
independently put in a separate file as another program and that program is called, this is referred to as
calling a program.
The program of an independent separate file can be called from various programs and commonly used.
If a series of work is organized as a unit of a subroutine or another program, the same contents do not
have to be described repeatedly. This is effective for correcting descriptions, reducing the creation
time and otherwise improving the ease of reading programs.
Procedure name
Each procedure name, whether Sub or Function, must be unique within a task. Even when a program
file is loaded by #Include, all procedure names must be unique. "#Include" is a command to read a
designated file from other program files.
For details, refer to "#Include"of PROGRAMMER'S MANUAL.