How To Write A Program - Vexta EMP400 Series Operating Manual

Controller for servo and stepping motors
Table of Contents

Advertisement

6.5.1 How to write a program

There is a set of requirements that must be satisfied when writing a program using a text editor.
These requirements are explained in the following example of program composition.
1. Start a text editor.
2. Write a program by meeting the requirements explained below.
Type in alphanumeric characters.
Up to 80 characters may be entered for each line.
[Requirements]
∗1. The program should start with "Seq∗" (∗ represents
a program number). Enter a space between
"Seq" and the program number.
∗2. Enter the line number in brackets "[ ]."
∗3. No more than one command can be entered into a
single line.
∗4. Following the last line of the program, be sure to
press the Enter key at least once.
∗5. One text file can contain more than one program.
∗6. The line number may be omitted. A space may be
entered.
∗7. Any character string entered following " ; " will be a
comment. The comment will not be saved in the
controller.
3. Save the created program in text format.
Always add the ".txt" extension to the text file name.
Downloading the file you created and saved in text
format in Step 2 to the controller and then uploading it
to a PC will result in the following:
[Results]
∗3. An error has occurred, since more than one
command was entered into one step.
∗4. Blank steps have been deleted.
∗6. An [n] representing the line number has been
added. A space has been deleted.
∗7. A comment has been deleted.
6 Writing and editing a program
∗1
Seq 1
∗2
[1] LOOP 10
[2] VS 100
[3] V 3000, TR 30
[4] D 1000
[5] INC
[6] ENDL
Seq 2
LOOP 10
VS 100
V 3000
∗6
D 1000
inc
;comment
ENDL
Seq 1
[1] LOOP 10
[2] VS1 100
[3] syntax error
[4] D1 1000
[5] INC1
[6] ENDL
Seq 2
[1] LOOP 10
[2] VS1 100
[3] V1 3000
∗6
[4] D1 1000
[5] INC1
[6] ENDL
∗3
∗4
∗5
∗7
∗3
∗4
∗7
6-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents