Vous êtes sur la page 1sur 8

------- [ Entrada digital ] ------I0002:

I0004:
I0005:
I0006:

Datapool
Experincia 01: Selecionador

------- [ Sada digital ] ------O0011: [ADDR2],


O0008: [ADDR0],
O0009: [ADDR1],

Temporizador das Leituras


PULES

PULES

PULES

UPC

RESES

CONT

------- [ Contato auxiliar ] ------R0216: [PULES],


R0217: [RESES],
R0002: [GRANDE],
R0004: [MEDIO],
R0005: [POS3],
R0006: [COR1],
------- [ Memria inteira ] ------M0013: [CONT],

RESES
CTE36

------- [ Constante inteira ] ------K0035: [CTE36], Constante inteira, valor = 36


K0005: [CTE02], Constante inteira, valor = 2
K0008: [CTE05], Constante inteira, valor = 5
K0013: [CTE10], Constante inteira, valor = 10

Efetuando a leitura dos sensores de 0 a 7


=

ADDR2

CONT
ADDR0
CTE02
ADDR1

>=

<

CONT

CONT

CTE05

CTE10

ADDR0 ADDR1 ADDR2


MRL

I0002

GRANDE

I0002

GRANDE

I0004

MEDIO

I0004

MEDIO

I0005

POS3

I0005

POS3

I0006

COR1

I0006

COR1

I0007

POS4

I0007

POS4

EMR

ADDR2

------- [ Memria inteira ] ------M0013: [CONT],

ADDR1

------- [ Constante inteira ] ------K0015: [CTE12], Constante inteira, valor = 12


K0018: [CTE15], Constante inteira, valor = 15
K0028: [CTE20], Constante inteira, valor = 20

CONT

CTE12
ADDR0

>=

<

CONT

CONT

CTE15

CTE20

------- [ Sada digital ] ------O0011: [ADDR2],


O0009: [ADDR1],
O0008: [ADDR0],
------- [ Contato auxiliar ] ------R0007: [POS4],
R0011: [ALIMENT],
R0012: [COR2],
R0013: [PECAOK],
R0014: [COR3],

Efetuando a leitura dos sensores de 8 a 15

------- [ Entrada digital ] ------I0007:


I0008:
I0004:
I0005:
I0006:

ADDR2 ADDR1 ADDR0


MRL

I0008

ALIMENT

I0008

ALIMENT

I0004

COR2

I0004

COR2

I0005

PECAOK

I0005

PECAOK

I0006

COR3

I0006

COR3

EMR

------- [ Entrada digital ] ------I0008:


I0004:
I0005:
I0006:

Efetuando a leitura dos sensores de 16 a 24


=

ADDR2

CONT
ADDR0
CTE22
ADDR1

>=

<

CONT

CONT

CTE25

CTE30

ADDR0 ADDR1 ADDR2


MRL

------- [ Sada digital ] ------O0011: [ADDR2],


O0008: [ADDR0],
O0009: [ADDR1],
------- [ Contato auxiliar ] ------R0019: [POS2],
R0020: [METAL],
R0021: [POS1],
R0022: [PEQUENO],
R0047: [INICIAL],
R0045: [TELAINI],
R0046: [TELAPOS],
------- [ Memria inteira ] ------M0013: [CONT],

I0008

POS2

I0008

POS2

I0004

METAL

I0004

METAL

I0005

POS1

I0005

POS1

------- [ Constante inteira ] ------K0033: [CTE22], Constante inteira, valor = 22


K0031: [CTE25], Constante inteira, valor = 25
K0032: [CTE30], Constante inteira, valor = 30

I0006

PEQUENO

I0006

PEQUENO

EMR

Inicializando a esteira
INICIAL

TELAINI

INICIAL

TELAINI

TELAPOS

------- [ Contato auxiliar ] ------R0029: [TECLA1],


R0093: [POS1OK],
R0047: [INICIAL],
R0094: [POS2OK],
R0095: [POS3OK],
R0096: [POS4OK],
R0030: [TECLA2],
R0031: [TECLA3],

Escolhendo a Posio Seguinte

Posio 1
TECLA1

POS1OK

INICIAL

POS2OK

POS3OK

POS4OK

Posio 2
TECLA2

POS2OK

POS1OK

POS3OK

POS4OK

Posio 3
TECLA3

POS3OK

POS1OK

POS2OK

POS4OK

------- [ Contato auxiliar ] ------R0032: [TECLA4],


R0096: [POS4OK],
R0093: [POS1OK],
R0094: [POS2OK],
POS4OK R0095: [POS3OK],
R0019: [POS2],
R0098: [IR31],
R0099: [IR41],
POS1OK R0097: [IR21],
R0005: [POS3],
R0007: [POS4],
R0021: [POS1],
POS2OK
R0101: [IR32],
R0102: [IR42],
R0100: [IR12],
POS3OK

Posio 4
TECLA4

Verificando a posicao 1
POS1OK
MRL
POS2

IR31

IR41

IR21

POS3

IR21

IR41

IR31

POS4

IR21

IR31

IR41

EMR

Verificando a posicao 2
POS2OK
MRL
POS1

IR32

IR42

IR12

POS3

IR12

IR42

IR32

POS4

IR12

IR32

IR42

EMR

------- [ Sada digital ] ------O0000: [SENTIDO],

Verificando a posicao 3
POS3OK
MRL
POS1

IR23

IR43

IR13

POS2

IR13

IR43

IR23

POS4

IR13

IR23

IR43

EMR

Verificando a posicao 4
POS4OK
MRL
POS1

IR24

IR34

IR14

POS2

IR14

IR34

IR24

POS3

IR14

IR24

IR34

EMR

Determinao do Sentido do Motor de Passo


IR12

IR13

IR14

IR23

IR24

IR34

SENTIDO

------- [ Contato auxiliar ] ------R0095: [POS3OK],


R0021: [POS1],
R0104: [IR23],
R0105: [IR43],
R0103: [IR13],
R0019: [POS2],
R0007: [POS4],
R0096: [POS4OK],
R0107: [IR24],
R0108: [IR34],
R0106: [IR14],
R0005: [POS3],
R0100: [IR12],

------- [ Sada digital ] ------O0000: [SENTIDO],


SENTIDO O0001: [MPASSO],

IR43

------- [ Contato auxiliar ] ------R0105: [IR43],


R0102: [IR42],
R0099: [IR41],
R0101: [IR32],
R0098: [IR31],
R0097: [IR21],
R0093: [POS1OK],
R0021: [POS1],
R0047: [INICIAL],
R0094: [POS2OK],
R0019: [POS2],
R0095: [POS3OK],
R0005: [POS3],

IR42

IR41

IR32

IR31

IR21

Acionamento do Motor de Passo para ir para a Posio 1


POS1OK

POS1

MPASSO

POS1OK

POS1

MPASSO

INICIAL

Acionamento do Motor de Passo para ir para a Posio 2


POS2OK

POS2

MPASSO

POS2OK

POS2

MPASSO

Acionamento do Motor de Passo para ir para a Posio 3


POS3OK

POS3

MPASSO

POS3OK

POS3

MPASSO

------- [ Sada digital ] ------O0001: [MPASSO],


O0000: [SENTIDO],

Acionamento do Motor de Passo para ir para a Posio 4


POS4OK

POS4

POS4OK

POS4

------- [ Contato auxiliar ] ------MPASSO R0096: [POS4OK],


R0007: [POS4],
R0045: [TELAINI],
R0046: [TELAPOS],
MPASSO R0047: [INICIAL],

SENTIDO

END

Subrotina de inicializaao de Variveis (RESET)


T0000
BBK
TELAINI

TELAPOS

INICIAL

EBK