Remote Processing Coorporation RPC-320 Dokumentacja Strona 183

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 186
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 182
Event Multitasking - 14
Timer 0 is configured at address 0 and bit 1. The wait time is 0.05 seconds. The output will go high for 0.06 seconds at
the end of the wait period, and then go low.
The PULSE function returns the remaining time of each stage. If the return is negative, the number is the time left in the
wait stage. If the return is positive, the number is the remaining part of the active time. The example below demonstrates
this.
10 PULSE 0,0,1,.05,1
30 A = PULSE(0):IF A=0 THEN STOP
40 PRINT A
50 GOTO 30
RUN
–.05
–.05
–.045
–.045
–.045
.
.
.
.03
.02
.02
.02
.01
.01
.01
5E-03
5E-03
5E-03
STOP
Operation of a Multiple Pulsed Outputs
The real power of the PULSE operation comes when multiple timed outputs are required and the time relationship between
outputs must be maintained. The application could involve pneumatic valves, injection molding steps or other
sequence–oriented operations.
10 PULSE 0,0,0,4,1
20 PULSE 1,0,1,6.5,1
30 PULSE 2,0,2,1.5,1
40 PULSE 3,0,3,7.5,1
50 .
60 .
The rest of your program, starting at line 60, executes independently of the timed outputs. Each output will time without
further intervention by the program. Thus, the program can do other tasks, like handle communications, check safety limits
and acquire process data such as temperatures, pressures, etc.
If the program should terminate before a timer times out, the bit will be left in the “active” state. When program execution
stops, all timers are cancelled. If the program is restarted with the CONT statement, the timers will not restart.
Przeglądanie stron 182
1 2 ... 178 179 180 181 182 183 184 185 186

Komentarze do niniejszej Instrukcji

Brak uwag