Sample Application Programs (T-Pds) - Toshiba 2000 User Manual

Integrated controller
Hide thumbs Also See for 2000:
Table of Contents

Advertisement

Chapter 9 Appendix

Sample Application Programs (T-PDS)

9.4
(1) Sample program of PF611
|
1|[W0000 TINZ(0031)W0001]-|/|--[00002 TON T000]-------------------( )-- | prepare send data
|
|
2|[ 00000 MOV D1000][ 00001 MOV D1001]------------------------------------------- | circuit 2-6
|
|
3|[H0001 READ D1000 -> D1100]----------------------------------------------------|
| /* read PF611 module status */
|
4|[D1100 AND HF000 -> D1100][D1100
| /* module status = standby? */
|R0501
5|-| |-+[ 00065 MOV D1000][ 00001 MOV D1001][ 00002 MOV D1002]-------|
|
|
|
|
|
+[D1002 WRITE D1000 -> H0001]-------------------------------------------- |
|
| /* PF611 start request */
|
|
9
|
+[ 00064 MOV D1000][ 00001 MOV D1001][-23131 MOV D1002]------ |
|
|
|
|
|
+[D1002 WRITE D1000 -> H0001][ SET R0502]------------------------- |
|
/* module control enable */
|R0502
6|-| |--[00030 TON T100]-----------------------------------------------------------( )-- |
| /* wait for 3 seconds */
|
7|[ 00512 MOV D1000][ 00032 MOV D1001]------------------------------------------- | circuit7-12
|
|
8|[H0001 READ D1000 -> W0512]--------------------------------------------------- |
| /* read receive data (32words) */
|
9|[ 00256 MOV D1000][ 00032 MOV D1001]------------------------------------------- |
|
|
10|[W0000 WRITE D1000 -> H0001]--------------------------------------------------- |
| /* write send data (32 words) */
|R0503 R0500
11|-| |---| |-+[W0000 TCMP (32) W0512 -> D1200][ +1 D1300]-------- |
|
|
|
|
|
+[ +1 W0000]-------------------------------------------------------------------- |
| /* compare send data and receive data */
|
12|[W0000 MOV YW000][D1300 MOV YW001]------------------------------------- |
| /* compare error counter (W0000) copy to YW001 */
|
13|[END ]-------------------------------------------------------------------------------------------- |
44
In this sample program, PF611 is mounted on basic unit and slot 1 of S2T/S2E.
Sample program issues the start request to PF611, writes increment data in "Write data"
area, reads from "Read data" area, and compares both data.
This program is registered in S2T/S2E. The program moves when S2T/S2E move to
RUN mode.
Main program
R0500
Figure 9-3 Sample program of PF611
Block 1
R0500
R0501 |
= 04096]------------------( )-- |
R0503 |
model 2000 PROFIBUS Module User's Manual for S2T/S2E
| wait for 20ms
|
| PF611 start request
|
|
|
|
|
|
|
|
|
|
|
|
|
| compare data
|
|
|
|
|
|
|
|
|
|
|
|
|

Advertisement

Table of Contents
loading

Table of Contents