another example. isensor s0 s1 s2 iext /isensoriret ocyl=1 ocyl=0
Post on 21-Dec-2015
226 views
TRANSCRIPT
![Page 1: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/1.jpg)
Another Example
![Page 2: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/2.jpg)
Another Example
![Page 3: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/3.jpg)
Another Example
iSENSOR
S0
S1
S2
iEXT
/iSENSOR•iRET
oCYL=1
oCYL=0
oCYL=0
![Page 4: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/4.jpg)
Example #2 State Diagram
iSENSOR
S0
S1
S2
iEXT
/iSENSOR•iRET
oCYL=1
oCYL=0
oCYL=0
CurrSt iSENSOR iEXT iRET | NextSt------------------------------------S0 0 X X | S0S0 1 X X | S1S1 X 0 X | S1S1 X 1 X | S2S2 0 X 0 | S2S2 0 X 1 | S0S2 1 X X | S2
![Page 5: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/5.jpg)
Example #2 State Diagram
cS0 = cS2•/iSENSOR•iRET + cS0•/iSENSOR + /cS0•/cS1•/cS2
cS1 = cS0•iSENSOR + cS1•/iEXT
cS2 = cS1•iEXT + cS2•/(/iSENSOR•iRET)
= cS1•iEXT + cS2•(iSENSOR + /iRET)
iSENSOR
S0
S1
S2
iEXT
/iSENSOR•iRET
oCYL=1
oCYL=0
oCYL=0
CurrSt iSENSOR iEXT iRET | NextSt------------------------------------S0 0 X X | S0S0 1 X X | S1S1 X 0 X | S1S1 X 1 X | S2S2 0 X 0 | S2S2 0 X 1 | S0S2 1 X X | S2
![Page 6: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/6.jpg)
State Machines in Ladder Logic• Pure relay logic - traditional design:
– 2 states = 1 coil– 3-4 states = 2 coils– 5-8 states = 3 coils, etc.– difficult to debug, modify and document
• Pure relay logic - “one-hot” design– 1 coil per state– easier to debug, modify, and document– watch out for “illegal” states
• RLL-Plus– “Stages”– JMP “coils”– easiest to write and maintain– not available in all brands of PLC’s
![Page 7: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/7.jpg)
Example #2 State Diagram
cS0 = cS2•/iSENSOR•iRET
+ cS0•/iSENSOR
+ /cS0•/cS1•/cS2
cS1 = cS0•iSENSOR + cS1•/iEXT
cS2 = cS1•iEXT + cS2•iSENSOR
+ cS2•/iRET)
iSENSOR
S0
S1
S2
iEXT
/iSENSOR•iRET
oCYL=1
oCYL=0
oCYL=0
![Page 8: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/8.jpg)
Ex #2 - RLL-Plus Stages
iSENSOR
S0
S1
S2
iEXT
/iSENSOR•iRET
oCYL=1
oCYL=0
oCYL=0
![Page 9: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/9.jpg)
Multi-state Example
• When sensor detects block; clamp block, drill hole, shift, drill 2nd hole, shift back, release clamp
![Page 10: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/10.jpg)
Inputs and Outputs• iSENSOR block
present• iDRILLDN drill is
down• iDRILLUP drill is up• iCLAMPED fully
clamped• iRELEASED fully
unclamped• iPOS1 unshifted• iPOS2 shifted
• oDRILL start drilling
• oCLAMP activate clamp
• oSHIFT shift block holder
![Page 11: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/11.jpg)
State Diagrams
• One state per “action”• Look for “wait” states needed
![Page 12: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/12.jpg)
State Diagram
![Page 13: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/13.jpg)
RLL-Plus
![Page 14: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/14.jpg)
RLL-Plus
![Page 15: Another Example. iSENSOR S0 S1 S2 iEXT /iSENSORiRET oCYL=1 oCYL=0](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d555503460f94a32fac/html5/thumbnails/15.jpg)
RLL-Plus