Você está na página 1de 41

CFGS Automatització i Robòtica Industrial

CONTROL DE UN SINAMIC
CON IOT 2040 DE SIEMENS

1
Fouad Rifi
CFGS Automatització i Robòtica Industrial

IMPRESIÓN DE TODAS LAS PANTALLAS DEL MOVIL

2
Fouad Rifi
CFGS Automatització i Robòtica Industrial

CONTROL

3
Fouad Rifi
CFGS Automatització i Robòtica Industrial

Codigo Control
[{"id":"70923482.2f1edc","type":"tab","label":"CONTROL"},{"id":"43b7acc5.3c3164","type":"ui
_switch","z":"70923482.2f1edc","name":"HABILITAR / DESABILITAR","label":"DESHABILITAR
/HABILITAR","group":"fbd182e3.fd84c","order":0,"width":0,"height":0,"passthru":true,"topic":
"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false"
,"offvalueType":"bool","officon":"","offcolor":"","x":306,"y":162,"wires":[["5bc5e7cf.38b118","
2e1867dd.8f6c08"]]},{"id":"5bc5e7cf.38b118","type":"s7
out","z":"70923482.2f1edc","endpoint":"7716e795.d07978","variable":"HABILITACION
CONTROL","name":"HABILITACIÓN
CONTROL","x":693,"y":171,"wires":[]},{"id":"7a7782ae.6b177c","type":"comment","z":"70923
482.2f1edc","name":"HABILITACIÓN
CONTROL","info":"","x":586,"y":59,"wires":[]},{"id":"2e1867dd.8f6c08","type":"function","z":"
70923482.2f1edc","name":"TEXTO A VISUALIZAR","func":"if (msg.payload
===true)\nmsg.payload =\"HABILITADA\";\nelse\nmsg.payload =\"DESHABILITADA\";\nreturn
msg;\n","outputs":1,"noerr":0,"x":706,"y":278,"wires":[["a501a811.9e5f38"]]},{"id":"a501a811
.9e5f38","type":"ui_text","z":"70923482.2f1edc","group":"fbd182e3.fd84c","order":0,"width":
0,"height":0,"name":"ESTADO CONTROL","label":"ESTADO
CONTROL:","format":"{{msg.payload}}","layout":"row-
spread","x":1036,"y":278,"wires":[]},{"id":"eef550ef.29d99","type":"comment","z":"70923482.
2f1edc","name":"CONTROL MARCHA /
PARO","info":"","x":577,"y":419,"wires":[]},{"id":"c09e610c.2b623","type":"ui_button","z":"70
923482.2f1edc","name":"MARCHA
DERECHA","group":"5d36422d.7ea04c","order":0,"width":0,"height":0,"label":"MARCHA
DERECHA","color":"#00ff00","icon":"rotate_right","payload":"true","payloadType":"bool","top
ic":"","x":156,"y":507,"wires":[["21fcf9f7.7e8b76"]]},{"id":"17803978.143167","type":"ui_butt
on","z":"70923482.2f1edc","name":"MARCHA
IZQUIERDA","group":"5d36422d.7ea04c","order":0,"width":0,"height":0,"label":"MARCHA
IZQUIERDA","color":"#0000ff","icon":"rotate_left","payload":"true","payloadType":"bool","top
ic":"","x":161,"y":578,"wires":[["a7a0f87e.7bfb18"]]},{"id":"3d04c1c1.ec5f4e","type":"ui_butto
n","z":"70923482.2f1edc","name":"PARO","group":"5d36422d.7ea04c","order":0,"width":0,"h
eight":0,"label":"PARO","color":"#ff0000","icon":"pause_circle_outline","payload":"true","payl
oadType":"bool","topic":"","x":115,"y":642,"wires":[["bf327d7c.61223"]]},{"id":"21fcf9f7.7e8b
76","type":"s7
out","z":"70923482.2f1edc","endpoint":"7716e795.d07978","variable":"MARCHA
DERECHA","name":"MARCHA
DERECHA","x":422,"y":507,"wires":[]},{"id":"a7a0f87e.7bfb18","type":"s7
out","z":"70923482.2f1edc","endpoint":"7716e795.d07978","variable":"MARCHA
IZQUIERDA","name":"MARCHA
IZQUIERDA","x":418,"y":578,"wires":[]},{"id":"bf327d7c.61223","type":"s7
out","z":"70923482.2f1edc","endpoint":"7716e795.d07978","variable":"PARO","name":"PARO
","x":369,"y":641,"wires":[]},{"id":"c6bec3ab.2bf34","type":"s7
in","z":"70923482.2f1edc","endpoint":"7716e795.d07978","mode":"single","variable":"ESTAD
O MOTOR","diff":true,"name":"ESTADO

4
Fouad Rifi
CFGS Automatització i Robòtica Industrial

MOTOR","x":641,"y":509,"wires":[["4c17f584.57808c"]]},{"id":"4c17f584.57808c","type":"func
tion","z":"70923482.2f1edc","name":"ESTADO MOTOR","func":"if
(msg.payload===1)\nmsg.payload=\"MOTOR IZQUIERDA\";\nif
(msg.payload===2)\nmsg.payload=\"MOTOR DERECHA\";\nif
(msg.payload===4)\nmsg.payload=\"MOTOR PARADO\";\nreturn
msg;","outputs":1,"noerr":0,"x":860,"y":510,"wires":[["f9ce00eb.db001"]]},{"id":"f9ce00eb.db
001","type":"ui_text","z":"70923482.2f1edc","group":"5d36422d.7ea04c","order":0,"width":0,
"height":0,"name":"","label":"ESTADO MOTOR: ","format":"{{msg.payload}}","layout":"row-
spread","x":1157,"y":576,"wires":[]},{"id":"fbd182e3.fd84c","type":"ui_group","z":"","name":"
HABILITACIÓN
CONTROL","tab":"815b769c.840108","order":1,"disp":true,"width":"6"},{"id":"7716e795.d079
78","type":"s7
endpoint","z":"","address":"192.168.1.20","port":"102","rack":"0","slot":"1","localtsaphi":"01"
,"localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-
slot","cycletime":"500","timeout":"1500","verbose":"default","name":"PLC S7-
12000","vartable":[{"addr":"QW10","name":"CONTROL"},{"addr":"M0.3","name":"HABILITACI
ON CONTROL"},{"addr":"M0.4","name":"HABILITACION
CONSIGNA"},{"addr":"M0.0","name":"MARCHA DERECHA"},{"addr":"M0.1","name":"MARCHA
IZQUIERDA"},{"addr":"M0.2","name":"PARO"},{"addr":"MW10","name":"CONSIGNA
ENVIO"},{"addr":"QW12","name":"CONSIGNA"},{"addr":"I11.1","name":"MOTOR
FUNCIONANDO"},{"addr":"M20.2","name":"MOTOR
PARADO"},{"addr":"I10.6","name":"INDICACION DE GIRO"},{"addr":"M20.0","name":"MOTOR
IZQUIERDA"},{"addr":"M20.1","name":"MOTOR DERECHA"},{"addr":"M0.5","name":"RESET
TIEMPOS"},{"addr":"MW14","name":"TIEMPO DERECHA"},{"addr":"MW12","name":"TIEMPO
IZQUIERDA"},{"addr":"MW16","name":"TIEMPO
PARADO"},{"addr":"IW12","name":"VELOCIDAD"},{"addr":"MW18","name":"VELOCIDAD_ABS"
},{"addr":"MB30","name":"RESULTADO_COMPARACION"},{"addr":"I11.3","name":"FALLO"},{"a
ddr":"M1.0","name":"EVENTO ENTRANTE"},{"addr":"M2.0","name":"NO HAY
FALLO"},{"addr":"M2.1","name":"FALLO VARIADOR"},{"addr":"M2.2","name":"FALLO
COMUNICACION"},{"addr":"M0.7","name":"RESET FALLO"},{"addr":"Q11.7","name":"RESET DE
FALLO"},{"addr":"QW80","name":"SALIDA ANALOGICA"},{"addr":"MB20","name":"ESTADO
MOTOR"},{"addr":"MB2","name":"ALARMAS"}]},{"id":"5d36422d.7ea04c","type":"ui_group","z
":"","name":"CONTROL MARCHAS /
PARO","tab":"815b769c.840108","order":2,"disp":true,"width":"6"},{"id":"815b769c.840108","
type":"ui_tab","z":"","name":"CONTROL","icon":"dashboard","order":1}]

5
Fouad Rifi
CFGS Automatització i Robòtica Industrial

CONSIGNA RPM SLIDER

6
Fouad Rifi
CFGS Automatització i Robòtica Industrial

Codigo Consigna RPM Slider


[{"id":"eb9f867e.078028","type":"tab","label":"CONSIGNA RPM
SLIDER"},{"id":"444a78af.019d08","type":"comment","z":"eb9f867e.078028","name":"HABILIT
ACION
CONSIGNA","info":"","x":549,"y":71,"wires":[]},{"id":"81881c75.592fd","type":"ui_switch","z":
"eb9f867e.078028","name":"HABILITAR / DESHABILITAR","label":"DESHABILITAR
/HABILITAR","group":"52fdad11.c8bc44","order":0,"width":0,"height":0,"passthru":true,"topic
":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"fals
e","offvalueType":"bool","officon":"","offcolor":"","x":183,"y":123,"wires":[["fdf25287.57318",
"2c698eac.599e12"]]},{"id":"fdf25287.57318","type":"s7
out","z":"eb9f867e.078028","endpoint":"7716e795.d07978","variable":"HABILITACION
CONSIGNA","name":"HABILITACIÓN
CONSIGNA","x":925,"y":120,"wires":[]},{"id":"2c698eac.599e12","type":"function","z":"eb9f86
7e.078028","name":"HABILITADA/DESHABILITADA","func":"if (msg.payload
===true)\nmsg.payload =\"HABILITADA\";\nelse\nmsg.payload =\"DESHABILITADA\";\nreturn
msg;\n","outputs":1,"noerr":0,"x":572,"y":232,"wires":[["69351a8b.59d484"]]},{"id":"69351a8
b.59d484","type":"ui_text","z":"eb9f867e.078028","group":"52fdad11.c8bc44","order":0,"wid
th":0,"height":0,"name":"ESTADO CONSIGNA","label":"ESTADO
CONSIGNA:","format":"{{msg.payload}}","layout":"row-
spread","x":909,"y":232,"wires":[]},{"id":"f4f17caf.d899e","type":"comment","z":"eb9f867e.07
8028","name":"ESCRIBIR
CONSIGNA","info":"","x":535,"y":347,"wires":[]},{"id":"d81a3992.56ff78","type":"ui_slider","z"
:"eb9f867e.078028","name":"","label":"0-
1500","group":"ec77898a.712e88","order":0,"width":0,"height":0,"passthru":true,"topic":"","
min":0,"max":"16348","step":"10","x":171,"y":414,"wires":[["46499ecf.069bd"]]},{"id":"46499
ecf.069bd","type":"s7
out","z":"eb9f867e.078028","endpoint":"7716e795.d07978","variable":"CONSIGNA
ENVIO","name":"CONSIGNA
ENVIO","x":899,"y":410,"wires":[]},{"id":"f02308f5.188a08","type":"comment","z":"eb9f867e.
078028","name":"LEER CONSIGNA /
VELOCIDAD","info":"","x":540,"y":486,"wires":[]},{"id":"4353ee14.d995b","type":"s7
in","z":"eb9f867e.078028","endpoint":"7716e795.d07978","mode":"single","variable":"CONSI
GNA","diff":true,"name":"CONSIGNA","x":175,"y":572,"wires":[["ea736c75.0db2f"]]},{"id":"4d
73503f.d538f","type":"s7
in","z":"eb9f867e.078028","endpoint":"7716e795.d07978","mode":"single","variable":"CONSI
GNA","diff":true,"name":"","x":175,"y":641,"wires":[["800e10b2.5eff3"]]},{"id":"15021c3b.f2b
1b4","type":"s7
in","z":"eb9f867e.078028","endpoint":"7716e795.d07978","mode":"single","variable":"VELOC
IDAD_ABS","diff":true,"name":"","x":187,"y":716,"wires":[["36865511.effd9a"]]},{"id":"800e10
b2.5eff3","type":"range","z":"eb9f867e.078028","minin":"0","maxin":"16384","minout":"0","
maxout":"1500","action":"scale","round":true,"name":"16384 =
1500","x":470,"y":642,"wires":[["bb8ba3a7.c5aeb"]]},{"id":"ea736c75.0db2f","type":"function"
,"z":"eb9f867e.078028","name":"valor","func":"msg.payload = msg.payload + \"

7
Fouad Rifi
CFGS Automatització i Robòtica Industrial

valor\";\nreturn
msg;","outputs":1,"noerr":0,"x":747,"y":575,"wires":[["8bc3c3a2.b1c18"]]},{"id":"bb8ba3a7.c5
aeb","type":"function","z":"eb9f867e.078028","name":"R.P.M.","func":"msg.payload =
msg.payload + \" R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":746,"y":643,"wires":[["f5253045.1994c"]]},{"id":"36865511.eff
d9a","type":"range","z":"eb9f867e.078028","minin":"0","maxin":"16384","minout":"0","maxo
ut":"1500","action":"scale","round":true,"name":"16384 =
1500","x":476,"y":715,"wires":[["70011025.f35cc"]]},{"id":"70011025.f35cc","type":"function",
"z":"eb9f867e.078028","name":"R.P.M.","func":"msg.payload = msg.payload + \"
R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":744,"y":712,"wires":[["30eba193.0c342e"]]},{"id":"8bc3c3a2.b
1c18","type":"ui_text","z":"eb9f867e.078028","group":"84b23827.762c68","order":0,"width":
0,"height":0,"name":"","label":"CONSIGNA (0 A
16384):","format":"{{msg.payload}}","layout":"row-
spread","x":1061,"y":570,"wires":[]},{"id":"f5253045.1994c","type":"ui_text","z":"eb9f867e.07
8028","group":"84b23827.762c68","order":0,"width":0,"height":0,"name":"","label":"CONSIG
NA (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1062,"y":641,"wires":[]},{"id":"30eba193.0c342e","type":"ui_text","z":"eb9f867e.0
78028","group":"84b23827.762c68","order":0,"width":0,"height":0,"name":"","label":"VELOCI
DAD (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1060,"y":713,"wires":[]},{"id":"52fdad11.c8bc44","type":"ui_group","z":"","name":
"HABILITACIÓN
CONSIGNA","tab":"280ee96e.fc4686","order":1,"disp":true,"width":"6"},{"id":"7716e795.d079
78","type":"s7
endpoint","z":"","address":"192.168.1.20","port":"102","rack":"0","slot":"1","localtsaphi":"01"
,"localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-
slot","cycletime":"500","timeout":"1500","verbose":"default","name":"PLC S7-
12000","vartable":[{"addr":"QW10","name":"CONTROL"},{"addr":"M0.3","name":"HABILITACI
ON CONTROL"},{"addr":"M0.4","name":"HABILITACION
CONSIGNA"},{"addr":"M0.0","name":"MARCHA DERECHA"},{"addr":"M0.1","name":"MARCHA
IZQUIERDA"},{"addr":"M0.2","name":"PARO"},{"addr":"MW10","name":"CONSIGNA
ENVIO"},{"addr":"QW12","name":"CONSIGNA"},{"addr":"I11.1","name":"MOTOR
FUNCIONANDO"},{"addr":"M20.2","name":"MOTOR
PARADO"},{"addr":"I10.6","name":"INDICACION DE GIRO"},{"addr":"M20.0","name":"MOTOR
IZQUIERDA"},{"addr":"M20.1","name":"MOTOR DERECHA"},{"addr":"M0.5","name":"RESET
TIEMPOS"},{"addr":"MW14","name":"TIEMPO DERECHA"},{"addr":"MW12","name":"TIEMPO
IZQUIERDA"},{"addr":"MW16","name":"TIEMPO
PARADO"},{"addr":"IW12","name":"VELOCIDAD"},{"addr":"MW18","name":"VELOCIDAD_ABS"
},{"addr":"MB30","name":"RESULTADO_COMPARACION"},{"addr":"I11.3","name":"FALLO"},{"a
ddr":"M1.0","name":"EVENTO ENTRANTE"},{"addr":"M2.0","name":"NO HAY
FALLO"},{"addr":"M2.1","name":"FALLO VARIADOR"},{"addr":"M2.2","name":"FALLO
COMUNICACION"},{"addr":"M0.7","name":"RESET FALLO"},{"addr":"Q11.7","name":"RESET DE
FALLO"},{"addr":"QW80","name":"SALIDA ANALOGICA"},{"addr":"MB20","name":"ESTADO

8
Fouad Rifi
CFGS Automatització i Robòtica Industrial

MOTOR"},{"addr":"MB2","name":"ALARMAS"}]},{"id":"ec77898a.712e88","type":"ui_group","z
":"","name":"ESCRIBIR
CONSIGNA","tab":"280ee96e.fc4686","order":2,"disp":true,"width":"6"},{"id":"84b23827.762c
68","type":"ui_group","z":"","name":"LEER CONSIGNA /
VELICIDAD","tab":"280ee96e.fc4686","order":3,"disp":true,"width":"6"},{"id":"280ee96e.fc468
6","type":"ui_tab","z":"","name":"CONSIGNA RPM SLIDER","icon":"dashboard","order":2}]

9
Fouad Rifi
CFGS Automatització i Robòtica Industrial

CONSIGNA RPM BOTONES

10
Fouad Rifi
CFGS Automatització i Robòtica Industrial

Codigo Consigna RPM Botones


[{"id":"29ed0929.828206","type":"tab","label":"CONSIGNA RPM
BOTONES"},{"id":"28ff3303.de596c","type":"comment","z":"29ed0929.828206","name":"BOT
ONES
RPM","info":"","x":444,"y":68,"wires":[]},{"id":"118178fb.d22587","type":"ui_button","z":"29e
d0929.828206","name":"","group":"46fc0f87.4e66a","order":0,"width":"3","height":"1","label
":"0
RPM","color":"","icon":"","payload":"0","payloadType":"num","topic":"","x":151,"y":132,"wire
s":[["200443d3.511edc"]]},{"id":"4f157215.e8886c","type":"ui_button","z":"29ed0929.828206
","name":"","group":"46fc0f87.4e66a","order":0,"width":"3","height":"1","label":"300
RPM","color":"","icon":"","payload":"300","payloadType":"num","topic":"","x":152,"y":195,"wi
res":[["200443d3.511edc"]]},{"id":"ff761986.10e108","type":"ui_button","z":"29ed0929.82820
6","name":"","group":"46fc0f87.4e66a","order":0,"width":"3","height":"1","label":"600
RPM","color":"","icon":"","payload":"600","payloadType":"num","topic":"","x":155,"y":248,"wi
res":[["200443d3.511edc"]]},{"id":"cafa34a.b0e13c8","type":"ui_button","z":"29ed0929.82820
6","name":"","group":"46fc0f87.4e66a","order":0,"width":"3","height":"1","label":"900
RPM","color":"","icon":"","payload":"900","payloadType":"num","topic":"","x":155,"y":304,"wi
res":[["200443d3.511edc"]]},{"id":"3cb8395b.f05406","type":"ui_button","z":"29ed0929.8282
06","name":"","group":"46fc0f87.4e66a","order":0,"width":"3","height":"1","label":"1200
RPM","color":"","icon":"","payload":"1200","payloadType":"num","topic":"","x":159,"y":363,"
wires":[["200443d3.511edc"]]},{"id":"442d73dc.f9aa0c","type":"ui_button","z":"29ed0929.828
206","name":"","group":"46fc0f87.4e66a","order":0,"width":"3","height":"1","label":"1500
RPM","color":"","icon":"","payload":"1500","payloadType":"num","topic":"","x":161,"y":419,"
wires":[["200443d3.511edc"]]},{"id":"200443d3.511edc","type":"range","z":"29ed0929.82820
6","minin":"0","maxin":"1500","minout":"0","maxout":"16384","action":"scale","round":true,"
name":"1500 =
16384","x":437,"y":238,"wires":[["5d8a9101.24222"]]},{"id":"5d8a9101.24222","type":"s7
out","z":"29ed0929.828206","endpoint":"7716e795.d07978","variable":"CONSIGNA
ENVIO","name":"CONSIGNA
ENVÍO","x":823,"y":239,"wires":[]},{"id":"51d399d6.1aba88","type":"comment","z":"29ed0929
.828206","name":"LEER CONSIGNA /
VELOCIDAD","info":"","x":478,"y":469,"wires":[]},{"id":"3d125600.b8079a","type":"s7
in","z":"29ed0929.828206","endpoint":"7716e795.d07978","mode":"single","variable":"CONSI
GNA","diff":true,"name":"","x":164,"y":567,"wires":[["ab661d7b.2e065"]]},{"id":"b7a9bca4.e0
4ab","type":"s7
in","z":"29ed0929.828206","endpoint":"7716e795.d07978","mode":"single","variable":"CONSI
GNA","diff":true,"name":"","x":165,"y":640,"wires":[["737c19b4.3912d8"]]},{"id":"a688cde.b9
a013","type":"s7
in","z":"29ed0929.828206","endpoint":"7716e795.d07978","mode":"single","variable":"VELOC
IDAD_ABS","diff":true,"name":"","x":182,"y":712,"wires":[["1c50b7f7.e704c8"]]},{"id":"737c19
b4.3912d8","type":"range","z":"29ed0929.828206","minin":"0","maxin":"16384","minout":"0"
,"maxout":"1500","action":"scale","round":true,"name":"16384 A
1500","x":451,"y":639,"wires":[["ac97f2a3.5badb"]]},{"id":"ab661d7b.2e065","type":"function

11
Fouad Rifi
CFGS Automatització i Robòtica Industrial

","z":"29ed0929.828206","name":"valor","func":"msg.payload = msg.payload + \"


valor\";\nreturn
msg;","outputs":1,"noerr":0,"x":622,"y":566,"wires":[["f2015859.3ad968"]]},{"id":"ac97f2a3.5
badb","type":"function","z":"29ed0929.828206","name":"RPM","func":"msg.payload =
msg.payload + \" R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":622,"y":639,"wires":[["39de3593.17251a"]]},{"id":"1c50b7f7.e
704c8","type":"range","z":"29ed0929.828206","minin":"0","maxin":"16384","minout":"0","ma
xout":"1500","action":"scale","round":true,"name":"16384 A
1500","x":436,"y":712,"wires":[["119036c9.702b29"]]},{"id":"119036c9.702b29","type":"functi
on","z":"29ed0929.828206","name":"RPM","func":"msg.payload = msg.payload + \"
R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":616,"y":711,"wires":[["b4c9b4d8.2e7d48"]]},{"id":"f2015859.3
ad968","type":"ui_text","z":"29ed0929.828206","group":"b8ee8fec.d6cc4","order":0,"width":
0,"height":0,"name":"","label":"CONSIGNA (0 A
16384):","format":"{{msg.payload}}","layout":"row-
spread","x":1005,"y":568,"wires":[]},{"id":"39de3593.17251a","type":"ui_text","z":"29ed0929.
828206","group":"b8ee8fec.d6cc4","order":0,"width":0,"height":0,"name":"","label":"CONSIG
NA (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1005,"y":637,"wires":[]},{"id":"b4c9b4d8.2e7d48","type":"ui_text","z":"29ed0929.
828206","group":"b8ee8fec.d6cc4","order":0,"width":0,"height":0,"name":"","label":"VELOCID
AD (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1011,"y":715,"wires":[]},{"id":"46fc0f87.4e66a","type":"ui_group","z":"","name":"
BOTONES
RPM","tab":"80104a98.41f078","order":1,"disp":true,"width":"6"},{"id":"7716e795.d07978","t
ype":"s7
endpoint","z":"","address":"192.168.1.20","port":"102","rack":"0","slot":"1","localtsaphi":"01"
,"localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-
slot","cycletime":"500","timeout":"1500","verbose":"default","name":"PLC S7-
12000","vartable":[{"addr":"QW10","name":"CONTROL"},{"addr":"M0.3","name":"HABILITACI
ON CONTROL"},{"addr":"M0.4","name":"HABILITACION
CONSIGNA"},{"addr":"M0.0","name":"MARCHA DERECHA"},{"addr":"M0.1","name":"MARCHA
IZQUIERDA"},{"addr":"M0.2","name":"PARO"},{"addr":"MW10","name":"CONSIGNA
ENVIO"},{"addr":"QW12","name":"CONSIGNA"},{"addr":"I11.1","name":"MOTOR
FUNCIONANDO"},{"addr":"M20.2","name":"MOTOR
PARADO"},{"addr":"I10.6","name":"INDICACION DE GIRO"},{"addr":"M20.0","name":"MOTOR
IZQUIERDA"},{"addr":"M20.1","name":"MOTOR DERECHA"},{"addr":"M0.5","name":"RESET
TIEMPOS"},{"addr":"MW14","name":"TIEMPO DERECHA"},{"addr":"MW12","name":"TIEMPO
IZQUIERDA"},{"addr":"MW16","name":"TIEMPO
PARADO"},{"addr":"IW12","name":"VELOCIDAD"},{"addr":"MW18","name":"VELOCIDAD_ABS"
},{"addr":"MB30","name":"RESULTADO_COMPARACION"},{"addr":"I11.3","name":"FALLO"},{"a
ddr":"M1.0","name":"EVENTO ENTRANTE"},{"addr":"M2.0","name":"NO HAY
FALLO"},{"addr":"M2.1","name":"FALLO VARIADOR"},{"addr":"M2.2","name":"FALLO
COMUNICACION"},{"addr":"M0.7","name":"RESET FALLO"},{"addr":"Q11.7","name":"RESET DE

12
Fouad Rifi
CFGS Automatització i Robòtica Industrial

FALLO"},{"addr":"QW80","name":"SALIDA ANALOGICA"},{"addr":"MB20","name":"ESTADO
MOTOR"},{"addr":"MB2","name":"ALARMAS"}]},{"id":"b8ee8fec.d6cc4","type":"ui_group","z":
"","name":"LEER CONSIGNA /
VELOCIDAD","tab":"80104a98.41f078","order":2,"disp":true,"width":"6"},{"id":"80104a98.41f0
78","type":"ui_tab","z":"","name":"CONSIGNA RPM BOTONES","icon":"dashboard","order":3}]

13
Fouad Rifi
CFGS Automatització i Robòtica Industrial

VELOCIDAD Y CONSIGNA

14
Fouad Rifi
CFGS Automatització i Robòtica Industrial

Codigo Velocidad y Consigna


[{"id":"649c4c4d.5654c4","type":"tab","label":"VELOCIDAD Y
CONSIGNA"},{"id":"e903dcfa.3b99","type":"comment","z":"649c4c4d.5654c4","name":"GRAFI
CAS VELOCIDAD /
CONSIGNA","info":"","x":484,"y":59,"wires":[]},{"id":"dbf753a0.8e47c","type":"s7
in","z":"649c4c4d.5654c4","endpoint":"7716e795.d07978","mode":"single","variable":"CONSI
GNA","diff":true,"name":"CONSIGNA","x":112,"y":209,"wires":[["4c6a4306.a7232c"]]},{"id":"8
99145ac.41f0f8","type":"comment","z":"649c4c4d.5654c4","name":"RELACION VELOCIDAD /
CONSIGNA","info":"","x":488,"y":286,"wires":[]},{"id":"649854a6.3c0cfc","type":"s7
in","z":"649c4c4d.5654c4","endpoint":"7716e795.d07978","mode":"single","variable":"RESUL
TADO_COMPARACION","diff":true,"name":"","x":175,"y":349,"wires":[["5b67eb00.887044"]]},
{"id":"5b67eb00.887044","type":"function","z":"649c4c4d.5654c4","name":"COMPARACIÓN",
"func":"if (msg.payload ===1)\nmsg.payload =\"VELOCIDAD MENOR QUE CONSIGNA\";\nif
(msg.payload ===2)\nmsg.payload =\"VELOCIDAD IGUAL QUE CONSIGNA\";\nif (msg.payload
===3)\nmsg.payload =\"VELOCIDAD MAYOR QUE CONSIGNA\";\nreturn
msg;","outputs":1,"noerr":0,"x":491,"y":349,"wires":[["d4c33eae.d8042"]]},{"id":"efe6e611.02
bac8","type":"comment","z":"649c4c4d.5654c4","name":"CONSIGNA CON
DROPDOWN","info":"","x":480,"y":424,"wires":[]},{"id":"618fca9d.de21f4","type":"ui_dropdo
wn","z":"649c4c4d.5654c4","name":"","label":"ELIGE
VELOCIDAD","group":"5682b7f7.d82c88","order":0,"width":0,"height":0,"passthru":true,"opti
ons":[{"label":"0 RPM","value":0,"type":"num"},{"label":"300
RPM","value":300,"type":"num"},{"label":"600 RPM","value":600,"type":"num"},{"label":"900
RPM","value":900,"type":"num"},{"label":"1200
RPM","value":1200,"type":"num"},{"label":"1500
RPM","value":1500,"type":"num"}],"payload":"","topic":"","x":151,"y":510,"wires":[["4cd339c
2.3f4448"]]},{"id":"4cd339c2.3f4448","type":"range","z":"649c4c4d.5654c4","minin":"0","maxi
n":"1500","minout":"0","maxout":"16384","action":"scale","round":true,"name":"1500 =
16384","x":457,"y":510,"wires":[["2121585e.8d0618"]]},{"id":"2121585e.8d0618","type":"s7
out","z":"649c4c4d.5654c4","endpoint":"7716e795.d07978","variable":"CONSIGNA
ENVIO","name":"CONSIGNA
ENVÍO","x":919,"y":513,"wires":[]},{"id":"4c6a4306.a7232c","type":"range","z":"649c4c4d.565
4c4","minin":"0","maxin":"16384","minout":"0","maxout":"1500","action":"scale","round":tru
e,"name":"1500 =
16384","x":484,"y":211,"wires":[["6211d267.4f74cc"]]},{"id":"d4c33eae.d8042","type":"ui_tex
t","z":"649c4c4d.5654c4","group":"49234849.936ec8","order":0,"width":0,"height":0,"name":
"","label":"RELACION VELOCIDAD / CONSIGNA: ","format":"{{msg.payload}}","layout":"row-
spread","x":870,"y":348,"wires":[]},{"id":"e82d6213.b9a68","type":"ui_gauge","z":"649c4c4d.5
654c4","name":"VELOCIDAD","group":"ef0b5840.aa2aa8","order":0,"width":"3","height":"2","
gtype":"gage","title":"VELOCIDAD","label":"RPM","format":"{{value}}","min":0,"max":"1500","
colors":["#008000","#008000","#008000"],"x":932,"y":139,"wires":[]},{"id":"6211d267.4f74cc"
,"type":"ui_gauge","z":"649c4c4d.5654c4","name":"CONSIGNA","group":"ef0b5840.aa2aa8","
order":0,"width":"3","height":"2","gtype":"gage","title":"CONSIGNA","label":"RPM","format":"
{{value}}","min":0,"max":"1500","colors":["#00ff00","#00ff00","#00ff00"],"x":933,"y":212,"wir

15
Fouad Rifi
CFGS Automatització i Robòtica Industrial

es":[]},{"id":"e6b2f2c4.5a78b","type":"s7
in","z":"649c4c4d.5654c4","endpoint":"7716e795.d07978","mode":"single","variable":"VELOCI
DAD_ABS","diff":true,"name":"","x":128,"y":136,"wires":[["838fc90b.f60428"]]},{"id":"838fc90
b.f60428","type":"range","z":"649c4c4d.5654c4","minin":"0","maxin":"16384","minout":"0","
maxout":"1500","action":"scale","round":true,"name":"16384 =
1500","x":486,"y":136,"wires":[["e82d6213.b9a68"]]},{"id":"7716e795.d07978","type":"s7
endpoint","z":"","address":"192.168.1.20","port":"102","rack":"0","slot":"1","localtsaphi":"01"
,"localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-
slot","cycletime":"500","timeout":"1500","verbose":"default","name":"PLC S7-
12000","vartable":[{"addr":"QW10","name":"CONTROL"},{"addr":"M0.3","name":"HABILITACI
ON CONTROL"},{"addr":"M0.4","name":"HABILITACION
CONSIGNA"},{"addr":"M0.0","name":"MARCHA DERECHA"},{"addr":"M0.1","name":"MARCHA
IZQUIERDA"},{"addr":"M0.2","name":"PARO"},{"addr":"MW10","name":"CONSIGNA
ENVIO"},{"addr":"QW12","name":"CONSIGNA"},{"addr":"I11.1","name":"MOTOR
FUNCIONANDO"},{"addr":"M20.2","name":"MOTOR
PARADO"},{"addr":"I10.6","name":"INDICACION DE GIRO"},{"addr":"M20.0","name":"MOTOR
IZQUIERDA"},{"addr":"M20.1","name":"MOTOR DERECHA"},{"addr":"M0.5","name":"RESET
TIEMPOS"},{"addr":"MW14","name":"TIEMPO DERECHA"},{"addr":"MW12","name":"TIEMPO
IZQUIERDA"},{"addr":"MW16","name":"TIEMPO
PARADO"},{"addr":"IW12","name":"VELOCIDAD"},{"addr":"MW18","name":"VELOCIDAD_ABS"
},{"addr":"MB30","name":"RESULTADO_COMPARACION"},{"addr":"I11.3","name":"FALLO"},{"a
ddr":"M1.0","name":"EVENTO ENTRANTE"},{"addr":"M2.0","name":"NO HAY
FALLO"},{"addr":"M2.1","name":"FALLO VARIADOR"},{"addr":"M2.2","name":"FALLO
COMUNICACION"},{"addr":"M0.7","name":"RESET FALLO"},{"addr":"Q11.7","name":"RESET DE
FALLO"},{"addr":"QW80","name":"SALIDA ANALOGICA"},{"addr":"MB20","name":"ESTADO
MOTOR"},{"addr":"MB2","name":"ALARMAS"}]},{"id":"5682b7f7.d82c88","type":"ui_group","z
":"","name":"CONSIGNA CON
DROPDOWN","tab":"8c3e32a4.8bd3e","order":3,"disp":true,"width":"6"},{"id":"49234849.936
ec8","type":"ui_group","z":"","name":"RELACION
VELOCIDAD/CONSIGNA","tab":"8c3e32a4.8bd3e","order":2,"disp":true,"width":"6"},{"id":"ef0
b5840.aa2aa8","type":"ui_group","z":"","name":"GRAFICAS VELOCIDAD /
CONSIGNA","tab":"8c3e32a4.8bd3e","order":1,"disp":true,"width":"6"},{"id":"8c3e32a4.8bd3e
","type":"ui_tab","z":"","name":"VELOCIDAD Y CONSIGNA","icon":"dashboard","order":4}]

16
Fouad Rifi
CFGS Automatització i Robòtica Industrial

CONTROL TIEMPOS

17
Fouad Rifi
CFGS Automatització i Robòtica Industrial

Codigo Control Tiempos


[{"id":"ec51159f.5b2268","type":"tab","label":"CONTROL
TIEMPOS"},{"id":"a2e17312.b73a","type":"comment","z":"ec51159f.5b2268","name":"FUNCIO
NAMIENTOS","info":"","x":473,"y":39,"wires":[]},{"id":"192bb967.a6f397","type":"s7
in","z":"ec51159f.5b2268","endpoint":"7716e795.d07978","mode":"single","variable":"TIEMP
O DERECHA","diff":true,"name":"TIEMPO
DERECHA","x":132,"y":97,"wires":[["2c9a5512.bdd9fa"]]},{"id":"2c9a5512.bdd9fa","type":"fun
ction","z":"ec51159f.5b2268","name":"SEGUNDOS","func":"msg.payload = msg.payload + \"
Seg.\";\nreturn
msg;","outputs":1,"noerr":0,"x":488,"y":97,"wires":[["fef0b7e1.958218"]]},{"id":"fef0b7e1.958
218","type":"ui_text","z":"ec51159f.5b2268","group":"631359ad.14fcb8","order":0,"width":0,
"height":0,"name":"","label":"TIEMPO DERECHA:","format":"{{msg.payload}}","layout":"row-
spread","x":832,"y":98,"wires":[]},{"id":"b1f05c4b.bcd7d","type":"s7
in","z":"ec51159f.5b2268","endpoint":"7716e795.d07978","mode":"single","variable":"TIEMP
O IZQUIERDA","diff":true,"name":"TIEMPO
IZQUIERDA","x":144,"y":159,"wires":[["1e7fea6.6229216"]]},{"id":"1e7fea6.6229216","type":"f
unction","z":"ec51159f.5b2268","name":"SEGUNDOS","func":"msg.payload = msg.payload + \"
Seg.\";\nreturn
msg;","outputs":1,"noerr":0,"x":487,"y":160,"wires":[["6fabdfc7.58043"]]},{"id":"6fabdfc7.580
43","type":"ui_text","z":"ec51159f.5b2268","group":"631359ad.14fcb8","order":0,"width":0,"
height":0,"name":"","label":"FUNCIONA A
IZQUIERDA:","format":"{{msg.payload}}","layout":"row-
spread","x":854,"y":159,"wires":[]},{"id":"1777d935.c4d127","type":"s7
in","z":"ec51159f.5b2268","endpoint":"7716e795.d07978","mode":"single","variable":"TIEMP
O PARADO","diff":true,"name":"TIEMPO
PARADO","x":137,"y":218,"wires":[["4c5fdad3.9e23b4"]]},{"id":"4c5fdad3.9e23b4","type":"fun
ction","z":"ec51159f.5b2268","name":"SEGUNDOS","func":"msg.payload = msg.payload + \"
Seg.\";\nreturn
msg;","outputs":1,"noerr":0,"x":488,"y":220,"wires":[["ad029b4d.3e6ae8"]]},{"id":"ad029b4d.
3e6ae8","type":"ui_text","z":"ec51159f.5b2268","group":"631359ad.14fcb8","order":0,"width
":0,"height":0,"name":"","label":"MOTOR
PARADO:","format":"{{msg.payload}}","layout":"row-
spread","x":823,"y":222,"wires":[]},{"id":"7ac18007.fe1f8","type":"comment","z":"ec51159f.5
b2268","name":"GRAFICO
TIEMPOS","info":"","x":481,"y":283,"wires":[]},{"id":"28bd34c0.be39bc","type":"ui_gauge","z":
"ec51159f.5b2268","name":"","group":"77375f3f.0bd","order":0,"width":"2","height":"2","gty
pe":"gage","title":"DERECHA","label":"Mins","format":"{{value}}","min":0,"max":"10","colors":
["#00b500","#e6e600","#ca3838"],"x":827,"y":356,"wires":[]},{"id":"b09bc5fe.087058","type":
"ui_gauge","z":"ec51159f.5b2268","name":"","group":"77375f3f.0bd","order":0,"width":"2","
height":"2","gtype":"gage","title":"IZQUIERDA","label":"Mins","format":"{{value}}","min":0,"m
ax":"10","colors":["#00b500","#e6e600","#ca3838"],"x":824,"y":426,"wires":[]},{"id":"c2590ec
a.88357","type":"ui_gauge","z":"ec51159f.5b2268","name":"","group":"77375f3f.0bd","order"
:0,"width":"2","height":"2","gtype":"gage","title":"PARADO","label":"Mins","format":"{{value}}

18
Fouad Rifi
CFGS Automatització i Robòtica Industrial

","min":0,"max":"10","colors":["#00b500","#e6e600","#ca3838"],"x":826,"y":493,"wires":[]},{"i
d":"a0c773d6.b9093","type":"comment","z":"ec51159f.5b2268","name":"PUESTA A
CERO","info":"","x":509,"y":573,"wires":[]},{"id":"9482f7a0.75d658","type":"ui_button","z":"ec
51159f.5b2268","name":"","group":"25d606d.134c2fa","order":0,"width":0,"height":0,"label":
"RESET
TIEMPOS","color":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":148,"y":62
8,"wires":[["668240ea.a4123"]]},{"id":"668240ea.a4123","type":"s7
out","z":"ec51159f.5b2268","endpoint":"7716e795.d07978","variable":"RESET
TIEMPOS","name":"RESET
TIEMPOS","x":814,"y":628,"wires":[]},{"id":"4531539.c432bac","type":"s7
in","z":"ec51159f.5b2268","endpoint":"7716e795.d07978","mode":"single","variable":"TIEMP
O PARADO","diff":true,"name":"TIEMPO
PARADO","x":139,"y":496,"wires":[["d841409b.d3669"]]},{"id":"7074e02d.2db1e","type":"s7
in","z":"ec51159f.5b2268","endpoint":"7716e795.d07978","mode":"single","variable":"TIEMP
O IZQUIERDA","diff":true,"name":"TIEMPO
IZQUIERDA","x":147,"y":427,"wires":[["200f4928.1fae16"]]},{"id":"dc3eaae5.d733b8","type":"s
7
in","z":"ec51159f.5b2268","endpoint":"7716e795.d07978","mode":"single","variable":"TIEMP
O DERECHA","diff":true,"name":"TIEMPO
DERECHA","x":134,"y":354,"wires":[["a70044c1.7ade48"]]},{"id":"d841409b.d3669","type":"ra
nge","z":"ec51159f.5b2268","minin":"0","maxin":"60","minout":"0","maxout":"1","action":"sc
ale","round":true,"name":"60 s = 1
min","x":487,"y":494,"wires":[["c2590eca.88357"]]},{"id":"200f4928.1fae16","type":"range","z
":"ec51159f.5b2268","minin":"0","maxin":"60","minout":"0","maxout":"1","action":"scale","ro
und":true,"name":"60 s = 1
min","x":490,"y":426,"wires":[["b09bc5fe.087058"]]},{"id":"a70044c1.7ade48","type":"range",
"z":"ec51159f.5b2268","minin":"0","maxin":"60","minout":"0","maxout":"1","action":"scale","
round":true,"name":"60 s = 1
min","x":488,"y":355,"wires":[["28bd34c0.be39bc"]]},{"id":"7716e795.d07978","type":"s7
endpoint","z":"","address":"192.168.1.20","port":"102","rack":"0","slot":"1","localtsaphi":"01"
,"localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-
slot","cycletime":"500","timeout":"1500","verbose":"default","name":"PLC S7-
12000","vartable":[{"addr":"QW10","name":"CONTROL"},{"addr":"M0.3","name":"HABILITACI
ON CONTROL"},{"addr":"M0.4","name":"HABILITACION
CONSIGNA"},{"addr":"M0.0","name":"MARCHA DERECHA"},{"addr":"M0.1","name":"MARCHA
IZQUIERDA"},{"addr":"M0.2","name":"PARO"},{"addr":"MW10","name":"CONSIGNA
ENVIO"},{"addr":"QW12","name":"CONSIGNA"},{"addr":"I11.1","name":"MOTOR
FUNCIONANDO"},{"addr":"M20.2","name":"MOTOR
PARADO"},{"addr":"I10.6","name":"INDICACION DE GIRO"},{"addr":"M20.0","name":"MOTOR
IZQUIERDA"},{"addr":"M20.1","name":"MOTOR DERECHA"},{"addr":"M0.5","name":"RESET
TIEMPOS"},{"addr":"MW14","name":"TIEMPO DERECHA"},{"addr":"MW12","name":"TIEMPO
IZQUIERDA"},{"addr":"MW16","name":"TIEMPO
PARADO"},{"addr":"IW12","name":"VELOCIDAD"},{"addr":"MW18","name":"VELOCIDAD_ABS"

19
Fouad Rifi
CFGS Automatització i Robòtica Industrial

},{"addr":"MB30","name":"RESULTADO_COMPARACION"},{"addr":"I11.3","name":"FALLO"},{"a
ddr":"M1.0","name":"EVENTO ENTRANTE"},{"addr":"M2.0","name":"NO HAY
FALLO"},{"addr":"M2.1","name":"FALLO VARIADOR"},{"addr":"M2.2","name":"FALLO
COMUNICACION"},{"addr":"M0.7","name":"RESET FALLO"},{"addr":"Q11.7","name":"RESET DE
FALLO"},{"addr":"QW80","name":"SALIDA ANALOGICA"},{"addr":"MB20","name":"ESTADO
MOTOR"},{"addr":"MB2","name":"ALARMAS"}]},{"id":"631359ad.14fcb8","type":"ui_group","z
":"","name":"FUNCIONAMIENTOS","tab":"8f83f0f5.6af74","order":1,"disp":true,"width":"6"},{"
id":"77375f3f.0bd","type":"ui_group","z":"","name":"GRAFICOS
TIEMPOS","tab":"8f83f0f5.6af74","order":2,"disp":true,"width":"6"},{"id":"25d606d.134c2fa","
type":"ui_group","z":"","name":"PUESTA A
CERO","tab":"8f83f0f5.6af74","order":3,"disp":true,"width":"6"},{"id":"8f83f0f5.6af74","type":
"ui_tab","z":"","name":"CONTROL TIEMPOS","icon":"dashboard","order":5}]

20
Fouad Rifi
CFGS Automatització i Robòtica Industrial

CONTROL ALARMA

21
Fouad Rifi
CFGS Automatització i Robòtica Industrial

Codigo Control Alarma


[{"id":"5c746894.ed01b8","type":"tab","label":"CONTROL
ALARMA"},{"id":"906cac7e.82de4","type":"comment","z":"5c746894.ed01b8","name":"FUNCI
ONAMIENTO
SINAMICS","info":"","x":550,"y":75,"wires":[]},{"id":"d67e68a6.9bc868","type":"s7
in","z":"5c746894.ed01b8","endpoint":"7716e795.d07978","mode":"single","variable":"ALAR
MAS","diff":true,"name":"ALARMAS","x":112,"y":158,"wires":[["8af9107e.2529d"]]},{"id":"8af
9107e.2529d","type":"function","z":"5c746894.ed01b8","name":"NO HAY FALLO","func":"if
(msg.payload ===1)\nmsg.payload = \"FUNCIONAMIENTO CORRECTO EN SINAMIC\";\nif
(msg.payload ===2)\nmsg.payload = \"HAY UN FALLO EN SINAMIC. PULSAR RESET
ALARMA\";\nif (msg.payload ===4)\nmsg.payload = \"FALLO DE COMUNICACIÓN, MIRAR
CABLE RJ45\";\n\nreturn
msg;","outputs":1,"noerr":0,"x":746,"y":161,"wires":[["ff5173b0.90a66"]]},{"id":"ff5173b0.90a
66","type":"ui_text","z":"5c746894.ed01b8","group":"2d87959f.fbaada","order":0,"width":0,"
height":0,"name":"","label":"ESTADO:","format":"{{msg.payload}}","layout":"row-
spread","x":1129,"y":219,"wires":[]},{"id":"70160c22.408184","type":"comment","z":"5c74689
4.ed01b8","name":"BOTONES
ALARMA","info":"","x":530,"y":220,"wires":[]},{"id":"8c68950.b0fb868","type":"ui_button","z":
"5c746894.ed01b8","name":"","group":"8cca4d42.b222f","order":0,"width":0,"height":0,"labe
l":"PRUEBA DE
MAIL","color":"#FF0000","icon":"mail","payload":"true","payloadType":"bool","topic":"","x":2
70,"y":380,"wires":[["5ceb4806.e7d588"]]},{"id":"8791385c.87b9f8","type":"e-
mail","z":"5c746894.ed01b8","server":"smtp.gmail.com","port":"465","name":"Rifi.fouad1996
@gmail.com","dname":"MAIL
ALARMA","x":1130,"y":379,"wires":[]},{"id":"2f9b40e2.e9835","type":"ui_button","z":"5c7468
94.ed01b8","name":"Reset
alarma","group":"8cca4d42.b222f","order":0,"width":0,"height":0,"label":"Reset
alarma","color":"#ffff00","icon":"sync","payload":"true","payloadType":"bool","topic":"","x":1
14,"y":442,"wires":[["3b545ad5.f342e6"]]},{"id":"fa43c19b.76c28","type":"function","z":"5c74
6894.ed01b8","name":"","func":"if(msg.payload ===1)\nmsg.payload= \"Variador Sinamic
control bomba 1: -Comunicación OK y no hay fallo. -El SINAMIC está preparado para ponerse
en marcha. -Hora y fecha del evento= \" + Date().toString(),\nmsg.topic = \"BOMBA 1 ESTA
BIEN\";\nif(msg.payload ===2)\nmsg.payload= \"Variador Sinamic control bomba 1: -
ALARMA¡¡¡¡¡ Hay un fallo en el variador. -Hay comunicación con el PLC. Pulsar botón de reset
fallo. -Hora y fecha del evento = \" + Date().toString(),\nmsg.topic = \"BOMBA 1 ESTA EN
FALLO\";\nif(msg.payload ===4)\nmsg.payload= \"Variador Sinamic control bomba 1: -
ALARMA¡¡¡¡¡ Ha fallado la comunicación con el Sinamic.- Comprobar el cable de comunicación
RJ45.-Hora y fecha del evento = \" + Date().toString(),\nmsg.topic = \"BOMBA 1 NO
COMUNICA\";\nreturn
msg;","outputs":1,"noerr":0,"x":710,"y":320,"wires":[["8791385c.87b9f8"]]},{"id":"3b545ad5.f
342e6","type":"s7
out","z":"5c746894.ed01b8","endpoint":"7716e795.d07978","variable":"RESET
FALLO","name":"RESET

22
Fouad Rifi
CFGS Automatització i Robòtica Industrial

FALLO","x":1131,"y":441,"wires":[]},{"id":"efa9ad5c.e3856","type":"comment","z":"5c746894.
ed01b8","name":"DESPACHO
AUTOMATISMOS","info":"","x":553,"y":501,"wires":[]},{"id":"53f8cb40.6b4ff4","type":"iot2000
-io-pulse","z":"5c746894.ed01b8","name":"50
ms","interval":"50","x":102,"y":566,"wires":[["720333e3.1c057c"]]},{"id":"720333e3.1c057c","
type":"iot2000-io-
ai","z":"5c746894.ed01b8","name":"TEMPERATURA","pin":"U1","x":444,"y":566,"wires":[["f28
28110.b151c"]]},{"id":"76c0bd38.d2dd04","type":"ui_text","z":"5c746894.ed01b8","group":"c
eb392e6.394f","order":0,"width":0,"height":0,"name":"","label":"TEMPERATURA ACTUAL:
","format":"{{msg.payload}} ºC","layout":"row-
spread","x":1163,"y":562,"wires":[]},{"id":"f2828110.b151c","type":"range","z":"5c746894.ed0
1b8","minin":"0","maxin":"1023","minout":"-
40","maxout":"110","action":"scale","round":true,"name":"","x":800,"y":561,"wires":[["76c0b
d38.d2dd04"]]},{"id":"9f57315.823e0d","type":"s7
in","z":"5c746894.ed01b8","endpoint":"7716e795.d07978","mode":"single","variable":"ALAR
MAS","diff":true,"name":"ALARMAS","x":320,"y":320,"wires":[["fa43c19b.76c28"]]},{"id":"5ce
b4806.e7d588","type":"function","z":"5c746894.ed01b8","name":"","func":"msg.payload=
\"ESTE ES UN MENSAJE DE PRUEBA: TODO ERAN RISAS HASTA QUE NOS DIMOS CUENTA QUE
EL TARTAMUDO QUERÍA JAMÓN \" + Date().toString(),\nmsg.topic = \"MENSAJE DE
PRUEBA\";\n\nreturn
msg;","outputs":1,"noerr":0,"x":710,"y":380,"wires":[["8791385c.87b9f8"]]},{"id":"7716e795.d
07978","type":"s7
endpoint","z":"","address":"192.168.1.20","port":"102","rack":"0","slot":"1","localtsaphi":"01"
,"localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-
slot","cycletime":"500","timeout":"1500","verbose":"default","name":"PLC S7-
12000","vartable":[{"addr":"QW10","name":"CONTROL"},{"addr":"M0.3","name":"HABILITACI
ON CONTROL"},{"addr":"M0.4","name":"HABILITACION
CONSIGNA"},{"addr":"M0.0","name":"MARCHA DERECHA"},{"addr":"M0.1","name":"MARCHA
IZQUIERDA"},{"addr":"M0.2","name":"PARO"},{"addr":"MW10","name":"CONSIGNA
ENVIO"},{"addr":"QW12","name":"CONSIGNA"},{"addr":"I11.1","name":"MOTOR
FUNCIONANDO"},{"addr":"M20.2","name":"MOTOR
PARADO"},{"addr":"I10.6","name":"INDICACION DE GIRO"},{"addr":"M20.0","name":"MOTOR
IZQUIERDA"},{"addr":"M20.1","name":"MOTOR DERECHA"},{"addr":"M0.5","name":"RESET
TIEMPOS"},{"addr":"MW14","name":"TIEMPO DERECHA"},{"addr":"MW12","name":"TIEMPO
IZQUIERDA"},{"addr":"MW16","name":"TIEMPO
PARADO"},{"addr":"IW12","name":"VELOCIDAD"},{"addr":"MW18","name":"VELOCIDAD_ABS"
},{"addr":"MB30","name":"RESULTADO_COMPARACION"},{"addr":"I11.3","name":"FALLO"},{"a
ddr":"M1.0","name":"EVENTO ENTRANTE"},{"addr":"M2.0","name":"NO HAY
FALLO"},{"addr":"M2.1","name":"FALLO VARIADOR"},{"addr":"M2.2","name":"FALLO
COMUNICACION"},{"addr":"M0.7","name":"RESET FALLO"},{"addr":"Q11.7","name":"RESET DE
FALLO"},{"addr":"QW80","name":"SALIDA ANALOGICA"},{"addr":"MB20","name":"ESTADO
MOTOR"},{"addr":"MB2","name":"ALARMAS"}]},{"id":"2d87959f.fbaada","type":"ui_group","z"
:"","name":"FUNCIONAMIENTO

23
Fouad Rifi
CFGS Automatització i Robòtica Industrial

SINAMICS","tab":"ff2e7f1a.e17e3","order":1,"disp":true,"width":"6"},{"id":"8cca4d42.b222f","
type":"ui_group","z":"","name":"BOTONES
ALARMA","tab":"ff2e7f1a.e17e3","order":2,"disp":true,"width":"6"},{"id":"ceb392e6.394f","ty
pe":"ui_group","z":"","name":"DESPACHO
AUTOMATISMOS","tab":"ff2e7f1a.e17e3","order":3,"disp":true,"width":"6"},{"id":"ff2e7f1a.e1
7e3","type":"ui_tab","z":"","name":"CONTROL ALARMA","icon":"dashboard","order":6}]

24
Fouad Rifi
CFGS Automatització i Robòtica Industrial

IMPRESIÓN DE LOS TRES MAILS RECIBIDOS + EL DE PRUEBA

MAIL DE PRUEBA:

25
Fouad Rifi
CFGS Automatització i Robòtica Industrial

MAIL FUNCIONAMIENTO CORRECTO:

MAIL FALLO EN VARIADOR:

26
Fouad Rifi
CFGS Automatització i Robòtica Industrial

MAIL FALLO COMUNICACIÓN:

27
Fouad Rifi
CFGS Automatització i Robòtica Industrial

CODIGO COMPLETO DE TODO EL PROYECTO

[{"id":"a7ce8a98.115c28","type":"tab","label":"CONTROL"},{"id":"7a348692.2dcc68","type":"t
ab","label":"CONSIGNA RPM
SLIDER"},{"id":"8424747d.3012d8","type":"tab","label":"CONSIGNA RPM
BOTONES"},{"id":"d85ec897.93f748","type":"tab","label":"VELOCIDAD Y
CONSIGNA"},{"id":"3de6e3d3.5464ac","type":"tab","label":"CONTROL
TIEMPOS"},{"id":"6b088c11.0f1804","type":"tab","label":"CONTROL
ALARMA"},{"id":"ed106163.7e5a2","type":"ui_group","z":"","name":"Habilitar
Control","tab":"","order":1,"disp":true,"width":"6"},{"id":"8b1e78ba.67aec8","type":"ui_group
","z":"","name":"Control
Marcha/Paro","tab":"","order":2,"disp":true,"width":"6"},{"id":"e6c59178.588c","type":"ui_gr
oup","z":"","name":"Habilitación
Consigna","tab":"","order":1,"disp":true,"width":"6"},{"id":"c87e22e8.8edc3","type":"ui_group
","z":"","name":"Escribir
Consigna","tab":"","order":2,"disp":true,"width":"6"},{"id":"77702cec.cec6f4","type":"ui_grou
p","z":"","name":"Leer Consigna /
Velocidad","tab":"","order":3,"disp":true,"width":"6"},{"id":"fcca2ee1.a1a32","type":"ui_group
","z":"","name":"Botones
RPM","tab":"","order":1,"disp":true,"width":"6"},{"id":"12aee29.e24141d","type":"ui_group","
z":"","name":"Leer Consigna /
Velocidad","tab":"","order":2,"disp":true,"width":"6"},{"id":"d00fb545.378ee8","type":"ui_gro
up","z":"","name":"Graficas Velocidad /
Consigna","tab":"","order":1,"disp":true,"width":"6"},{"id":"dfe28291.a598d","type":"ui_group
","z":"","name":"Relación Velocidad /
Consigna","tab":"","order":2,"disp":true,"width":"6"},{"id":"24685bd7.30c834","type":"ui_gro
up","z":"","name":"Consigna con
Dropdown","tab":"","order":3,"disp":true,"width":"6"},{"id":"2e603a35.6f9866","type":"ui_gro
up","name":"Group
3","tab":"","order":3,"disp":true,"width":6},{"id":"e0c9a18.83b5e6","type":"ui_group","z":"","
name":"Funcionamientos","tab":"","order":1,"disp":true,"width":"6"},{"id":"15212f89.73e77",
"type":"ui_group","z":"","name":"Grabación
Tiempos","tab":"","order":2,"disp":true,"width":"6"},{"id":"4bfa947c.26066c","type":"ui_grou
p","z":"","name":"Puesta a

28
Fouad Rifi
CFGS Automatització i Robòtica Industrial

0","tab":"","order":3,"disp":true,"width":"6"},{"id":"fec701e8.43dfb","type":"ui_group","z":"",
"name":"Funcionamiento
Sinamics","tab":"","order":1,"disp":true,"width":"6"},{"id":"1ee8ea3f.c2b416","type":"ui_grou
p","z":"","name":"Botones
Alarma","tab":"","order":2,"disp":true,"width":"6"},{"id":"7c334a57.489174","type":"ui_group
","z":"","name":"Despacho
Automatismos","tab":"","order":3,"disp":true,"width":"6"},{"id":"9840eeb6.a8e0a","type":"ui_
base","name":"Rifi","theme":"theme-
light"},{"id":"2c60d315.ab044c","type":"ui_group","z":"","name":"HABILITACIÓN
CONTROL","tab":"","order":1,"disp":true,"width":"6"},{"id":"bc8aba9c.fb4a08","type":"ui_grou
p","z":"","name":"CONTROL MARCHAS /
PARO","tab":"","order":2,"disp":true,"width":"6"},{"id":"3b7efa6d.ec9e26","type":"ui_group",
"z":"","name":"HABILITACIÓN
CONSIGNA","tab":"","order":1,"disp":true,"width":"6"},{"id":"9e43c3c6.91b4e","type":"ui_gro
up","z":"","name":"ESCRIBIR
CONSIGNA","tab":"","order":2,"disp":true,"width":"6"},{"id":"ff6d7cda.93921","type":"ui_grou
p","z":"","name":"LEER CONSIGNA /
VELOCIDAD","tab":"","order":3,"disp":true,"width":"6"},{"id":"a23082e2.7aed3","type":"ui_gr
oup","z":"","name":"BOTONES
RPM","tab":"","order":1,"disp":true,"width":"6"},{"id":"1c04e3b9.166c3c","type":"ui_group","
z":"","name":"LEER CONSIGNA /
VELOCIDAD","tab":"","order":2,"disp":true,"width":"6"},{"id":"c5573f25.9c3e2","type":"ui_gro
up","z":"","name":"GRAFICAS VELOCIDAD /
CONSIGNA","tab":"","order":1,"disp":true,"width":"6"},{"id":"29cc28f5.044cd8","type":"ui_gro
up","z":"","name":"RELACIÓN VELOCIDAD /
CONSIGNA","tab":"","order":2,"disp":true,"width":"6"},{"id":"660ad801.2b6568","type":"ui_gr
oup","z":"","name":"CONSIGNA CON
DROPDOWN","tab":"","order":3,"disp":true,"width":"6"},{"id":"a5690a93.783d08","type":"ui_
base","name":"Variador Sebi","theme":"theme-
dark"},{"id":"ee577c8c.b6899","type":"ui_group","z":"","name":"HABLITACIÓN
CONTROL","tab":"","order":1,"disp":true,"width":"6"},{"id":"8f76867e.872258","type":"ui_gro
up","z":"","name":"CONTROL MARCHAS
/PARO","tab":"","order":2,"disp":true,"width":"6"},{"id":"7a38a629.718918","type":"ui_group"
,"z":"","name":"HABILITACIÓN
CONSIGNA","tab":"","order":1,"disp":true,"width":"6"},{"id":"7f6e52d9.3a8c5c","type":"ui_gro
up","z":"","name":"ESCRIBIR
CONSIGNA","tab":"","order":2,"disp":true,"width":"6"},{"id":"77172920.2fec18","type":"ui_gr
oup","z":"","name":"LEER CONSIGNA /
VELOCIDAD","tab":"","order":3,"disp":true,"width":"6"},{"id":"d7059cbc.5f17f","type":"ui_gro
up","z":"","name":"BOTONES
RPM","tab":"","order":1,"disp":true,"width":"6"},{"id":"e359def8.d1d23","type":"ui_group","z
":"","name":"LEER CONSIGNA /
VELOCIDAD","tab":"","order":2,"disp":true,"width":"6"},{"id":"937a3ce9.2c658","type":"ui_gro

29
Fouad Rifi
CFGS Automatització i Robòtica Industrial

up","z":"","name":"GRAFICAS VELOCIDAD / CONSIGNA


","tab":"","order":1,"disp":true,"width":"7"},{"id":"d02ec038.9e1a3","type":"ui_group","z":"","
name":"RELACIÓN VELOCIDAD CONSIGNA
","tab":"","order":2,"disp":true,"width":"6"},{"id":"70f7485e.25a988","type":"ui_group","z":"",
"name":"CONSIGNA CON DROPDPWN
","tab":"","order":3,"disp":true,"width":"6"},{"id":"3aa1ee93.837ed2","type":"ui_group","z":""
,"name":"FUNCIONAMIENTOS
","tab":"","order":1,"disp":true,"width":"6"},{"id":"a4d15f2a.a9ef","type":"ui_group","z":"","n
ame":"GRAFICOS TIEMPOS
","tab":"","order":2,"disp":true,"width":"6"},{"id":"f7b396f1.cbfd18","type":"ui_group","z":"","
name":"PUESTA A CERO
","tab":"","order":3,"disp":true,"width":"6"},{"id":"e2c93d2a.6c9aa","type":"ui_group","z":"","
name":"FUNCIONAMIENTO
SINAMICS","tab":"","order":1,"disp":true,"width":"6"},{"id":"35151c6f.7b3e04","type":"ui_gro
up","z":"","name":"BOTONES
ALARMA","tab":"","order":2,"disp":true,"width":"6"},{"id":"45862920.2f99b8","type":"ui_grou
p","z":"","name":"DESPACHO AUTOMATISMOS
","tab":"","order":3,"disp":true,"width":"6"},{"id":"435b8665.740288","type":"ui_group","z":""
,"name":"HABILITACIÓN
CONTROL","tab":"","order":1,"disp":true,"width":"6"},{"id":"8b7f0796.3c7f18","type":"ui_grou
p","z":"","name":"CONTROL MARCHAS /
PARO","tab":"","order":2,"disp":true,"width":"6"},{"id":"c6223291.cae6f","type":"ui_group","z
":"","name":"HABILITACIÓN
CONSIGNA","tab":"","order":1,"disp":true,"width":"6"},{"id":"7614628d.d9bacc","type":"ui_gr
oup","z":"","name":"ESCRIBIR
CONSIGNA","tab":"","order":2,"disp":true,"width":"6"},{"id":"ffb3a69d.1eeeb8","type":"ui_gro
up","z":"","name":"LEER Consigna /
VELOCIDAD","tab":"","order":3,"disp":true,"width":"6"},{"id":"a74d57da.a61088","type":"ui_g
roup","z":"","name":"BOTONES
RPM","tab":"","order":1,"disp":true,"width":"6"},{"id":"58f8e52d.9d257c","type":"ui_group","
z":"","name":"LEER CONSIGNA /
VELOCIDAD","tab":"","order":2,"disp":true,"width":"6"},{"id":"a10639eb.3cd0e8","type":"ui_g
roup","z":"","name":"GRAFICAS VELOCIDAD /
CONSIGNA","tab":"","order":1,"disp":true,"width":"6"},{"id":"1224427a.861b2e","type":"ui_gr
oup","z":"","name":"RELACIÓN VELOCIDAD /
CONSIGNA","tab":"","order":2,"disp":true,"width":"6"},{"id":"ecbc24fa.2754e8","type":"ui_gro
up","z":"","name":"CONSIGNA CON
DROPDOWN","tab":"","order":3,"disp":true,"width":"6"},{"id":"a74334c4.942838","type":"ui_
group","z":"","name":"FUNCIONAMIENTOS","tab":"","order":1,"disp":true,"width":"6"},{"id":"
b26fd5c9.309bf8","type":"ui_group","z":"","name":"GRAFICOS
TIEMPOS","tab":"","order":2,"disp":true,"width":"6"},{"id":"4bce9473.30c00c","type":"ui_grou
p","z":"","name":"PUESTA A
CERO","tab":"","order":3,"disp":true,"width":"6"},{"id":"b62f4dab.f6632","type":"ui_group","z

30
Fouad Rifi
CFGS Automatització i Robòtica Industrial

":"","name":"FUNCIONAMIENTO
SINAMICS","tab":"","order":1,"disp":true,"width":"6"},{"id":"b39429c0.ac6428","type":"ui_gro
up","z":"","name":"BOTONES
ALARMAS","tab":"","order":2,"disp":true,"width":"6"},{"id":"7aec4af1.4db774","type":"ui_gro
up","z":"","name":"DESPACHO
AUTOMATAS","tab":"","order":3,"disp":true,"width":"6"},{"id":"d550e94d.ec5438","type":"ui_
base","theme":{"name":"theme-
light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-
system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica
Neue,sans-
serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","
baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-
Sans,Ubuntu,Cantarell,Helvetica Neue,sans-
serif","edited":false},"customTheme":{"name":"Untitled Theme
1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-
system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica
Neue,sans-serif"},"themeState":{"base-
color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-
backgroundColor":{"value":"#0094CE","edited":false},"page-
backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-
backgroundColor":{"value":"#ffffff","edited":false},"group-
textColor":{"value":"#1bbfff","edited":false},"group-
borderColor":{"value":"#ffffff","edited":false},"group-
backgroundColor":{"value":"#ffffff","edited":false},"widget-
textColor":{"value":"#111111","edited":false},"widget-
backgroundColor":{"value":"#0094ce","edited":false},"widget-
borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-
system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica
Neue,sans-
serif"}}}},{"id":"85dd5a8.ffc9ca8","type":"ui_tab","z":"","name":"CONTROL","icon":"dashboard
","order":1},{"id":"94e1a69.c02eb58","type":"ui_group","z":"","name":"HABILITACIÓN
CONTROL","tab":"85dd5a8.ffc9ca8","order":1,"disp":true,"width":"6"},{"id":"eec80023.8cf01",
"type":"ui_group","z":"","name":"CONTROL MARCHAS /
PARO","tab":"85dd5a8.ffc9ca8","order":2,"disp":true,"width":"6"},{"id":"4b6a88c3.efe848","ty
pe":"ui_tab","z":"","name":"CONSIGNA RPM
SLIDER","icon":"dashboard","order":2},{"id":"ecdf1117.e4f5d","type":"ui_group","z":"","name
":"HABILITACIÓN
CONSIGNA","tab":"4b6a88c3.efe848","order":1,"disp":true,"width":"6"},{"id":"b530f01c.5f071
","type":"ui_group","z":"","name":"ESCRIBIR
CONSIGNA","tab":"4b6a88c3.efe848","order":2,"disp":true,"width":"6"},{"id":"1d1e29a.26f36
d6","type":"ui_tab","z":"","name":"CONSIGNA RPM
BOTONES","icon":"dashboard","order":3},{"id":"57b587f9.f05a68","type":"ui_group","z":"","n
ame":"LEER CONSIGNA /

31
Fouad Rifi
CFGS Automatització i Robòtica Industrial

VELICIDAD","tab":"4b6a88c3.efe848","order":3,"disp":true,"width":"6"},{"id":"9d5154.0cb5de
b","type":"ui_group","z":"","name":"BOTONES
RPM","tab":"1d1e29a.26f36d6","order":1,"disp":true,"width":"6"},{"id":"496b46bb.0280f8","t
ype":"ui_group","z":"","name":"LEER CONSIGNA /
VELOCIDAD","tab":"1d1e29a.26f36d6","order":2,"disp":true,"width":"6"},{"id":"7c5b1599.8fd
11c","type":"ui_tab","z":"","name":"VELOCIDAD Y
CONSIGNA","icon":"dashboard","order":4},{"id":"b563a4.f5441c6","type":"ui_group","z":"","n
ame":"GRAFICAS VELOCIDAD /
CONSIGNA","tab":"7c5b1599.8fd11c","order":1,"disp":true,"width":"6"},{"id":"e4b8d149.609b
7","type":"ui_group","z":"","name":"RELACION
VELOCIDAD/CONSIGNA","tab":"7c5b1599.8fd11c","order":2,"disp":true,"width":"6"},{"id":"1a
8803c.6b07dfc","type":"ui_group","z":"","name":"CONSIGNA CON
DROPDOWN","tab":"7c5b1599.8fd11c","order":3,"disp":true,"width":"6"},{"id":"349b27d1.92
8eb8","type":"ui_tab","z":"","name":"CONTROL
TIEMPOS","icon":"dashboard","order":5},{"id":"81177a9b.44d518","type":"ui_group","z":"","n
ame":"FUNCIONAMIENTOS","tab":"349b27d1.928eb8","order":1,"disp":true,"width":"6"},{"id"
:"f4e95cac.ecdbb","type":"ui_group","z":"","name":"GRAFICOS
TIEMPOS","tab":"349b27d1.928eb8","order":2,"disp":true,"width":"6"},{"id":"61f21462.097dd
c","type":"ui_group","z":"","name":"PUESTA A
CERO","tab":"349b27d1.928eb8","order":3,"disp":true,"width":"6"},{"id":"b54fb39a.e7a21","t
ype":"ui_tab","z":"","name":"CONTROL
ALARMA","icon":"dashboard","order":6},{"id":"ba5f82d8.fc6a6","type":"ui_group","z":"","nam
e":"FUNCIONAMIENTO
SINAMICS","tab":"b54fb39a.e7a21","order":1,"disp":true,"width":"6"},{"id":"dbf041d.06f36c",
"type":"ui_group","z":"","name":"BOTONES
ALARMA","tab":"b54fb39a.e7a21","order":2,"disp":true,"width":"6"},{"id":"df794c7.60e56b","
type":"ui_group","z":"","name":"DESPACHO
AUTOMATISMOS","tab":"b54fb39a.e7a21","order":3,"disp":true,"width":"6"},{"id":"7408d556.
dc218c","type":"s7
endpoint","z":"","address":"192.168.1.20","port":"102","rack":"0","slot":"1","localtsaphi":"01"
,"localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-
slot","cycletime":"500","timeout":"1500","verbose":"default","name":"PLC S7-
12000","vartable":[{"addr":"QW10","name":"CONTROL"},{"addr":"M0.3","name":"HABILITACI
ON CONTROL"},{"addr":"M0.4","name":"HABILITACION
CONSIGNA"},{"addr":"M0.0","name":"MARCHA DERECHA"},{"addr":"M0.1","name":"MARCHA
IZQUIERDA"},{"addr":"M0.2","name":"PARO"},{"addr":"MW10","name":"CONSIGNA
ENVIO"},{"addr":"QW12","name":"CONSIGNA"},{"addr":"I11.1","name":"MOTOR
FUNCIONANDO"},{"addr":"M20.2","name":"MOTOR
PARADO"},{"addr":"I10.6","name":"INDICACION DE GIRO"},{"addr":"M20.0","name":"MOTOR
IZQUIERDA"},{"addr":"M20.1","name":"MOTOR DERECHA"},{"addr":"M0.5","name":"RESET
TIEMPOS"},{"addr":"MW14","name":"TIEMPO DERECHA"},{"addr":"MW12","name":"TIEMPO
IZQUIERDA"},{"addr":"MW16","name":"TIEMPO
PARADO"},{"addr":"IW12","name":"VELOCIDAD"},{"addr":"MW18","name":"VELOCIDAD_ABS"

32
Fouad Rifi
CFGS Automatització i Robòtica Industrial

},{"addr":"MB30","name":"RESULTADO_COMPARACION"},{"addr":"I11.3","name":"FALLO"},{"a
ddr":"M1.0","name":"EVENTO ENTRANTE"},{"addr":"M2.0","name":"NO HAY
FALLO"},{"addr":"M2.1","name":"FALLO VARIADOR"},{"addr":"M2.2","name":"FALLO
COMUNICACION"},{"addr":"M0.7","name":"RESET FALLO"},{"addr":"Q11.7","name":"RESET DE
FALLO"},{"addr":"QW80","name":"SALIDA ANALOGICA"},{"addr":"MB20","name":"ESTADO
MOTOR"},{"addr":"MB2","name":"ALARMAS"}]},{"id":"a044e37d.3e156","type":"ui_base","the
me":"theme-light"},{"id":"5b8b5227.1c774c","type":"ui_group","name":"Group
1","tab":"","order":1,"disp":true,"width":6},{"id":"535a4a53.3bfd84","type":"ui_switch","z":"a
7ce8a98.115c28","name":"HABILITAR / DESABILITAR","label":"DESHABILITAR
/HABILITAR","group":"94e1a69.c02eb58","order":0,"width":0,"height":0,"passthru":true,"topi
c":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"fal
se","offvalueType":"bool","officon":"","offcolor":"","x":306,"y":162,"wires":[["3da00191.231e
ae","d3c141f9.c7735"]]},{"id":"3da00191.231eae","type":"s7
out","z":"a7ce8a98.115c28","endpoint":"7408d556.dc218c","variable":"HABILITACION
CONTROL","name":"HABILITACIÓN
CONTROL","x":693,"y":171,"wires":[]},{"id":"10790cb0.d7ac53","type":"comment","z":"a7ce8a
98.115c28","name":"HABILITACIÓN
CONTROL","info":"","x":586,"y":59,"wires":[]},{"id":"d3c141f9.c7735","type":"function","z":"a
7ce8a98.115c28","name":"TEXTO A VISUALIZAR","func":"if (msg.payload
===true)\nmsg.payload =\"HABILITADA\";\nelse\nmsg.payload =\"DESHABILITADA\";\nreturn
msg;\n","outputs":1,"noerr":0,"x":706,"y":278,"wires":[["9d65cd91.0bb67"]]},{"id":"9d65cd91.
0bb67","type":"ui_text","z":"a7ce8a98.115c28","group":"94e1a69.c02eb58","order":0,"width"
:0,"height":0,"name":"ESTADO CONTROL","label":"ESTADO
CONTROL:","format":"{{msg.payload}}","layout":"row-
spread","x":1036,"y":278,"wires":[]},{"id":"8d48188a.0e4008","type":"comment","z":"a7ce8a9
8.115c28","name":"CONTROL MARCHA /
PARO","info":"","x":577,"y":419,"wires":[]},{"id":"441b9965.e7e208","type":"ui_button","z":"a
7ce8a98.115c28","name":"MARCHA
DERECHA","group":"eec80023.8cf01","order":0,"width":0,"height":0,"label":"MARCHA
DERECHA","color":"#00ff00","icon":"rotate_right","payload":"true","payloadType":"bool","top
ic":"","x":156,"y":507,"wires":[["bb7384de.c806e8"]]},{"id":"33292f0c.7af59","type":"ui_butto
n","z":"a7ce8a98.115c28","name":"MARCHA
IZQUIERDA","group":"eec80023.8cf01","order":0,"width":0,"height":0,"label":"MARCHA
IZQUIERDA","color":"#0000ff","icon":"rotate_left","payload":"true","payloadType":"bool","top
ic":"","x":161,"y":578,"wires":[["284f5d62.d87d22"]]},{"id":"61a744d5.97132c","type":"ui_but
ton","z":"a7ce8a98.115c28","name":"PARO","group":"eec80023.8cf01","order":0,"width":0,"h
eight":0,"label":"PARO","color":"#ff0000","icon":"pause_circle_outline","payload":"true","payl
oadType":"bool","topic":"","x":115,"y":642,"wires":[["f7e44430.902188"]]},{"id":"bb7384de.c8
06e8","type":"s7
out","z":"a7ce8a98.115c28","endpoint":"7408d556.dc218c","variable":"MARCHA
DERECHA","name":"MARCHA
DERECHA","x":422,"y":507,"wires":[]},{"id":"284f5d62.d87d22","type":"s7
out","z":"a7ce8a98.115c28","endpoint":"7408d556.dc218c","variable":"MARCHA

33
Fouad Rifi
CFGS Automatització i Robòtica Industrial

IZQUIERDA","name":"MARCHA
IZQUIERDA","x":418,"y":578,"wires":[]},{"id":"f7e44430.902188","type":"s7
out","z":"a7ce8a98.115c28","endpoint":"7408d556.dc218c","variable":"PARO","name":"PARO
","x":369,"y":641,"wires":[]},{"id":"ff92f7a4.10a608","type":"s7
in","z":"a7ce8a98.115c28","endpoint":"7408d556.dc218c","mode":"single","variable":"ESTAD
O MOTOR","diff":true,"name":"ESTADO
MOTOR","x":641,"y":509,"wires":[["590c515e.331e3"]]},{"id":"590c515e.331e3","type":"functi
on","z":"a7ce8a98.115c28","name":"ESTADO MOTOR","func":"if
(msg.payload===1)\nmsg.payload=\"MOTOR IZQUIERDA\";\nif
(msg.payload===2)\nmsg.payload=\"MOTOR DERECHA\";\nif
(msg.payload===4)\nmsg.payload=\"MOTOR PARADO\";\nreturn
msg;","outputs":1,"noerr":0,"x":860,"y":510,"wires":[["999e944c.1a6938"]]},{"id":"999e944c.1
a6938","type":"ui_text","z":"a7ce8a98.115c28","group":"eec80023.8cf01","order":0,"width":0
,"height":0,"name":"","label":"ESTADO MOTOR: ","format":"{{msg.payload}}","layout":"row-
spread","x":1157,"y":576,"wires":[]},{"id":"ba4293c.948047","type":"comment","z":"7a348692
.2dcc68","name":"HABILITACION
CONSIGNA","info":"","x":549,"y":71,"wires":[]},{"id":"b971198d.9329b8","type":"ui_switch","z
":"7a348692.2dcc68","name":"HABILITAR / DESHABILITAR","label":"DESHABILITAR
/HABILITAR","group":"ecdf1117.e4f5d","order":0,"width":0,"height":0,"passthru":true,"topic":
"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false"
,"offvalueType":"bool","officon":"","offcolor":"","x":183,"y":123,"wires":[["f082aa81.c19eb8","
f2ad7450.542b68"]]},{"id":"f082aa81.c19eb8","type":"s7
out","z":"7a348692.2dcc68","endpoint":"7408d556.dc218c","variable":"HABILITACION
CONSIGNA","name":"HABILITACIÓN
CONSIGNA","x":925,"y":120,"wires":[]},{"id":"f2ad7450.542b68","type":"function","z":"7a3486
92.2dcc68","name":"HABILITADA/DESHABILITADA","func":"if (msg.payload
===true)\nmsg.payload =\"HABILITADA\";\nelse\nmsg.payload =\"DESHABILITADA\";\nreturn
msg;\n","outputs":1,"noerr":0,"x":572,"y":232,"wires":[["826c72f8.90528"]]},{"id":"826c72f8.9
0528","type":"ui_text","z":"7a348692.2dcc68","group":"ecdf1117.e4f5d","order":0,"width":0,
"height":0,"name":"ESTADO CONSIGNA","label":"ESTADO
CONSIGNA:","format":"{{msg.payload}}","layout":"row-
spread","x":909,"y":232,"wires":[]},{"id":"e3a7f65f.e5a938","type":"comment","z":"7a348692.
2dcc68","name":"ESCRIBIR
CONSIGNA","info":"","x":535,"y":347,"wires":[]},{"id":"466ce43f.0e761c","type":"ui_slider","z"
:"7a348692.2dcc68","name":"","label":"0-
1500","group":"b530f01c.5f071","order":0,"width":0,"height":0,"passthru":true,"topic":"","mi
n":0,"max":"16348","step":"10","x":171,"y":414,"wires":[["8e5b206d.1a7e"]]},{"id":"8e5b206d
.1a7e","type":"s7
out","z":"7a348692.2dcc68","endpoint":"7408d556.dc218c","variable":"CONSIGNA
ENVIO","name":"CONSIGNA
ENVIO","x":899,"y":410,"wires":[]},{"id":"1053684.0a19b98","type":"comment","z":"7a348692
.2dcc68","name":"LEER CONSIGNA /
VELOCIDAD","info":"","x":540,"y":486,"wires":[]},{"id":"da2d9509.0a40d8","type":"comment",

34
Fouad Rifi
CFGS Automatització i Robòtica Industrial

"z":"8424747d.3012d8","name":"BOTONES
RPM","info":"","x":444,"y":68,"wires":[]},{"id":"87cdf69b.1aae28","type":"ui_button","z":"842
4747d.3012d8","name":"","group":"9d5154.0cb5deb","order":0,"width":"3","height":"1","labe
l":"0
RPM","color":"","icon":"","payload":"0","payloadType":"num","topic":"","x":151,"y":132,"wire
s":[["d1ffcb18.027378"]]},{"id":"4e36f94d.d74098","type":"ui_button","z":"8424747d.3012d8"
,"name":"","group":"9d5154.0cb5deb","order":0,"width":"3","height":"1","label":"300
RPM","color":"","icon":"","payload":"300","payloadType":"num","topic":"","x":152,"y":195,"wi
res":[["d1ffcb18.027378"]]},{"id":"4b382833.dfaf18","type":"ui_button","z":"8424747d.3012d
8","name":"","group":"9d5154.0cb5deb","order":0,"width":"3","height":"1","label":"600
RPM","color":"","icon":"","payload":"600","payloadType":"num","topic":"","x":155,"y":248,"wi
res":[["d1ffcb18.027378"]]},{"id":"8df52028.ccc0b","type":"ui_button","z":"8424747d.3012d8"
,"name":"","group":"9d5154.0cb5deb","order":0,"width":"3","height":"1","label":"900
RPM","color":"","icon":"","payload":"900","payloadType":"num","topic":"","x":155,"y":304,"wi
res":[["d1ffcb18.027378"]]},{"id":"f60cf358.55a1b","type":"ui_button","z":"8424747d.3012d8"
,"name":"","group":"9d5154.0cb5deb","order":0,"width":"3","height":"1","label":"1200
RPM","color":"","icon":"","payload":"1200","payloadType":"num","topic":"","x":159,"y":363,"
wires":[["d1ffcb18.027378"]]},{"id":"71c1f998.787ea8","type":"ui_button","z":"8424747d.301
2d8","name":"","group":"9d5154.0cb5deb","order":0,"width":"3","height":"1","label":"1500
RPM","color":"","icon":"","payload":"1500","payloadType":"num","topic":"","x":161,"y":419,"
wires":[["d1ffcb18.027378"]]},{"id":"d1ffcb18.027378","type":"range","z":"8424747d.3012d8",
"minin":"0","maxin":"1500","minout":"0","maxout":"16384","action":"scale","round":true,"na
me":"1500 =
16384","x":437,"y":238,"wires":[["7d98f244.27709c"]]},{"id":"7d98f244.27709c","type":"s7
out","z":"8424747d.3012d8","endpoint":"7408d556.dc218c","variable":"CONSIGNA
ENVIO","name":"CONSIGNA
ENVÍO","x":823,"y":239,"wires":[]},{"id":"9adeba1a.29cdd8","type":"comment","z":"8424747d
.3012d8","name":"LEER CONSIGNA /
VELOCIDAD","info":"","x":478,"y":469,"wires":[]},{"id":"e07abe7f.4d29e","type":"s7
in","z":"7a348692.2dcc68","endpoint":"7408d556.dc218c","mode":"single","variable":"CONSI
GNA","diff":true,"name":"CONSIGNA","x":175,"y":572,"wires":[["2008f986.d54306"]]},{"id":"4
6988e07.1ed25","type":"s7
in","z":"7a348692.2dcc68","endpoint":"7408d556.dc218c","mode":"single","variable":"CONSI
GNA","diff":true,"name":"","x":175,"y":641,"wires":[["78b680e.46ec98"]]},{"id":"55e38e26.bf1
bf","type":"s7
in","z":"7a348692.2dcc68","endpoint":"7408d556.dc218c","mode":"single","variable":"VELOCI
DAD_ABS","diff":true,"name":"","x":187,"y":716,"wires":[["aa2d9b1d.2e8008"]]},{"id":"78b68
0e.46ec98","type":"range","z":"7a348692.2dcc68","minin":"0","maxin":"16384","minout":"0",
"maxout":"1500","action":"scale","round":true,"name":"16384 =
1500","x":470,"y":642,"wires":[["5400237f.33580c"]]},{"id":"7230217d.1faae","type":"comme
nt","z":"d85ec897.93f748","name":"GRAFICAS VELOCIDAD /
CONSIGNA","info":"","x":484,"y":59,"wires":[]},{"id":"84c67bb7.b8c758","type":"s7
in","z":"d85ec897.93f748","endpoint":"7408d556.dc218c","mode":"single","variable":"CONSI

35
Fouad Rifi
CFGS Automatització i Robòtica Industrial

GNA","diff":true,"name":"CONSIGNA","x":112,"y":209,"wires":[["94b3992a.144ad8"]]},{"id":"7
06e5140.f8906","type":"comment","z":"d85ec897.93f748","name":"RELACION VELOCIDAD /
CONSIGNA","info":"","x":488,"y":286,"wires":[]},{"id":"6c781efb.bb5d6","type":"s7
in","z":"d85ec897.93f748","endpoint":"7408d556.dc218c","mode":"single","variable":"RESULT
ADO_COMPARACION","diff":true,"name":"","x":175,"y":349,"wires":[["70f3e0ea.e11db"]]},{"i
d":"70f3e0ea.e11db","type":"function","z":"d85ec897.93f748","name":"COMPARACIÓN","fun
c":"if (msg.payload ===1)\nmsg.payload =\"VELOCIDAD MENOR QUE CONSIGNA\";\nif
(msg.payload ===2)\nmsg.payload =\"VELOCIDAD IGUAL QUE CONSIGNA\";\nif (msg.payload
===3)\nmsg.payload =\"VELOCIDAD MAYOR QUE CONSIGNA\";\nreturn
msg;","outputs":1,"noerr":0,"x":491,"y":349,"wires":[["f9322142.0e1ed"]]},{"id":"efef6a2c.62a
ac8","type":"comment","z":"d85ec897.93f748","name":"CONSIGNA CON
DROPDOWN","info":"","x":480,"y":424,"wires":[]},{"id":"6025ac3c.2045c4","type":"ui_dropdo
wn","z":"d85ec897.93f748","name":"","label":"ELIGE
VELOCIDAD","group":"1a8803c.6b07dfc","order":0,"width":0,"height":0,"passthru":true,"optio
ns":[{"label":"0 RPM","value":0,"type":"num"},{"label":"300
RPM","value":300,"type":"num"},{"label":"600 RPM","value":600,"type":"num"},{"label":"900
RPM","value":900,"type":"num"},{"label":"1200
RPM","value":1200,"type":"num"},{"label":"1500
RPM","value":1500,"type":"num"}],"payload":"","topic":"","x":151,"y":510,"wires":[["f451d36
3.e098f"]]},{"id":"f451d363.e098f","type":"range","z":"d85ec897.93f748","minin":"0","maxin":
"1500","minout":"0","maxout":"16384","action":"scale","round":true,"name":"1500 =
16384","x":457,"y":510,"wires":[["351cdcb3.aafb14"]]},{"id":"351cdcb3.aafb14","type":"s7
out","z":"d85ec897.93f748","endpoint":"7408d556.dc218c","variable":"CONSIGNA
ENVIO","name":"CONSIGNA
ENVÍO","x":919,"y":513,"wires":[]},{"id":"94b3992a.144ad8","type":"range","z":"d85ec897.93f
748","minin":"0","maxin":"16384","minout":"0","maxout":"1500","action":"scale","round":tru
e,"name":"1500 =
16384","x":484,"y":211,"wires":[["e8b63e96.7bc18"]]},{"id":"2008f986.d54306","type":"functi
on","z":"7a348692.2dcc68","name":"valor","func":"msg.payload = msg.payload + \"
valor\";\nreturn
msg;","outputs":1,"noerr":0,"x":747,"y":575,"wires":[["f2ab72ab.23f7d"]]},{"id":"5400237f.335
80c","type":"function","z":"7a348692.2dcc68","name":"R.P.M.","func":"msg.payload =
msg.payload + \" R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":746,"y":643,"wires":[["64febc7e.26e4d4"]]},{"id":"aa2d9b1d.2
e8008","type":"range","z":"7a348692.2dcc68","minin":"0","maxin":"16384","minout":"0","ma
xout":"1500","action":"scale","round":true,"name":"16384 =
1500","x":476,"y":715,"wires":[["51d9cdef.387344"]]},{"id":"51d9cdef.387344","type":"functio
n","z":"7a348692.2dcc68","name":"R.P.M.","func":"msg.payload = msg.payload + \"
R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":744,"y":712,"wires":[["e2071897.1b6678"]]},{"id":"f2ab72ab.2
3f7d","type":"ui_text","z":"7a348692.2dcc68","group":"57b587f9.f05a68","order":0,"width":0,
"height":0,"name":"","label":"CONSIGNA (0 A
16384):","format":"{{msg.payload}}","layout":"row-

36
Fouad Rifi
CFGS Automatització i Robòtica Industrial

spread","x":1061,"y":570,"wires":[]},{"id":"64febc7e.26e4d4","type":"ui_text","z":"7a348692.2
dcc68","group":"57b587f9.f05a68","order":0,"width":0,"height":0,"name":"","label":"CONSIG
NA (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1062,"y":641,"wires":[]},{"id":"e2071897.1b6678","type":"ui_text","z":"7a348692.
2dcc68","group":"57b587f9.f05a68","order":0,"width":0,"height":0,"name":"","label":"VELOCI
DAD (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1060,"y":713,"wires":[]},{"id":"60eefdbd.ebb864","type":"s7
in","z":"8424747d.3012d8","endpoint":"7408d556.dc218c","mode":"single","variable":"CONSI
GNA","diff":true,"name":"","x":164,"y":567,"wires":[["3fba3d98.7c3ed2"]]},{"id":"3b44b06.48
e185","type":"s7
in","z":"8424747d.3012d8","endpoint":"7408d556.dc218c","mode":"single","variable":"CONSI
GNA","diff":true,"name":"","x":165,"y":640,"wires":[["c4644718.92c3d8"]]},{"id":"b1692fe9.e6
4a3","type":"s7
in","z":"8424747d.3012d8","endpoint":"7408d556.dc218c","mode":"single","variable":"VELOC
IDAD_ABS","diff":true,"name":"","x":182,"y":712,"wires":[["2fe6755f.f9f87a"]]},{"id":"c464471
8.92c3d8","type":"range","z":"8424747d.3012d8","minin":"0","maxin":"16384","minout":"0","
maxout":"1500","action":"scale","round":true,"name":"16384 A
1500","x":451,"y":639,"wires":[["e3eb0c39.9ba03"]]},{"id":"3fba3d98.7c3ed2","type":"functio
n","z":"8424747d.3012d8","name":"valor","func":"msg.payload = msg.payload + \"
valor\";\nreturn
msg;","outputs":1,"noerr":0,"x":622,"y":566,"wires":[["6138fa73.b4a9f4"]]},{"id":"e3eb0c39.9
ba03","type":"function","z":"8424747d.3012d8","name":"RPM","func":"msg.payload =
msg.payload + \" R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":622,"y":639,"wires":[["7dec9ce8.319344"]]},{"id":"2fe6755f.f9
f87a","type":"range","z":"8424747d.3012d8","minin":"0","maxin":"16384","minout":"0","max
out":"1500","action":"scale","round":true,"name":"16384 A
1500","x":436,"y":712,"wires":[["3680496a.54a7d6"]]},{"id":"3680496a.54a7d6","type":"functi
on","z":"8424747d.3012d8","name":"RPM","func":"msg.payload = msg.payload + \"
R.P.M.\";\nreturn
msg;","outputs":1,"noerr":0,"x":616,"y":711,"wires":[["cecae5c.26a3f18"]]},{"id":"6138fa73.b4
a9f4","type":"ui_text","z":"8424747d.3012d8","group":"496b46bb.0280f8","order":0,"width":
0,"height":0,"name":"","label":"CONSIGNA (0 A
16384):","format":"{{msg.payload}}","layout":"row-
spread","x":1005,"y":568,"wires":[]},{"id":"7dec9ce8.319344","type":"ui_text","z":"8424747d.
3012d8","group":"496b46bb.0280f8","order":0,"width":0,"height":0,"name":"","label":"CONSI
GNA (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1005,"y":637,"wires":[]},{"id":"cecae5c.26a3f18","type":"ui_text","z":"8424747d.3
012d8","group":"496b46bb.0280f8","order":0,"width":0,"height":0,"name":"","label":"VELOCI
DAD (0 A 1500):","format":"{{msg.payload}}","layout":"row-
spread","x":1011,"y":715,"wires":[]},{"id":"f9322142.0e1ed","type":"ui_text","z":"d85ec897.93
f748","group":"e4b8d149.609b7","order":0,"width":0,"height":0,"name":"","label":"RELACION
VELOCIDAD / CONSIGNA: ","format":"{{msg.payload}}","layout":"row-
spread","x":870,"y":348,"wires":[]},{"id":"799de30a.53cfbc","type":"comment","z":"3de6e3d3.

37
Fouad Rifi
CFGS Automatització i Robòtica Industrial

5464ac","name":"FUNCIONAMIENTOS","info":"","x":473,"y":39,"wires":[]},{"id":"5fe203c6.111
59c","type":"s7
in","z":"3de6e3d3.5464ac","endpoint":"7408d556.dc218c","mode":"single","variable":"TIEMP
O DERECHA","diff":true,"name":"TIEMPO
DERECHA","x":132,"y":97,"wires":[["817696d2.9abd18"]]},{"id":"817696d2.9abd18","type":"fu
nction","z":"3de6e3d3.5464ac","name":"SEGUNDOS","func":"msg.payload = msg.payload + \"
Seg.\";\nreturn
msg;","outputs":1,"noerr":0,"x":488,"y":97,"wires":[["9c73a108.fc0e3"]]},{"id":"9c73a108.fc0e
3","type":"ui_text","z":"3de6e3d3.5464ac","group":"81177a9b.44d518","order":0,"width":0,"
height":0,"name":"","label":"TIEMPO DERECHA:","format":"{{msg.payload}}","layout":"row-
spread","x":832,"y":98,"wires":[]},{"id":"919bf0f2.a1389","type":"s7
in","z":"3de6e3d3.5464ac","endpoint":"7408d556.dc218c","mode":"single","variable":"TIEMP
O IZQUIERDA","diff":true,"name":"TIEMPO
IZQUIERDA","x":144,"y":159,"wires":[["72581951.27ee68"]]},{"id":"72581951.27ee68","type":
"function","z":"3de6e3d3.5464ac","name":"SEGUNDOS","func":"msg.payload = msg.payload +
\" Seg.\";\nreturn
msg;","outputs":1,"noerr":0,"x":487,"y":160,"wires":[["3a9fcd8e.5f4572"]]},{"id":"3a9fcd8e.5f
4572","type":"ui_text","z":"3de6e3d3.5464ac","group":"81177a9b.44d518","order":0,"width":
0,"height":0,"name":"","label":"FUNCIONA A
IZQUIERDA:","format":"{{msg.payload}}","layout":"row-
spread","x":854,"y":159,"wires":[]},{"id":"fa87166b.5b4a68","type":"s7
in","z":"3de6e3d3.5464ac","endpoint":"7408d556.dc218c","mode":"single","variable":"TIEMP
O PARADO","diff":true,"name":"TIEMPO
PARADO","x":137,"y":218,"wires":[["a6a229df.1634d8"]]},{"id":"a6a229df.1634d8","type":"fun
ction","z":"3de6e3d3.5464ac","name":"SEGUNDOS","func":"msg.payload = msg.payload + \"
Seg.\";\nreturn
msg;","outputs":1,"noerr":0,"x":488,"y":220,"wires":[["af038001.8470e"]]},{"id":"af038001.84
70e","type":"ui_text","z":"3de6e3d3.5464ac","group":"81177a9b.44d518","order":0,"width":0
,"height":0,"name":"","label":"MOTOR PARADO:","format":"{{msg.payload}}","layout":"row-
spread","x":823,"y":222,"wires":[]},{"id":"eddf5c36.ae5eb","type":"comment","z":"3de6e3d3.
5464ac","name":"GRAFICO
TIEMPOS","info":"","x":481,"y":283,"wires":[]},{"id":"5a67afbd.42a12","type":"ui_gauge","z":"
3de6e3d3.5464ac","name":"","group":"f4e95cac.ecdbb","order":0,"width":"2","height":"2","g
type":"gage","title":"DERECHA","label":"Mins","format":"{{value}}","min":0,"max":"10","colors
":["#00b500","#e6e600","#ca3838"],"x":827,"y":356,"wires":[]},{"id":"a493f56a.a91b98","type
":"ui_gauge","z":"3de6e3d3.5464ac","name":"","group":"f4e95cac.ecdbb","order":0,"width":"
2","height":"2","gtype":"gage","title":"IZQUIERDA","label":"Mins","format":"{{value}}","min":0
,"max":"10","colors":["#00b500","#e6e600","#ca3838"],"x":824,"y":426,"wires":[]},{"id":"6ae1
6a37.b6a584","type":"ui_gauge","z":"3de6e3d3.5464ac","name":"","group":"f4e95cac.ecdbb"
,"order":0,"width":"2","height":"2","gtype":"gage","title":"PARADO","label":"Mins","format":"
{{value}}","min":0,"max":"10","colors":["#00b500","#e6e600","#ca3838"],"x":826,"y":493,"wir
es":[]},{"id":"f84bb360.aa36d","type":"comment","z":"3de6e3d3.5464ac","name":"PUESTA A
CERO","info":"","x":509,"y":573,"wires":[]},{"id":"1a0427c3.3491c8","type":"ui_button","z":"3

38
Fouad Rifi
CFGS Automatització i Robòtica Industrial

de6e3d3.5464ac","name":"","group":"61f21462.097ddc","order":0,"width":0,"height":0,"label
":"RESET
TIEMPOS","color":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":148,"y":62
8,"wires":[["ec3eb408.a048f8"]]},{"id":"ec3eb408.a048f8","type":"s7
out","z":"3de6e3d3.5464ac","endpoint":"7408d556.dc218c","variable":"RESET
TIEMPOS","name":"RESET
TIEMPOS","x":814,"y":628,"wires":[]},{"id":"182d559a.4e9e5a","type":"comment","z":"6b088c
11.0f1804","name":"FUNCIONAMIENTO
SINAMICS","info":"","x":550,"y":75,"wires":[]},{"id":"6124f8ad.6c2248","type":"s7
in","z":"6b088c11.0f1804","endpoint":"7408d556.dc218c","mode":"single","variable":"ALARM
AS","diff":true,"name":"ALARMAS","x":112,"y":158,"wires":[["57e18564.62c8ec"]]},{"id":"57e1
8564.62c8ec","type":"function","z":"6b088c11.0f1804","name":"NO HAY FALLO","func":"if
(msg.payload ===1)\nmsg.payload = \"FUNCIONAMIENTO CORRECTO EN SINAMIC\";\nif
(msg.payload ===2)\nmsg.payload = \"HAY UN FALLO EN SINAMIC. PULSAR RESET
ALARMA\";\nif (msg.payload ===4)\nmsg.payload = \"FALLO DE COMUNICACIÓN, MIRAR
CABLE RJ45\";\n\nreturn
msg;","outputs":1,"noerr":0,"x":746,"y":161,"wires":[["9d0c4a49.7e1d18"]]},{"id":"9d0c4a49.7
e1d18","type":"ui_text","z":"6b088c11.0f1804","group":"ba5f82d8.fc6a6","order":0,"width":0
,"height":0,"name":"","label":"ESTADO:","format":"{{msg.payload}}","layout":"row-
spread","x":1129,"y":219,"wires":[]},{"id":"f0cc681a.f17e38","type":"comment","z":"6b088c11
.0f1804","name":"BOTONES
ALARMA","info":"","x":530,"y":220,"wires":[]},{"id":"91350b4.ad41df8","type":"ui_button","z"
:"6b088c11.0f1804","name":"","group":"dbf041d.06f36c","order":0,"width":0,"height":0,"labe
l":"PRUEBA DE
MAIL","color":"#FF0000","icon":"mail","payload":"true","payloadType":"bool","topic":"","x":2
70,"y":380,"wires":[["cb9a9334.aa6d6"]]},{"id":"5c707933.656438","type":"e-
mail","z":"6b088c11.0f1804","server":"smtp.gmail.com","port":"465","name":"Rifi.fouad1996
@gmail.com","dname":"MAIL
ALARMA","x":1130,"y":379,"wires":[]},{"id":"dfc5f0e3.79521","type":"ui_button","z":"6b088c1
1.0f1804","name":"Reset
alarma","group":"dbf041d.06f36c","order":0,"width":0,"height":0,"label":"Reset
alarma","color":"#ffff00","icon":"sync","payload":"true","payloadType":"bool","topic":"","x":1
14,"y":442,"wires":[["7242d188.c3a4a"]]},{"id":"9dbd9b43.4284c8","type":"function","z":"6b0
88c11.0f1804","name":"","func":"if(msg.payload ===1)\nmsg.payload= \"Variador Sinamic
control bomba 1: -Comunicación OK y no hay fallo. -El SINAMIC está preparado para ponerse
en marcha. -Hora y fecha del evento= \" + Date().toString(),\nmsg.topic = \"BOMBA 1 ESTA
BIEN\";\nif(msg.payload ===2)\nmsg.payload= \"Variador Sinamic control bomba 1: -
ALARMA¡¡¡¡¡ Hay un fallo en el variador. -Hay comunicación con el PLC. Pulsar botón de reset
fallo. -Hora y fecha del evento = \" + Date().toString(),\nmsg.topic = \"BOMBA 1 ESTA EN
FALLO\";\nif(msg.payload ===4)\nmsg.payload= \"Variador Sinamic control bomba 1: -
ALARMA¡¡¡¡¡ Ha fallado la comunicación con el Sinamic.- Comprobar el cable de comunicación
RJ45.-Hora y fecha del evento = \" + Date().toString(),\nmsg.topic = \"BOMBA 1 NO
COMUNICA\";\nreturn

39
Fouad Rifi
CFGS Automatització i Robòtica Industrial

msg;","outputs":1,"noerr":0,"x":710,"y":320,"wires":[["5c707933.656438"]]},{"id":"7242d188.c
3a4a","type":"s7
out","z":"6b088c11.0f1804","endpoint":"7408d556.dc218c","variable":"RESET
FALLO","name":"RESET
FALLO","x":1131,"y":441,"wires":[]},{"id":"8ae75a5.805d3a8","type":"comment","z":"6b088c1
1.0f1804","name":"DESPACHO
AUTOMATISMOS","info":"","x":553,"y":501,"wires":[]},{"id":"f8302940.27e398","type":"iot200
0-io-pulse","z":"6b088c11.0f1804","name":"50
ms","interval":"50","x":102,"y":566,"wires":[["28853588.89638a"]]},{"id":"28853588.89638a",
"type":"iot2000-io-
ai","z":"6b088c11.0f1804","name":"TEMPERATURA","pin":"U1","x":444,"y":566,"wires":[["eb4
e3553.ad9f08"]]},{"id":"52a52656.b941f8","type":"ui_text","z":"6b088c11.0f1804","group":"df
794c7.60e56b","order":0,"width":0,"height":0,"name":"","label":"TEMPERATURA ACTUAL:
","format":"{{msg.payload}} ºC","layout":"row-
spread","x":1163,"y":562,"wires":[]},{"id":"2b935dff.728102","type":"ui_gauge","z":"d85ec897
.93f748","name":"VELOCIDAD","group":"b563a4.f5441c6","order":0,"width":"3","height":"2","
gtype":"gage","title":"VELOCIDAD","label":"RPM","format":"{{value}}","min":0,"max":"1500","
colors":["#008000","#008000","#008000"],"x":932,"y":139,"wires":[]},{"id":"e8b63e96.7bc18",
"type":"ui_gauge","z":"d85ec897.93f748","name":"CONSIGNA","group":"b563a4.f5441c6","or
der":0,"width":"3","height":"2","gtype":"gage","title":"CONSIGNA","label":"RPM","format":"{{
value}}","min":0,"max":"1500","colors":["#00ff00","#00ff00","#00ff00"],"x":933,"y":212,"wires
":[]},{"id":"eb4e3553.ad9f08","type":"range","z":"6b088c11.0f1804","minin":"0","maxin":"102
3","minout":"-
40","maxout":"110","action":"scale","round":true,"name":"","x":800,"y":561,"wires":[["52a52
656.b941f8"]]},{"id":"2f1ed75e.5cff48","type":"s7
in","z":"d85ec897.93f748","endpoint":"7408d556.dc218c","mode":"single","variable":"VELOCI
DAD_ABS","diff":true,"name":"","x":128,"y":136,"wires":[["2fa943ef.e6937c"]]},{"id":"2fa943e
f.e6937c","type":"range","z":"d85ec897.93f748","minin":"0","maxin":"16384","minout":"0","
maxout":"1500","action":"scale","round":true,"name":"16384 =
1500","x":486,"y":136,"wires":[["2b935dff.728102"]]},{"id":"ee8d67d9.8a5128","type":"s7
in","z":"3de6e3d3.5464ac","endpoint":"7408d556.dc218c","mode":"single","variable":"TIEMP
O PARADO","diff":true,"name":"TIEMPO
PARADO","x":139,"y":496,"wires":[["eaf64bc2.ac8b58"]]},{"id":"c120d404.66d908","type":"s7
in","z":"3de6e3d3.5464ac","endpoint":"7408d556.dc218c","mode":"single","variable":"TIEMP
O IZQUIERDA","diff":true,"name":"TIEMPO
IZQUIERDA","x":147,"y":427,"wires":[["da8dc2ed.b4d1d"]]},{"id":"8f503f9a.dbbec","type":"s7
in","z":"3de6e3d3.5464ac","endpoint":"7408d556.dc218c","mode":"single","variable":"TIEMP
O DERECHA","diff":true,"name":"TIEMPO
DERECHA","x":134,"y":354,"wires":[["be0c7c57.0d4bb"]]},{"id":"eaf64bc2.ac8b58","type":"ran
ge","z":"3de6e3d3.5464ac","minin":"0","maxin":"60","minout":"0","maxout":"1","action":"sca
le","round":true,"name":"60 s = 1
min","x":487,"y":494,"wires":[["6ae16a37.b6a584"]]},{"id":"da8dc2ed.b4d1d","type":"range","
z":"3de6e3d3.5464ac","minin":"0","maxin":"60","minout":"0","maxout":"1","action":"scale","r

40
Fouad Rifi
CFGS Automatització i Robòtica Industrial

ound":true,"name":"60 s = 1
min","x":490,"y":426,"wires":[["a493f56a.a91b98"]]},{"id":"be0c7c57.0d4bb","type":"range","
z":"3de6e3d3.5464ac","minin":"0","maxin":"60","minout":"0","maxout":"1","action":"scale","r
ound":true,"name":"60 s = 1
min","x":488,"y":355,"wires":[["5a67afbd.42a12"]]},{"id":"ff6c82c0.99189","type":"s7
in","z":"6b088c11.0f1804","endpoint":"7408d556.dc218c","mode":"single","variable":"ALARM
AS","diff":true,"name":"ALARMAS","x":320,"y":320,"wires":[["9dbd9b43.4284c8"]]},{"id":"cb9
a9334.aa6d6","type":"function","z":"6b088c11.0f1804","name":"","func":"msg.payload=
\"ESTE ES UN MENSAJE DE PRUEBA: TODO ERAN RISAS HASTA QUE NOS DIMOS CUENTA QUE
EL TARTAMUDO QUERÍA JAMÓN \" + Date().toString(),\nmsg.topic = \"MENSAJE DE
PRUEBA\";\n\nreturn
msg;","outputs":1,"noerr":0,"x":710,"y":380,"wires":[["5c707933.656438"]]}]

41
Fouad Rifi