EasyManua.ls Logo

Vigor VS Series - Mark Pointer and Branch Pointer (P)

Vigor VS Series
484 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
M9000
M9000
P6
˙˙˙˙˙˙˙˙˙˙˙˙˙
CALL P0Z0
SRET
MOV D9019 Z0
P0
SRET
FEND
˙˙˙˙˙˙˙˙˙˙˙˙˙
Read the day of a week (D9019) from the Real-Time Clock as the index
value.
Call the corresponding subroutine that according to the index value. One related
subroutine will be executed at the day in a week.
When Z0=0 (Sunday),do the P0 subroutine.
When Z0= 1~5 (Monday to Friday), do one of the subroutine P1~P5
respectively.
When Z0= 6 (Saturday), do the P6 subroutine.
The purpose of the Mark Pointer and Branch Pointer (P) is to specify a specific point in the program. Usually they are
used to indicate the destination of the CJ instruction, or the start position of a subroutine of the CALL instruction.
In the past, the VB series PLC only had Branch Pointer P, which indicates a specific location with indication number, but
the program's readability was disadvantageous. Therefore, the VS series PLC newly enhances the Mark Pointer indicator
function to enable programmers use illustrative text to indicate a specific address, thus greatly increases the readability.
The ID numbers of Branch Pointer P in the VS1, VS2, VSM and VS3 series are exactly the same: P0~P1023, 1024
points in total.
The Branch Pointer P63 or P255 is equal to the position of END in the program.
The Mark Pointer is made up of 16 English characters or numbers, and its use is exactly the same as the Branch
Pointer P.
A maximum of 1024 Mark or Branch Pointers P in the program can be used.
The ID number at Branch Pointer P can be modified by the V, Z Index Register; texts in a Mark Pointer cannot use the
V, Z Index Register. By the characteristics, choose the suitable one at the program.
Among the exemplary programs are the Mark Pointer (left) and Branch Pointer P (right), the left one that uses the
Mark Pointer can acquire better readability.
An example of using Branch Pointer P and combine with Index Registers V, Z.
FEND
SRET
END
˙˙˙˙˙˙˙˙˙˙
EMERGENCY_STOP
CALL EMERGENCY_STOP
FEND
SRET
END
˙˙˙˙˙˙˙˙˙˙
CALL P0
P0
35
2-10 Mark Pointer and Branch Pointer (P)

Table of Contents