![Cebekit UCPIC-7 Скачать руководство пользователя страница 5](http://html1.mh-extra.com/html/cebekit/ucpic-7/ucpic-7_manual_2577410005.webp)
UCPIC-7
:main:
potenciometro:
readadc 4, b0
if b0<120 then motor_off
if b0>120 then motor_on
motor_off:
low 2
low 0
low 1
goto potenciometro
motor_on:
high 2
low 0
high 1
goto potenciometro
PRACTICE 5
Put switch S4 in position to load the program record, finishing work put position.
In this program we read the potentiometer with readadc 4. if the value is less than 100 the motor rotates in one
direction, if the value is between 100 and 150 the motor is stopped if it exceeds 150 the motor rotates in reverse
Mettez l'interrupteur S4 en position pour charger l'enregistrement du programme, la finition position de travail de vente.
Dans ce programme, nous lisons le potentiomètre avec readadc 4. si la valeur est inférieure à 100, le moteur tourne
dans un sens, si la valeur est comprise entre 100 et 150, le moteur est arrêté si elle dépasse 150, le moteur tourne en
sens inverse
Poner conmutador S4 en posición grabar para cargar el programa, al terminar poner posición trabajo .
En este programa leemos el potenciómetro con readadc 4 . si el valor es inferior a 100 el motor gira en un sentido , si el
valor esta entre 100 y 150 el motor esta parado si es superior a 150 el motor gira en sentido inverso
main:
potenciometro:
readadc 4, b0
if b0<100 then motor_izq
if b0>100 and b0<150 then motor_off
if b0>150 then motor_der
motor_off:
low 2
low 0
low 1
goto potenciometro
motor_izq:
high 2
high 0
low 1
goto potenciometro
motor_der:
high 2
low 0
high 1
goto potenciometro