diff --git a/Node-RED/ConfigData.csv b/Node-RED/ConfigData.csv index 299575c..6097d64 100644 --- a/Node-RED/ConfigData.csv +++ b/Node-RED/ConfigData.csv @@ -1,3 +1,3 @@ Version_Index,HBW_di_PosBelt_Horizontal,HBW_di_PosBelt_Vertical,HBW_di_PosBelt_Offset_Vertical,HBW_di_PosRack_Offset_Vertical,HBW_di_PosRack_A1_Horizontal,HBW_di_PosRack_A1_Vertical,HBW_di_PosRack_B2_Horizontal,HBW_di_PosRack_B2_Vertical,HBW_di_PosRack_C3_Horizontal,HBW_di_PosRack_C3_Vertical,VGR_di_Pos_Color_horizontal,VGR_di_Pos_Color_vertical,VGR_di_Pos_Color_rotate,VGR_di_Pos_DSI_horizontal,VGR_di_Pos_DSI_Collect_vertical,VGR_di_Pos_DSI_Discard_vertical,VGR_di_Pos_DSI_rotate,VGR_di_Offset_Pos_DSI_NFC_vertical,VGR_di_Pos_DSO_horizontal,VGR_di_Pos_DSO_Collect_vertical,VGR_di_Pos_DSO_Discard_vertical,VGR_di_Pos_DSO_rotate,VGR_di_Offset_Pos_DSO_vertical,VGR_di_Pos_HBW_horizontal,VGR_di_Pos_HBW_Collect_vertical,VGR_di_Pos_HBW_Discard_vertical,VGR_di_Pos_HBW_rotate,VGR_di_Offset_Pos_HBW_horizontal,VGR_di_Offset_Pos_HBW_vertical,VGR_di_Pos_MPO_horizontal,VGR_di_Pos_MPO_vertical,VGR_di_Pos_MPO_rotate,VGR_di_Offset_Pos_MPO_vertical,VGR_di_Pos_NFC_horizontal,VGR_di_Pos_NFC_vertical,VGR_di_Pos_NFC_rotate,VGR_di_Pos_NiO_horizontal,VGR_di_Pos_NiO_vertical,VGR_di_Pos_NiO_rotate,VGR_di_Pos_SLD_Blue_horizontal,VGR_di_Pos_SLD_Blue_vertical,VGR_di_Pos_SLD_Blue_rotate,VGR_di_Pos_SLD_Red_horizontal,VGR_di_Pos_SLD_Red_vertical,VGR_di_Pos_SLD_Red_rotate,VGR_di_Pos_SLD_White_horizontal,VGR_di_Pos_SLD_White_vertical,VGR_di_Pos_SLD_White_rotate,SSC_di_PosCentre_Horizontal,SSC_di_PosCentre_Vertical,SSC_di_PosHBW_Horizontal,SSC_di_PosHBW_Vertical,SSC_w_Threshold_Red_Blue,SSC_w_Threshold_White_Red,SLD_w_Threshold_Red_Blue,SLD_w_Threshold_White_Red,SLD_i_CounterValue_Blue,SLD_i_CounterValue_Red,SLD_i_CounterValue_White -1.0,18,2800,370,370,2870,400,5200,1750,7560,3250,150,2450,430,20,2950,0,30,1200,2070,0,1480,970,0,600,650,200,5350,0,0,3400,1800,3500,650,900,2450,700,0,2700,1100,2150,3100,1200,1580,3100,1460,1370,3100,1770,3000,1400,5400,950,15447,9690,15681,9880,26,16,5 +1.0,18,2800,370,370,2870,400,5200,1750,7560,3250,150,2450,430,25,2950,0,30,1200,2070,0,1480,970,0,600,650,200,5350,0,0,3400,1800,3500,650,900,2450,700,0,2700,1100,2150,3100,1200,1580,3100,1460,1370,3100,1770,3000,1400,5400,950,15447,9690,15681,9880,26,16,5 diff --git a/Node-RED/flows_IOTpi2.json b/Node-RED/flows_IOTpi2.json index 25bfd1f..1c35302 100644 --- a/Node-RED/flows_IOTpi2.json +++ b/Node-RED/flows_IOTpi2.json @@ -1 +1 @@ -[{"id":"9f657cfc.c7c8a8","type":"tab","label":"MQTT - pub","disabled":false,"info":""},{"id":"ac6244e8.d50e1","type":"tab","label":"MQTT - sub","disabled":false,"info":""},{"id":"87526827.008ad8","type":"tab","label":"MQTT - conf","disabled":false,"info":""},{"id":"d8972c0.715b4d8","type":"tab","label":"Interface Dashboard","disabled":false,"info":""},{"id":"1bbb875f.799c41","type":"tab","label":"TXT Data","disabled":false,"info":""},{"id":"b973f4d9.d701f8","type":"tab","label":"Pan Tilt Unit","disabled":false,"info":""},{"id":"4c072751.507d3","type":"tab","label":"NFC Reader","disabled":false,"info":""},{"id":"f27e9a4.d7269e8","type":"tab","label":"Order/Stock HBW","disabled":false,"info":""},{"id":"cc38a811.11de2","type":"tab","label":"HMI - Main","disabled":false,"info":""},{"id":"40d33793.7558d8","type":"tab","label":"HMI - HBW Positions","disabled":false,"info":""},{"id":"eac85a93.4f949","type":"tab","label":"HMI - run HBW axis","disabled":false,"info":""},{"id":"881fbb6.2d64cc8","type":"tab","label":"HMI - VGR Positions","disabled":false,"info":""},{"id":"b495b31e.fe8338","type":"tab","label":"HMI - run VGR axis","disabled":false,"info":""},{"id":"96ccbb8c.f85068","type":"tab","label":"HMI - SSC Positions","disabled":false,"info":""},{"id":"410fcde3.56d53c","type":"tab","label":"HMI - run SSC (camera) axis","disabled":false,"info":""},{"id":"d157eff7.cfa8","type":"tab","label":"HMI - Calibration color sensor","disabled":false,"info":""},{"id":"18869de1.83d712","type":"tab","label":"HMI - Calibration SLD pushout","disabled":false,"info":""},{"id":"bcaa3a6a.3bdbe8","type":"tab","label":"Save/Load Config Data","disabled":false,"info":""},{"id":"788959e0.92f718","type":"mqtt-broker","z":"","name":"","broker":"192.168.0.10","port":"1883","clientid":"Node-RED","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"7a04da17.be3684","type":"ui_group","z":"","name":"Monitoring - Temperature","tab":"7123cfb3.70e918","order":2,"disp":true,"width":"14","collapse":true},{"id":"127b3360.4e5a15","type":"ui_tab","z":"","name":"Factory - Overview","icon":"dashboard","order":9,"disabled":false,"hidden":false},{"id":"8e33f951.9d5c28","type":"ui_base","theme":{"name":"theme-custom","lightTheme":{"default":"#0094CE","baseColor":"#0069b4","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#0080c0","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"fischertechnik","default":"#4B7930","baseColor":"#0069b4","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","reset":false},"themeState":{"base-color":{"default":"#4B7930","value":"#0069b4","edited":true},"page-titlebar-backgroundColor":{"value":"#0069b4","edited":false},"page-backgroundColor":{"value":"#ebebeb","edited":true},"page-sidebar-backgroundColor":{"value":"#ebebeb","edited":true},"group-textColor":{"value":"#0069b4","edited":true},"group-borderColor":{"value":"#c8c8c8","edited":true},"group-backgroundColor":{"value":"#fdfdfd","edited":true},"widget-textColor":{"value":"#060606","edited":true},"widget-backgroundColor":{"value":"#0069b4","edited":false},"widget-borderColor":{"value":"#fcfcfc","edited":true},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"fischertechnik Node-RED Dashboard","hideToolbar":"false","allowSwipe":"true","lockMenu":"true","allowTempTheme":"true","dateFormat":"DD-MM-YYYY HH:MM:SS","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":1,"py":1}}},{"id":"eb3550b8.f56fd","type":"ui_group","z":"","name":"Order","tab":"127b3360.4e5a15","order":4,"disp":true,"width":8,"collapse":true},{"id":"bdcd0b28.1ddab","type":"ui_spacer","name":"spacer","group":"","order":1,"width":1,"height":1},{"id":"5911e125.55d648","type":"ui_spacer","name":"spacer","group":"","order":1,"width":1,"height":1},{"id":"4ca4e42e.6fa77c","type":"ui_group","z":"","name":"Camera","tab":"127b3360.4e5a15","order":1,"disp":true,"width":"8","collapse":true},{"id":"3ff02105.92e276","type":"ui_group","z":"","name":"Monitoring - Humidity","tab":"7123cfb3.70e918","order":3,"disp":true,"width":"14","collapse":true},{"id":"d8977677.16e66","type":"ui_group","z":"","name":"Monitoring - Pressure","tab":"7123cfb3.70e918","order":4,"disp":true,"width":"14","collapse":true},{"id":"21e46307.e38724","type":"ui_group","z":"","name":"Monitoring - Air Quality","tab":"7123cfb3.70e918","order":5,"disp":true,"width":"14","collapse":true},{"id":"ef8cbdb6.45dfb8","type":"ui_spacer","name":"spacer","group":"","order":1,"width":1,"height":1},{"id":"12c7d408.dba2d4","type":"ui_link","z":"","name":"ft Cloud","link":"https://www.fischertechnik-cloud.com","icon":"open_in_browser","target":"newtab","order":8},{"id":"3f05f1d2.27c6d6","type":"ui_group","z":"","name":"Monitoring - Brightness","tab":"7123cfb3.70e918","order":1,"disp":true,"width":"14","collapse":true},{"id":"a811398d.c6fe18","type":"ui_group","z":"","name":"Monitoring - Sensors","tab":"127b3360.4e5a15","order":3,"disp":true,"width":8,"collapse":true},{"id":"7123cfb3.70e918","type":"ui_tab","z":"","name":"Factory - Graph","icon":"dashboard","order":10,"disabled":false,"hidden":false},{"id":"81f41a6c.c5594","type":"ui_group","z":"","name":"Camera Control","tab":"127b3360.4e5a15","order":2,"disp":true,"width":8,"collapse":false},{"id":"6bb8ca6d.ccfd2c","type":"ui_group","z":"","name":"Factory Control","tab":"127b3360.4e5a15","order":5,"disp":true,"width":8,"collapse":false},{"id":"74a7d84.2350d28","type":"OPCUA-IIoT-Connector","z":"","discoveryUrl":"","endpoint":"opc.tcp://192.168.0.1:4840","keepSessionAlive":true,"loginEnabled":false,"securityPolicy":"None","securityMode":"NONE","name":"SIEMENS PLC@192.168.0.1","showErrors":true,"individualCerts":false,"publicCertificateFile":"","privateKeyFile":"","defaultSecureTokenLifetime":"","endpointMustExist":false,"autoSelectRightEndpoint":false,"strategyMaxRetry":"","strategyInitialDelay":"","strategyMaxDelay":"","strategyRandomisationFactor":"","requestedSessionTimeout":"","connectionStartDelay":"","reconnectDelay":"","maxBadSessionRequests":""},{"id":"f8b787c3.8b4878","type":"ui_spacer","name":"spacer","group":"","order":2,"width":2,"height":1},{"id":"c911b629.093fe8","type":"ui_spacer","name":"spacer","group":"","order":4,"width":2,"height":1},{"id":"f048c673.d5d95","type":"ui_spacer","name":"spacer","group":"","order":6,"width":2,"height":1},{"id":"a3ba7fbb.8f5ce8","type":"ui_tab","z":"","name":"HMI - HBW Positions","icon":"dashboard","order":3,"disabled":false,"hidden":false},{"id":"7f600873.485d1","type":"ui_group","z":"","name":"HBW","tab":"a3ba7fbb.8f5ce8","order":1,"disp":true,"width":"9","collapse":false},{"id":"a3007d55.6b202","type":"ui_group","z":"","name":"Position Belt","tab":"a3ba7fbb.8f5ce8","order":4,"disp":true,"width":9,"collapse":true},{"id":"8ab9db0e.d06c28","type":"ui_tab","z":"","name":"HMI - VGR Positions","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"8cacc4a1.8c2a2","type":"ui_group","z":"","name":"VGR","tab":"8ab9db0e.d06c28","order":1,"disp":true,"width":"9","collapse":false},{"id":"5353e4b6.26835c","type":"ui_group","z":"","name":"Position HBW","tab":"8ab9db0e.d06c28","order":7,"disp":true,"width":9,"collapse":true},{"id":"45b2e95e.e9c128","type":"ui_group","z":"","name":"Position DSI","tab":"8ab9db0e.d06c28","order":5,"disp":true,"width":9,"collapse":true},{"id":"b2b71f4e.623de8","type":"ui_group","z":"","name":"Position DSO","tab":"8ab9db0e.d06c28","order":6,"disp":true,"width":9,"collapse":true},{"id":"9fd654b1.4a21b","type":"ui_group","z":"","name":"Position Color Reader","tab":"8ab9db0e.d06c28","order":4,"disp":true,"width":9,"collapse":true},{"id":"b38d78a9.9c40e","type":"ui_group","z":"","name":"Position MPO","tab":"8ab9db0e.d06c28","order":8,"disp":true,"width":9,"collapse":true},{"id":"8505f695.7df0c8","type":"ui_group","z":"","name":"Position NFC","tab":"8ab9db0e.d06c28","order":9,"disp":true,"width":9,"collapse":true},{"id":"473e26bd.22581","type":"ui_group","z":"","name":"Position Rack","tab":"a3ba7fbb.8f5ce8","order":5,"disp":true,"width":"9","collapse":true},{"id":"6e361096.7da8e8","type":"ui_group","z":"","name":"Position Rack Row B","tab":"a3ba7fbb.8f5ce8","order":7,"disp":true,"width":"9","collapse":true},{"id":"9d24bd1.772d74","type":"ui_group","z":"","name":"Position Rack Row C","tab":"a3ba7fbb.8f5ce8","order":8,"disp":true,"width":"9","collapse":true},{"id":"f568aa06.b25238","type":"ui_tab","z":"","name":"HMI - Config Data","icon":"dashboard","order":7,"disabled":false,"hidden":false},{"id":"6bec7372.842fa4","type":"ui_group","z":"","name":"Save Data","tab":"f568aa06.b25238","order":1,"disp":true,"width":"6","collapse":false},{"id":"b5a8ed55.950378","type":"ui_group","z":"","name":"Load Data","tab":"f568aa06.b25238","order":2,"disp":true,"width":"6","collapse":false},{"id":"afaa8b63.c29268","type":"ui_group","z":"","name":"Position SLD","tab":"8ab9db0e.d06c28","order":11,"disp":true,"width":"9","collapse":true},{"id":"6357a333.f0fea4","type":"ui_group","z":"","name":"Position NiO","tab":"8ab9db0e.d06c28","order":10,"disp":true,"width":"9","collapse":true},{"id":"ea4864b0.48b81","type":"ui_group","z":"","name":"Position Rack Row A","tab":"a3ba7fbb.8f5ce8","order":6,"disp":true,"width":"9","collapse":true},{"id":"41be4504.78be34","type":"ui_tab","z":"","name":"HMI - SSC Positions","icon":"dashboard","order":5,"disabled":false,"hidden":false},{"id":"21394b3d.7fa8b4","type":"ui_group","z":"","name":"SSC","tab":"41be4504.78be34","order":1,"disp":true,"width":"9","collapse":false},{"id":"b07ee037.6d618","type":"ui_group","z":"","name":"Position Centre","tab":"41be4504.78be34","order":3,"disp":true,"width":"9","collapse":true},{"id":"7a5f99d9.a1dfe","type":"ui_group","z":"","name":"Position HBW","tab":"41be4504.78be34","order":4,"disp":true,"width":"9","collapse":true},{"id":"afad8954.d2ebc","type":"ui_spacer","name":"spacer","group":"","order":1,"width":5,"height":1},{"id":"2a0fe601.aef032","type":"ui_spacer","name":"spacer","group":"","order":2,"width":5,"height":1},{"id":"30a4ede4.d9de6a","type":"ui_spacer","name":"spacer","group":"","order":3,"width":5,"height":1},{"id":"7b144e6.268db3","type":"ui_spacer","name":"spacer","group":"","order":4,"width":5,"height":1},{"id":"e0793e27.57538","type":"ui_spacer","name":"spacer","group":"","order":5,"width":5,"height":1},{"id":"26b2794d.9c66e6","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":1,"width":5,"height":1},{"id":"9d37fb2a.cd225","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":2,"width":5,"height":1},{"id":"13d51a83.482805","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":3,"width":5,"height":1},{"id":"b7575961.1ba058","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":4,"width":5,"height":1},{"id":"e2f3c2ef.503bd8","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":5,"width":5,"height":1},{"id":"9608e0f4.098128","type":"ui_group","z":"","name":"move to Position","tab":"a3ba7fbb.8f5ce8","order":3,"disp":true,"width":"6","collapse":false},{"id":"ef1d79ce.88a2d8","type":"ui_spacer","name":"spacer","group":"","order":1,"width":5,"height":1},{"id":"2e8749b7.a37e5e","type":"ui_spacer","name":"spacer","group":"","order":2,"width":5,"height":1},{"id":"962d8511.861798","type":"ui_spacer","name":"spacer","group":"","order":3,"width":5,"height":1},{"id":"c3a269dc.f0329","type":"ui_spacer","name":"spacer","group":"","order":4,"width":5,"height":1},{"id":"b9404ca8.05071","type":"ui_spacer","name":"spacer","group":"","order":5,"width":5,"height":1},{"id":"2f117237.36aff6","type":"ui_group","z":"","name":"move to Position","tab":"8ab9db0e.d06c28","order":3,"disp":true,"width":"6","collapse":false},{"id":"d418765.9bb9f88","type":"ui_group","z":"","name":"move to position","tab":"41be4504.78be34","order":2,"disp":true,"width":"6","collapse":false},{"id":"72acbed0.619f98","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":1,"width":5,"height":1},{"id":"41107a06.3e322c","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":2,"width":5,"height":1},{"id":"e6b17adf.53c628","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":3,"width":5,"height":1},{"id":"8e4312e4.77f84","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":4,"width":5,"height":1},{"id":"6add451a.91479c","type":"ui_spacer","name":"spacer","group":"","order":1,"width":6,"height":1},{"id":"d7d91ca7.0d9938","type":"ui_spacer","name":"spacer","group":"","order":2,"width":6,"height":1},{"id":"42691401.f657f4","type":"ui_spacer","name":"spacer","group":"","order":6,"width":6,"height":1},{"id":"16075f1d.0247e1","type":"ui_spacer","name":"spacer","group":"","order":2,"width":1,"height":1},{"id":"d3f29f15.6606d","type":"ui_spacer","name":"spacer","group":"","order":4,"width":1,"height":1},{"id":"3ab9a62d.05b032","type":"ui_spacer","name":"spacer","group":"","order":4,"width":1,"height":1},{"id":"f107a9a6.5d77f8","type":"ui_spacer","name":"spacer","group":"","order":7,"width":1,"height":1},{"id":"c11014fb.73009","type":"ui_spacer","name":"spacer","group":"","order":6,"width":1,"height":1},{"id":"8600dc5f.358488","type":"ui_tab","z":"","name":"HMI - Calibration","icon":"dashboard","order":6,"disabled":false,"hidden":false},{"id":"4dd8e20b.5429ac","type":"ui_group","z":"","name":"Color sensor calibration","tab":"8600dc5f.358488","order":2,"disp":true,"width":"9","collapse":true},{"id":"9a003a94.59357","type":"ui_group","z":"","name":"SLD push out counter","tab":"8600dc5f.358488","order":3,"disp":true,"width":"9","collapse":true},{"id":"1e4a1f68.4051f1","type":"ui_tab","z":"","name":"HMI - Main","icon":"dashboard","order":1,"disabled":false,"hidden":false},{"id":"4334b06.5f5075","type":"ui_group","z":"","name":"Camera view","tab":"1e4a1f68.4051f1","order":1,"disp":true,"width":"10","collapse":false},{"id":"c863b9e5.ef9b6","type":"ui_group","z":"","name":"Factory Control via OPCUA","tab":"1e4a1f68.4051f1","order":2,"disp":true,"width":"10","collapse":false},{"id":"90b4565f.31f758","type":"ui_spacer","name":"spacer","group":"8cacc4a1.8c2a2","order":1,"width":9,"height":"2"},{"id":"1cf4786b.c171e","type":"ui_spacer","name":"spacer","group":"2f117237.36aff6","order":7,"width":1,"height":1},{"id":"bdb2e574.64c788","type":"ui_spacer","name":"spacer","group":"2f117237.36aff6","order":10,"width":1,"height":1},{"id":"d3a81696.aa74d","type":"ui_spacer","name":"spacer","group":"2f117237.36aff6","order":13,"width":1,"height":1},{"id":"dde55429.6a3398","type":"ui_spacer","name":"spacer","group":"2f117237.36aff6","order":16,"width":1,"height":1},{"id":"429a901c.8a8dc","type":"ui_spacer","name":"spacer","group":"afaa8b63.c29268","order":4,"width":9,"height":1},{"id":"568d96e2.40a8a8","type":"ui_spacer","name":"spacer","group":"afaa8b63.c29268","order":8,"width":9,"height":1},{"id":"11b8901b.4c9138","type":"ui_spacer","name":"spacer","group":"d418765.9bb9f88","order":1,"width":6,"height":1},{"id":"116af58f.f9d0ca","type":"ui_spacer","name":"spacer","group":"d418765.9bb9f88","order":7,"width":1,"height":1},{"id":"10573da9.7cc422","type":"ui_spacer","name":"spacer","group":"d418765.9bb9f88","order":10,"width":1,"height":1},{"id":"a92b0805.e714f","type":"ui_spacer","name":"spacer","group":"7f600873.485d1","order":1,"width":9,"height":1},{"id":"bc56fad3.9dca88","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":6,"width":1,"height":1},{"id":"4036f73.1f1ac88","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":9,"width":1,"height":1},{"id":"b2ced7c4.ed5cd8","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":12,"width":1,"height":1},{"id":"67e800c0.b1d308","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":15,"width":1,"height":1},{"id":"204d9775.013ef8","type":"ui_spacer","name":"spacer","group":"4dd8e20b.5429ac","order":3,"width":9,"height":1},{"id":"d4d09a1b.af0e38","type":"ui_spacer","name":"spacer","group":"4dd8e20b.5429ac","order":12,"width":9,"height":1},{"id":"f522b723.a3425","type":"ui_spacer","name":"spacer","group":"4dd8e20b.5429ac","order":16,"width":1,"height":1},{"id":"feaf73f.11bd19","type":"ui_spacer","name":"spacer","group":"9a003a94.59357","order":6,"width":1,"height":1},{"id":"82956c45.28a928","type":"ui_group","z":"","name":"HBW View","tab":"1e4a1f68.4051f1","order":3,"disp":true,"width":10,"collapse":false},{"id":"ba673a61.c513c8","type":"ui_spacer","name":"spacer","group":"c863b9e5.ef9b6","order":2,"width":2,"height":1},{"id":"c3f726f5.f6cd78","type":"ui_spacer","name":"spacer","group":"c863b9e5.ef9b6","order":5,"width":2,"height":1},{"id":"39d20017.924018","type":"ui_spacer","name":"spacer","group":"c863b9e5.ef9b6","order":8,"width":2,"height":1},{"id":"7f6177b6.e28bf","type":"ui_spacer","name":"spacer","group":"82956c45.28a928","order":1,"width":1,"height":1},{"id":"88a35404.8a459","type":"ui_spacer","name":"spacer","group":"81f41a6c.c5594","order":10,"width":4,"height":1},{"id":"7348f57a.29b584","type":"ui_spacer","name":"spacer","group":"eb3550b8.f56fd","order":2,"width":1,"height":1},{"id":"ee183995.168","type":"ui_spacer","name":"spacer","group":"eb3550b8.f56fd","order":4,"width":1,"height":1},{"id":"bbb46fb7.68f028","type":"ui_spacer","name":"spacer","group":"6bb8ca6d.ccfd2c","order":3,"width":2,"height":1},{"id":"77c2cef6.2a8958","type":"ui_spacer","name":"spacer","group":"6bb8ca6d.ccfd2c","order":6,"width":6,"height":1},{"id":"60d28ced.b3f5bc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/bme680","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":140,"wires":[["812f38bd.a07a9","c0b75c24.e01498","620b8b6c.be3d9c","2fb6c01b.b3c6e8","fbf6f326.070978","d302dca8.3bf48","75ff536b.21e514"]]},{"id":"b0bccee6.26251","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"7a04da17.be3684","order":1,"width":0,"height":0,"label":"Temperature Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"-10","ymax":"30","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":540,"y":300,"wires":[[]]},{"id":"812f38bd.a07a9","type":"function","z":"9f657cfc.c7c8a8","name":"temp","func":"msg.payload = msg.payload.t;\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":260,"wires":[["b0bccee6.26251","601c49f6.4208e8","579fb2b0.826a04"]]},{"id":"601c49f6.4208e8","type":"debug","z":"9f657cfc.c7c8a8","name":"t","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":220,"wires":[]},{"id":"c0b75c24.e01498","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":140,"wires":[]},{"id":"620b8b6c.be3d9c","type":"function","z":"9f657cfc.c7c8a8","name":"humidity","func":"msg.payload = msg.payload.h;\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":380,"wires":[["95db81b0.49d48","e04a7125.35a6a8","46cf4486.b43974"]]},{"id":"95db81b0.49d48","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"3ff02105.92e276","order":1,"width":0,"height":0,"label":"Humidity Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":520,"y":420,"wires":[[]]},{"id":"e04a7125.35a6a8","type":"debug","z":"9f657cfc.c7c8a8","name":"h","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":340,"wires":[]},{"id":"2fb6c01b.b3c6e8","type":"function","z":"9f657cfc.c7c8a8","name":"pressure","func":"msg.payload = msg.payload.p;\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":500,"wires":[["b776b2be.f4a058","1e948a44.85511e","966b2b37.9ab568"]]},{"id":"fbf6f326.070978","type":"function","z":"9f657cfc.c7c8a8","name":"air quality index","func":"msg.payload = msg.payload.iaq;\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":620,"wires":[["eb69416b.607a78","3b21cfb.7b73e3","14a737a4.122f48"]]},{"id":"d7e8b055.8350c8","type":"comment","z":"9f657cfc.c7c8a8","name":"https://github.com/fischertechnik/txt_training_factory/blob/master/TxtSmartFactoryLib/doc/MqttInterface.md","info":"","x":380,"y":40,"wires":[]},{"id":"75ff536b.21e514","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\n//msg.payload = date;\nmsg.payload = date.toLocaleString('de-DE', { hour12:false });\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":180,"wires":[["4e7fa4cb.3844ec","84101a2.3b1f068"]]},{"id":"d302dca8.3bf48","type":"function","z":"9f657cfc.c7c8a8","name":"air quality score","func":"msg.payload = msg.payload.aq;\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":740,"wires":[["65fcd9c3.82e108","c820432.85c4fc"]]},{"id":"1e948a44.85511e","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"d8977677.16e66","order":1,"width":0,"height":0,"label":"Pressure Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"900","ymax":"1100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":520,"y":540,"wires":[[]]},{"id":"b776b2be.f4a058","type":"debug","z":"9f657cfc.c7c8a8","name":"p","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":460,"wires":[]},{"id":"3b21cfb.7b73e3","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"21e46307.e38724","order":1,"width":0,"height":0,"label":"Air Quality Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"200","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#808080","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":530,"y":660,"wires":[[]]},{"id":"eb69416b.607a78","type":"debug","z":"9f657cfc.c7c8a8","name":"iaq","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":580,"wires":[]},{"id":"65fcd9c3.82e108","type":"debug","z":"9f657cfc.c7c8a8","name":"aq","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":700,"wires":[]},{"id":"4e7fa4cb.3844ec","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":140,"wires":[]},{"id":"84101a2.3b1f068","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":1,"width":0,"height":0,"name":"","label":"timestamp BME680","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":180,"wires":[]},{"id":"66a2d434.06c7fc","type":"ui_template","z":"9f657cfc.c7c8a8","group":"4ca4e42e.6fa77c","name":"Camera view","order":2,"width":8,"height":6,"format":"\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":510,"y":1100,"wires":[[]]},{"id":"4e4dfc30.8b82ec","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/cam","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":1060,"wires":[["4b452284.b5022c","62a78ca1.6179ec","9ef24d19.94725"]]},{"id":"4b452284.b5022c","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1020,"wires":[]},{"id":"62a78ca1.6179ec","type":"function","z":"9f657cfc.c7c8a8","name":"data","func":"msg.payload = msg.payload.data;\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":1100,"wires":[["66a2d434.06c7fc"]]},{"id":"579fb2b0.826a04","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":2,"width":0,"height":0,"name":"","label":"temperature","format":"{{msg.payload}} °C","layout":"row-spread","x":510,"y":260,"wires":[]},{"id":"46cf4486.b43974","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":3,"width":0,"height":0,"name":"","label":"humidity","format":"{{msg.payload}} % r.H.","layout":"row-spread","x":500,"y":380,"wires":[]},{"id":"966b2b37.9ab568","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":4,"width":0,"height":0,"name":"","label":"pressure","format":"{{msg.payload}} hPa","layout":"row-spread","x":500,"y":500,"wires":[]},{"id":"14a737a4.122f48","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":5,"width":0,"height":0,"name":"","label":"air quality","format":"{{msg.payload}}","layout":"row-spread","x":500,"y":620,"wires":[]},{"id":"c820432.85c4fc","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":6,"width":0,"height":0,"name":"","label":"air quality accuracy","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":740,"wires":[]},{"id":"469d615e.63a76","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"eb3550b8.f56fd","order":1,"width":2,"height":1,"passthru":true,"label":"WHITE","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"type\":\"WHITE\"}","payloadType":"json","topic":"f/o/order","x":250,"y":660,"wires":[["db1538fd.3adec8"]]},{"id":"109d9f5f.bb1af1","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"eb3550b8.f56fd","order":3,"width":2,"height":1,"passthru":true,"label":"RED","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"type\":\"RED\"}","payloadType":"json","topic":"f/o/order","x":250,"y":700,"wires":[["6b53d33a.be9a14"]]},{"id":"9b4ede65.80119","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"eb3550b8.f56fd","order":5,"width":2,"height":1,"passthru":true,"label":"BLUE","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"type\":\"BLUE\"}","payloadType":"json","topic":"f/o/order","x":250,"y":740,"wires":[["8d108965.865058"]]},{"id":"5a9e242a.46dc4c","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":990,"y":620,"wires":[]},{"id":"ea5cc20e.8a21e8","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":770,"y":660,"wires":[["5a9e242a.46dc4c","c969f87a.2bf39"]]},{"id":"c969f87a.2bf39","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"f/o/order","qos":"0","retain":"","broker":"788959e0.92f718","x":980,"y":660,"wires":[]},{"id":"e734f37b.85d48","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":660,"wires":[["469d615e.63a76"]]},{"id":"31624c5b.6627f4","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":700,"wires":[["109d9f5f.bb1af1"]]},{"id":"c83dfa96.e5848","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":740,"wires":[["9b4ede65.80119"]]},{"id":"7921020f.dc1f3c","type":"comment","z":"ac6244e8.d50e1","name":"https://github.com/fischertechnik/txt_training_factory/blob/master/TxtSmartFactoryLib/doc/MqttInterface.md","info":"","x":380,"y":40,"wires":[]},{"id":"74415e5d.76122","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/ldr","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":840,"wires":[["2e2dd73.72941a8","371cf9d7.885d1e","ae74009f.4977a8"]]},{"id":"2e2dd73.72941a8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":800,"wires":[]},{"id":"5e7d105e.705ab","type":"mqtt out","z":"87526827.008ad8","name":"","topic":"c/ldr","qos":"0","retain":"","broker":"788959e0.92f718","x":830,"y":260,"wires":[]},{"id":"1e6f5178.f8b317","type":"inject","z":"87526827.008ad8","name":"","topic":"","payload":"{\"period\":3}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"3","x":450,"y":260,"wires":[["74c2fc8f.82a9ec"]]},{"id":"ce11d701.441f48","type":"debug","z":"87526827.008ad8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":850,"y":220,"wires":[]},{"id":"74c2fc8f.82a9ec","type":"function","z":"87526827.008ad8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":260,"wires":[["5e7d105e.705ab","ce11d701.441f48"]]},{"id":"2497f7cd.0baed8","type":"comment","z":"87526827.008ad8","name":"https://github.com/fischertechnik/txt_training_factory/blob/master/TxtSmartFactoryLib/doc/MqttInterface.md","info":"","x":380,"y":40,"wires":[]},{"id":"e65a8a6b.d9f1c8","type":"mqtt out","z":"87526827.008ad8","name":"","topic":"c/bme680","qos":"0","retain":"","broker":"788959e0.92f718","x":840,"y":160,"wires":[]},{"id":"ab74f582.68d728","type":"inject","z":"87526827.008ad8","name":"","topic":"","payload":"{\"period\":3}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"3","x":450,"y":120,"wires":[["7390b7be.8f9e08"]]},{"id":"ed44e2e8.83c75","type":"debug","z":"87526827.008ad8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":850,"y":120,"wires":[]},{"id":"7390b7be.8f9e08","type":"function","z":"87526827.008ad8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":160,"wires":[["e65a8a6b.d9f1c8","ed44e2e8.83c75"]]},{"id":"1c70e1b9.c34746","type":"mqtt out","z":"87526827.008ad8","name":"","topic":"c/cam","qos":"0","retain":"","broker":"788959e0.92f718","x":830,"y":360,"wires":[]},{"id":"84b8028c.eb88f8","type":"inject","z":"87526827.008ad8","name":"","topic":"","payload":"{\"on\":true,\"fps\":2}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"3","x":430,"y":320,"wires":[["ca38a602.b2a778"]]},{"id":"849c1549.00d428","type":"debug","z":"87526827.008ad8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":830,"y":320,"wires":[]},{"id":"ca38a602.b2a778","type":"function","z":"87526827.008ad8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":360,"wires":[["1c70e1b9.c34746","849c1549.00d428"]]},{"id":"9ef24d19.94725","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1060,"wires":[["d50b8f4b.49d6f8","a9519cc0.fff178"]]},{"id":"d50b8f4b.49d6f8","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1020,"wires":[]},{"id":"a9519cc0.fff178","type":"ui_text","z":"9f657cfc.c7c8a8","group":"4ca4e42e.6fa77c","order":1,"width":0,"height":0,"name":"","label":"timestamp Cam","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":1060,"wires":[]},{"id":"371cf9d7.885d1e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":840,"wires":[["ace724d2.777568","50949e8e.b064a8"]]},{"id":"ace724d2.777568","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":800,"wires":[]},{"id":"50949e8e.b064a8","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":7,"width":0,"height":0,"name":"","label":"timestamp LDR","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":840,"wires":[]},{"id":"bbbb8d6e.1c7728","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"3f05f1d2.27c6d6","order":1,"width":0,"height":0,"label":"Brightness Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":530,"y":960,"wires":[[]]},{"id":"ae74009f.4977a8","type":"function","z":"9f657cfc.c7c8a8","name":"brightness","func":"msg.payload = msg.payload.br;\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":920,"wires":[["bbbb8d6e.1c7728","df773d11.1960a8","6181e4a2.8b2d04"]]},{"id":"df773d11.1960a8","type":"debug","z":"9f657cfc.c7c8a8","name":"br","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":880,"wires":[]},{"id":"6181e4a2.8b2d04","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":8,"width":0,"height":0,"name":"","label":"brightness","format":"{{msg.payload}} %","layout":"row-spread","x":509,"y":920,"wires":[]},{"id":"f4ae4e9f.663ff8","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/ptu/pos","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1200,"wires":[["25833043.8ce598","bb46bef0.bbb4e"]]},{"id":"67768e80.e94c1","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/alert","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":1300,"wires":[["fbaa96c3.c0b6f8","af94dca3.058e6"]]},{"id":"25833043.8ce598","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1160,"wires":[]},{"id":"fbaa96c3.c0b6f8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1260,"wires":[]},{"id":"bb46bef0.bbb4e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1200,"wires":[["e395dbe7.408ea"]]},{"id":"e395dbe7.408ea","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1160,"wires":[]},{"id":"af94dca3.058e6","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1300,"wires":[["b9fe827b.f73418"]]},{"id":"b9fe827b.f73418","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1260,"wires":[]},{"id":"461b988f.5ebd9","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/broadcast","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1400,"wires":[["cd5124e1.a12528","aece27f2.909228"]]},{"id":"cd5124e1.a12528","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1360,"wires":[]},{"id":"aece27f2.909228","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1400,"wires":[["14af6379.f2d61d"]]},{"id":"14af6379.f2d61d","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1360,"wires":[]},{"id":"3c2d74a9.8bedcc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/hbw","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":1500,"wires":[["e34c15e0.7210c","fe2022f2.3c8978"]]},{"id":"e34c15e0.7210c","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1460,"wires":[]},{"id":"fe2022f2.3c8978","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1500,"wires":[["2995d025.9a087"]]},{"id":"2995d025.9a087","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1460,"wires":[]},{"id":"e3f32425.b1a3b","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/vgr","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1600,"wires":[["aae36ef8.19bd9","b8a105b4.261f38"]]},{"id":"aae36ef8.19bd9","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1560,"wires":[]},{"id":"b8a105b4.261f38","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1600,"wires":[["8fd5ec12.e14ce"]]},{"id":"8fd5ec12.e14ce","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1560,"wires":[]},{"id":"bc50579a.a71e48","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/mpo","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":1700,"wires":[["36696fca.ad3708","b32da19c.ac4958"]]},{"id":"36696fca.ad3708","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1660,"wires":[]},{"id":"b32da19c.ac4958","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1700,"wires":[["e3283291.446938"]]},{"id":"e3283291.446938","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1660,"wires":[]},{"id":"2b192409.84bdd4","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/sld","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1800,"wires":[["2f78603d.db2ed","2284e06c.4abfc"]]},{"id":"2f78603d.db2ed","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1760,"wires":[]},{"id":"2284e06c.4abfc","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1800,"wires":[["11d08a89.a936bd"]]},{"id":"11d08a89.a936bd","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1760,"wires":[]},{"id":"18ec0e82.f80ee1","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/dsi","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1900,"wires":[["d30f4848.a1694","fb3567ae.139988"]]},{"id":"d30f4848.a1694","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1860,"wires":[]},{"id":"fb3567ae.139988","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1900,"wires":[["4bc20d41.372d8c"]]},{"id":"4bc20d41.372d8c","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1860,"wires":[]},{"id":"5f0942f.d7e76bc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/dso","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":2000,"wires":[["19213146.a02c4f","3c127876.b784e"]]},{"id":"19213146.a02c4f","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1960,"wires":[]},{"id":"3c127876.b784e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2000,"wires":[["f6d79ba0.d37e88"]]},{"id":"f6d79ba0.d37e88","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1960,"wires":[]},{"id":"f57fea84.ddf0f","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/stock","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":2100,"wires":[["d438ef5f.a413a","2233e65b.30e7aa"]]},{"id":"d438ef5f.a413a","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2060,"wires":[]},{"id":"2233e65b.30e7aa","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\n//msg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2100,"wires":[["1e54221e.d16566"]]},{"id":"1e54221e.d16566","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2060,"wires":[]},{"id":"4fe904ee.802424","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/order","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":2200,"wires":[["320266a.e86b69a","456c0b89.5ff26c"]]},{"id":"320266a.e86b69a","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2160,"wires":[]},{"id":"456c0b89.5ff26c","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2200,"wires":[["8f5f6b66.bdc06"]]},{"id":"8f5f6b66.bdc06","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2160,"wires":[]},{"id":"84635a36.ee1dc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":2300,"wires":[["677f7dbc.b4525c","f9987081.827ae8"]]},{"id":"677f7dbc.b4525c","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2260,"wires":[]},{"id":"f9987081.827ae8","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2300,"wires":[["a62c06fb.008708"]]},{"id":"a62c06fb.008708","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2260,"wires":[]},{"id":"edcf13e3.e36778","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"o/ptu","qos":"0","retain":"","broker":"788959e0.92f718","x":690,"y":140,"wires":[]},{"id":"c32ef581.4cd728","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":300,"wires":[["38b8c579.959692"]]},{"id":"e7dfb427.3d4b68","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":710,"y":100,"wires":[]},{"id":"e5f1f300.ac0068","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":140,"wires":[["edcf13e3.e36778","e7dfb427.3d4b68"]]},{"id":"202f8830.5eb9d","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"f/o/state/ack","qos":"0","retain":"","broker":"788959e0.92f718","x":710,"y":560,"wires":[]},{"id":"baebad7e.8ced8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"{\"period\":3}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":560,"wires":[["3b462ce1.1fc3bc"]]},{"id":"21b3674.9368218","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":710,"y":520,"wires":[]},{"id":"854fa779.7e1a9","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":560,"wires":[["202f8830.5eb9d","21b3674.9368218"]]},{"id":"38b8c579.959692","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":11,"width":2,"height":1,"passthru":true,"label":"STOP","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"stop\"}","payloadType":"json","topic":"","x":250,"y":300,"wires":[["e5f1f300.ac0068"]]},{"id":"6ecd8875.891cd8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":340,"wires":[["764d96a5.3d45b8"]]},{"id":"764d96a5.3d45b8","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":9,"width":2,"height":1,"passthru":true,"label":"HOME","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"home\"}","payloadType":"json","topic":"","x":250,"y":340,"wires":[["e5f1f300.ac0068"]]},{"id":"bc47beae.a812b8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":380,"wires":[["754b68cf.41636"]]},{"id":"754b68cf.41636","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":5,"width":2,"height":1,"passthru":true,"label":"<<","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"start_pan\"}","payloadType":"json","topic":"","x":250,"y":380,"wires":[["e5f1f300.ac0068"]]},{"id":"71be9898.77ccf8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":420,"wires":[["8f710ff9.ab3b88"]]},{"id":"8f710ff9.ab3b88","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":6,"width":2,"height":1,"passthru":true,"label":">>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"end_pan\"}","payloadType":"json","topic":"","x":250,"y":420,"wires":[["e5f1f300.ac0068"]]},{"id":"72063d1f.bcffbc","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":460,"wires":[["dfe8bed5.a96b"]]},{"id":"dfe8bed5.a96b","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":7,"width":2,"height":1,"passthru":true,"label":"vv","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"start_tilt\"}","payloadType":"json","topic":"","x":250,"y":460,"wires":[["e5f1f300.ac0068"]]},{"id":"ddef70ab.541f8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":500,"wires":[["58365993.d8ec"]]},{"id":"58365993.d8ec","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":8,"width":2,"height":1,"passthru":true,"label":"^^","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"end_tilt\"}","payloadType":"json","topic":"","x":250,"y":500,"wires":[["e5f1f300.ac0068"]]},{"id":"c6e27102.618e4","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":140,"wires":[["349e9c79.f30684"]]},{"id":"349e9c79.f30684","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":1,"width":2,"height":1,"passthru":true,"label":"<","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_left\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":140,"wires":[["e5f1f300.ac0068"]]},{"id":"eed528e0.fba488","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":180,"wires":[["7ebd653f.697084"]]},{"id":"7ebd653f.697084","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":2,"width":2,"height":1,"passthru":true,"label":">","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_right\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":180,"wires":[["e5f1f300.ac0068"]]},{"id":"1e647cba.85a3f3","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":220,"wires":[["c02a536e.81e71"]]},{"id":"c02a536e.81e71","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":3,"width":2,"height":1,"passthru":true,"label":"v","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_down\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":220,"wires":[["e5f1f300.ac0068"]]},{"id":"4678cc68.1d32d4","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":260,"wires":[["3c901c9d.232864"]]},{"id":"3c901c9d.232864","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":4,"width":2,"height":1,"passthru":true,"label":"^","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_up\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":260,"wires":[["e5f1f300.ac0068"]]},{"id":"3b462ce1.1fc3bc","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":5,"width":2,"height":1,"passthru":true,"label":"ACK","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{}","payloadType":"json","topic":"f/o/state/ack","x":250,"y":560,"wires":[["854fa779.7e1a9"]]},{"id":"ab169cb4.e41fa","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/ssc/joy","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":180,"wires":[["de536f1e.d60cc8","9931697d.43f12"]]},{"id":"de536f1e.d60cc8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":140,"wires":[]},{"id":"9931697d.43f12","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":180,"wires":[["4b136cb8.4e6494"]]},{"id":"4b136cb8.4e6494","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":140,"wires":[]},{"id":"7524e3ec.f110f4","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/vgr/do","qos":"0","datatype":"json","broker":"788959e0.92f718","x":750,"y":280,"wires":[["11dd917a.841147","d15bc23a.c961c8"]]},{"id":"11dd917a.841147","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":240,"wires":[]},{"id":"d15bc23a.c961c8","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":280,"wires":[["2aed7005.76f35"]]},{"id":"2aed7005.76f35","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":240,"wires":[]},{"id":"7394939c.ae70bc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/hbw/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":380,"wires":[["47ee3e64.1d3c18","8a676356.7d08e"]]},{"id":"47ee3e64.1d3c18","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":340,"wires":[]},{"id":"8a676356.7d08e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":380,"wires":[["11c3842d.fa707c"]]},{"id":"11c3842d.fa707c","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":340,"wires":[]},{"id":"befdf27c.24aea8","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/mpo/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":480,"wires":[["9a62e192.66762","1820cc0d.ccedbc"]]},{"id":"9a62e192.66762","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":440,"wires":[]},{"id":"1820cc0d.ccedbc","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":480,"wires":[["46817d18.00fccc"]]},{"id":"46817d18.00fccc","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":440,"wires":[]},{"id":"35c3fed0.6267aa","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/sld/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":580,"wires":[["fcd66841.24af6","5f59e463.f4ba54"]]},{"id":"fcd66841.24af6","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":540,"wires":[]},{"id":"5f59e463.f4ba54","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":580,"wires":[["8207ceeb.b5a288"]]},{"id":"8207ceeb.b5a288","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":540,"wires":[]},{"id":"4f6d05da.9487dc","type":"comment","z":"d8972c0.715b4d8","name":"Publish","info":"","x":70,"y":60,"wires":[]},{"id":"aa48c2f4.e60b68","type":"comment","z":"d8972c0.715b4d8","name":"Dashboard Ack. Button from MQTT ","info":"","x":150,"y":100,"wires":[]},{"id":"48a7bea4.763b88","type":"mqtt in","z":"d8972c0.715b4d8","name":"","topic":"f/o/state/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":140,"wires":[["3c0bf468.2670ec"]]},{"id":"14269794.be7df8","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":140,"wires":[["ac80336f.fd0dc"]]},{"id":"78aff3f3.b6d954","type":"comment","z":"d8972c0.715b4d8","name":"Subscribe","info":"","x":80,"y":340,"wires":[]},{"id":"9d6c9558.802fa","type":"comment","z":"d8972c0.715b4d8","name":"Alert Message - from OPC UA to MQTT","info":"","x":170,"y":380,"wires":[]},{"id":"36f7c27f.217056","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":440,"wires":[["45d2f19d.87a89"]]},{"id":"4675f8c1.bdfdd","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/alert","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":440,"wires":[]},{"id":"4fb82fd7.3daa5","type":"comment","z":"d8972c0.715b4d8","name":"State DSI - actual values to MQTT","info":"","x":160,"y":520,"wires":[]},{"id":"6b9a4500.924dac","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":580,"wires":[["eebe6573.388c"]]},{"id":"eebe6573.388c","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":580,"wires":[["5fdaf37d.b1ac9c"]]},{"id":"478cd18.0cd01b","type":"debug","z":"d8972c0.715b4d8","name":"i/state/dsi","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":540,"wires":[]},{"id":"6081239f.099974","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/dsi","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":580,"wires":[]},{"id":"d04288b7.d7a6d8","type":"comment","z":"d8972c0.715b4d8","name":"State DSO - actual values to MQTT ","info":"","x":150,"y":760,"wires":[]},{"id":"befa7850.898a88","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/dso","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":820,"wires":[]},{"id":"14c16ca3.0a2953","type":"comment","z":"d8972c0.715b4d8","name":"State HBW - actual values to MQTT ","info":"","x":160,"y":1020,"wires":[]},{"id":"fcffd51b.ae1d28","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/hbw","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":1080,"wires":[]},{"id":"977644c6.ae04c8","type":"comment","z":"d8972c0.715b4d8","name":"State MPO - actual values to MQTT ","info":"","x":150,"y":1280,"wires":[]},{"id":"2036511b.98cc7e","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/mpo","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":1340,"wires":[]},{"id":"6821320f.a47244","type":"comment","z":"d8972c0.715b4d8","name":"State SLD - actual values to MQTT ","info":"","x":150,"y":1540,"wires":[]},{"id":"fd4114ad.a5aeb","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/sld","qos":"0","retain":"","broker":"788959e0.92f718","x":1070,"y":1600,"wires":[]},{"id":"9f615908.5356e8","type":"comment","z":"d8972c0.715b4d8","name":"State VGR - actual values to MQTT ","info":"","x":150,"y":1780,"wires":[]},{"id":"785ce783.613b7","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/vgr","qos":"0","retain":"","broker":"788959e0.92f718","x":1070,"y":1840,"wires":[]},{"id":"68812a7c.196704","type":"comment","z":"d8972c0.715b4d8","name":"Alert Message - normally coming from TXT not OPC UA?","info":"","x":560,"y":380,"wires":[]},{"id":"a1dae50.3e6a018","type":"mqtt out","z":"f27e9a4.d7269e8","name":"","topic":"f/i/stock","qos":"0","retain":"","broker":"788959e0.92f718","x":1120,"y":600,"wires":[]},{"id":"226e2ad3.bcdc56","type":"function","z":"f27e9a4.d7269e8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":660,"wires":[["a1dae50.3e6a018"]]},{"id":"1d5499b5.089ece","type":"inject","z":"f27e9a4.d7269e8","name":"","topic":"","payload":"{\"stockItems\":[{\"workpiece\":{\"id\":\"123456789ABCDE\",\"type\":\"BLUE\",\"state\":\"PROCESSED\"},\"location\":\"A1\"},{\"workpiece\":{\"id\":\"123456789ABCDF\",\"type\":\"RED\",\"state\":\"PROCESSED\"},\"location\":\"A2\"},{\"workpiece\":{\"id\":\"123456789ABCDG\",\"type\":\"BLUE\",\"state\":\"PROCESSESD\"},\"location\":\"A3\"},{\"workpiece\":{\"id\":\"123456789ABCDH\",\"type\":\"\",\"state\":\"PROCESSED\"},\"location\":\"B1\"},{\"workpiece\":{\"id\":\"123456789ABCDI\",\"type\":\"WHITE\",\"state\":\"RAW\"},\"location\":\"B2\"},{\"workpiece\":{\"id\":\"123456789ABCDJ\",\"type\":\"\",\"state\":\"RAW\"},\"location\":\"B3\"},{\"workpiece\":{\"id\":\"123456789ABCDK\",\"type\":\"\",\"state\":\"RAW\"},\"location\":\"C1\"},{\"workpiece\":null,\"location\":\"C3\"}]}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":760,"y":660,"wires":[["226e2ad3.bcdc56"]]},{"id":"ce1a1028.d2d418","type":"comment","z":"f27e9a4.d7269e8","name":"Stock HBW - actual values to MQTT ","info":"","x":160,"y":560,"wires":[]},{"id":"5fdaf37d.b1ac9c","type":"function","z":"d8972c0.715b4d8","name":"read DSI state","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state DSI\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":580,"wires":[["45a06c82.3abdb4"]]},{"id":"45a06c82.3abdb4","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":580,"wires":[["a466fc32.76b258"]]},{"id":"a466fc32.76b258","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_dsi = {\n ts: \"\",\n station: \"dsi\",\n code: 0,\n description: \"Exakte Beschreibung\"\n }\n\nstate_dsi.code = msg.payload[0].value.value; //[0] = code\nstate_dsi.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_dsi.description = msg.payload[2].value.value; //[2] = description\nstate_dsi.station = msg.payload[3].value.value; //[3] = station\nstate_dsi.target = msg.payload[4].value.value; //[1] = target\nstate_dsi.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_dsi);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":580,"wires":[["6081239f.099974","478cd18.0cd01b"]]},{"id":"1dce1f60.7c53f9","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":680,"wires":[["a46a60e3.1696c"]]},{"id":"a46a60e3.1696c","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":680,"wires":[["d525d303.4b3aa8"]]},{"id":"d525d303.4b3aa8","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":680,"wires":[["a18711a9.f97bb"]]},{"id":"a18711a9.f97bb","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":680,"wires":[[]]},{"id":"4e81eede.4cc59","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state DSI","info":"","x":120,"y":640,"wires":[]},{"id":"14508b1.ea145f5","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":820,"wires":[["444b0489.73ec04"]]},{"id":"444b0489.73ec04","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":820,"wires":[["14047040.277b4"]]},{"id":"604103f1.1058dc","type":"debug","z":"d8972c0.715b4d8","name":"i/state/dso","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":780,"wires":[]},{"id":"14047040.277b4","type":"function","z":"d8972c0.715b4d8","name":"read DSO state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state DSO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":820,"wires":[["b0e068a6.c2a93"]]},{"id":"b0e068a6.c2a93","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":820,"wires":[["3c526a20.6b8936"]]},{"id":"3c526a20.6b8936","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_dso = {\n ts: \"\",\n station: \"dsi\",\n code: 0,\n description: \"Exakte Beschreibung\"\n }\n\nstate_dso.code = msg.payload[0].value.value; //[0] = code\nstate_dso.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_dso.description = msg.payload[2].value.value; //[2] = description\nstate_dso.station = msg.payload[3].value.value; //[3] = station\nstate_dso.target = msg.payload[4].value.value; //[1] = target\nstate_dso.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_dso);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":820,"wires":[["604103f1.1058dc","befa7850.898a88"]]},{"id":"3bb73be3.2e1f7c","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":920,"wires":[["725f5e6d.8fd61"]]},{"id":"725f5e6d.8fd61","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":920,"wires":[["20fcb4aa.13fa5c"]]},{"id":"20fcb4aa.13fa5c","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":920,"wires":[["77d34599.9078f4"]]},{"id":"77d34599.9078f4","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":920,"wires":[[]]},{"id":"12de2060.3e27c8","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state DSO","info":"","x":120,"y":880,"wires":[]},{"id":"a52034f5.4a45a","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":1080,"wires":[["6235aa99.b52504"]]},{"id":"6235aa99.b52504","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":1080,"wires":[["84a4753b.c48e5"]]},{"id":"57e97102.13fc78","type":"debug","z":"d8972c0.715b4d8","name":"i/state/hbw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1050,"y":1040,"wires":[]},{"id":"84a4753b.c48e5","type":"function","z":"d8972c0.715b4d8","name":"read HBW state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state HBW\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":1080,"wires":[["a035c4d9.be8fc8"]]},{"id":"a035c4d9.be8fc8","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":1080,"wires":[["3d4d137d.0de5e4"]]},{"id":"3d4d137d.0de5e4","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_hbw = {\n ts: \"\",\n station: \"dsi\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"hbw\"}\n\n\nstate_hbw.code = msg.payload[0].value.value; //[0] = code\nstate_hbw.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_hbw.description = msg.payload[2].value.value; //[2] = description\nstate_hbw.station = msg.payload[3].value.value; //[3] = station\nstate_hbw.target = msg.payload[4].value.value; //[1] = target\nstate_hbw.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_hbw);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":1080,"wires":[["57e97102.13fc78","fcffd51b.ae1d28"]]},{"id":"3ab91027.fe2d7","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1180,"wires":[["d0d1fa6e.2b991"]]},{"id":"d0d1fa6e.2b991","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1180,"wires":[["628ac138.5c2628"]]},{"id":"628ac138.5c2628","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1180,"wires":[["4b6f6512.6ed9ec"]]},{"id":"4b6f6512.6ed9ec","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1180,"wires":[[]]},{"id":"54070d7.65da474","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state HBW","info":"","x":120,"y":1140,"wires":[]},{"id":"3f2b2cda.e1ebcc","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":1340,"wires":[["4f6e48e3.2b1b88"]]},{"id":"4f6e48e3.2b1b88","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":1340,"wires":[["ba6cb267.b075e8"]]},{"id":"809aa043.0376f8","type":"debug","z":"d8972c0.715b4d8","name":"i/state/mpo","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1050,"y":1300,"wires":[]},{"id":"ba6cb267.b075e8","type":"function","z":"d8972c0.715b4d8","name":"read MPO state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state MPO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":1340,"wires":[["1edf7e52.178c02"]]},{"id":"1edf7e52.178c02","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":1340,"wires":[["b088c56a.74932"]]},{"id":"b088c56a.74932","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_mpo = {\n ts: \"\",\n station: \"mpo\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"mpo\"}\n\n\nstate_mpo.code = msg.payload[0].value.value; //[0] = code\nstate_mpo.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_mpo.description = msg.payload[2].value.value; //[2] = description\nstate_mpo.station = msg.payload[3].value.value; //[3] = station\nstate_mpo.target = msg.payload[4].value.value; //[1] = target\nstate_mpo.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_mpo);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":1340,"wires":[["809aa043.0376f8","2036511b.98cc7e"]]},{"id":"c83842f4.1e779","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1440,"wires":[["e3aefda7.813c68"]]},{"id":"e3aefda7.813c68","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1440,"wires":[["b36e80c3.042b58"]]},{"id":"b36e80c3.042b58","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1440,"wires":[["234964b1.01f544"]]},{"id":"234964b1.01f544","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1440,"wires":[[]]},{"id":"53817ca2.4f227c","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state MPO","info":"","x":120,"y":1400,"wires":[]},{"id":"8845428c.a35388","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"ldt_ts\"","datatypeName":""}],"x":110,"y":1600,"wires":[["e3f044a1.7b83c"]]},{"id":"e3f044a1.7b83c","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":1600,"wires":[["1120b5a5.d9c70a"]]},{"id":"1120b5a5.d9c70a","type":"function","z":"d8972c0.715b4d8","name":"read SLD state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state MPO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":1600,"wires":[["7dacd9fd.799078"]]},{"id":"7dacd9fd.799078","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":1600,"wires":[["9a1bc815.f8657"]]},{"id":"9a1bc815.f8657","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_sld = {\n ts: \"\",\n station: \"sld\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"sld\"}\n\n\nstate_sld.code = msg.payload[0].value.value; //[0] = code\nstate_sld.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_sld.description = msg.payload[2].value.value; //[2] = description\nstate_sld.station = msg.payload[3].value.value; //[3] = station\nstate_sld.target = msg.payload[4].value.value; //[1] = target\nstate_sld.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_sld);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":830,"y":1600,"wires":[["27192396.b36a1c","fd4114ad.a5aeb"]]},{"id":"27192396.b36a1c","type":"debug","z":"d8972c0.715b4d8","name":"i/state/sld","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1060,"y":1560,"wires":[]},{"id":"b67342cd.f82ec8","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1680,"wires":[["e4e1804b.7d72e"]]},{"id":"e4e1804b.7d72e","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1680,"wires":[["90f9022d.52388"]]},{"id":"90f9022d.52388","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1680,"wires":[["d1931caf.598b9"]]},{"id":"d1931caf.598b9","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1680,"wires":[[]]},{"id":"53def95b.d41208","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state SLD","info":"","x":120,"y":1640,"wires":[]},{"id":"d5bdca11.691ac8","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"ldt_ts\"","datatypeName":""}],"x":110,"y":1840,"wires":[["3b758296.097116"]]},{"id":"3b758296.097116","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":1840,"wires":[["acf217e4.bd543"]]},{"id":"acf217e4.bd543","type":"function","z":"d8972c0.715b4d8","name":"read VGR state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state MPO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":1840,"wires":[["cca12ac.b0f2058"]]},{"id":"cca12ac.b0f2058","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":1840,"wires":[["4ebd5476.9c979c"]]},{"id":"4ebd5476.9c979c","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_vgr = {\n ts: \"\",\n station: \"vgr\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"vgr\"}\n\n\nstate_vgr.code = msg.payload[0].value.value; //[0] = code\nstate_vgr.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_vgr.description = msg.payload[2].value.value; //[2] = description\nstate_vgr.station = msg.payload[3].value.value; //[3] = station\nstate_vgr.target = msg.payload[4].value.value; //[1] = target\nstate_vgr.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_vgr);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":830,"y":1840,"wires":[["83c6e1ce.6331a","785ce783.613b7"]]},{"id":"83c6e1ce.6331a","type":"debug","z":"d8972c0.715b4d8","name":"i/state/vgr","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1060,"y":1800,"wires":[]},{"id":"efaeea88.8d55","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state VGR","info":"","x":120,"y":1880,"wires":[]},{"id":"88587f49.ce2cb","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1920,"wires":[["54ad3cee.228c5c"]]},{"id":"54ad3cee.228c5c","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1920,"wires":[["2fc4373a.62965"]]},{"id":"2fc4373a.62965","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1920,"wires":[["464d3595.56c79c"]]},{"id":"464d3595.56c79c","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1920,"wires":[[]]},{"id":"ac80336f.fd0dc","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":580,"y":140,"wires":[["9f0398d5.5dfac"]]},{"id":"9f0398d5.5dfac","type":"debug","z":"d8972c0.715b4d8","name":"f/o/state/ack","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":750,"y":140,"wires":[]},{"id":"3c0bf468.2670ec","type":"function","z":"d8972c0.715b4d8","name":"value to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"ldt_AcknowledgeButton\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":140,"wires":[["14269794.be7df8"]]},{"id":"45d2f19d.87a89","type":"function","z":"d8972c0.715b4d8","name":"values to read","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"s_data\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":440,"wires":[["5dc02706.9d659"]]},{"id":"5dc02706.9d659","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":440,"wires":[["eb2df124.7a3b"]]},{"id":"eb2df124.7a3b","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { code: 0, data:\"\",id:\"\", ts:\"\" };\n\n\noutput.code = msg.payload[0].value.value; //[0] = code\noutput.data = msg.payload[1].value.value; //[1] = data\noutput.id = msg.payload[2].value.value; //[2] = id\noutput.ts = msg.payload[3].value.value; //[3] = timestamp\n\nnew_msg.payload = JSON.stringify(output);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":830,"y":440,"wires":[["1acdffbf.26fe3","4675f8c1.bdfdd"]]},{"id":"1acdffbf.26fe3","type":"debug","z":"d8972c0.715b4d8","name":"i/alert","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1050,"y":400,"wires":[]},{"id":"8e7ca773.57ce68","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"f/o/nfc/ds","qos":"0","retain":"","broker":"788959e0.92f718","x":700,"y":820,"wires":[]},{"id":"941cc170.2077f","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":820,"wires":[["de9a4d5.6dba8b"]]},{"id":"50e3d831.b0aaa","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":710,"y":780,"wires":[]},{"id":"8481a142.77d748","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":820,"wires":[["8e7ca773.57ce68","50e3d831.b0aaa"]]},{"id":"de9a4d5.6dba8b","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":4,"width":2,"height":1,"passthru":true,"label":"NFC DELETE","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"delete\"}","payloadType":"json","topic":"f/o/nfc/ds","x":280,"y":820,"wires":[["8481a142.77d748"]]},{"id":"e891ffe6.baba5","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":860,"wires":[["3e75fdbc.f401a2"]]},{"id":"3e75fdbc.f401a2","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":1,"width":2,"height":1,"passthru":true,"label":"NFC READ","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"read\"}","payloadType":"json","topic":"f/o/nfc/ds","x":270,"y":860,"wires":[["8481a142.77d748"]]},{"id":"6916b3b7.5894ac","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":900,"wires":[["8ddf48ed.db195"]]},{"id":"8ddf48ed.db195","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":2,"width":2,"height":1,"passthru":true,"label":"NFC READ_UID","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"read_uid\"}","payloadType":"json","topic":"f/o/nfc/ds","x":280,"y":900,"wires":[["8481a142.77d748"]]},{"id":"f79caa5.71a59d8","type":"comment","z":"4c072751.507d3","name":"NFC reader - control actions from MQTT","info":"","x":180,"y":40,"wires":[]},{"id":"63deb236.a8fd74","type":"mqtt in","z":"4c072751.507d3","name":"","topic":"f/o/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":80,"wires":[["4f4071ae.f69d18"]]},{"id":"ab901d1.7ac506","type":"debug","z":"4c072751.507d3","name":"write NFC command to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":630,"y":40,"wires":[]},{"id":"c39d13d0.22ce48","type":"comment","z":"4c072751.507d3","name":"PLC Subscribe","info":"","x":130,"y":160,"wires":[]},{"id":"4f4071ae.f69d18","type":"function","z":"4c072751.507d3","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"ActionButtonNFCModule\".\"s_cmd\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.cmd,\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":80,"wires":[["25f175ee.f8eb1a","ab901d1.7ac506"]]},{"id":"25f175ee.f8eb1a","type":"OPCUA-IIoT-Write","z":"4c072751.507d3","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":440,"y":80,"wires":[["aceba3f4.faa3d8"]]},{"id":"aceba3f4.faa3d8","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":80,"wires":[[]]},{"id":"6d6cbb3a.64ab34","type":"mqtt in","z":"4c072751.507d3","name":"","topic":"fl/i/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":100,"y":240,"wires":[["a7818371.2e3468","6181d227.4a0744"]]},{"id":"a7818371.2e3468","type":"function","z":"4c072751.507d3","name":"values to write","func":"var i;\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"Workpiece\".\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"Workpiece\".\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"Workpiece\".\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[0].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[0].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[1].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[1].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[2].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[2].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[3].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[3].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[4].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[4].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[5].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[5].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[6].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[6].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[7].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[7].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[8].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[8].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\n// for (i = 0; i < msg.payload.history.length; i++) {\n// }\n\n\nif (msg.payload.workpiece === null)\n { msg.payload.workpiece = {};\n msg.payload.workpiece.id = \"\";\n msg.payload.workpiece.state = \"\"; \n msg.payload.workpiece.type = \"\";\n }\n\nif (msg.payload.history === null)\n { msg.payload.history = []\n msg.payload.history[0] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[1] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[2] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 1)\n { msg.payload.history[1] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[2] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 2)\n { msg.payload.history[2] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 3)\n { msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 4)\n { msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 5)\n { msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 6)\n { msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 7)\n { msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 8)\n { msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\n\nmsg.valuesToWrite = [\n msg.payload.ts,\n msg.payload.workpiece.id,\n msg.payload.workpiece.state,\n msg.payload.workpiece.type,\n msg.payload.history[0].code,\n msg.payload.history[0].ts,\n msg.payload.history[1].code,\n msg.payload.history[1].ts,\n msg.payload.history[2].code,\n msg.payload.history[2].ts,\n msg.payload.history[3].code,\n msg.payload.history[3].ts,\n msg.payload.history[4].code,\n msg.payload.history[4].ts,\n msg.payload.history[5].code,\n msg.payload.history[5].ts,\n msg.payload.history[6].code,\n msg.payload.history[6].ts,\n msg.payload.history[7].code,\n msg.payload.history[7].ts,\n msg.payload.history[8].code,\n msg.payload.history[8].ts,\n ]\n\nmsg.payload.hist_len = msg.payload.history.length;\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":240,"wires":[["d961fb7a.82b708","739370d1.a2891","c09cb4bc.f63ca8"]]},{"id":"d961fb7a.82b708","type":"OPCUA-IIoT-Write","z":"4c072751.507d3","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":570,"y":240,"wires":[["dc583c39.c44f1"]]},{"id":"739370d1.a2891","type":"debug","z":"4c072751.507d3","name":"write NFC input to OPC values","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":650,"y":200,"wires":[]},{"id":"dc583c39.c44f1","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":710,"y":240,"wires":[[]]},{"id":"d0afe70d.1022c","type":"comment","z":"4c072751.507d3","name":"NFC reader - deliver read values from MQTT to OPC UA","info":"","x":240,"y":200,"wires":[]},{"id":"cfa66d34.2082e","type":"comment","z":"4c072751.507d3","name":"NFC Reader actions from PLC","info":"","x":150,"y":440,"wires":[]},{"id":"b79ea3fe.a276c","type":"OPCUA-IIoT-Inject","z":"4c072751.507d3","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"","datatypeName":""}],"x":100,"y":480,"wires":[["8bbbf944.1e50f"]]},{"id":"8bbbf944.1e50f","type":"OPCUA-IIoT-Listener","z":"4c072751.507d3","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":250,"y":480,"wires":[["d4559cf5.61d818"]]},{"id":"d4559cf5.61d818","type":"function","z":"4c072751.507d3","name":"read NFC data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for NFC action\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"s_cmd\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"Workpiece\".\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"Workpiece\".\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"Workpiece\".\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[0].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[0].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[1].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[1].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[2].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[2].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[3].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[3].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[4].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[4].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[5].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[5].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[6].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[6].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[7].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[7].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[8].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[8].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":480,"wires":[["edb8ae34.ff46f"]]},{"id":"edb8ae34.ff46f","type":"OPCUA-IIoT-Read","z":"4c072751.507d3","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":660,"y":480,"wires":[["9595e4a9.f713b8","81783bda.cf6638"]]},{"id":"9595e4a9.f713b8","type":"function","z":"4c072751.507d3","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar NFC_out = {\n ts: \"\",\n workpiece: {id:\"\",type:\"\",state:\"\"},\n cmd: \"\",\n history:[]\n }\n\nvar NFC = {\n ts: \"\",\n cmd: \"\",\n }\n\n\n NFC_out.cmd = msg.payload[0].value.value; //[0] = cmd\n NFC_out.ts = msg.payload[1].value.value; //[1] = timestamp\n\n NFC_out.workpiece.id = msg.payload[2].value.value; //[2] = wp.id\n NFC_out.workpiece.state = msg.payload[3].value.value; //[3] = wp.state\n NFC_out.workpiece.type = msg.payload[4].value.value; //[4] = wp.type\n\n\n if (msg.payload[5].value.value === 0)\n { NFC_out.history = [] }\n else\n { NFC_out.history[0] = {\"code\": msg.payload[5].value.value,\"ts\":msg.payload[6].value.value }; }\n\n if (msg.payload[7].value.value === 0)\n { }\n else\n { NFC_out.history[1] = {\"code\": msg.payload[7].value.value,\"ts\":msg.payload[8].value.value }; }\n\n if (msg.payload[9].value.value === 0)\n { }\n else\n { NFC_out.history[2] = {\"code\": msg.payload[9].value.value,\"ts\":msg.payload[10].value.value }; }\n\n if (msg.payload[11].value.value === 0)\n { }\n else\n { NFC_out.history[3] = {\"code\": msg.payload[11].value.value,\"ts\":msg.payload[12].value.value }; }\n\n if (msg.payload[13].value.value === 0)\n { }\n else\n { NFC_out.history[4] = {\"code\": msg.payload[13].value.value,\"ts\":msg.payload[14].value.value }; }\n\n\n if (msg.payload[15].value.value === 0)\n { }\n else\n { NFC_out.history[5] = {\"code\": msg.payload[15].value.value,\"ts\":msg.payload[16].value.value }; }\n\n if (msg.payload[17].value.value === 0)\n { }\n else\n { NFC_out.history[6] = {\"code\": msg.payload[17].value.value,\"ts\":msg.payload[18].value.value }; }\n\n if (msg.payload[19].value.value === 0)\n { }\n else\n { NFC_out.history[7] = {\"code\": msg.payload[19].value.value,\"ts\":msg.payload[20].value.value }; }\n\n if (msg.payload[21].value.value === 0)\n { }\n else\n { NFC_out.history[8] = {\"code\": msg.payload[21].value.value,\"ts\":msg.payload[22].value.value }; }\n\n\n if (NFC_out.cmd === \"write\" )\n { new_msg.payload = JSON.stringify(NFC_out); }\n else\n {NFC.cmd = NFC_out.cmd;\n NFC.ts = NFC_out.ts;\n new_msg.payload = JSON.stringify(NFC); }\n\nreturn new_msg;","outputs":1,"noerr":0,"x":860,"y":480,"wires":[["37bf2120.91a146","782c754f.0648fc"]]},{"id":"b50021c8.58c51","type":"inject","z":"4c072751.507d3","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":580,"wires":[["262cdf7d.826468"]]},{"id":"262cdf7d.826468","type":"function","z":"4c072751.507d3","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":580,"wires":[["1fedde32.72fba2"]]},{"id":"1fedde32.72fba2","type":"OPCUA-IIoT-Write","z":"4c072751.507d3","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":460,"y":580,"wires":[["bc612683.ad76e"]]},{"id":"bc612683.ad76e","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":610,"y":580,"wires":[[]]},{"id":"b394f419.ac14e8","type":"comment","z":"4c072751.507d3","name":"Trigger PLC NFC action","info":"","x":150,"y":540,"wires":[]},{"id":"37bf2120.91a146","type":"mqtt out","z":"4c072751.507d3","name":"","topic":"fl/o/nfc/ds","qos":"0","retain":"","broker":"788959e0.92f718","x":1090,"y":480,"wires":[]},{"id":"782c754f.0648fc","type":"debug","z":"4c072751.507d3","name":"PLC out to NFC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1110,"y":440,"wires":[]},{"id":"b145f37b.5f0858","type":"comment","z":"4c072751.507d3","name":"PLC Publish","info":"","x":110,"y":400,"wires":[]},{"id":"cf4f32a5.1c4f3","type":"comment","z":"b973f4d9.d701f8","name":"Publish","info":"","x":70,"y":60,"wires":[]},{"id":"dda4202e.cba3b8","type":"comment","z":"b973f4d9.d701f8","name":"pan/tilt unit - control actions from MQTT","info":"","x":170,"y":120,"wires":[]},{"id":"78d2e190.54f2d8","type":"mqtt in","z":"b973f4d9.d701f8","name":"","topic":"o/ptu","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":160,"wires":[["80286e18.ad8e5"]]},{"id":"80286e18.ad8e5","type":"function","z":"b973f4d9.d701f8","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"PosPanTiltUnit\".\"s_cmd\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"PosPanTiltUnit\".\"i_degree\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"PosPanTiltUnit\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\nif (typeof msg.payload.degree === 'number')\n { msg.payload.degree = msg.payload.degree; }\nelse\n { msg.payload.degree = 0; }\n\nmsg.valuesToWrite = [\n msg.payload.cmd,\n msg.payload.degree,\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":160,"wires":[["4ef133b2.4c7af4"]]},{"id":"4ef133b2.4c7af4","type":"OPCUA-IIoT-Write","z":"b973f4d9.d701f8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":430,"y":160,"wires":[["bf06b5b4.197498"]]},{"id":"bf06b5b4.197498","type":"OPCUA-IIoT-Response","z":"b973f4d9.d701f8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":580,"y":160,"wires":[["95109a78.96f57"]]},{"id":"95109a78.96f57","type":"debug","z":"b973f4d9.d701f8","name":"o/ptu","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":730,"y":160,"wires":[]},{"id":"d0e042f3.82f4f8","type":"comment","z":"b973f4d9.d701f8","name":"pan/tilt unit - actual values to MQTT","info":"","x":150,"y":300,"wires":[]},{"id":"5c7ca1ce.af1a2","type":"mqtt out","z":"b973f4d9.d701f8","name":"","topic":"i/ptu/pos","qos":"0","retain":"","broker":"788959e0.92f718","x":1040,"y":340,"wires":[]},{"id":"17aba46e.0ca034","type":"OPCUA-IIoT-Inject","z":"b973f4d9.d701f8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":340,"wires":[["a3e93a0c.f6954"]]},{"id":"a3e93a0c.f6954","type":"OPCUA-IIoT-Listener","z":"b973f4d9.d701f8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":340,"wires":[["91483793.941ab8"]]},{"id":"91483793.941ab8","type":"function","z":"b973f4d9.d701f8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"r_pan\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"r_tilt\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":340,"wires":[["e73fb775.950808"]]},{"id":"e73fb775.950808","type":"OPCUA-IIoT-Read","z":"b973f4d9.d701f8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":340,"wires":[["9af144c6.3f0f9"]]},{"id":"9af144c6.3f0f9","type":"function","z":"b973f4d9.d701f8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { pan: 0, tilt:0, ts:\"\" };\n\n//var ts = new Date().toISOString();\n\noutput.pan = msg.payload[0].value.value; //[0] = pan\noutput.tilt = msg.payload[1].value.value; //[1] = tilt\noutput.ts = msg.payload[2].value.value; //[2] = timestamp\n\nnew_msg.payload = JSON.stringify(output);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":340,"wires":[["5c7ca1ce.af1a2","b9716bca.8a72"]]},{"id":"b9716bca.8a72","type":"debug","z":"b973f4d9.d701f8","name":"i/ptu/pos","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":300,"wires":[]},{"id":"be8c44f0.34d648","type":"comment","z":"b973f4d9.d701f8","name":"Trigger state pto","info":"","x":120,"y":400,"wires":[]},{"id":"1e082af2.a98575","type":"inject","z":"b973f4d9.d701f8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":440,"wires":[["a66777a4.4a8f98"]]},{"id":"a66777a4.4a8f98","type":"function","z":"b973f4d9.d701f8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":440,"wires":[["3f4093ef.9f3afc"]]},{"id":"3f4093ef.9f3afc","type":"OPCUA-IIoT-Write","z":"b973f4d9.d701f8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":440,"wires":[["47bed223.1582e4"]]},{"id":"47bed223.1582e4","type":"OPCUA-IIoT-Response","z":"b973f4d9.d701f8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":440,"wires":[[]]},{"id":"2fdb7f6.3f2578","type":"comment","z":"b973f4d9.d701f8","name":"Subscribe","info":"","x":80,"y":240,"wires":[]},{"id":"a92adbd9.b56498","type":"comment","z":"d8972c0.715b4d8","name":"End","info":"","x":90,"y":2020,"wires":[]},{"id":"a0626628.a45778","type":"comment","z":"b973f4d9.d701f8","name":"End","info":"","x":90,"y":540,"wires":[]},{"id":"53e78f28.2f9df8","type":"comment","z":"4c072751.507d3","name":"End","info":"","x":90,"y":640,"wires":[]},{"id":"c66ec048.6fdb5","type":"debug","z":"f27e9a4.d7269e8","name":"stock in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":680,"y":560,"wires":[]},{"id":"e580bfa9.62e2a8","type":"OPCUA-IIoT-Inject","z":"f27e9a4.d7269e8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":600,"wires":[["454dd175.42f528"]]},{"id":"454dd175.42f528","type":"OPCUA-IIoT-Listener","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":600,"wires":[["1542a9f7.37e86e"]]},{"id":"1542a9f7.37e86e","type":"function","z":"f27e9a4.d7269e8","name":"read data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for NFC action\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"s_location\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,0].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,0].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,0].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,1].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,1].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,1].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,2].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,2].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,2].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,0].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,0].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,0].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,1].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,1].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,1].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,2].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,2].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,2].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,0].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,0].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,0].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,1].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,1].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,1].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,2].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,2].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,2].\"s_type\"',\n \"datatypeName\":'String'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":600,"wires":[["f8c5b876.630e38","c66ec048.6fdb5"]]},{"id":"f8c5b876.630e38","type":"OPCUA-IIoT-Read","z":"f27e9a4.d7269e8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":670,"y":600,"wires":[["e9789f89.465a98","4be6403c.29abd8"]]},{"id":"e9789f89.465a98","type":"function","z":"f27e9a4.d7269e8","name":"Format Output Message","func":"var new_msg = { payload: \"\", pl_obj: {} };\n\nvar HBW_stock_out = {\n ts: \"\",\n stockItems: [{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},\n {workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},\n {workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},\n ]\n };\n\n/*\n*/\n\n//HBW_stock_out.location = msg.payload[0].value.value; //[0] = location\nHBW_stock_out.ts = msg.payload[1].value.value; //[1] = timestamp\n\nif (msg.payload[2].value.value === \"\")\n { HBW_stock_out.stockItems[0].location === \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[0].workpiece = {};\n HBW_stock_out.stockItems[0].workpiece = {\n \"id\": msg.payload[2].value.value,\n \"state\":msg.payload[3].value.value,\n \"type\": msg.payload[4].value.value }; \n HBW_stock_out.stockItems[0].location = \"A1\"\n }\n\nif (msg.payload[5].value.value === \"\")\n { HBW_stock_out.stockItems[1].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[1].workpiece = {};\n HBW_stock_out.stockItems[1].workpiece = {\n \"id\": msg.payload[5].value.value,\n \"state\":msg.payload[6].value.value,\n \"type\": msg.payload[7].value.value }; \n HBW_stock_out.stockItems[1].location = \"A2\"\n}\n\n\nif (msg.payload[8].value.value === \"\")\n { HBW_stock_out.stockItems[2].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[2].workpiece = {};\n HBW_stock_out.stockItems[2].workpiece = {\n \"id\": msg.payload[8].value.value,\n \"state\":msg.payload[9].value.value,\n \"type\": msg.payload[10].value.value }; \n HBW_stock_out.stockItems[2].location = \"A3\"\n}\n\nif (msg.payload[11].value.value === \"\")\n { HBW_stock_out.stockItems[3].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[3].workpiece = {};\n HBW_stock_out.stockItems[3].workpiece = {\n \"id\": msg.payload[11].value.value,\n \"state\":msg.payload[12].value.value,\n \"type\": msg.payload[13].value.value }; \n HBW_stock_out.stockItems[3].location = \"B1\"\n}\n\nif (msg.payload[14].value.value === \"\")\n { HBW_stock_out.stockItems[4].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[4].workpiece = {};\n HBW_stock_out.stockItems[4].workpiece = {\n \"id\": msg.payload[14].value.value,\n \"state\":msg.payload[15].value.value,\n \"type\": msg.payload[16].value.value }; \n HBW_stock_out.stockItems[4].location = \"B2\"\n}\n\nif (msg.payload[17].value.value === \"\")\n { HBW_stock_out.stockItems[5].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[5].workpiece = {};\n HBW_stock_out.stockItems[5].workpiece = {\n \"id\": msg.payload[17].value.value,\n \"state\":msg.payload[18].value.value,\n \"type\": msg.payload[19].value.value }; \n HBW_stock_out.stockItems[5].location = \"B3\"\n}\n\nif (msg.payload[20].value.value === \"\")\n { HBW_stock_out.stockItems[6].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[6].workpiece = {};\n HBW_stock_out.stockItems[6].workpiece = {\n \"id\": msg.payload[20].value.value,\n \"state\":msg.payload[21].value.value,\n \"type\": msg.payload[22].value.value }; \n HBW_stock_out.stockItems[6].location = \"C1\"\n}\n\nif (msg.payload[23].value.value === \"\")\n { HBW_stock_out.stockItems[7].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[7].workpiece = {};\n HBW_stock_out.stockItems[7].workpiece = {\n \"id\": msg.payload[23].value.value,\n \"state\":msg.payload[24].value.value,\n \"type\": msg.payload[25].value.value }; \n HBW_stock_out.stockItems[7].location = \"C2\"\n}\n\n\nif (msg.payload[26].value.value === \"\")\n { HBW_stock_out.stockItems[8].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[8].workpiece = {};\n HBW_stock_out.stockItems[8].workpiece = {\n \"id\": msg.payload[26].value.value,\n \"state\":msg.payload[27].value.value,\n \"type\": msg.payload[28].value.value }; \n HBW_stock_out.stockItems[8].location = \"C3\"\n}\n\nnew_msg.payload = JSON.stringify(HBW_stock_out);\nnew_msg.pl_obj = (HBW_stock_out);\nreturn new_msg;","outputs":1,"noerr":0,"x":870,"y":600,"wires":[["a42f27e9.9eebd","a1dae50.3e6a018"]]},{"id":"b60c6547.1adbf8","type":"inject","z":"f27e9a4.d7269e8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":700,"wires":[["7e81dbbd.876844"]]},{"id":"7e81dbbd.876844","type":"function","z":"f27e9a4.d7269e8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":700,"wires":[["264678cd.15c11"]]},{"id":"264678cd.15c11","type":"OPCUA-IIoT-Write","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":700,"wires":[["89d2c3b3.d6812"]]},{"id":"89d2c3b3.d6812","type":"OPCUA-IIoT-Response","z":"f27e9a4.d7269e8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":700,"wires":[[]]},{"id":"940bd4b.e3096a8","type":"comment","z":"f27e9a4.d7269e8","name":"Trigger HBW stock action","info":"","x":150,"y":660,"wires":[]},{"id":"a42f27e9.9eebd","type":"debug","z":"f27e9a4.d7269e8","name":"PLC out to HBW Stock","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1160,"y":560,"wires":[]},{"id":"3310a09f.ae8fa","type":"comment","z":"f27e9a4.d7269e8","name":"Subscribe","info":"","x":80,"y":520,"wires":[]},{"id":"43067afe.b82a0c","type":"comment","z":"f27e9a4.d7269e8","name":"End","info":"","x":70,"y":800,"wires":[]},{"id":"579f7729.835cb8","type":"comment","z":"f27e9a4.d7269e8","name":"Publish","info":"","x":70,"y":40,"wires":[]},{"id":"c96e1f89.5ae768","type":"comment","z":"f27e9a4.d7269e8","name":"Order Workpiece - control actions from MQTT","info":"","x":190,"y":80,"wires":[]},{"id":"eda38feb.2caaa8","type":"debug","z":"f27e9a4.d7269e8","name":"f/o/order","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":740,"y":120,"wires":[]},{"id":"e7426646.c0b36","type":"mqtt in","z":"f27e9a4.d7269e8","name":"","topic":"f/o/order","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":120,"wires":[["14b7cf8f.2c3cf8","b0aa04de.b7b368"]]},{"id":"14b7cf8f.2c3cf8","type":"function","z":"f27e9a4.d7269e8","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"OrderWorkpieceButton\".\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"OrderWorkpieceButton\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.type,\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":120,"wires":[["1c3414b2.7ffe0b"]]},{"id":"1c3414b2.7ffe0b","type":"OPCUA-IIoT-Write","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":430,"y":120,"wires":[["4e03142f.9db8dc"]]},{"id":"4e03142f.9db8dc","type":"OPCUA-IIoT-Response","z":"f27e9a4.d7269e8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":580,"y":120,"wires":[["eda38feb.2caaa8"]]},{"id":"6709e4ea.97feb4","type":"comment","z":"f27e9a4.d7269e8","name":"State Order - actual values to MQTT ","info":"","x":160,"y":240,"wires":[]},{"id":"51d9b27a.f4f0e4","type":"OPCUA-IIoT-Inject","z":"f27e9a4.d7269e8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":280,"wires":[["bd7d059e.84cb8"]]},{"id":"62c1c99a.4ad388","type":"mqtt out","z":"f27e9a4.d7269e8","name":"","topic":"f/i/order","qos":"0","retain":"","broker":"788959e0.92f718","x":1040,"y":280,"wires":[]},{"id":"50e236ae.ece588","type":"comment","z":"f27e9a4.d7269e8","name":"Subscribe","info":"","x":80,"y":200,"wires":[]},{"id":"bd7d059e.84cb8","type":"OPCUA-IIoT-Listener","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":280,"wires":[["a54f69a6.6d0ec8"]]},{"id":"a54f69a6.6d0ec8","type":"function","z":"f27e9a4.d7269e8","name":"read Order state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state Order\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"s_type\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":280,"wires":[["99e78949.497c88"]]},{"id":"99e78949.497c88","type":"OPCUA-IIoT-Read","z":"f27e9a4.d7269e8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":280,"wires":[["d1811b9f.770d"]]},{"id":"d1811b9f.770d","type":"function","z":"f27e9a4.d7269e8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_order = {\n ts: \"\",\n state: \"\",\n type: \"\",\n }\n\nstate_order.state = msg.payload[0].value.value; //[0] = state\nstate_order.type = msg.payload[1].value.value; //[1] = type\nstate_order.ts = msg.payload[2].value.value; //[2] = timestamp\n\nnew_msg.payload = JSON.stringify(state_order);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":280,"wires":[["8cd3a33e.67f458","62c1c99a.4ad388"]]},{"id":"760fc958.ba97e","type":"inject","z":"f27e9a4.d7269e8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":380,"wires":[["b557589f.7c33b"]]},{"id":"b557589f.7c33b","type":"function","z":"f27e9a4.d7269e8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":380,"wires":[["9b3496d4.7005a8"]]},{"id":"9b3496d4.7005a8","type":"OPCUA-IIoT-Write","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":380,"wires":[["165fb096.b8ff07"]]},{"id":"165fb096.b8ff07","type":"OPCUA-IIoT-Response","z":"f27e9a4.d7269e8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":380,"wires":[[]]},{"id":"d03b53e8.13e0b8","type":"comment","z":"f27e9a4.d7269e8","name":"Trigger state Order","info":"","x":130,"y":340,"wires":[]},{"id":"8cd3a33e.67f458","type":"debug","z":"f27e9a4.d7269e8","name":"f/i/order","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":240,"wires":[]},{"id":"b0aa04de.b7b368","type":"debug","z":"f27e9a4.d7269e8","name":"mqtt order in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":250,"y":160,"wires":[]},{"id":"4be6403c.29abd8","type":"debug","z":"f27e9a4.d7269e8","name":"read in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":840,"y":560,"wires":[]},{"id":"38c6f16e.60b216","type":"mqtt in","z":"1bbb875f.799c41","name":"","topic":"i/cam","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":120,"wires":[["746e989a.9e1e48"]]},{"id":"746e989a.9e1e48","type":"function","z":"1bbb875f.799c41","name":"value to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"CameraPicture\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n// { \"name\":\"\",\n// \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"CameraPicture\".\"s_data\"',\n// \"datatypeName\":'String'},\n ]\nmsg.valuesToWrite = [\n msg.payload.ts,\n// msg.payload.data,\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":120,"wires":[["a744aaf9.607cf8","2b490d6a.7d923a"]]},{"id":"a744aaf9.607cf8","type":"OPCUA-IIoT-Write","z":"1bbb875f.799c41","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":120,"wires":[["ec740d86.a936e"]]},{"id":"ec740d86.a936e","type":"OPCUA-IIoT-Response","z":"1bbb875f.799c41","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":120,"wires":[[]]},{"id":"3afc4054.0803a","type":"comment","z":"1bbb875f.799c41","name":"Sensor Signals from TXT","info":"","x":130,"y":60,"wires":[]},{"id":"d318e897.cf6d8","type":"comment","z":"1bbb875f.799c41","name":"End","info":"","x":70,"y":460,"wires":[]},{"id":"14dc81ea.35b4f6","type":"mqtt in","z":"1bbb875f.799c41","name":"","topic":"i/bme680","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":240,"wires":[["3ac69873.ebbd68"]]},{"id":"8a37dfee.e935b","type":"mqtt in","z":"1bbb875f.799c41","name":"","topic":"i/ldr","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":340,"wires":[["ecc1fb8d.138cd8"]]},{"id":"3ac69873.ebbd68","type":"function","z":"1bbb875f.799c41","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"i_aq\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"di_gr\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_h\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"i_iaq\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_p\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_rh\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_rt\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_t\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.aq,\n msg.payload.gr,\n msg.payload.h,\n msg.payload.iaq,\n msg.payload.p,\n msg.payload.rh,\n msg.payload.rt,\n msg.payload.t,\n msg.payload.ts,\n]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":240,"wires":[["c381e352.557c98","371d4544.9d0042"]]},{"id":"c381e352.557c98","type":"OPCUA-IIoT-Write","z":"1bbb875f.799c41","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":240,"wires":[["e0151dc2.2d174"]]},{"id":"e0151dc2.2d174","type":"OPCUA-IIoT-Response","z":"1bbb875f.799c41","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":240,"wires":[[]]},{"id":"ecc1fb8d.138cd8","type":"function","z":"1bbb875f.799c41","name":"values to write","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"BrightnessSensor\".\"i_ldr\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"BrightnessSensor\".\"r_br\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"BrightnessSensor\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.ldr,\n msg.payload.br,\n msg.payload.ts,\n]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":340,"wires":[["dc8e27a9.7bd0a","f5c18683.2ddb1"]]},{"id":"dc8e27a9.7bd0a","type":"OPCUA-IIoT-Write","z":"1bbb875f.799c41","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":340,"wires":[["bb217b43.09e4a8"]]},{"id":"bb217b43.09e4a8","type":"OPCUA-IIoT-Response","z":"1bbb875f.799c41","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":340,"wires":[[]]},{"id":"2b490d6a.7d923a","type":"debug","z":"1bbb875f.799c41","name":"write i/cam tmstmp to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":80,"wires":[]},{"id":"371d4544.9d0042","type":"debug","z":"1bbb875f.799c41","name":"write i/bme680 data to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":200,"wires":[]},{"id":"f5c18683.2ddb1","type":"debug","z":"1bbb875f.799c41","name":"write i/ldr data to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":620,"y":300,"wires":[]},{"id":"c19c3a95.da0e78","type":"OPCUA-IIoT-Inject","z":"40d33793.7558d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"x_Position_Reached\"","datatypeName":""}],"x":110,"y":80,"wires":[["1847b81e.0bb6f8"]]},{"id":"1847b81e.0bb6f8","type":"OPCUA-IIoT-Listener","z":"40d33793.7558d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":80,"wires":[["9c60c1c7.2c8f18"]]},{"id":"9c60c1c7.2c8f18","type":"function","z":"40d33793.7558d8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":80,"wires":[["758e1c3c.2ba854"]]},{"id":"758e1c3c.2ba854","type":"OPCUA-IIoT-Read","z":"40d33793.7558d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":80,"wires":[["fb542bb6.4c6878","af75b462.d672d8"]]},{"id":"fb542bb6.4c6878","type":"function","z":"40d33793.7558d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { hz_axis_actpos: 0,\n hz_axis_targetpos: 0,\n hz_axis_posreached: 0,\n vert_axis_actpos: 0,\n vert_axis_targetpos: 0,\n vert_axis_posreached: 0\n };\n\n\noutput.hz_axis_actpos = msg.payload[0].value.value; \noutput.hz_axis_targetpos = msg.payload[1].value.value; \noutput.hz_axis_posreached = msg.payload[2].value.value; \noutput.vert_axis_actpos = msg.payload[3].value.value; \noutput.vert_axis_targetpos = msg.payload[4].value.value; \noutput.vert_axis_posreached = msg.payload[5].value.value; \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["68726228.04cd5c","3095523e.c04016","392670.07d5199","585eaba.0a1bfd4"]]},{"id":"68726228.04cd5c","type":"function","z":"40d33793.7558d8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"HBW_hz_axis_X\"\n\nmsg.top = 300\nmsg.left = 100\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.hz_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["8158f94b.ad1eb8"]]},{"id":"8158f94b.ad1eb8","type":"function","z":"40d33793.7558d8","name":"color all Items","func":"var lastState = flow.get('HBW_State') || {};\n\n// Colorize \nif (msg.payload.state == 1) \n{ msg.payload.color = '#5a5' } else\n{ msg.payload.color = '#a55' }\n\n\nlastState[msg.topic] = msg.payload; \nflow.set('HBW_State', lastState);\nreturn { \n \"topic\": msg.topic,\n \"payload\": lastState,\n \"url\": msg.url\n};\n","outputs":1,"noerr":0,"x":820,"y":160,"wires":[["14e063c3.f8b8ec"]]},{"id":"14e063c3.f8b8ec","type":"link out","z":"40d33793.7558d8","name":"toPicBox","links":["bb73551f.fa8d"],"x":975,"y":160,"wires":[]},{"id":"bb73551f.fa8d","type":"link in","z":"40d33793.7558d8","name":"PicBox","links":["14e063c3.f8b8ec","b54e35de.9e131"],"x":75,"y":360,"wires":[["bc1b61a8.b70418"]]},{"id":"bc1b61a8.b70418","type":"ui_template","z":"40d33793.7558d8","group":"7f600873.485d1","name":"Status Picture VGR","order":2,"width":9,"height":7,"format":"\n\n
\n\n
\n \n \n \n {{el.text}}\n \n
\n
\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":210,"y":360,"wires":[[]]},{"id":"6f5a2122.1f3448","type":"comment","z":"40d33793.7558d8","name":"HMI - Picture Box","info":"","x":120,"y":320,"wires":[]},{"id":"fcd8702c.5ee98","type":"comment","z":"40d33793.7558d8","name":"read real values from PLC","info":"","x":150,"y":40,"wires":[]},{"id":"3095523e.c04016","type":"function","z":"40d33793.7558d8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"HBW_hz_axis_W\"\n\nmsg.top = 320\nmsg.left = 100\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.hz_axis_targetpos\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":200,"wires":[["8158f94b.ad1eb8"]]},{"id":"ef0d76c0.9bac4","type":"debug","z":"40d33793.7558d8","name":"Read HBW Pos.","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":580,"y":480,"wires":[]},{"id":"392670.07d5199","type":"function","z":"40d33793.7558d8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"HBW_vert_axis_X\"\n\nmsg.top = 70\nmsg.left = 270\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.vert_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["8158f94b.ad1eb8"]]},{"id":"585eaba.0a1bfd4","type":"function","z":"40d33793.7558d8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"HBW_vert_axis_W\"\n\nmsg.top = 90\nmsg.left = 270\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.vert_axis_targetpos\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":300,"wires":[["8158f94b.ad1eb8"]]},{"id":"796bcf22.7b51a","type":"OPCUA-IIoT-Inject","z":"40d33793.7558d8","injectType":"inject","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"Init","payload":"","addressSpaceItems":[],"x":110,"y":480,"wires":[["b793ab10.b3a828"]]},{"id":"64c49f07.3e14c8","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":540,"wires":[["4877dca2.924d1c"]]},{"id":"4877dca2.924d1c","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":540,"wires":[["60fa7383.0e42e4"]]},{"id":"60fa7383.0e42e4","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":540,"wires":[[]]},{"id":"1cf34a00.49e556","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":600,"wires":[["ed9bc869.8af17"]]},{"id":"ed9bc869.8af17","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":600,"wires":[["8b2161fb.e9d6f8"]]},{"id":"8b2161fb.e9d6f8","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":600,"wires":[[]]},{"id":"1582d77c.dedc81","type":"comment","z":"40d33793.7558d8","name":"HMI - Positions","info":"","x":120,"y":440,"wires":[]},{"id":"9175e6d9.13dd48","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[0,0].\"di_PosRack_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":860,"wires":[["fea464cb.5396b8"]]},{"id":"fea464cb.5396b8","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":860,"wires":[["9eb98e.7b45de7"]]},{"id":"9eb98e.7b45de7","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":860,"wires":[[]]},{"id":"f175b82e.fe3c58","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[0,0].\"di_PosRack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":920,"wires":[["be9d8a7a.03353"]]},{"id":"be9d8a7a.03353","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":920,"wires":[["3536f0ea.2c34d"]]},{"id":"3536f0ea.2c34d","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":920,"wires":[[]]},{"id":"62e451c4.63d2f","type":"file","z":"bcaa3a6a.3bdbe8","name":"ConfigData.csv","filename":".node-red/pub/CSV/ConfigData.csv","appendNewline":true,"createDir":true,"overwriteFile":"true","encoding":"none","x":1120,"y":80,"wires":[[]]},{"id":"598108f7.a32b4","type":"csv","z":"bcaa3a6a.3bdbe8","name":"","sep":",","hdrin":true,"hdrout":true,"multi":"one","ret":"\\r\\n","temp":"Version_Index, HBW_di_PosBelt_Horizontal, HBW_di_PosBelt_Vertical, HBW_di_PosBelt_Offset_Vertical, HBW_di_PosRack_Offset_Vertical, HBW_di_PosRack_A1_Horizontal, HBW_di_PosRack_A1_Vertical, HBW_di_PosRack_B2_Horizontal, HBW_di_PosRack_B2_Vertical, HBW_di_PosRack_C3_Horizontal, HBW_di_PosRack_C3_Vertical, VGR_di_Pos_Color_horizontal, VGR_di_Pos_Color_vertical, VGR_di_Pos_Color_rotate, VGR_di_Pos_DSI_horizontal, VGR_di_Pos_DSI_Collect_vertical, VGR_di_Pos_DSI_Discard_vertical, VGR_di_Pos_DSI_rotate, VGR_di_Offset_Pos_DSI_NFC_vertical, VGR_di_Pos_DSO_horizontal, VGR_di_Pos_DSO_Collect_vertical, VGR_di_Pos_DSO_Discard_vertical, VGR_di_Pos_DSO_rotate, VGR_di_Offset_Pos_DSO_vertical, VGR_di_Pos_HBW_horizontal, VGR_di_Pos_HBW_Collect_vertical, VGR_di_Pos_HBW_Discard_vertical, VGR_di_Pos_HBW_rotate, VGR_di_Offset_Pos_HBW_horizontal, VGR_di_Offset_Pos_HBW_vertical, VGR_di_Pos_MPO_horizontal, VGR_di_Pos_MPO_vertical, VGR_di_Pos_MPO_rotate, VGR_di_Offset_Pos_MPO_vertical, VGR_di_Pos_NFC_horizontal, VGR_di_Pos_NFC_vertical, VGR_di_Pos_NFC_rotate, VGR_di_Pos_NiO_horizontal, VGR_di_Pos_NiO_vertical, VGR_di_Pos_NiO_rotate, VGR_di_Pos_SLD_Blue_horizontal, VGR_di_Pos_SLD_Blue_vertical, VGR_di_Pos_SLD_Blue_rotate, VGR_di_Pos_SLD_Red_horizontal, VGR_di_Pos_SLD_Red_vertical, VGR_di_Pos_SLD_Red_rotate, VGR_di_Pos_SLD_White_horizontal, VGR_di_Pos_SLD_White_vertical, VGR_di_Pos_SLD_White_rotate, SSC_di_PosCentre_Horizontal, SSC_di_PosCentre_Vertical, SSC_di_PosHBW_Horizontal, SSC_di_PosHBW_Vertical, SSC_w_Threshold_Red_Blue, SSC_w_Threshold_White_Red, SLD_w_Threshold_Red_Blue, SLD_w_Threshold_White_Red, SLD_i_CounterValue_Blue, SLD_i_CounterValue_Red, SLD_i_CounterValue_White","skip":0,"strings":true,"x":950,"y":80,"wires":[["62e451c4.63d2f"]]},{"id":"d7e62043.7ba3d","type":"http in","z":"bcaa3a6a.3bdbe8","name":"downloads","url":"/downloads","method":"get","upload":false,"swaggerDoc":"","x":120,"y":140,"wires":[["bbbc5437.d371c8"]]},{"id":"1bdac880.bfc6d8","type":"http response","z":"bcaa3a6a.3bdbe8","name":"response","statusCode":"200","headers":{"content-type":"text/plain"},"x":440,"y":140,"wires":[]},{"id":"bbbc5437.d371c8","type":"ui_template","z":"bcaa3a6a.3bdbe8","group":"6bec7372.842fa4","name":"","order":3,"width":6,"height":1,"format":"
\nDownload ConfigData.csv\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":280,"y":140,"wires":[["1bdac880.bfc6d8"]]},{"id":"e1799448.4ec238","type":"comment","z":"bcaa3a6a.3bdbe8","name":"Save config data (with Download Link)","info":"","x":190,"y":40,"wires":[]},{"id":"45f7dad0.91549c","type":"function","z":"bcaa3a6a.3bdbe8","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":80,"wires":[["8f4d5755.e5e118"]]},{"id":"8f4d5755.e5e118","type":"OPCUA-IIoT-Read","z":"bcaa3a6a.3bdbe8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":550,"y":80,"wires":[["df5838a3.8e2b18","ba104c4f.f439c8"]]},{"id":"df5838a3.8e2b18","type":"function","z":"bcaa3a6a.3bdbe8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //Version Index\n Version_Index: \"1.0\", //[]\n //HBW\n HBW_di_PosBelt_Horizontal: 1, //[0]\n HBW_di_PosBelt_Vertical: 1, //[1]\n HBW_di_PosBelt_Offset_Vertical: 1, //[2]\n \n HBW_di_PosRack_Offset_Vertical: 1, //[3]\n HBW_di_PosRack_A1_Horizontal: 1, //[4]\n HBW_di_PosRack_A1_Vertical: 1, //[5]\n\n HBW_di_PosRack_B2_Horizontal: 1, //[6]\n HBW_di_PosRack_B2_Vertical: 1, //[7]\n\n HBW_di_PosRack_C3_Horizontal: 1, //[8]\n HBW_di_PosRack_C3_Vertical: 1, //[9]\n\n //VGR\n VGR_di_Pos_Color_horizontal: 1, //[10]\n VGR_di_Pos_Color_vertical: 1, //[11]\n VGR_di_Pos_Color_rotate: 1, //[12]\n //Pos DSI\n VGR_di_Pos_DSI_horizontal: 1, //[13]\n VGR_di_Pos_DSI_Collect_vertical: 1, //[14]\n VGR_di_Pos_DSI_Discard_vertical: 1, //[15]\n VGR_di_Pos_DSI_rotate: 1, //[16]\n VGR_di_Offset_Pos_DSI_NFC_vertical: 1, //[17]\n //Pos DSO\n VGR_di_Pos_DSO_horizontal: 1, //[18] \n VGR_di_Pos_DSO_Collect_vertical: 1, //[19]\n VGR_di_Pos_DSO_Discard_vertical: 1, //[20] \n VGR_di_Pos_DSO_rotate: 1, //[21] \n VGR_di_Offset_Pos_DSO_vertical: 1, //[22]\n //Pos HBW\n VGR_di_Pos_HBW_horizontal: 1, //[23] \n VGR_di_Pos_HBW_Collect_vertical: 1, //[24] \n VGR_di_Pos_HBW_Discard_vertical: 1, //[25] \n VGR_di_Pos_HBW_rotate: 1, //[26] \n VGR_di_Offset_Pos_HBW_horizontal: 1, //[27] \n VGR_di_Offset_Pos_HBW_vertical: 1, //[28] \n //Pos MPO\n VGR_di_Pos_MPO_horizontal: 1, //[29] \n VGR_di_Pos_MPO_vertical: 1, //[30] \n VGR_di_Pos_MPO_rotate: 1, //[31] \n VGR_di_Offset_Pos_MPO_vertical: 1, //[32]\n //Pos NFC\n VGR_di_Pos_NFC_horizontal: 1, //[33] \n VGR_di_Pos_NFC_vertical: 1, //[34] \n VGR_di_Pos_NFC_rotate: 1, //[35] \n //Pos NiO\n VGR_di_Pos_NiO_horizontal: 1, //[36] \n VGR_di_Pos_NiO_vertical: 1, //[37] \n VGR_di_Pos_NiO_rotate: 1, //[38] \n //Pos SLD Blue\n VGR_di_Pos_SLD_Blue_horizontal: 1, //[39] \n VGR_di_Pos_SLD_Blue_vertical: 1, //[40] \n VGR_di_Pos_SLD_Blue_rotate: 1, //[41] \n //Pos SLD Red\n VGR_di_Pos_SLD_Red_horizontal:1, //[42] \n VGR_di_Pos_SLD_Red_vertical:1, //[43] \n VGR_di_Pos_SLD_Red_rotate:1, //[44] \n //Pos SLD White\n VGR_di_Pos_SLD_White_horizontal: 1, //[45] \n VGR_di_Pos_SLD_White_vertical: 1, //[46] \n VGR_di_Pos_SLD_White_rotate: 1, //[47] \n\n //SSC\n //Centre\n SSC_di_PosCentre_Horizontal: 1, //[48]\n SSC_di_PosCentre_Vertical: 1, //[49]\n //HBW\n SSC_di_PosHBW_Horizontal: 1, //[50]\n SSC_di_PosHBW_Vertical: 1, //[51]\n\n //Color Sensor Calibration\n //DSI\n SSC_w_Threshold_Red_Blue: 1, //[52]\n SSC_w_Threshold_White_Red: 1, //[53]\n\n //Color Sensor Calibration\n //SLD\n SLD_w_Threshold_Red_Blue: 1, //[54]\n SLD_w_Threshold_White_Red: 1, //[55]\n \n //Pushout Counter\n //SLD\n SLD_i_CounterValue_Blue: 1, //[56]\n SLD_i_CounterValue_Red: 1, //[57]\n SLD_i_CounterValue_White: 1, //[58]\n\n }\n\n\n\n\nConfData_out.Version_Index = \"1.0\";\n//HBW\nConfData_out.HBW_di_PosBelt_Horizontal = msg.payload[0].value.value; //[0] \nConfData_out.HBW_di_PosBelt_Vertical = msg.payload[1].value.value; //[1] \nConfData_out.HBW_di_PosBelt_Offset_Vertical= msg.payload[2].value.value; //[2]\n\nConfData_out.HBW_di_PosRack_Offset_Vertical= msg.payload[3].value.value; //[3]\nConfData_out.HBW_di_PosRack_A1_Horizontal = msg.payload[4].value.value; //[4] \nConfData_out.HBW_di_PosRack_A1_Vertical = msg.payload[5].value.value; //[5]\n\nConfData_out.HBW_di_PosRack_B2_Horizontal = msg.payload[6].value.value; //[6] \nConfData_out.HBW_di_PosRack_B2_Vertical = msg.payload[7].value.value; //[7]\n\nConfData_out.HBW_di_PosRack_C3_Horizontal = msg.payload[8].value.value; //[8] \nConfData_out.HBW_di_PosRack_C3_Vertical = msg.payload[9].value.value; //[9]\n\n//VGR\n//Pos Color\nConfData_out.VGR_di_Pos_Color_horizontal = msg.payload[10].value.value; //[10] \nConfData_out.VGR_di_Pos_Color_vertical = msg.payload[11].value.value; //[11] \nConfData_out.VGR_di_Pos_Color_rotate = msg.payload[12].value.value; //[12] \n//Pos DSI\nConfData_out.VGR_di_Pos_DSI_horizontal = msg.payload[13].value.value; //[13] \nConfData_out.VGR_di_Pos_DSI_Collect_vertical = msg.payload[14].value.value; //[14] \nConfData_out.VGR_di_Pos_DSI_Discard_vertical = msg.payload[15].value.value; //[15] \nConfData_out.VGR_di_Pos_DSI_rotate = msg.payload[16].value.value; //[16] \nConfData_out.VGR_di_Offset_Pos_DSI_NFC_vertical = msg.payload[17].value.value; //[17] \n//Pos DSO\nConfData_out.VGR_di_Pos_DSO_horizontal = msg.payload[18].value.value; //[18] \nConfData_out.VGR_di_Pos_DSO_Collect_vertical = msg.payload[19].value.value; //[19] \nConfData_out.VGR_di_Pos_DSO_Discard_vertical = msg.payload[20].value.value; //[20] \nConfData_out.VGR_di_Pos_DSO_rotate = msg.payload[21].value.value; //[21] \nConfData_out.VGR_di_Offset_Pos_DSO_vertical = msg.payload[22].value.value; //[22] \n//Pos HBW\nConfData_out.VGR_di_Pos_HBW_horizontal = msg.payload[23].value.value; //[23] \nConfData_out.VGR_di_Pos_HBW_Collect_vertical = msg.payload[24].value.value; //[24] \nConfData_out.VGR_di_Pos_HBW_Discard_vertical = msg.payload[25].value.value; //[25] \nConfData_out.VGR_di_Pos_HBW_rotate = msg.payload[26].value.value; //[26] \nConfData_out.VGR_di_Offset_Pos_HBW_horizontal = msg.payload[27].value.value; //[27] \nConfData_out.VGR_di_Offset_Pos_HBW_vertical = msg.payload[28].value.value; //[28] \n//Pos MPO\nConfData_out.VGR_di_Pos_MPO_horizontal = msg.payload[29].value.value; //[29] \nConfData_out.VGR_di_Pos_MPO_vertical = msg.payload[30].value.value; //[30] \nConfData_out.VGR_di_Pos_MPO_rotate = msg.payload[31].value.value; //[31] \nConfData_out.VGR_di_Offset_Pos_MPO_vertical = msg.payload[32].value.value; //[32] \n//Pos NFC\nConfData_out.VGR_di_Pos_NFC_horizontal = msg.payload[33].value.value; //[33] \nConfData_out.VGR_di_Pos_NFC_vertical = msg.payload[34].value.value; //[34] \nConfData_out.VGR_di_Pos_NFC_rotate = msg.payload[35].value.value; //[35] \n//Pos NiO\nConfData_out.VGR_di_Pos_NiO_horizontal = msg.payload[36].value.value; //[36] \nConfData_out.VGR_di_Pos_NiO_vertical = msg.payload[37].value.value; //[37] \nConfData_out.VGR_di_Pos_NiO_rotate = msg.payload[38].value.value; //[38] \n//Pos SLD Blue\nConfData_out.VGR_di_Pos_SLD_Blue_horizontal = msg.payload[39].value.value; //[39] \nConfData_out.VGR_di_Pos_SLD_Blue_vertical = msg.payload[40].value.value; //[40] \nConfData_out.VGR_di_Pos_SLD_Blue_rotate = msg.payload[41].value.value; //[41] \n//Pos SLD Red\nConfData_out.VGR_di_Pos_SLD_Red_horizontal = msg.payload[42].value.value; //[42] \nConfData_out.VGR_di_Pos_SLD_Red_vertical = msg.payload[43].value.value; //[43] \nConfData_out.VGR_di_Pos_SLD_Red_rotate = msg.payload[44].value.value; //[44] \n//Pos SLD White\nConfData_out.VGR_di_Pos_SLD_White_horizontal = msg.payload[45].value.value; //[45] \nConfData_out.VGR_di_Pos_SLD_White_vertical = msg.payload[46].value.value; //[46] \nConfData_out.VGR_di_Pos_SLD_White_rotate = msg.payload[47].value.value; //[47] \n\n//SSC\n//Pos Centre\nConfData_out.SSC_di_PosCentre_Horizontal = msg.payload[48].value.value; //[48] \nConfData_out.SSC_di_PosCentre_Vertical = msg.payload[49].value.value; //[49] \n//Pos HBW\nConfData_out.SSC_di_PosHBW_Horizontal = msg.payload[50].value.value; //[50]\nConfData_out.SSC_di_PosHBW_Vertical = msg.payload[51].value.value; //[51]\n\n//Color Sensor Calibration\n//DSI\nConfData_out.SSC_w_Threshold_Red_Blue = msg.payload[52].value.value; //[52]\nConfData_out.SSC_w_Threshold_White_Red = msg.payload[53].value.value; //[53]\n\n//Color Sensor Calibration\n//SLD\nConfData_out.SLD_w_Threshold_Red_Blue = msg.payload[54].value.value; //[54]\nConfData_out.SLD_w_Threshold_White_Red = msg.payload[55].value.value; //[55]\n \n//Pushout Counter\n//SLD\nConfData_out.SLD_i_CounterValue_Blue = msg.payload[56].value.value; //[56]\nConfData_out.SLD_i_CounterValue_Red = msg.payload[57].value.value; //[57]\nConfData_out.SLD_i_CounterValue_White = msg.payload[58].value.value; //[58]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":750,"y":80,"wires":[["598108f7.a32b4","e33b94f0.11d828"]]},{"id":"80690a67.faa2","type":"file in","z":"bcaa3a6a.3bdbe8","name":"ConfigData.csv","filename":".node-red/pub/CSV/ConfigData.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":320,"y":260,"wires":[["b0a17a71.115998"]]},{"id":"b0a17a71.115998","type":"csv","z":"bcaa3a6a.3bdbe8","name":"","sep":",","hdrin":true,"hdrout":false,"multi":"one","ret":"\\r\\n","temp":"Version_Index, HBW_di_PosBelt_Horizontal, HBW_di_PosBelt_Vertical, HBW_di_PosBelt_Offset_Vertical, HBW_di_PosRack_Offset_Vertical, HBW_di_PosRack_A1_Horizontal, HBW_di_PosRack_A1_Vertical, HBW_di_PosRack_B2_Horizontal, HBW_di_PosRack_B2_Vertical, HBW_di_PosRack_C3_Horizontal, HBW_di_PosRack_C3_Vertical, VGR_di_Pos_Color_horizontal, VGR_di_Pos_Color_vertical, VGR_di_Pos_Color_rotate, VGR_di_Pos_DSI_horizontal, VGR_di_Pos_DSI_Collect_vertical, VGR_di_Pos_DSI_Discard_vertical, VGR_di_Pos_DSI_rotate, VGR_di_Offset_Pos_DSI_NFC_vertical, VGR_di_Pos_DSO_horizontal, VGR_di_Pos_DSO_Collect_vertical, VGR_di_Pos_DSO_Discard_vertical, VGR_di_Pos_DSO_rotate, VGR_di_Offset_Pos_DSO_vertical, VGR_di_Pos_HBW_horizontal, VGR_di_Pos_HBW_Collect_vertical, VGR_di_Pos_HBW_Discard_vertical, VGR_di_Pos_HBW_rotate, VGR_di_Offset_Pos_HBW_horizontal, VGR_di_Offset_Pos_HBW_vertical, VGR_di_Pos_MPO_horizontal, VGR_di_Pos_MPO_vertical, VGR_di_Pos_MPO_rotate, VGR_di_Offset_Pos_MPO_vertical, VGR_di_Pos_NFC_horizontal, VGR_di_Pos_NFC_vertical, VGR_di_Pos_NFC_rotate, VGR_di_Pos_NiO_horizontal, VGR_di_Pos_NiO_vertical, VGR_di_Pos_NiO_rotate, VGR_di_Pos_SLD_Blue_horizontal, VGR_di_Pos_SLD_Blue_vertical, VGR_di_Pos_SLD_Blue_rotate, VGR_di_Pos_SLD_Red_horizontal, VGR_di_Pos_SLD_Red_vertical, VGR_di_Pos_SLD_Red_rotate, VGR_di_Pos_SLD_White_horizontal, VGR_di_Pos_SLD_White_vertical, VGR_di_Pos_SLD_White_rotate, SSC_di_PosCentre_Horizontal, SSC_di_PosCentre_Vertical, SSC_di_PosHBW_Horizontal, SSC_di_PosHBW_Vertical, SSC_w_Threshold_Red_Blue, SSC_w_Threshold_White_Red, SLD_w_Threshold_Red_Blue, SLD_w_Threshold_White_Red, SLD_i_CounterValue_Blue, SLD_i_CounterValue_Red, SLD_i_CounterValue_White","skip":0,"strings":true,"x":490,"y":260,"wires":[["72a051c6.5b7af","b5f92d7c.873f38"]]},{"id":"72a051c6.5b7af","type":"function","z":"bcaa3a6a.3bdbe8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\n\nmsg.valuesToWrite = [\n //HBW\n msg.payload.HBW_di_PosBelt_Horizontal, //[0]\n msg.payload.HBW_di_PosBelt_Vertical, //[1]\n msg.payload.HBW_di_PosBelt_Offset_Vertical, //[2]\n\n msg.payload.HBW_di_PosRack_Offset_Vertical, //[3]\n msg.payload.HBW_di_PosRack_A1_Horizontal, //[4]\n msg.payload.HBW_di_PosRack_A1_Vertical, //[5]\n\n msg.payload.HBW_di_PosRack_B2_Horizontal, //[6]\n msg.payload.HBW_di_PosRack_B2_Vertical, //[7]\n\n msg.payload.HBW_di_PosRack_C3_Horizontal, //[8]\n msg.payload.HBW_di_PosRack_C3_Vertical, //[9]\n\n //VGR\n msg.payload.VGR_di_Pos_Color_horizontal, //[10]\n msg.payload.VGR_di_Pos_Color_vertical, //[11]\n msg.payload.VGR_di_Pos_Color_rotate, //[12]\n //Pos DSI\n msg.payload.VGR_di_Pos_DSI_horizontal, //[13]\n msg.payload.VGR_di_Pos_DSI_Collect_vertical, //[14]\n msg.payload.VGR_di_Pos_DSI_Discard_vertical, //[15]\n msg.payload.VGR_di_Pos_DSI_rotate, //[16]\n msg.payload.VGR_di_Offset_Pos_DSI_NFC_vertical, //[17]\n //Pos DSO\n msg.payload.VGR_di_Pos_DSO_horizontal, //[18] \n msg.payload.VGR_di_Pos_DSO_Collect_vertical, //[19]\n msg.payload.VGR_di_Pos_DSO_Discard_vertical, //[20] \n msg.payload.VGR_di_Pos_DSO_rotate, //[21] \n msg.payload.VGR_di_Offset_Pos_DSO_vertical, //[22]\n //Pos HBW\n msg.payload.VGR_di_Pos_HBW_horizontal, //[23] \n msg.payload.VGR_di_Pos_HBW_Collect_vertical, //[24] \n msg.payload.VGR_di_Pos_HBW_Discard_vertical, //[25] \n msg.payload.VGR_di_Pos_HBW_rotate, //[26] \n msg.payload.VGR_di_Offset_Pos_HBW_horizontal, //[27] \n msg.payload.VGR_di_Offset_Pos_HBW_vertical, //[28] \n //Pos MPO\n msg.payload.VGR_di_Pos_MPO_horizontal, //[29] \n msg.payload.VGR_di_Pos_MPO_vertical, //[30] \n msg.payload.VGR_di_Pos_MPO_rotate, //[31] \n msg.payload.VGR_di_Offset_Pos_MPO_vertical, //[32]\n //Pos NFC\n msg.payload.VGR_di_Pos_NFC_horizontal, //[33] \n msg.payload.VGR_di_Pos_NFC_vertical, //[34] \n msg.payload.VGR_di_Pos_NFC_rotate, //[35] \n //Pos NiO\n msg.payload.VGR_di_Pos_NiO_horizontal, //[36] \n msg.payload.VGR_di_Pos_NiO_vertical, //[37] \n msg.payload.VGR_di_Pos_NiO_rotate, //[38] \n //Pos SLD Blue\n msg.payload.VGR_di_Pos_SLD_Blue_horizontal, //[39] \n msg.payload.VGR_di_Pos_SLD_Blue_vertical, //[40] \n msg.payload.VGR_di_Pos_SLD_Blue_rotate, //[41] \n //Pos SLD Red\n msg.payload.VGR_di_Pos_SLD_Red_horizontal, //[42] \n msg.payload.VGR_di_Pos_SLD_Red_vertical, //[43] \n msg.payload.VGR_di_Pos_SLD_Red_rotate, //[44] \n //Pos SLD White\n msg.payload.VGR_di_Pos_SLD_White_horizontal, //[45] \n msg.payload.VGR_di_Pos_SLD_White_vertical, //[46] \n msg.payload.VGR_di_Pos_SLD_White_rotate, //[47] \n //SSC\n //Centre\n msg.payload.SSC_di_PosCentre_Horizontal, //[48]\n msg.payload.SSC_di_PosCentre_Vertical, //[49]\n //HBW\n msg.payload.SSC_di_PosHBW_Horizontal, //[50]\n msg.payload.SSC_di_PosHBW_Vertical, //[51]\n\n //Color Sensor Calibration\n //DSI\n msg.payload.SSC_w_Threshold_Red_Blue, //[52]\n msg.payload.SSC_w_Threshold_White_Red, //[53]\n\n //Color Sensor Calibration\n //SLD\n msg.payload.SLD_w_Threshold_Red_Blue, //[54]\n msg.payload.SLD_w_Threshold_White_Red, //[55]\n \n //Pushout Counter\n //SLD\n msg.payload.SLD_i_CounterValue_Blue, //[56]\n msg.payload.SLD_i_CounterValue_Red, //[57]\n msg.payload.SLD_i_CounterValue_White, //[58]\n\n ];\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":140,"y":320,"wires":[["fe1c17d9.37e568"]]},{"id":"fe1c17d9.37e568","type":"OPCUA-IIoT-Write","z":"bcaa3a6a.3bdbe8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":310,"y":320,"wires":[["a8d3157f.e1dfb8"]]},{"id":"a8d3157f.e1dfb8","type":"OPCUA-IIoT-Response","z":"bcaa3a6a.3bdbe8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":490,"y":320,"wires":[["68692c0.dac22d4"]]},{"id":"275b294b.b7ae96","type":"comment","z":"bcaa3a6a.3bdbe8","name":"Load config data to PLC","info":"","x":150,"y":220,"wires":[]},{"id":"ba104c4f.f439c8","type":"OPCUA-IIoT-Response","z":"bcaa3a6a.3bdbe8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":710,"y":120,"wires":[[]]},{"id":"53758868.1fdaf8","type":"link out","z":"bcaa3a6a.3bdbe8","name":"Load config data","links":["bd9747b7.6cf028","9ee547e9.5da9e8","62fed044.76c68"],"x":815,"y":320,"wires":[]},{"id":"bd9747b7.6cf028","type":"link in","z":"40d33793.7558d8","name":"","links":["53758868.1fdaf8"],"x":115,"y":660,"wires":[["b793ab10.b3a828"]]},{"id":"68692c0.dac22d4","type":"function","z":"bcaa3a6a.3bdbe8","name":"Load tmstmp ","func":"var new_msg = {};\nvar now = Date().toLocaleString('de-DE', { hour12:false });\n\nnew_msg.payload = now;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":320,"wires":[["53758868.1fdaf8"]]},{"id":"887e2037.98cbd8","type":"comment","z":"40d33793.7558d8","name":"Load config data to PLC","info":"","x":150,"y":620,"wires":[]},{"id":"fbf9fc2f.b61e58","type":"OPCUA-IIoT-Inject","z":"881fbb6.2d64cc8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"x_Position_Reached\"","datatypeName":""}],"x":110,"y":80,"wires":[["1b5aff67.e09a09"]]},{"id":"1b5aff67.e09a09","type":"OPCUA-IIoT-Listener","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":80,"wires":[["46fa3579.5e60ac"]]},{"id":"46fa3579.5e60ac","type":"function","z":"881fbb6.2d64cc8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":80,"wires":[["fa08ef6c.ef669"]]},{"id":"fa08ef6c.ef669","type":"OPCUA-IIoT-Read","z":"881fbb6.2d64cc8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":630,"y":80,"wires":[["66783481.d3494c","f9d0324b.ce4b5"]]},{"id":"66783481.d3494c","type":"function","z":"881fbb6.2d64cc8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { hz_axis_actpos: 0,\n vert_axis_actpos: 0,\n rot_axis_actpos: 0,\n hz_axis_targetpos: 0,\n vert_axis_targetpos: 0,\n rot_axis_targetpos: 0,\n hz_axis_posreached: 0,\n vert_axis_posreached: 0,\n rot_axis_posreached: 0\n };\noutput.hz_axis_actpos = msg.payload[0].value.value; \noutput.vert_axis_actpos = msg.payload[1].value.value; \noutput.rot_axis_actpos = msg.payload[2].value.value; \noutput.hz_axis_targetpos = msg.payload[3].value.value; \noutput.vert_axis_targetpos = msg.payload[4].value.value; \noutput.rot_axis_targetpos = msg.payload[5].value.value; \noutput.hz_axis_posreached = msg.payload[6].value.value; \noutput.vert_axis_posreached = msg.payload[7].value.value; \noutput.rot_axis_posreached = msg.payload[8].value.value; \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["445dd8e6.c5fe2","3c6f2241.68e77e","6e134a1e.8b4d3c","84e61de6.25047","cdb4a03c.8dc64","9a2b5890.4f57a","4524a46c.15acec"]]},{"id":"445dd8e6.c5fe2","type":"function","z":"881fbb6.2d64cc8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"VGR_hz_axis_X\"\n\nmsg.top = 60\nmsg.left = 40\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.hz_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hz. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["f16cc2e4.e07d88"]]},{"id":"f16cc2e4.e07d88","type":"function","z":"881fbb6.2d64cc8","name":"color all Items","func":"var lastState = flow.get('VGR_State') || {};\n\n// Colorize \nif (msg.payload.state == 1) \n{ msg.payload.color = '#5a5' } else\n{ msg.payload.color = '#a55' }\n\n\nlastState[msg.topic] = msg.payload; \nflow.set('VGR_State', lastState);\nreturn { \n \"topic\": msg.topic,\n \"payload\": lastState,\n \"url\": msg.url\n};\n","outputs":1,"noerr":0,"x":820,"y":300,"wires":[["76c272d9.4f18c4"]]},{"id":"76c272d9.4f18c4","type":"link out","z":"881fbb6.2d64cc8","name":"toPicBox","links":["f7ce17d0.639b98"],"x":975,"y":300,"wires":[]},{"id":"f7ce17d0.639b98","type":"link in","z":"881fbb6.2d64cc8","name":"PicBox","links":["76c272d9.4f18c4"],"x":75,"y":360,"wires":[["ee1590af.545c7"]]},{"id":"ee1590af.545c7","type":"ui_template","z":"881fbb6.2d64cc8","group":"8cacc4a1.8c2a2","name":"Status Picture VGR","order":2,"width":9,"height":7,"format":"\n\n
\n\n
\n \n \n \n {{el.text}}\n \n
\n
\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":210,"y":360,"wires":[[]]},{"id":"ee766efa.5777a8","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Picture Box","info":"","x":120,"y":320,"wires":[]},{"id":"a9085074.d8e5c8","type":"comment","z":"881fbb6.2d64cc8","name":"read real values from PLC","info":"","x":150,"y":40,"wires":[]},{"id":"3c6f2241.68e77e","type":"function","z":"881fbb6.2d64cc8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"VGR_hz_axis_W\"\n\nmsg.top = 80\nmsg.left = 40\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.hz_axis_targetpos\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hz. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":200,"wires":[["f16cc2e4.e07d88"]]},{"id":"cdb4a03c.8dc64","type":"debug","z":"881fbb6.2d64cc8","name":"act. Val. VGR","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":800,"y":160,"wires":[]},{"id":"6e134a1e.8b4d3c","type":"function","z":"881fbb6.2d64cc8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"VGR_vert_axis_X\"\n\nmsg.top = 80\nmsg.left = 280\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.vert_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["f16cc2e4.e07d88"]]},{"id":"84e61de6.25047","type":"function","z":"881fbb6.2d64cc8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"VGR_vert_axis_W\"\n\nmsg.top = 100\nmsg.left = 280\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.vert_axis_targetpos\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":300,"wires":[["f16cc2e4.e07d88"]]},{"id":"3f2b2126.0fe44e","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":600,"wires":[["8c2f785e.986d"]]},{"id":"8c2f785e.986d","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":600,"wires":[["e1309d48.5c8ce8"]]},{"id":"e1309d48.5c8ce8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":600,"wires":[[]]},{"id":"315e5775.d8984","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'\n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":660,"wires":[["7db60124.933948"]]},{"id":"7db60124.933948","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":660,"wires":[["8a473973.401d9"]]},{"id":"8a473973.401d9","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":660,"wires":[[]]},{"id":"5c337444.3799ac","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions","info":"","x":120,"y":500,"wires":[]},{"id":"102c3c27.3b9a14","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":820,"wires":[["47246981.fcc64"]]},{"id":"47246981.fcc64","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":820,"wires":[["450869c5.4ec228"]]},{"id":"450869c5.4ec228","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":820,"wires":[[]]},{"id":"2470a838.60e6e8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":880,"wires":[["cc4fe3eb.d2da"]]},{"id":"cc4fe3eb.d2da","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":880,"wires":[[]]},{"id":"d5bab92d.5f0f28","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1160,"wires":[["f3962ac8.cec468"]]},{"id":"f3962ac8.cec468","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1160,"wires":[["c6bd85b4.44c3c8"]]},{"id":"c6bd85b4.44c3c8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1160,"wires":[[]]},{"id":"67e594bd.2e143c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1220,"wires":[["a86d4f5b.67f328"]]},{"id":"a86d4f5b.67f328","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1220,"wires":[["9ef79aff.9ec578"]]},{"id":"9ef79aff.9ec578","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1220,"wires":[[]]},{"id":"8c3ef105.a6bb8","type":"debug","z":"881fbb6.2d64cc8","name":"Read VGR Pos.","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":520,"wires":[]},{"id":"406252c4.ee950c","type":"function","z":"881fbb6.2d64cc8","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for NFC action\nmsg.addressSpaceItems = [\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":560,"wires":[["1098da46.8d104e"]]},{"id":"1098da46.8d104e","type":"OPCUA-IIoT-Read","z":"881fbb6.2d64cc8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":110,"y":620,"wires":[["9901784a.d8867","6e33cae3.93fb0c"]]},{"id":"6e33cae3.93fb0c","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":350,"y":660,"wires":[[]]},{"id":"9901784a.d8867","type":"function","z":"881fbb6.2d64cc8","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n VGR_di_Pos_Color_horizontal: 1, //[0]\n VGR_di_Pos_Color_vertical: 1, //[1]\n VGR_di_Pos_Color_rotate: 1, //[2]\n //Pos DSI\n VGR_di_Pos_DSI_horizontal: 1, //[3]\n VGR_di_Pos_DSI_Collect_vertical: 1, //[4]\n VGR_di_Pos_DSI_Discard_vertical: 1, //[5]\n VGR_di_Pos_DSI_rotate: 1, //[6]\n VGR_di_Offset_Pos_DSI_NFC_vertical: 1, //[7]\n //Pos DSO\n VGR_di_Pos_DSO_horizontal:1, //[8] \n VGR_di_Pos_DSO_Collect_vertical:1, //[9]\n VGR_di_Pos_DSO_Discard_vertical:1, //[10] \n VGR_di_Pos_DSO_rotate:1, //[11] \n VGR_di_Offset_Pos_DSO_vertical: 1, //[12]\n //Pos HBW\n VGR_di_Pos_HBW_horizontal:1, //[13] \n VGR_di_Pos_HBW_Collect_vertical:1, //[14] \n VGR_di_Pos_HBW_Discard_vertical:1, //[15] \n VGR_di_Pos_HBW_rotate:1, //[16] \n VGR_di_Offset_Pos_HBW_horizontal:1, //[17] \n VGR_di_Offset_Pos_HBW_vertical:1, //[18] \n //Pos MPO\n VGR_di_Pos_MPO_horizontal:1, //[19] \n VGR_di_Pos_MPO_vertical:1, //[20] \n VGR_di_Pos_MPO_rotate:1, //[21] \n VGR_di_Offset_Pos_MPO_vertical: 1, //[22]\n //Pos NFC\n VGR_di_Pos_NFC_horizontal:1, //[23] \n VGR_di_Pos_NFC_vertical:1, //[24] \n VGR_di_Pos_NFC_rotate:1, //[25] \n //Pos NiO\n VGR_di_Pos_NiO_horizontal:1, //[26] \n VGR_di_Pos_NiO_vertical:1, //[27] \n VGR_di_Pos_NiO_rotate:1, //[28] \n //Pos SLD Blue\n VGR_di_Pos_SLD_Blue_horizontal:1, //[29] \n VGR_di_Pos_SLD_Blue_vertical:1, //[30] \n VGR_di_Pos_SLD_Blue_rotate:1, //[31] \n //Pos SLD Red\n VGR_di_Pos_SLD_Red_horizontal:1, //[32] \n VGR_di_Pos_SLD_Red_vertical:1, //[33] \n VGR_di_Pos_SLD_Red_rotate:1, //[34] \n //Pos SLD White\n VGR_di_Pos_SLD_White_horizontal :1, //[35] \n VGR_di_Pos_SLD_White_vertical:1, //[36] \n VGR_di_Pos_SLD_White_rotate:1, //[37] \n }\n\n\n//Pos Color\nConfData_out.VGR_di_Pos_Color_horizontal = msg.payload[0].value.value; //[0] \nConfData_out.VGR_di_Pos_Color_vertical = msg.payload[1].value.value; //[1] \nConfData_out.VGR_di_Pos_Color_rotate = msg.payload[2].value.value; //[2] \n//Pos DSI\nConfData_out.VGR_di_Pos_DSI_horizontal = msg.payload[3].value.value; //[3] \nConfData_out.VGR_di_Pos_DSI_Collect_vertical = msg.payload[4].value.value; //[4] \nConfData_out.VGR_di_Pos_DSI_Discard_vertical = msg.payload[5].value.value; //[5] \nConfData_out.VGR_di_Pos_DSI_rotate = msg.payload[6].value.value; //[6] \nConfData_out.VGR_di_Offset_Pos_DSI_NFC_vertical = msg.payload[7].value.value; //[7] \n//Pos DSO\nConfData_out.VGR_di_Pos_DSO_horizontal = msg.payload[8].value.value; //[8] \nConfData_out.VGR_di_Pos_DSO_Collect_vertical = msg.payload[9].value.value; //[9] \nConfData_out.VGR_di_Pos_DSO_Discard_vertical = msg.payload[10].value.value; //[10] \nConfData_out.VGR_di_Pos_DSO_rotate = msg.payload[11].value.value; //[11] \nConfData_out.VGR_di_Offset_Pos_DSO_vertical = msg.payload[12].value.value; //[12] \n//Pos HBW\nConfData_out.VGR_di_Pos_HBW_horizontal = msg.payload[13].value.value; //[13] \nConfData_out.VGR_di_Pos_HBW_Collect_vertical = msg.payload[14].value.value; //[14] \nConfData_out.VGR_di_Pos_HBW_Discard_vertical = msg.payload[15].value.value; //[15] \nConfData_out.VGR_di_Pos_HBW_rotate = msg.payload[16].value.value; //[16] \nConfData_out.VGR_di_Offset_Pos_HBW_horizontal = msg.payload[17].value.value; //[17] \nConfData_out.VGR_di_Offset_Pos_HBW_vertical = msg.payload[18].value.value; //[18] \n//Pos MPO\nConfData_out.VGR_di_Pos_MPO_horizontal = msg.payload[19].value.value; //[19] \nConfData_out.VGR_di_Pos_MPO_vertical = msg.payload[20].value.value; //[20] \nConfData_out.VGR_di_Pos_MPO_rotate = msg.payload[21].value.value; //[21] \nConfData_out.VGR_di_Offset_Pos_MPO_vertical = msg.payload[22].value.value; //[22] \n//Pos NFC\nConfData_out.VGR_di_Pos_NFC_horizontal = msg.payload[23].value.value; //[23] \nConfData_out.VGR_di_Pos_NFC_vertical = msg.payload[24].value.value; //[24] \nConfData_out.VGR_di_Pos_NFC_rotate = msg.payload[25].value.value; //[25] \n//Pos NiO\nConfData_out.VGR_di_Pos_NiO_horizontal = msg.payload[26].value.value; //[26] \nConfData_out.VGR_di_Pos_NiO_vertical = msg.payload[27].value.value; //[27] \nConfData_out.VGR_di_Pos_NiO_rotate = msg.payload[28].value.value; //[28] \n//Pos SLD Blue\nConfData_out.VGR_di_Pos_SLD_Blue_horizontal = msg.payload[29].value.value; //[29] \nConfData_out.VGR_di_Pos_SLD_Blue_vertical = msg.payload[30].value.value; //[30] \nConfData_out.VGR_di_Pos_SLD_Blue_rotate = msg.payload[31].value.value; //[31] \n//Pos SLD Red\nConfData_out.VGR_di_Pos_SLD_Red_horizontal = msg.payload[32].value.value; //[32] \nConfData_out.VGR_di_Pos_SLD_Red_vertical = msg.payload[33].value.value; //[33] \nConfData_out.VGR_di_Pos_SLD_Red_rotate = msg.payload[34].value.value; //[34] \n//Pos SLD White\nConfData_out.VGR_di_Pos_SLD_White_horizontal = msg.payload[35].value.value; //[35] \nConfData_out.VGR_di_Pos_SLD_White_vertical = msg.payload[36].value.value; //[36] \nConfData_out.VGR_di_Pos_SLD_White_rotate = msg.payload[37].value.value; //[37] \n\n//new_msg.payload = JSON.stringify(ConfData_out);\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":360,"y":620,"wires":[["c44039e5.daa138","8c3ef105.a6bb8","4fc26b74.804d8c","6406d29b.995be4","859ece4b.25471","cd543917.476a8","f26bfe0.32e26","1322b09f.ce70d7","57ac77b4.9c0b38","72959b18.9d2644","62e1b919.a8cfa","71d4e66a.2755a8","92cf74b1.65dae8","39fb0b50.f37504","3ee64a4f.6572de","9193d23f.cac3e","f80006c2.e807c8","8b1683f3.3407a","56e01414.cbbd24","43ea292a.470dd8","253c460b.7d4a6a","277cc8ed.656778","63bcc8.f67a6b38","db964c1e.da9468","70f2dac5.aa521c","15d638e1.976ed7","3bd0540a.9bdddc","d14f176e.8f2d7","1b47041d.d9e4b4","b8c83989.8a80b","7c403132.bb3148","f07b734e.247d8","efd673bd.679a18","62ebf3dd.1a428c","f34f8093.e76208","ef552e5f.6d173","ddc4874a.2c8448","a92834a2.51ba9","9893d785.54f7e"]]},{"id":"6668eed3.17db2","type":"OPCUA-IIoT-Inject","z":"881fbb6.2d64cc8","injectType":"inject","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"Init","payload":"","addressSpaceItems":[],"x":110,"y":560,"wires":[["406252c4.ee950c"]]},{"id":"95208776.418cf","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":720,"wires":[["5b15f2f3.3d04cc"]]},{"id":"5b15f2f3.3d04cc","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":720,"wires":[["100356d2.7c62e9"]]},{"id":"100356d2.7c62e9","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":720,"wires":[[]]},{"id":"c44039e5.daa138","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_Color_horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":600,"wires":[["17bddab6.10d3ad"]]},{"id":"4fc26b74.804d8c","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":820,"wires":[["9dd6c0cc.904ef8"]]},{"id":"6d87fa80.8dda4c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":880,"wires":[["2470a838.60e6e8"]]},{"id":"6406d29b.995be4","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_Collect_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":880,"wires":[["a0947f48.3fa6c"]]},{"id":"859ece4b.25471","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_Color_vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":660,"wires":[["200e1f63.7cf2a8"]]},{"id":"cd543917.476a8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_Color_rotate; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":720,"wires":[["e1522b32.d0edf8"]]},{"id":"f26bfe0.32e26","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1000,"wires":[["693540e8.345de"]]},{"id":"3af1c81a.b27fe","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1000,"wires":[["55e691d1.e9ac2"]]},{"id":"55e691d1.e9ac2","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1000,"wires":[["2a704ee3.455fd2"]]},{"id":"2a704ee3.455fd2","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1000,"wires":[[]]},{"id":"e76217de.1a8608","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - DSI","info":"","x":650,"y":780,"wires":[]},{"id":"1322b09f.ce70d7","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_DSI_NFC_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1060,"wires":[["e9314c87.c23e4"]]},{"id":"41bb3419.82f8a4","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1060,"wires":[["f19a56d9.f270b8"]]},{"id":"f19a56d9.f270b8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1060,"wires":[["c296f1d0.2d2298"]]},{"id":"c296f1d0.2d2298","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1060,"wires":[[]]},{"id":"57ac77b4.9c0b38","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1160,"wires":[["4d21f945.03ee6"]]},{"id":"72959b18.9d2644","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_Collect_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1220,"wires":[["41e489e7.e785a"]]},{"id":"62e1b919.a8cfa","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1340,"wires":[["7a382885.2cee78"]]},{"id":"a93df711.ac90d8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1340,"wires":[["90abbffd.52a908"]]},{"id":"90abbffd.52a908","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1340,"wires":[["edfea0cb.751c7"]]},{"id":"edfea0cb.751c7","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1340,"wires":[[]]},{"id":"45843c.f19093c4","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - DSO","info":"","x":660,"y":1120,"wires":[]},{"id":"732c5e17.29f5c8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1500,"wires":[["45f7aa9e.eb4d3c"]]},{"id":"45f7aa9e.eb4d3c","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1500,"wires":[["96330cf6.5a2418"]]},{"id":"96330cf6.5a2418","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1500,"wires":[[]]},{"id":"948b197f.5e8f18","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1560,"wires":[["4770fcb3.d47f2c"]]},{"id":"4770fcb3.d47f2c","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1560,"wires":[[]]},{"id":"71d4e66a.2755a8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1500,"wires":[["4a6ed881.5fc1a8"]]},{"id":"c74204e0.a4f298","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1560,"wires":[["948b197f.5e8f18"]]},{"id":"92cf74b1.65dae8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_Collect_vertical\n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1560,"wires":[["57f22339.c700cc"]]},{"id":"39fb0b50.f37504","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1680,"wires":[["cef08d22.d4373"]]},{"id":"bdcd2e34.7a61f8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1680,"wires":[["d3ea94be.5e6f48"]]},{"id":"d3ea94be.5e6f48","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1680,"wires":[["4d51a85c.4e94a"]]},{"id":"4d51a85c.4e94a","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1680,"wires":[[]]},{"id":"9a5f82c8.dd21b8","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - HBW","info":"","x":660,"y":1460,"wires":[]},{"id":"3ee64a4f.6572de","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_HBW_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1740,"wires":[["a4e19aec.6ea288"]]},{"id":"b54423ee.50aee","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1000,"y":1740,"wires":[["d4d1702c.6278e"]]},{"id":"d4d1702c.6278e","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1740,"wires":[["16b049ca.71237e"]]},{"id":"16b049ca.71237e","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1740,"wires":[[]]},{"id":"9193d23f.cac3e","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_HBW_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1800,"wires":[["e3793fd0.41e8d8"]]},{"id":"b23796bd.423a88","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1800,"wires":[["888d6d60.ead018"]]},{"id":"888d6d60.ead018","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1800,"wires":[["768e5f06.cd0c98"]]},{"id":"768e5f06.cd0c98","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1800,"wires":[[]]},{"id":"9596458e.46568","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1900,"wires":[["995011d1.e0f1c8"]]},{"id":"995011d1.e0f1c8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1900,"wires":[["4a6bf8e0.de698"]]},{"id":"4a6bf8e0.de698","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1900,"wires":[[]]},{"id":"11f1447d.75dc6c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1960,"wires":[["d317392b.8d2bd"]]},{"id":"d317392b.8d2bd","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1960,"wires":[["1fcbab2.3ed5555"]]},{"id":"1fcbab2.3ed5555","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1960,"wires":[[]]},{"id":"9893d785.54f7e","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_MPO_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1900,"wires":[["55f07ba1.c6a6a4"]]},{"id":"f80006c2.e807c8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_MPO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1960,"wires":[["3f0b80fb.5b5fd"]]},{"id":"8b1683f3.3407a","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_MPO_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2020,"wires":[["bb8e6b3f.fc2cc8"]]},{"id":"52b11f95.cb8da8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2020,"wires":[["7d333457.a3bd14"]]},{"id":"7d333457.a3bd14","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2020,"wires":[["68dc9397.250034"]]},{"id":"68dc9397.250034","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2020,"wires":[[]]},{"id":"f00286d4.c63638","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - MPO","info":"","x":660,"y":1860,"wires":[]},{"id":"9895c6db.9b7cb","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2180,"wires":[["bbac144f.6e9af"]]},{"id":"bbac144f.6e9af","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2180,"wires":[["bed4af59.ba16b8"]]},{"id":"bed4af59.ba16b8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2180,"wires":[[]]},{"id":"32289ad2.582e06","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2240,"wires":[["2355aa64.aadb26"]]},{"id":"2355aa64.aadb26","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2240,"wires":[[]]},{"id":"56e01414.cbbd24","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NFC_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2180,"wires":[["559af1f6.41cce"]]},{"id":"651e1072.cfbee8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2240,"wires":[["32289ad2.582e06"]]},{"id":"43ea292a.470dd8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NFC_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2240,"wires":[["9d86730a.d6679"]]},{"id":"253c460b.7d4a6a","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NFC_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2300,"wires":[["46047037.c36b48"]]},{"id":"553943c4.b70a7c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2300,"wires":[["98208bb5.20317"]]},{"id":"98208bb5.20317","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2300,"wires":[["6f106b14.c3f7e4"]]},{"id":"6f106b14.c3f7e4","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2300,"wires":[[]]},{"id":"bd5d9d3e.73e5d","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - NFC","info":"","x":660,"y":2140,"wires":[]},{"id":"e33b94f0.11d828","type":"debug","z":"bcaa3a6a.3bdbe8","name":"Save Config Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":990,"y":120,"wires":[]},{"id":"b5f92d7c.873f38","type":"debug","z":"bcaa3a6a.3bdbe8","name":"Load Config Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":260,"wires":[]},{"id":"9ee547e9.5da9e8","type":"link in","z":"881fbb6.2d64cc8","name":"","links":["53758868.1fdaf8"],"x":75,"y":740,"wires":[["406252c4.ee950c"]]},{"id":"b793ab10.b3a828","type":"function","z":"40d33793.7558d8","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":480,"wires":[["385ab57e.0467a2"]]},{"id":"385ab57e.0467a2","type":"OPCUA-IIoT-Read","z":"40d33793.7558d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":110,"y":540,"wires":[["579d8fc.3617e7","c3f047b.e36a338"]]},{"id":"579d8fc.3617e7","type":"function","z":"40d33793.7558d8","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //HBW\n HBW_di_PosBelt_Horizontal: 1,\n HBW_di_PosBelt_Vertical: 1,\n HBW_di_PosBelt_Offset_Vertical: 1,\n \n HBW_di_PosRack_Offset_Vertical: 1,\n HBW_di_PosRack_A1_Horizontal: 1,\n HBW_di_PosRack_A1_Vertical: 1,\n\n HBW_di_PosRack_B2_Horizontal: 1,\n HBW_di_PosRack_B2_Vertical: 1,\n\n HBW_di_PosRack_C3_Horizontal: 1,\n HBW_di_PosRack_C3_Vertical: 1,\n }\n\nConfData_out.HBW_di_PosBelt_Horizontal = msg.payload[0].value.value; //[0] \nConfData_out.HBW_di_PosBelt_Vertical = msg.payload[1].value.value; //[1] \nConfData_out.HBW_di_PosBelt_Offset_Vertical= msg.payload[2].value.value; //[2]\n\nConfData_out.HBW_di_PosRack_Offset_Vertical= msg.payload[3].value.value; //[3]\nConfData_out.HBW_di_PosRack_A1_Horizontal = msg.payload[4].value.value; //[4] \nConfData_out.HBW_di_PosRack_A1_Vertical = msg.payload[5].value.value; //[5]\n \nConfData_out.HBW_di_PosRack_B2_Horizontal = msg.payload[6].value.value; //[6] \nConfData_out.HBW_di_PosRack_B2_Vertical = msg.payload[7].value.value; //[7]\n\nConfData_out.HBW_di_PosRack_C3_Horizontal = msg.payload[8].value.value; //[8] \nConfData_out.HBW_di_PosRack_C3_Vertical = msg.payload[9].value.value; //[9]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":360,"y":540,"wires":[["12e24fc8.47fc4","ef0d76c0.9bac4","5914a608.ec0d1","88443721.1abe08","ee00c763.b0816","f453f728.bedce8","13ec438f.8b986c","1fb7ab10.63f635","53f37005.028fb","fb30ab25.15f0b","9cd501f5.32273"]]},{"id":"c3f047b.e36a338","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":350,"y":580,"wires":[[]]},{"id":"12e24fc8.47fc4","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosBelt_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":540,"wires":[["e4f60edf.43afd"]]},{"id":"5914a608.ec0d1","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosBelt_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":600,"wires":[["fa6cdea2.08b458"]]},{"id":"88443721.1abe08","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_A1_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":860,"wires":[["ac5cfa02.41e0a8"]]},{"id":"ee00c763.b0816","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosRack_A1_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":920,"wires":[["a372a3ff.11256"]]},{"id":"ac9706f.90c2278","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack A1","info":"","x":600,"y":820,"wires":[]},{"id":"b768493e.e2ef98","type":"comment","z":"881fbb6.2d64cc8","name":"Load config data to PLC","info":"","x":130,"y":700,"wires":[]},{"id":"b60a93ea.ccf63","type":"ui_button","z":"bcaa3a6a.3bdbe8","name":"","group":"6bec7372.842fa4","order":2,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fa-save fa-2x","payload":"","payloadType":"str","topic":"","x":90,"y":80,"wires":[["45f7dad0.91549c"]]},{"id":"48f5d20e.17e504","type":"ui_button","z":"bcaa3a6a.3bdbe8","name":"","group":"b5a8ed55.950378","order":2,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fa-download fa-2x","payload":"","payloadType":"str","topic":"","x":90,"y":260,"wires":[["80690a67.faa2"]]},{"id":"fe4ab5c6.81748","type":"ui_text","z":"bcaa3a6a.3bdbe8","group":"6bec7372.842fa4","order":1,"width":4,"height":1,"name":"","label":"save Config Data to file","format":"{{msg.payload}}","layout":"row-spread","x":470,"y":40,"wires":[]},{"id":"49fe7d18.d314e4","type":"ui_text","z":"bcaa3a6a.3bdbe8","group":"b5a8ed55.950378","order":1,"width":4,"height":1,"name":"","label":"load Config Data to PLC","format":"{{msg.payload}}","layout":"row-spread","x":390,"y":220,"wires":[]},{"id":"277cc8ed.656778","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_Discard_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":940,"wires":[["33b1cac3.2e722e"]]},{"id":"d0e7bcf5.1fff38","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":940,"wires":[["afa85957.152c18"]]},{"id":"afa85957.152c18","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":940,"wires":[["67bebcca.6a1f9c"]]},{"id":"67bebcca.6a1f9c","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":940,"wires":[[]]},{"id":"63bcc8.f67a6b38","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_Discard_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1280,"wires":[["5182428c.b78d6c"]]},{"id":"77b4f933.922ed8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1280,"wires":[["139f22fb.ba2335"]]},{"id":"139f22fb.ba2335","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1280,"wires":[["b7e6769d.f01388"]]},{"id":"b7e6769d.f01388","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1280,"wires":[[]]},{"id":"db964c1e.da9468","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_DSO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1400,"wires":[["ed9a4b7c.1d4d7"]]},{"id":"db098de7.10304","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1400,"wires":[["f79b4b67.abebe"]]},{"id":"f79b4b67.abebe","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1400,"wires":[["9abe63af.b634e"]]},{"id":"9abe63af.b634e","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1400,"wires":[[]]},{"id":"70f2dac5.aa521c","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_Discard_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1620,"wires":[["cbd08044.ae4ed"]]},{"id":"53b4b0e0.bf186","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1620,"wires":[["1773f883.afa737"]]},{"id":"1773f883.afa737","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1620,"wires":[["735f9eb8.3976e8"]]},{"id":"735f9eb8.3976e8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1620,"wires":[[]]},{"id":"15d638e1.976ed7","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_MPO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2080,"wires":[["1f88cf38.c28061"]]},{"id":"44816851.c0cfc8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2080,"wires":[["f747b957.268a5"]]},{"id":"f747b957.268a5","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2080,"wires":[["5813e6f4.a9f458"]]},{"id":"5813e6f4.a9f458","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2080,"wires":[[]]},{"id":"696757c8.d35fc","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2400,"wires":[["635ac96c.b3ebd"]]},{"id":"635ac96c.b3ebd","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2400,"wires":[["2131e373.a3b314"]]},{"id":"2131e373.a3b314","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2400,"wires":[[]]},{"id":"45efe42a.20d3a4","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2460,"wires":[["6ac8ee82.6564c8"]]},{"id":"6ac8ee82.6564c8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2460,"wires":[[]]},{"id":"3bd0540a.9bdddc","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NiO_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2400,"wires":[["502a24ae.17f714"]]},{"id":"12d80646.3dce4a","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2460,"wires":[["45efe42a.20d3a4"]]},{"id":"d14f176e.8f2d7","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NiO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2460,"wires":[["712ccd2b.c1b89c"]]},{"id":"1b47041d.d9e4b4","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NiO_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2520,"wires":[["d5a120dd.4dd568"]]},{"id":"a23013b4.ef0e28","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2520,"wires":[["b7db6dec.610ef8"]]},{"id":"b7db6dec.610ef8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2520,"wires":[["79bcaa6a.785d44"]]},{"id":"79bcaa6a.785d44","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2520,"wires":[[]]},{"id":"ba55aa28.b314b","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - NiO","info":"","x":650,"y":2360,"wires":[]},{"id":"d0603be8.c279a","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2620,"wires":[["2b59238e.e325b4"]]},{"id":"2b59238e.e325b4","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2620,"wires":[["4f7fc59a.1158d4"]]},{"id":"4f7fc59a.1158d4","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2620,"wires":[[]]},{"id":"5bade62c.0628a8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2680,"wires":[["37bbfcf1.e19d14"]]},{"id":"37bbfcf1.e19d14","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2680,"wires":[[]]},{"id":"b8c83989.8a80b","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Blue_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2620,"wires":[["d55328c.40529d8"]]},{"id":"f914c736.00a8e","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2680,"wires":[["5bade62c.0628a8"]]},{"id":"7c403132.bb3148","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Blue_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2680,"wires":[["64f54be8.8fc4b4"]]},{"id":"f07b734e.247d8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Blue_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2740,"wires":[["1df495af.c4cd0a"]]},{"id":"f6736dd5.b63b8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2740,"wires":[["700e8fb8.37b0a"]]},{"id":"700e8fb8.37b0a","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2740,"wires":[["aeb6c85a.a062d"]]},{"id":"aeb6c85a.a062d","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2740,"wires":[[]]},{"id":"1a989be0.93a39c","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - Blue","info":"","x":660,"y":2580,"wires":[]},{"id":"2401e3ee.a3373c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2840,"wires":[["f44e0cf3.1f4e4"]]},{"id":"f44e0cf3.1f4e4","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2840,"wires":[["f88a3753.3df5c8"]]},{"id":"f88a3753.3df5c8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2840,"wires":[[]]},{"id":"9cb22a64.55a36","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2900,"wires":[["3e448182.055936"]]},{"id":"3e448182.055936","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2900,"wires":[[]]},{"id":"efd673bd.679a18","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Red_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2840,"wires":[["6e51b3c6.e57984"]]},{"id":"7284e408.43618c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2900,"wires":[["9cb22a64.55a36"]]},{"id":"62ebf3dd.1a428c","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Red_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2900,"wires":[["394ded76.8a5f4a"]]},{"id":"f34f8093.e76208","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Red_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2960,"wires":[["6bcd9f12.404788"]]},{"id":"ac9fb19b.cb4668","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2960,"wires":[["fe2ca3d7.7c9be8"]]},{"id":"fe2ca3d7.7c9be8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2960,"wires":[["880eb3e6.52dbd8"]]},{"id":"880eb3e6.52dbd8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2960,"wires":[[]]},{"id":"9d321ebc.d3adf8","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - Red","info":"","x":660,"y":2800,"wires":[]},{"id":"9a2b5890.4f57a","type":"function","z":"881fbb6.2d64cc8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"VGR_rot_axis_X\"\n\nmsg.top = 230\nmsg.left = 20\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nif (msg.payload.rot_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.rot_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"rot. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":360,"wires":[["f16cc2e4.e07d88"]]},{"id":"4524a46c.15acec","type":"function","z":"881fbb6.2d64cc8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"VGR_rot_axis_W\"\n\nmsg.top = 250\nmsg.left = 20\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.rot_axis_targetpos\n\nif (msg.payload.rot_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"rot. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":400,"wires":[["f16cc2e4.e07d88"]]},{"id":"6b88c6ee.e66b98","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1000,"y":3060,"wires":[["31f0ba59.5a41de"]]},{"id":"31f0ba59.5a41de","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":3060,"wires":[["2eddca3e.64fcae"]]},{"id":"2eddca3e.64fcae","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":3060,"wires":[[]]},{"id":"2949ef98.e76a98","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":3120,"wires":[["e122b65c.8074f"]]},{"id":"e122b65c.8074f","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":3120,"wires":[[]]},{"id":"ef552e5f.6d173","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_White_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":3060,"wires":[["81b28d61.7da558"]]},{"id":"9ca680b0.6f874","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":3120,"wires":[["2949ef98.e76a98"]]},{"id":"ddc4874a.2c8448","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_White_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":3120,"wires":[["3205dbac.b651cc"]]},{"id":"a92834a2.51ba9","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_White_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":3180,"wires":[["600bcf5c.d8b608"]]},{"id":"6d76d171.e75098","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":3180,"wires":[["93ad6d2c.d8fde"]]},{"id":"93ad6d2c.d8fde","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":3180,"wires":[["6ae8a889.572aa8"]]},{"id":"6ae8a889.572aa8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":3180,"wires":[[]]},{"id":"8b19189d.e42c2","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - White","info":"","x":660,"y":3020,"wires":[]},{"id":"c3f4d4df.76cd28","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - Color Reader","info":"","x":690,"y":560,"wires":[]},{"id":"f453f728.bedce8","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosBelt_Offset_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":660,"wires":[["72a09b6a.17c51c"]]},{"id":"a42e8cbd.62f6b8","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":660,"wires":[["66a308ce.314a9"]]},{"id":"66a308ce.314a9","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":660,"wires":[["22ea4fc1.6854f"]]},{"id":"22ea4fc1.6854f","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":660,"wires":[[]]},{"id":"2aa43791.e0c5","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack","info":"","x":590,"y":720,"wires":[]},{"id":"13ec438f.8b986c","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_Offset_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":760,"wires":[["20f69031.d3694"]]},{"id":"573e4ed6.c8741","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":760,"wires":[["ef026001.294a78"]]},{"id":"ef026001.294a78","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":760,"wires":[["3b7a3f3.0a9ac4"]]},{"id":"3b7a3f3.0a9ac4","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":760,"wires":[[]]},{"id":"b99c4fdc.99401","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[1,1].\"di_PosRack_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1040,"wires":[["7640e0ef.7755"]]},{"id":"7640e0ef.7755","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1040,"wires":[["aadda1e9.f02a38"]]},{"id":"aadda1e9.f02a38","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1040,"wires":[[]]},{"id":"23382617.7b103a","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[1,1].\"di_PosRack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1100,"wires":[["bc5ded02.92b438"]]},{"id":"bc5ded02.92b438","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1100,"wires":[["979c5ec1.abab48"]]},{"id":"979c5ec1.abab48","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1100,"wires":[[]]},{"id":"594ed4e9.4f1834","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack B2","info":"","x":600,"y":1000,"wires":[]},{"id":"1fb7ab10.63f635","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_B2_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1040,"wires":[["90d6cad9.6e2f2"]]},{"id":"53f37005.028fb","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosRack_B2_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1100,"wires":[["956b93ff.90aad8"]]},{"id":"cb9e76e4.6f9b08","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[2,2].\"di_PosRack_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1220,"wires":[["28c8f27b.84ec9e"]]},{"id":"28c8f27b.84ec9e","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1220,"wires":[["262828c8.d7ab38"]]},{"id":"262828c8.d7ab38","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1220,"wires":[[]]},{"id":"32338c0b.0ae58c","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[2,2].\"di_PosRack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1280,"wires":[["ec94259b.0eb1b"]]},{"id":"ec94259b.0eb1b","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1280,"wires":[["be70113d.5c7a"]]},{"id":"be70113d.5c7a","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1280,"wires":[[]]},{"id":"9cd501f5.32273","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosRack_C3_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1280,"wires":[["36424d3f.1e7422"]]},{"id":"fb30ab25.15f0b","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_C3_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1220,"wires":[["9a6ef164.790a5"]]},{"id":"577b7eda.5e57b8","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack C3","info":"","x":600,"y":1180,"wires":[]},{"id":"f9d0324b.ce4b5","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":790,"y":80,"wires":[[]]},{"id":"af75b462.d672d8","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":790,"y":80,"wires":[[]]},{"id":"4a488fa3.6bd7d","type":"OPCUA-IIoT-Inject","z":"96ccbb8c.f85068","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"x_Position_Reached\"","datatypeName":""}],"x":110,"y":80,"wires":[["c92a3080.807d18"]]},{"id":"c92a3080.807d18","type":"OPCUA-IIoT-Listener","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":80,"wires":[["4c600ea3.3cd76"]]},{"id":"4c600ea3.3cd76","type":"function","z":"96ccbb8c.f85068","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":80,"wires":[["43eff686.a2311"]]},{"id":"43eff686.a2311","type":"OPCUA-IIoT-Read","z":"96ccbb8c.f85068","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":80,"wires":[["27d456f8.e4a13a","c357fa19.b47d1"]]},{"id":"27d456f8.e4a13a","type":"function","z":"96ccbb8c.f85068","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { hz_axis_actpos: 0,\n hz_axis_targetpos: 0,\n hz_axis_posreached: 0,\n vert_axis_actpos: 0,\n vert_axis_targetpos: 0,\n vert_axis_posreached: 0\n };\n\n\noutput.hz_axis_actpos = msg.payload[0].value.value; \noutput.hz_axis_targetpos = msg.payload[1].value.value; \noutput.hz_axis_posreached = msg.payload[2].value.value; \noutput.vert_axis_actpos = msg.payload[3].value.value; \noutput.vert_axis_targetpos = msg.payload[4].value.value; \noutput.vert_axis_posreached = msg.payload[5].value.value; \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["a13f2bc2.d4e128","3996e024.d46d48","a45a5416.e4c08","7d226c0b.d65ab4"]]},{"id":"a13f2bc2.d4e128","type":"function","z":"96ccbb8c.f85068","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"SSC_hz_axis_X\"\n\nmsg.top = 290\nmsg.left = 210\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.hz_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["af8fd5fe.0e309"]]},{"id":"af8fd5fe.0e309","type":"function","z":"96ccbb8c.f85068","name":"color all Items","func":"var lastState = flow.get('SSC_State') || {};\n\n// Colorize \nif (msg.payload.state == 1) \n{ msg.payload.color = '#5a5' } else\n{ msg.payload.color = '#a55' }\n\n\nlastState[msg.topic] = msg.payload; \nflow.set('SSC_State', lastState);\nreturn { \n \"topic\": msg.topic,\n \"payload\": lastState,\n \"url\": msg.url\n};\n","outputs":1,"noerr":0,"x":820,"y":160,"wires":[["6f7c4a26.3e6a2c"]]},{"id":"b3cad1.c6349d3","type":"comment","z":"96ccbb8c.f85068","name":"HMI - Picture Box","info":"","x":120,"y":320,"wires":[]},{"id":"622cea69.70ee34","type":"comment","z":"96ccbb8c.f85068","name":"read real values from PLC","info":"","x":150,"y":40,"wires":[]},{"id":"3996e024.d46d48","type":"function","z":"96ccbb8c.f85068","name":"place Item setpoint","func":"// real value\nmsg.topic = \"SSC_hz_axis_W\"\n\nmsg.top = 310\nmsg.left = 210\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.hz_axis_targetpos\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":200,"wires":[["af8fd5fe.0e309"]]},{"id":"a45a5416.e4c08","type":"function","z":"96ccbb8c.f85068","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"SSC_vert_axis_X\"\n\nmsg.top = 50\nmsg.left = 260\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.vert_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["af8fd5fe.0e309"]]},{"id":"7d226c0b.d65ab4","type":"function","z":"96ccbb8c.f85068","name":"place Item setpoint","func":"// real value\nmsg.topic = \"SSC_vert_axis_W\"\n\nmsg.top = 70\nmsg.left = 260\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.vert_axis_targetpos\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":300,"wires":[["af8fd5fe.0e309"]]},{"id":"c357fa19.b47d1","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":790,"y":80,"wires":[[]]},{"id":"6f7c4a26.3e6a2c","type":"ui_template","z":"96ccbb8c.f85068","group":"21394b3d.7fa8b4","name":"Status Picture SSC","order":1,"width":9,"height":7,"format":"\n\n
\n\n
\n \n \n \n {{el.text}}\n \n
\n
\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":190,"y":360,"wires":[[]]},{"id":"e4f60edf.43afd","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"horizontal:","tooltip":"","group":"a3007d55.6b202","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":540,"wires":[["64c49f07.3e14c8"]]},{"id":"fa6cdea2.08b458","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"vertical:","tooltip":"","group":"a3007d55.6b202","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":740,"y":600,"wires":[["1cf34a00.49e556"]]},{"id":"72a09b6a.17c51c","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"vertical Offset:","tooltip":"","group":"a3007d55.6b202","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":760,"y":660,"wires":[["a42e8cbd.62f6b8"]]},{"id":"20f69031.d3694","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"vertical Offset:","tooltip":"","group":"473e26bd.22581","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":760,"y":760,"wires":[["573e4ed6.c8741"]]},{"id":"ac5cfa02.41e0a8","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"A1 horizontal:","tooltip":"","group":"ea4864b0.48b81","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":760,"y":860,"wires":[["9175e6d9.13dd48"]]},{"id":"a372a3ff.11256","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"A1 vertical:","tooltip":"","group":"ea4864b0.48b81","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":920,"wires":[["f175b82e.fe3c58"]]},{"id":"90d6cad9.6e2f2","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"B2 horizontal:","tooltip":"","group":"6e361096.7da8e8","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":760,"y":1040,"wires":[["b99c4fdc.99401"]]},{"id":"956b93ff.90aad8","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"B2 vertical:","tooltip":"","group":"6e361096.7da8e8","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":1100,"wires":[["23382617.7b103a"]]},{"id":"9a6ef164.790a5","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"C3 horizontal:","tooltip":"","group":"9d24bd1.772d74","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":760,"y":1220,"wires":[["cb9e76e4.6f9b08"]]},{"id":"36424d3f.1e7422","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"C3 vertical:","tooltip":"","group":"9d24bd1.772d74","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":1280,"wires":[["32338c0b.0ae58c"]]},{"id":"17bddab6.10d3ad","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"9fd654b1.4a21b","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":600,"wires":[["3f2b2126.0fe44e"]]},{"id":"200e1f63.7cf2a8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"9fd654b1.4a21b","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":660,"wires":[["315e5775.d8984"]]},{"id":"e9314c87.c23e4","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"45b2e95e.e9c128","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":1060,"wires":[["41bb3419.82f8a4"]]},{"id":"e1522b32.d0edf8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"9fd654b1.4a21b","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":720,"wires":[["95208776.418cf"]]},{"id":"9dd6c0cc.904ef8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"45b2e95e.e9c128","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":820,"wires":[["102c3c27.3b9a14"]]},{"id":"a0947f48.3fa6c","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Collect:","tooltip":"","group":"45b2e95e.e9c128","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":880,"wires":[["6d87fa80.8dda4c"]]},{"id":"33b1cac3.2e722e","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Discard:","tooltip":"","group":"45b2e95e.e9c128","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":940,"wires":[["d0e7bcf5.1fff38"]]},{"id":"693540e8.345de","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"45b2e95e.e9c128","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":1000,"wires":[["3af1c81a.b27fe"]]},{"id":"4d21f945.03ee6","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"b2b71f4e.623de8","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":1160,"wires":[["d5bab92d.5f0f28"]]},{"id":"41e489e7.e785a","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Collect:","tooltip":"","group":"b2b71f4e.623de8","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1220,"wires":[["67e594bd.2e143c"]]},{"id":"5182428c.b78d6c","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Discard:","tooltip":"","group":"b2b71f4e.623de8","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1280,"wires":[["77b4f933.922ed8"]]},{"id":"7a382885.2cee78","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"b2b71f4e.623de8","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":1340,"wires":[["a93df711.ac90d8"]]},{"id":"ed9a4b7c.1d4d7","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"b2b71f4e.623de8","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":1400,"wires":[["db098de7.10304"]]},{"id":"4a6ed881.5fc1a8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"5353e4b6.26835c","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":1500,"wires":[["732c5e17.29f5c8"]]},{"id":"57f22339.c700cc","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Collect:","tooltip":"","group":"5353e4b6.26835c","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1560,"wires":[["c74204e0.a4f298"]]},{"id":"cbd08044.ae4ed","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Discard:","tooltip":"","group":"5353e4b6.26835c","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1620,"wires":[["53b4b0e0.bf186"]]},{"id":"cef08d22.d4373","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"5353e4b6.26835c","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":1680,"wires":[["bdcd2e34.7a61f8"]]},{"id":"e3793fd0.41e8d8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"5353e4b6.26835c","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":1800,"wires":[["b23796bd.423a88"]]},{"id":"a4e19aec.6ea288","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal Offset:","tooltip":"","group":"5353e4b6.26835c","order":6,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":810,"y":1740,"wires":[["b54423ee.50aee"]]},{"id":"55f07ba1.c6a6a4","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"b38d78a9.9c40e","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":1900,"wires":[["9596458e.46568"]]},{"id":"1f88cf38.c28061","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"b38d78a9.9c40e","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":2080,"wires":[["44816851.c0cfc8"]]},{"id":"bb8e6b3f.fc2cc8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"b38d78a9.9c40e","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":2020,"wires":[["52b11f95.cb8da8"]]},{"id":"3f0b80fb.5b5fd","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"b38d78a9.9c40e","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":1960,"wires":[["11f1447d.75dc6c"]]},{"id":"559af1f6.41cce","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"8505f695.7df0c8","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2180,"wires":[["9895c6db.9b7cb"]]},{"id":"9d86730a.d6679","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"8505f695.7df0c8","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":2240,"wires":[["651e1072.cfbee8"]]},{"id":"46047037.c36b48","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"8505f695.7df0c8","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":2300,"wires":[["553943c4.b70a7c"]]},{"id":"502a24ae.17f714","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"6357a333.f0fea4","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2400,"wires":[["696757c8.d35fc"]]},{"id":"712ccd2b.c1b89c","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"6357a333.f0fea4","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":2460,"wires":[["12d80646.3dce4a"]]},{"id":"d5a120dd.4dd568","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"6357a333.f0fea4","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":2520,"wires":[["a23013b4.ef0e28"]]},{"id":"d55328c.40529d8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal blue:","tooltip":"","group":"afaa8b63.c29268","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":2620,"wires":[["d0603be8.c279a"]]},{"id":"64f54be8.8fc4b4","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical blue:","tooltip":"","group":"afaa8b63.c29268","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2680,"wires":[["f914c736.00a8e"]]},{"id":"1df495af.c4cd0a","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate blue:","tooltip":"","group":"afaa8b63.c29268","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2740,"wires":[["f6736dd5.b63b8"]]},{"id":"6e51b3c6.e57984","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal red:","tooltip":"","group":"afaa8b63.c29268","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":2840,"wires":[["2401e3ee.a3373c"]]},{"id":"394ded76.8a5f4a","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical red:","tooltip":"","group":"afaa8b63.c29268","order":6,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2900,"wires":[["7284e408.43618c"]]},{"id":"6bcd9f12.404788","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate red:","tooltip":"","group":"afaa8b63.c29268","order":7,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2960,"wires":[["ac9fb19b.cb4668"]]},{"id":"81b28d61.7da558","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal white:","tooltip":"","group":"afaa8b63.c29268","order":9,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":3060,"wires":[["6b88c6ee.e66b98"]]},{"id":"3205dbac.b651cc","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical white:","tooltip":"","group":"afaa8b63.c29268","order":10,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":3120,"wires":[["9ca680b0.6f874"]]},{"id":"600bcf5c.d8b608","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate white:","tooltip":"","group":"afaa8b63.c29268","order":11,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":3180,"wires":[["6d76d171.e75098"]]},{"id":"800916f5.33e278","type":"debug","z":"96ccbb8c.f85068","name":"Read SSC Pos.","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":580,"y":460,"wires":[]},{"id":"69c292f5.a6e98c","type":"OPCUA-IIoT-Inject","z":"96ccbb8c.f85068","injectType":"inject","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"Init","payload":"","addressSpaceItems":[],"x":110,"y":460,"wires":[["a9dbc99d.b4b588"]]},{"id":"684c44ac.f3b1b4","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":520,"wires":[["8030657e.b5cb4"]]},{"id":"8030657e.b5cb4","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":520,"wires":[["c0bcf262.cafc"]]},{"id":"c0bcf262.cafc","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":520,"wires":[[]]},{"id":"100407.aab61bf9","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":580,"wires":[["10c00fae.8edff8"]]},{"id":"10c00fae.8edff8","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":580,"wires":[["e47b150.a5048e8"]]},{"id":"e47b150.a5048e8","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":580,"wires":[[]]},{"id":"65b6f4a4.2c4ccc","type":"comment","z":"96ccbb8c.f85068","name":"HMI - Positions","info":"","x":120,"y":420,"wires":[]},{"id":"df9184a1.1ffc88","type":"comment","z":"96ccbb8c.f85068","name":"Load config data to PLC","info":"","x":150,"y":600,"wires":[]},{"id":"a9dbc99d.b4b588","type":"function","z":"96ccbb8c.f85068","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":460,"wires":[["1c9524c4.ee6923"]]},{"id":"1c9524c4.ee6923","type":"OPCUA-IIoT-Read","z":"96ccbb8c.f85068","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":110,"y":520,"wires":[["2184c029.7a45b8","6523368c.55d07"]]},{"id":"2184c029.7a45b8","type":"function","z":"96ccbb8c.f85068","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //SSC\n SSC_di_PosCentre_Horizontal: 1,\n SSC_di_PosCentre_Vertical: 1,\n //HBW\n SSC_di_PosHBW_Horizontal: 1,\n SSC_di_PosHBW_Vertical: 1,\n }\n\nConfData_out.SSC_di_PosCentre_Horizontal = msg.payload[0].value.value; //[0] \nConfData_out.SSC_di_PosCentre_Vertical = msg.payload[1].value.value; //[1] \n\nConfData_out.SSC_di_PosHBW_Horizontal= msg.payload[2].value.value; //[2]\nConfData_out.SSC_di_PosHBW_Vertical= msg.payload[3].value.value; //[3]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":360,"y":520,"wires":[["f8b070e9.2ff978","800916f5.33e278","5a813bf2.a83014","e4fb8e01.61e4c","be77a25a.fb7378"]]},{"id":"6523368c.55d07","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":350,"y":560,"wires":[[]]},{"id":"f8b070e9.2ff978","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.SSC_di_PosCentre_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":520,"wires":[["38e4e946.bfc026"]]},{"id":"5a813bf2.a83014","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.SSC_di_PosCentre_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":580,"wires":[["6c2884a2.e2ce8c"]]},{"id":"38e4e946.bfc026","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"horizontal:","tooltip":"","group":"b07ee037.6d618","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":520,"wires":[["684c44ac.f3b1b4"]]},{"id":"6c2884a2.e2ce8c","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"vertical:","tooltip":"","group":"b07ee037.6d618","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":740,"y":580,"wires":[["100407.aab61bf9"]]},{"id":"ca13ca6e.463098","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":640,"wires":[["14123e42.c7962a"]]},{"id":"14123e42.c7962a","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":640,"wires":[["5fe459e1.7f17b8"]]},{"id":"5fe459e1.7f17b8","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":640,"wires":[[]]},{"id":"ebb0402c.ea9ee","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":700,"wires":[["9aae0202.80be98"]]},{"id":"9aae0202.80be98","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":700,"wires":[["823f87a8.6c42e8"]]},{"id":"823f87a8.6c42e8","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":700,"wires":[[]]},{"id":"e4fb8e01.61e4c","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.SSC_di_PosHBW_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":640,"wires":[["d874b451.615718"]]},{"id":"be77a25a.fb7378","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.SSC_di_PosHBW_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":700,"wires":[["3afaff66.c18f98"]]},{"id":"d874b451.615718","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"horizontal:","tooltip":"","group":"7a5f99d9.a1dfe","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":640,"wires":[["ca13ca6e.463098"]]},{"id":"3afaff66.c18f98","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"vertical:","tooltip":"","group":"7a5f99d9.a1dfe","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":740,"y":700,"wires":[["ebb0402c.ea9ee"]]},{"id":"62fed044.76c68","type":"link in","z":"96ccbb8c.f85068","name":"","links":["53758868.1fdaf8"],"x":55,"y":640,"wires":[["a9dbc99d.b4b588"]]},{"id":"9295eebb.3b604","type":"ui_dropdown","z":"eac85a93.4f949","name":"","label":"HBW Positions:","tooltip":"","place":"Select option","group":"9608e0f4.098128","order":2,"width":6,"height":1,"passthru":true,"options":[{"label":"Select position","value":0,"type":"num"},{"label":"Belt","value":21,"type":"num"},{"label":"Rack A1","value":22,"type":"num"},{"label":"Rack B2","value":23,"type":"num"},{"label":"Rack C3","value":24,"type":"num"}],"payload":"","topic":"HBW_position_no","x":880,"y":220,"wires":[["9d5e3e95.cdca7","d68f8bf9.41c9f"]]},{"id":"9d5e3e95.cdca7","type":"function","z":"eac85a93.4f949","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1080,"y":220,"wires":[["c2ec22d1.f87908"]]},{"id":"c2ec22d1.f87908","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1230,"y":220,"wires":[["5f34cd9d.a81834"]]},{"id":"5f34cd9d.a81834","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1370,"y":220,"wires":[[]]},{"id":"fbaa4cd3.d064e8","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":5,"width":3,"height":1,"name":"","label":"Start positioning:","format":"","layout":"row-spread","x":150,"y":580,"wires":[]},{"id":"8457eeb5.c62358","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":7,"width":2,"height":1,"passthru":false,"label":"START","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":340,"y":580,"wires":[["4531d795.eebae"]]},{"id":"4531d795.eebae","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":580,"wires":[["ff43ce7f.d435"]]},{"id":"ff43ce7f.d435","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":580,"wires":[["f0095366.5153e8"]]},{"id":"f0095366.5153e8","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":580,"wires":[[]]},{"id":"b02c4a3e.1d553","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":8,"width":3,"height":1,"name":"","label":"Final positioning:","format":"","layout":"row-spread","x":150,"y":640,"wires":[]},{"id":"4034ffcc.837cb","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":10,"width":2,"height":1,"passthru":false,"label":"FINAL","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":640,"wires":[["291bd25c.8768fe"]]},{"id":"291bd25c.8768fe","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Final_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":640,"wires":[["7114856f.ed899c"]]},{"id":"7114856f.ed899c","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":640,"wires":[["3b728052.45a2d"]]},{"id":"3b728052.45a2d","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":640,"wires":[[]]},{"id":"1629f689.e002f1","type":"OPCUA-IIoT-Inject","z":"eac85a93.4f949","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"di_Pos_Horizontal\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"di_Pos_Vertical\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"di_Pos_Rotate\"","datatypeName":""}],"x":110,"y":420,"wires":[["ac9f0d45.7102d8"]]},{"id":"ac9f0d45.7102d8","type":"OPCUA-IIoT-Listener","z":"eac85a93.4f949","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":420,"wires":[["2a981b73.7cdfec"]]},{"id":"2a981b73.7cdfec","type":"function","z":"eac85a93.4f949","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"di_Pos_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"di_Pos_Vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"di_Pos_Rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":420,"wires":[["344b68f6.bd2248"]]},{"id":"344b68f6.bd2248","type":"OPCUA-IIoT-Read","z":"eac85a93.4f949","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":420,"wires":[["c617df16.69db08","18344eb6.2cecc9","e52f49c1.3dda9"]]},{"id":"c617df16.69db08","type":"function","z":"eac85a93.4f949","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { act_pos_horizontal: 0, act_pos_vertical: 0, act_pos_rotate: 0};\n\noutput.act_pos_horizontal = msg.payload[0].value.value; //[0]\noutput.act_pos_vertical = msg.payload[1].value.value; //[1] \noutput.act_pos_rotate = msg.payload[2].value.value; //[2] \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":790,"y":420,"wires":[["f1d9f14.016979","947fb27e.725c2","9a90d538.4961a"]]},{"id":"f1d9f14.016979","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":3,"width":6,"height":1,"name":"","label":"Pos. value horizontal:","format":"{{msg.payload.act_pos_horizontal}}","layout":"row-spread","x":1080,"y":420,"wires":[]},{"id":"947fb27e.725c2","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":4,"width":6,"height":1,"name":"","label":"Pos. value vertical:","format":"{{msg.payload.act_pos_vertical}}","layout":"row-spread","x":1070,"y":460,"wires":[]},{"id":"24ccb90.36b3948","type":"ui_switch","z":"eac85a93.4f949","name":"","label":"Activate pos. move","tooltip":"","group":"9608e0f4.098128","order":1,"width":6,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":890,"y":80,"wires":[["a8f8a4d7.b4b1c"]]},{"id":"f6656a48.9ca298","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1230,"y":80,"wires":[["94fc48a6.795f28"]]},{"id":"94fc48a6.795f28","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1370,"y":80,"wires":[[]]},{"id":"6c0427e.687afd8","type":"comment","z":"eac85a93.4f949","name":"HMI - move to position","info":"","x":120,"y":40,"wires":[]},{"id":"3b427abe.feab36","type":"comment","z":"eac85a93.4f949","name":"HMI - position setpoints","info":"","x":120,"y":380,"wires":[]},{"id":"ffc1e825.74109","type":"comment","z":"eac85a93.4f949","name":"HMI - start positioning","info":"","x":120,"y":540,"wires":[]},{"id":"ac25230.dd2c9e","type":"ui_dropdown","z":"b495b31e.fe8338","name":"","label":"VGR Positions:","tooltip":"","place":"Select option","group":"2f117237.36aff6","order":2,"width":6,"height":1,"passthru":true,"options":[{"label":"Select position","value":0,"type":"num"},{"label":"Color Reader","value":41,"type":"num"},{"label":"DSI collect","value":42,"type":"num"},{"label":"DSI discard","value":43,"type":"num"},{"label":"DSO collect","value":44,"type":"num"},{"label":"DSO discard","value":45,"type":"num"},{"label":"HBW collect","value":46,"type":"num"},{"label":"HBW discard","value":47,"type":"num"},{"label":"MPO","value":48,"type":"num"},{"label":"NFC","value":49,"type":"num"},{"label":"NiO","value":50,"type":"num"},{"label":"SLD blue","value":51,"type":"num"},{"label":"SLD red","value":52,"type":"num"},{"label":"SLD white","value":53,"type":"num"}],"payload":"","topic":"VGR_Position_no","x":360,"y":180,"wires":[["6b7ab88d.1ec6f8","8d261637.39ebd"]]},{"id":"6b7ab88d.1ec6f8","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":180,"wires":[["35b22fbd.5a372"]]},{"id":"35b22fbd.5a372","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":180,"wires":[["f58632ea.77e108"]]},{"id":"f58632ea.77e108","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":180,"wires":[[]]},{"id":"e4706d5f.5a0e18","type":"comment","z":"b495b31e.fe8338","name":"HMI - select position","info":"","x":110,"y":140,"wires":[]},{"id":"6fc831c2.e6ddb","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":6,"width":3,"height":1,"name":"","label":"Start positioning:","format":"","layout":"row-spread","x":150,"y":460,"wires":[]},{"id":"3902d474.a31b04","type":"ui_button","z":"b495b31e.fe8338","name":"","group":"2f117237.36aff6","order":8,"width":2,"height":1,"passthru":false,"label":"Start","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":460,"wires":[["99788681.3d7ef"]]},{"id":"99788681.3d7ef","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":460,"wires":[["b6fa00da.2d58a"]]},{"id":"b6fa00da.2d58a","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":460,"wires":[["dde4555f.eed578"]]},{"id":"dde4555f.eed578","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":460,"wires":[[]]},{"id":"d410e23b.6fb178","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":9,"width":3,"height":1,"name":"","label":"Final positioning:","format":"","layout":"row-spread","x":150,"y":520,"wires":[]},{"id":"e75b0f38.83bc58","type":"ui_button","z":"b495b31e.fe8338","name":"","group":"2f117237.36aff6","order":11,"width":2,"height":1,"passthru":false,"label":"Final","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":520,"wires":[["324f6e2c.b1624a"]]},{"id":"324f6e2c.b1624a","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Final_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":520,"wires":[["c8b9cbe6.2508d8"]]},{"id":"c8b9cbe6.2508d8","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":520,"wires":[["71fa2044.b623"]]},{"id":"71fa2044.b623","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":520,"wires":[[]]},{"id":"fb890757.29594","type":"function","z":"b495b31e.fe8338","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { act_pos_horizontal: 0, act_pos_vertical: 0, act_pos_rotate: 0};\n\noutput.act_pos_horizontal = msg.payload[0].value.value; //[0]\noutput.act_pos_vertical = msg.payload[1].value.value; //[1] \noutput.act_pos_rotate = msg.payload[2].value.value; //[2] \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":300,"wires":[["5b90e7b1.4e993","ccc59dc2.96367","2903299d.ff97d6"]]},{"id":"5b90e7b1.4e993","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":3,"width":6,"height":1,"name":"","label":"Pos. value horizontal:","format":"{{msg.payload.act_pos_horizontal}}","layout":"row-spread","x":820,"y":300,"wires":[]},{"id":"ccc59dc2.96367","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":4,"width":6,"height":1,"name":"","label":"Pos. value vertical:","format":"{{msg.payload.act_pos_vertical}}","layout":"row-spread","x":810,"y":340,"wires":[]},{"id":"2903299d.ff97d6","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":5,"width":6,"height":1,"name":"","label":"Pos. value rotation:","format":"{{msg.payload.act_pos_rotate}}","layout":"row-spread","x":810,"y":380,"wires":[]},{"id":"5a2d21fb.9cf6a8","type":"ui_switch","z":"b495b31e.fe8338","name":"","label":"Activate pos. move","tooltip":"","group":"2f117237.36aff6","order":1,"width":6,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":370,"y":80,"wires":[["36828d72.71cb62"]]},{"id":"f55743a4.b20de8","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":80,"wires":[["c8857749.d79a4"]]},{"id":"c8857749.d79a4","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":80,"wires":[[]]},{"id":"8c25c151.4185b8","type":"comment","z":"b495b31e.fe8338","name":"HMI - move to position","info":"","x":120,"y":40,"wires":[]},{"id":"2756e6c3.e1f03a","type":"comment","z":"b495b31e.fe8338","name":"HMI - position setpoints","info":"","x":120,"y":260,"wires":[]},{"id":"c467d1ea.e6f42","type":"comment","z":"b495b31e.fe8338","name":"HMI - start positioning","info":"","x":120,"y":420,"wires":[]},{"id":"9492869b.670f5","type":"ui_dropdown","z":"410fcde3.56d53c","name":"","label":"SSC Positions:","tooltip":"","place":"Select option","group":"d418765.9bb9f88","order":3,"width":6,"height":1,"passthru":true,"options":[{"label":"Select position","value":0,"type":"num"},{"label":"Center","value":1,"type":"num"},{"label":"HBW","value":2,"type":"num"}],"payload":"","topic":"SSC_position_no","x":360,"y":180,"wires":[["ac8f7502.bd7648","d74711da.31d8d"]]},{"id":"ac8f7502.bd7648","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":180,"wires":[["495aa3f9.cc0604"]]},{"id":"495aa3f9.cc0604","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":180,"wires":[["2a5ea273.c770ae"]]},{"id":"2a5ea273.c770ae","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":180,"wires":[[]]},{"id":"e17528e4.48c6a","type":"comment","z":"410fcde3.56d53c","name":"HMI - select position","info":"","x":110,"y":140,"wires":[]},{"id":"fd0e3ad4.7f859","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":6,"width":3,"height":1,"name":"","label":"Start positioning:","format":"","layout":"row-spread","x":150,"y":460,"wires":[]},{"id":"b2de1e22.6c4bc","type":"ui_button","z":"410fcde3.56d53c","name":"","group":"d418765.9bb9f88","order":8,"width":2,"height":1,"passthru":false,"label":"Start","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":460,"wires":[["6b343bc3.96af44"]]},{"id":"6b343bc3.96af44","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":460,"wires":[["3e0c703a.dc6a9"]]},{"id":"3e0c703a.dc6a9","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":460,"wires":[["f581f0e0.4d6f78"]]},{"id":"f581f0e0.4d6f78","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":460,"wires":[[]]},{"id":"c34dbd09.f2df48","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":9,"width":3,"height":1,"name":"","label":"Home positioning:","format":"","layout":"row-spread","x":150,"y":520,"wires":[]},{"id":"ddc9646c.ad8e4","type":"ui_button","z":"410fcde3.56d53c","name":"","group":"d418765.9bb9f88","order":11,"width":2,"height":1,"passthru":false,"label":"Home","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":520,"wires":[["b4629dac.722198"]]},{"id":"fa5d1fae.4d4248","type":"function","z":"410fcde3.56d53c","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { act_pos_horizontal: 0, act_pos_vertical: 0, act_pos_rotate: 0};\n\noutput.act_pos_horizontal = msg.payload[0].value.value; //[0]\noutput.act_pos_vertical = msg.payload[1].value.value; //[1] \noutput.act_pos_rotate = msg.payload[2].value.value; //[2] \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":300,"wires":[["9b54a5d.e075bd8","268bd0e2.9462d8"]]},{"id":"9b54a5d.e075bd8","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":4,"width":6,"height":1,"name":"","label":"Pos. value horizontal:","format":"{{msg.payload.act_pos_horizontal}}","layout":"row-spread","x":820,"y":300,"wires":[]},{"id":"268bd0e2.9462d8","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":5,"width":6,"height":1,"name":"","label":"Pos. value vertical:","format":"{{msg.payload.act_pos_vertical}}","layout":"row-spread","x":810,"y":340,"wires":[]},{"id":"7272cf1b.9cd6c","type":"ui_switch","z":"410fcde3.56d53c","name":"","label":"Activate pos. move","tooltip":"","group":"d418765.9bb9f88","order":2,"width":6,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":370,"y":80,"wires":[["e2e8b027.48b018"]]},{"id":"f449215.0186ce","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":80,"wires":[["361b56fe.f7caba"]]},{"id":"361b56fe.f7caba","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":80,"wires":[[]]},{"id":"3107be83.db4a8a","type":"comment","z":"410fcde3.56d53c","name":"HMI - move to position","info":"","x":120,"y":40,"wires":[]},{"id":"7a86fed6.d6fc2","type":"comment","z":"410fcde3.56d53c","name":"HMI - position setpoints","info":"","x":120,"y":260,"wires":[]},{"id":"149674ca.029313","type":"comment","z":"410fcde3.56d53c","name":"HMI - start positioning","info":"","x":120,"y":420,"wires":[]},{"id":"8d261637.39ebd","type":"function","z":"b495b31e.fe8338","name":"switch UI Groups","func":"switch(msg.payload)\n{\n case 0:\n msg.group = { \"hide\": [\"nix\",\n ],\n \"show\": [\"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n\n case 41:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n ],\n \"focus\": true\n };\n break;\n\n\n case 42:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSI\",\n ],\n \"focus\": true\n };\n break;\n case 43:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSI\",\n ],\n \"focus\": true\n };\n break;\n case 44:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSO\",\n ],\n \"focus\": true\n };\n break;\n case 45:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSO\",\n ],\n \"focus\": true\n };\n break;\n case 46:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\n case 47:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\n case 48:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_MPO\",\n ],\n \"focus\": true\n };\n break;\n\n case 49:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NiOC\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_NFC\",\n ],\n \"focus\": true\n };\n break;\n \n case 50:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"focus\": true\n };\n break;\n\n case 51:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n\n case 52:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n \n case 53:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n\n default:\n msg.group = { \"hide\": [\"nix\",\n ],\n \"show\": [\"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n }; \n\n} \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"group\" : msg.group,\n \"BG_colour\": \"\",\n \"Background\":\"gray\",\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":240,"wires":[["44c77f1e.2f8328"]]},{"id":"44c77f1e.2f8328","type":"ui_ui_control","z":"b495b31e.fe8338","name":"","events":"all","x":780,"y":240,"wires":[[]]},{"id":"5a74ebc3.de637c","type":"link in","z":"b495b31e.fe8338","name":"","links":["18344eb6.2cecc9","7439e071.a0cf88"],"x":215,"y":300,"wires":[["fb890757.29594"]]},{"id":"18344eb6.2cecc9","type":"link out","z":"eac85a93.4f949","name":"listen setpoints","links":["5a74ebc3.de637c","54edf023.f8361"],"x":735,"y":480,"wires":[]},{"id":"e9f4ad3c.3535a","type":"link out","z":"eac85a93.4f949","name":"listen position","links":["59c24cc2.a5cea4","65c4b6d0.5b07c"],"x":815,"y":280,"wires":[]},{"id":"b10c7e10.c9ceb","type":"link out","z":"eac85a93.4f949","name":"listen activate","links":["e6fc1737.c6e3","43ee5c44.013afc"],"x":815,"y":140,"wires":[]},{"id":"59c24cc2.a5cea4","type":"link in","z":"b495b31e.fe8338","name":"","links":["e9f4ad3c.3535a","924334b7.b5acc"],"x":215,"y":180,"wires":[["ac25230.dd2c9e"]]},{"id":"e6fc1737.c6e3","type":"link in","z":"b495b31e.fe8338","name":"","links":["b10c7e10.c9ceb","a32d40c.6a0c8c"],"x":215,"y":80,"wires":[["5a2d21fb.9cf6a8"]]},{"id":"54edf023.f8361","type":"link in","z":"410fcde3.56d53c","name":"","links":["18344eb6.2cecc9","7439e071.a0cf88"],"x":215,"y":300,"wires":[["fa5d1fae.4d4248"]]},{"id":"65c4b6d0.5b07c","type":"link in","z":"410fcde3.56d53c","name":"","links":["e9f4ad3c.3535a","924334b7.b5acc"],"x":215,"y":180,"wires":[["9492869b.670f5"]]},{"id":"43ee5c44.013afc","type":"link in","z":"410fcde3.56d53c","name":"","links":["b10c7e10.c9ceb","a32d40c.6a0c8c"],"x":215,"y":80,"wires":[["7272cf1b.9cd6c"]]},{"id":"a8f8a4d7.b4b1c","type":"function","z":"eac85a93.4f949","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n\n\nif (wert === true)\n { \n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n }\nelse\n {\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n msg.valuesToWrite = [wert,0];\n }\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1080,"y":80,"wires":[["f6656a48.9ca298"]]},{"id":"d68f8bf9.41c9f","type":"function","z":"eac85a93.4f949","name":"switch UI Groups","func":"switch(msg.payload)\n{\n case 0:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"focus\": true\n };\n break;\n case 21:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n ],\n \"focus\": true\n };\n break;\n case 22:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n ],\n \"focus\": true\n };\n break;\n case 23:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n ],\n \"focus\": true\n };\n break;\n case 24:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"focus\": true\n };\n break;\n\n default:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"focus\": true\n };\n\n} \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"group\" : msg.group,\n \"BG_colour\": \"\",\n \"Background\":\"gray\",\n }\n};\n","outputs":1,"noerr":0,"x":130,"y":320,"wires":[["e65573b7.f70738"]]},{"id":"e65573b7.f70738","type":"ui_ui_control","z":"eac85a93.4f949","name":"","events":"all","x":300,"y":320,"wires":[["8a93ef88.964df"]]},{"id":"36828d72.71cb62","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n\n\nif (wert === true)\n { \n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n }\nelse\n {\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n msg.valuesToWrite = [wert,0];\n }\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":80,"wires":[["f55743a4.b20de8"]]},{"id":"d74711da.31d8d","type":"function","z":"410fcde3.56d53c","name":"switch UI Groups","func":"switch(msg.payload)\n{\n case 0:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\n case 1:\n msg.group = { \"hide\": [\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n ],\n \"focus\": true\n };\n break;\n\n case 2:\n msg.group = { \"hide\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\ndefault:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n\n} \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n //\"tab\": \"run Task\",\n \"group\" : msg.group,\n \"BG_colour\": \"\",\n \"Background\":\"gray\",\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":240,"wires":[["bf879f3c.63c1c8"]]},{"id":"bf879f3c.63c1c8","type":"ui_ui_control","z":"410fcde3.56d53c","name":"","events":"all","x":780,"y":240,"wires":[[]]},{"id":"8a93ef88.964df","type":"function","z":"eac85a93.4f949","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":160,"y":80,"wires":[["b60f1571.9347"]]},{"id":"b60f1571.9347","type":"OPCUA-IIoT-Read","z":"eac85a93.4f949","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":350,"y":80,"wires":[["e9e617d9.70a588","ca2c8580.e92f5"]]},{"id":"e9e617d9.70a588","type":"function","z":"eac85a93.4f949","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //value out\n OUT_x_activate_pos_move: false,\n OUT_i_position_no: 0,\n }\n\nConfData_out.OUT_x_activate_pos_move = msg.payload[0].value.value; //[0] \nConfData_out.OUT_i_position_no = msg.payload[1].value.value; //[1] \n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":520,"y":80,"wires":[["a5c44498.4e7798","48f88314.93f024"]]},{"id":"ca2c8580.e92f5","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":510,"y":140,"wires":[[]]},{"id":"a5c44498.4e7798","type":"function","z":"eac85a93.4f949","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = false ;\n\n\noutput = msg.payload.OUT_x_activate_pos_move; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":690,"y":80,"wires":[["24ccb90.36b3948","b10c7e10.c9ceb"]]},{"id":"48f88314.93f024","type":"function","z":"eac85a93.4f949","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0;\n\n\noutput = msg.payload.OUT_i_position_no; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":690,"y":220,"wires":[["9295eebb.3b604","e9f4ad3c.3535a"]]},{"id":"75b937ba.b62f1","type":"comment","z":"eac85a93.4f949","name":"HMI - change tab triggers OPCUA read","info":"","x":170,"y":280,"wires":[]},{"id":"b723e255.ca7818","type":"comment","z":"eac85a93.4f949","name":"Position change triggers group visibility","info":"","x":950,"y":180,"wires":[]},{"id":"32c6df9e.c32dc","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":8,"width":3,"height":1,"name":"","label":"Set calibration value:","format":"","layout":"row-spread","x":160,"y":540,"wires":[]},{"id":"45f9ab9d.f0bb04","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":11,"width":2,"height":1,"passthru":false,"label":"BLUE","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":540,"wires":[["2daabc9d.c95bcc"]]},{"id":"2daabc9d.c95bcc","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Calib_Value_Color_Blue\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":540,"wires":[["658b340.ec386cc"]]},{"id":"658b340.ec386cc","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":540,"wires":[["28c3ae3e.5d6b22"]]},{"id":"28c3ae3e.5d6b22","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":540,"wires":[[]]},{"id":"f5eb975.0f8efe8","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":4,"width":9,"height":1,"name":"","label":"Color sensor actual value:","format":"{{msg.payload.OUT_w_Actual_ColorValue}}","layout":"row-spread","x":780,"y":260,"wires":[]},{"id":"ac345810.bf1ec8","type":"ui_switch","z":"d157eff7.cfa8","name":"","label":"Calibrate color sensor","tooltip":"","group":"4dd8e20b.5429ac","order":1,"width":9,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":940,"y":140,"wires":[["5216ed9e.0bbe6c"]]},{"id":"44d78c5d.f91bd4","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1290,"y":140,"wires":[["109afc2b.6ca8c4"]]},{"id":"109afc2b.6ca8c4","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1450,"y":140,"wires":[[]]},{"id":"7d7b0864.ebfc5","type":"comment","z":"d157eff7.cfa8","name":"HMI - read color sensor calibration data","info":"","x":170,"y":40,"wires":[]},{"id":"b5fc50a7.d720e","type":"comment","z":"d157eff7.cfa8","name":"HMI - calibrate color sensor","info":"","x":140,"y":500,"wires":[]},{"id":"5216ed9e.0bbe6c","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Color_Sensor_Calibration\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1140,"y":140,"wires":[["44d78c5d.f91bd4"]]},{"id":"f8445134.1ecd","type":"OPCUA-IIoT-Read","z":"d157eff7.cfa8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":550,"y":80,"wires":[["d8b12e3e.fc945","790b47ee.800598"]]},{"id":"d8b12e3e.fc945","type":"function","z":"d157eff7.cfa8","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //value out\n OUT_x_Calib_Color_Sensor: false,\n OUT_i_Color_Sensor_Selection:0,\n OUT_w_Calib_ColorValue_Blue: 0,\n OUT_w_Calib_ColorValue_Red: 0,\n OUT_w_Calib_ColorValue_White: 0,\n OUT_w_Actual_ColorValue:0,\n OUT_w_Threshold_Red_Blue:0,\n OUT_w_Threshold_White_Red:0,\n }\n\n\n\nConfData_out.OUT_x_Calib_Color_Sensor = msg.payload[0].value.value; //[0] \nConfData_out.OUT_i_Color_Sensor_Selection = msg.payload[1].value.value; //[1]\nConfData_out.OUT_w_Calib_ColorValue_Blue = msg.payload[2].value.value; //[2] \nConfData_out.OUT_w_Calib_ColorValue_Red = msg.payload[3].value.value; //[3] \nConfData_out.OUT_w_Calib_ColorValue_White = msg.payload[4].value.value; //[4] \nConfData_out.OUT_w_Actual_ColorValue = msg.payload[5].value.value; //[5] \nConfData_out.OUT_w_Threshold_Red_Blue = msg.payload[6].value.value; //[6] \nConfData_out.OUT_w_Threshold_White_Red = msg.payload[7].value.value; //[7] \n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":400,"y":140,"wires":[["805b24fb.fcac1","f5eb975.0f8efe8","eee817a7.0958a","db0fa8a6.088158","13b0d732.b7a3e1","c8bcfa0c.6312a8","5d4797f3.9f3d38","a99bd513.d45fe8","fea95398.9ce5d8"]]},{"id":"790b47ee.800598","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":750,"y":80,"wires":[[]]},{"id":"805b24fb.fcac1","type":"function","z":"d157eff7.cfa8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = false ;\n\n\noutput = msg.payload.OUT_x_Calib_Color_Sensor; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":730,"y":140,"wires":[["ac345810.bf1ec8"]]},{"id":"6db2b73c.7f70d8","type":"OPCUA-IIoT-Inject","z":"d157eff7.cfa8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"x_Color_Sensor_Calibration\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Color_Sensor_Selection\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Blue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Red\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_White\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Actual_ColorValue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Threshold_Red_Blue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Threshold_White_Red\"","datatypeName":""}],"x":110,"y":80,"wires":[["abe069d3.73e238"]]},{"id":"abe069d3.73e238","type":"OPCUA-IIoT-Listener","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":80,"wires":[["32821c52.ea1854"]]},{"id":"c562c78a.eba3e","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":10,"width":2,"height":1,"passthru":false,"label":"RED","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":600,"wires":[["a27cc2e4.95e818"]]},{"id":"a27cc2e4.95e818","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Calib_Value_Color_Red\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":600,"wires":[["93271351.381d3"]]},{"id":"93271351.381d3","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":600,"wires":[["d62c7a74.3a4458"]]},{"id":"d62c7a74.3a4458","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":600,"wires":[[]]},{"id":"d00261eb.c343b8","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":9,"width":2,"height":1,"passthru":false,"label":"WHITE","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":660,"wires":[["2b705fc4.b6eae"]]},{"id":"2b705fc4.b6eae","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Calib_Value_Color_White\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":660,"wires":[["cd04300c.8f045"]]},{"id":"cd04300c.8f045","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":660,"wires":[["7f567681.534c5"]]},{"id":"7f567681.534c5","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":660,"wires":[[]]},{"id":"945e6945.5edfa","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":14,"width":3,"height":1,"name":"","label":"Home positioning:","format":"","layout":"row-spread","x":150,"y":700,"wires":[]},{"id":"451fb4c2.48777c","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":16,"width":2,"height":1,"passthru":false,"label":"HOME","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":700,"wires":[["297b82be.021c2e"]]},{"id":"297b82be.021c2e","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Home_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":700,"wires":[["cd518c81.89ac4"]]},{"id":"cd518c81.89ac4","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":700,"wires":[["1dcb12d.a88ff6d"]]},{"id":"1dcb12d.a88ff6d","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":700,"wires":[[]]},{"id":"46a3fcd4.1a442c","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":11,"width":3,"height":1,"name":"","label":"Start offset:","format":"","layout":"row-spread","x":130,"y":760,"wires":[]},{"id":"9d584f86.b6b758","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":13,"width":2,"height":1,"passthru":false,"label":"OFFSET","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":340,"y":760,"wires":[["af48288e.999d58"]]},{"id":"af48288e.999d58","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Offset\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":760,"wires":[["cda8b2e8.d8fee"]]},{"id":"cda8b2e8.d8fee","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":760,"wires":[["d6a051d4.d4a6d"]]},{"id":"d6a051d4.d4a6d","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":760,"wires":[[]]},{"id":"e52f49c1.3dda9","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":610,"y":480,"wires":[[]]},{"id":"eee817a7.0958a","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":7,"width":9,"height":1,"name":"","label":"Color value blue:","format":"{{msg.payload.OUT_w_Calib_ColorValue_Blue}}","layout":"row-spread","x":750,"y":300,"wires":[]},{"id":"db0fa8a6.088158","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":6,"width":9,"height":1,"name":"","label":"Color value red:","format":"{{msg.payload.OUT_w_Calib_ColorValue_Red}}","layout":"row-spread","x":740,"y":340,"wires":[]},{"id":"fea95398.9ce5d8","type":"debug","z":"d157eff7.cfa8","name":"Color sensor calib. data","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":790,"y":40,"wires":[]},{"id":"13b0d732.b7a3e1","type":"function","z":"d157eff7.cfa8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0;\n\n\noutput = msg.payload.OUT_i_Color_Sensor_Selection; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":730,"y":200,"wires":[["753a0d68.64687c"]]},{"id":"753a0d68.64687c","type":"ui_dropdown","z":"d157eff7.cfa8","name":"","label":"Sensor selection:","tooltip":"","place":"Select option","group":"4dd8e20b.5429ac","order":2,"width":9,"height":1,"passthru":true,"options":[{"label":"Select sensor","value":"0","type":"str"},{"label":"DSI","value":1,"type":"num"},{"label":"SLD","value":"2","type":"str"}],"payload":"","topic":"HBW_position_no","x":930,"y":200,"wires":[["c7401ab2.21b9e"]]},{"id":"c7401ab2.21b9e","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Color_Sensor_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1140,"y":200,"wires":[["dbcf7d3.61bc58"]]},{"id":"dbcf7d3.61bc58","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1290,"y":200,"wires":[["eadaef82.408ca8"]]},{"id":"eadaef82.408ca8","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1450,"y":200,"wires":[[]]},{"id":"32821c52.ea1854","type":"function","z":"d157eff7.cfa8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Color_Sensor_Calibration\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Color_Sensor_Selection\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Blue\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Red\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_White\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Actual_ColorValue\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'Word'},\n ]\n \n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":80,"wires":[["f8445134.1ecd"]]},{"id":"9a90d538.4961a","type":"debug","z":"eac85a93.4f949","name":"new position values","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1070,"y":380,"wires":[]},{"id":"c8bcfa0c.6312a8","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":5,"width":9,"height":1,"name":"","label":"Color value white:","format":"{{msg.payload.OUT_w_Calib_ColorValue_White}}","layout":"row-spread","x":750,"y":380,"wires":[]},{"id":"7c1c763f.cc7f18","type":"ui_template","z":"cc38a811.11de2","group":"4334b06.5f5075","name":"Camera view","order":2,"width":10,"height":8,"format":"\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":530,"y":180,"wires":[[]]},{"id":"987de9dd.1d35f","type":"mqtt in","z":"cc38a811.11de2","name":"","topic":"i/cam","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":140,"wires":[["3c2feecf.f5a97a","34cec622.ac7462","21f4ee2b.f86e3a"]]},{"id":"3c2feecf.f5a97a","type":"debug","z":"cc38a811.11de2","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":310,"y":100,"wires":[]},{"id":"34cec622.ac7462","type":"function","z":"cc38a811.11de2","name":"data","func":"msg.payload = msg.payload.data;\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":180,"wires":[["7c1c763f.cc7f18"]]},{"id":"21f4ee2b.f86e3a","type":"function","z":"cc38a811.11de2","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":140,"wires":[["dadb82ab.dbbdc","acdbb5d4.864318"]]},{"id":"dadb82ab.dbbdc","type":"debug","z":"cc38a811.11de2","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":510,"y":100,"wires":[]},{"id":"acdbb5d4.864318","type":"ui_text","z":"cc38a811.11de2","group":"4334b06.5f5075","order":1,"width":0,"height":0,"name":"","label":"timestamp Cam","format":"{{msg.payload}}","layout":"row-spread","x":540,"y":140,"wires":[]},{"id":"e36baf84.6f3b98","type":"comment","z":"cc38a811.11de2","name":"Camera view HMI - Main","info":"","x":130,"y":40,"wires":[]},{"id":"a6a48de6.18e81","type":"ui_text","z":"cc38a811.11de2","group":"c863b9e5.ef9b6","order":1,"width":6,"height":1,"name":"","label":"Clear HBW rack:","format":"","layout":"row-spread","x":130,"y":300,"wires":[]},{"id":"d9e572a3.d32ab","type":"ui_button","z":"cc38a811.11de2","name":"","group":"c863b9e5.ef9b6","order":3,"width":2,"height":1,"passthru":false,"label":"CLEAR","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":320,"y":300,"wires":[["1aa5f912.641677"]]},{"id":"1aa5f912.641677","type":"function","z":"cc38a811.11de2","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Clean_Rack_HBW\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":300,"wires":[["3f1f9ce0.458064"]]},{"id":"3f1f9ce0.458064","type":"OPCUA-IIoT-Write","z":"cc38a811.11de2","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":300,"wires":[["9cfd2553.726cd"]]},{"id":"9cfd2553.726cd","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":300,"wires":[[]]},{"id":"efcac8c9.532898","type":"comment","z":"cc38a811.11de2","name":"Clear HBW Rack","info":"","x":100,"y":260,"wires":[]},{"id":"5de1eda6.9de83c","type":"status","z":"cc38a811.11de2","name":"","scope":["c38758b9.c5c21"],"x":100,"y":620,"wires":[["42590122.2fe46"]]},{"id":"7122421c.98a41c","type":"trigger","z":"cc38a811.11de2","op1":"0","op2":"1","op1type":"str","op2type":"num","duration":"10","extend":false,"units":"s","reset":"0","bytopic":"all","name":"","x":490,"y":620,"wires":[["3fb7aba9.f81d34"]]},{"id":"42590122.2fe46","type":"function","z":"cc38a811.11de2","name":"connection lost?","func":"var local=global.get('data') || {};\nif (local.OPC_con_loss===undefined)//test exists\n {\n local.OPC_con_loss=0;\n }\n\n\n//if (msg.payload === \"Internal Error\")\n// { \n// msg.state = 1 ;\n// }\n//else\n// {\n msg.status.text === \"listening (1)\" ? msg.state = 0 : msg.state = 1\n// }\n\n\nif (msg.status.text === \"listening (1)\")\n {\n local.OPC_con_loss=0; \n global.set('data',local);\n }\n\nreturn {\"payload\": msg.state}","outputs":1,"noerr":0,"x":300,"y":620,"wires":[["7122421c.98a41c"]]},{"id":"c3c37f15.dbd6","type":"function","z":"cc38a811.11de2","name":"Request Token","func":"msg.payload = {\n \"client_id\": \"node-red-editor\",\n \"grant_type\": \"password\",\n \"scope\": \"*\",\n \"username\": \"type or username\",\n \"password\": \"type your password\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":680,"wires":[["f0934e34.1bcd6"]]},{"id":"f0934e34.1bcd6","type":"http request","z":"cc38a811.11de2","name":"Token","method":"POST","ret":"txt","paytoqs":false,"url":"http://localhost:1880/auth/token","tls":"","persist":false,"proxy":"","authType":"","x":470,"y":680,"wires":[["cbad7e2b.6c1ac"]]},{"id":"cbad7e2b.6c1ac","type":"function","z":"cc38a811.11de2","name":"Confirm token","func":"var status = msg.statusCode;\nvar token = '';\nmsg.headers ={};\n\n\nswitch(status){\n case 200:\n node.log(\"Secure restart\");\n token = JSON.parse(msg.payload);\n token = 'Bearer '+token.access_token;\n msg.headers = {\n \"Authorization\": token,\n \"Node-RED-Deployment-Type\":\"reload\"\n }\nmsg.payload =\"\";\n break;\n case 204:\n node.log(\"Secure without restart\");\n global.set('result','\tSuccess - with no further content');\n break;\n case 400:\n node.warn(\"Bad request\");\n break;\n case 401:\n node.warn(\"Not authorized\");\n break;\n case 403:\n node.warn(\"Forbidden\");\n break;\n case 404:\n node.log(\"Unsecure restart\");\n msg.headers = {\n \"Node-RED-Deployment-Type\":\"reload\"\n }\n break;\n case 409:\n node.warn(\"Version mismatch\");\n break;\n case 500:\n node.error(\"Server Error\");\n break;\n default:\n node.warn(\"Unknown Error\");\n break;\n}\n\nmsg.payload = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":680,"y":680,"wires":[["34e0253c.498f22"]],"info":"Restart of Node-Red flows.\nWill check if the action needs security or not.\nNote: if the first 5 attemps return a statuscode 403 'forbidden'\nthen the server will break and only way to recover is then to\nrestart the service"},{"id":"34e0253c.498f22","type":"http request","z":"cc38a811.11de2","name":"Restart","method":"POST","ret":"txt","paytoqs":false,"url":"http://localhost:1880/flows","tls":"","persist":false,"proxy":"","authType":"","x":860,"y":680,"wires":[[]]},{"id":"11509da5.1813f2","type":"comment","z":"cc38a811.11de2","name":"Restart Flows when OPC UA connection is lost","info":"","x":200,"y":480,"wires":[]},{"id":"3fb7aba9.f81d34","type":"function","z":"cc38a811.11de2","name":"count connection loss","func":"var count=0;\nvar local=global.get('data') || {};\nif (local.OPC_con_loss===undefined)//test exists\n{\nlocal.OPC_con_loss=0;\n}\n\ncount = local.OPC_con_loss;\nif (msg.payload === 1)\n{\ncount = count + 1;\nlocal.OPC_con_loss = count;\nglobal.set('data',local);\n}\n\nif (local.OPC_con_loss > 5)\n{\nmsg.payload = 0;\n}\n\nmsg.con_loss = local.OPC_con_loss; \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": msg.payload,\n \"con_loss\": msg.con_loss,\n};\n\n","outputs":1,"noerr":0,"x":700,"y":620,"wires":[["ff963ba.def7d48","8fc0bc00.7f2438","619f2be0.909c44"]]},{"id":"63c6cc41.c4bbb4","type":"ui_toast","z":"cc38a811.11de2","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":1230,"y":620,"wires":[[]]},{"id":"ff963ba.def7d48","type":"rbe","z":"cc38a811.11de2","name":"","func":"deadband","gap":"","start":"","inout":"in","property":"payload","x":110,"y":680,"wires":[["c3c37f15.dbd6"]]},{"id":"8fc0bc00.7f2438","type":"switch","z":"cc38a811.11de2","name":"","property":"con_loss","propertyType":"msg","rules":[{"t":"gt","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":620,"wires":[["a5f99cdd.ec9b58"]]},{"id":"a5f99cdd.ec9b58","type":"function","z":"cc38a811.11de2","name":"Message","func":"\nmsg.payload = \"OPC UA Connection failed check cables!\"\n\nreturn msg;","outputs":1,"noerr":0,"x":1060,"y":620,"wires":[["63c6cc41.c4bbb4"]]},{"id":"13fe8b8d.a39fb4","type":"comment","z":"cc38a811.11de2","name":"HBW View","info":"","x":80,"y":840,"wires":[]},{"id":"619f2be0.909c44","type":"debug","z":"cc38a811.11de2","name":"OPC connection lost?","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":960,"y":580,"wires":[]},{"id":"f673eef.ae18a9","type":"OPCUA-IIoT-Inject","z":"cc38a811.11de2","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"x_Clean_Rack_HBW\"","datatypeName":""}],"x":90,"y":520,"wires":[["c38758b9.c5c21"]]},{"id":"c38758b9.c5c21","type":"OPCUA-IIoT-Listener","z":"cc38a811.11de2","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":520,"wires":[["3daf23cf.f2fb4c"]]},{"id":"3daf23cf.f2fb4c","type":"function","z":"cc38a811.11de2","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n {\"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Clean_Rack_HBW\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":520,"wires":[["1726826e.42e1b6"]]},{"id":"1726826e.42e1b6","type":"OPCUA-IIoT-Read","z":"cc38a811.11de2","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":520,"wires":[["eecdce4e.35b18"]]},{"id":"eecdce4e.35b18","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":770,"y":520,"wires":[[]]},{"id":"2788f23f.05cf66","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":15,"width":3,"height":1,"name":"","label":"Home positioning:","format":"","layout":"row-spread","x":150,"y":580,"wires":[]},{"id":"53314054.a909c","type":"ui_button","z":"b495b31e.fe8338","name":"","group":"2f117237.36aff6","order":17,"width":2,"height":1,"passthru":false,"label":"HOME","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":580,"wires":[["4ba1b27f.2078f4"]]},{"id":"4ba1b27f.2078f4","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Home_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":580,"wires":[["c2244e10.04ad78"]]},{"id":"c2244e10.04ad78","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":580,"wires":[["b5679967.39116"]]},{"id":"b5679967.39116","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":580,"wires":[[]]},{"id":"f9fc48e4.9a3b68","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":12,"width":3,"height":1,"name":"","label":"Start offset:","format":"","layout":"row-spread","x":130,"y":640,"wires":[]},{"id":"974adc30.c65b18","type":"ui_button","z":"b495b31e.fe8338","name":"","group":"2f117237.36aff6","order":14,"width":2,"height":1,"passthru":false,"label":"OFFSET","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":340,"y":640,"wires":[["7015f25.bb3f58c"]]},{"id":"7015f25.bb3f58c","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Offset\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":640,"wires":[["674ed7e9.51898"]]},{"id":"674ed7e9.51898","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":640,"wires":[["d166f9ba.ad6c08"]]},{"id":"d166f9ba.ad6c08","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":640,"wires":[[]]},{"id":"b6bcaa83.2ee618","type":"comment","z":"18869de1.83d712","name":"HMI - Calibrate SLD push out values","info":"","x":160,"y":40,"wires":[]},{"id":"9b68f1a6.7514a","type":"OPCUA-IIoT-Read","z":"18869de1.83d712","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":650,"y":80,"wires":[["4b39a2c4.a8556c","59bdda37.4e8d64"]]},{"id":"d2d7b546.3aac3","type":"function","z":"18869de1.83d712","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //Pos. Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Counter_Value_Calibration\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n //Pos. Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n //Pos White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":80,"wires":[["9b68f1a6.7514a"]]},{"id":"4b39a2c4.a8556c","type":"function","z":"18869de1.83d712","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n OUT_x_Counter_Value_Calibration: false,\n OUT_i_Calib_CounterValue_Blue: 1,\n OUT_i_Calib_CounterValue_Red: 1,\n OUT_i_Calib_CounterValue_White: 1,\n }\n\nConfData_out.OUT_x_Counter_Value_Calibration = msg.payload[0].value.value; //[0]\nConfData_out.OUT_i_Calib_CounterValue_Blue = msg.payload[1].value.value; //[1] \nConfData_out.OUT_i_Calib_CounterValue_Red = msg.payload[2].value.value; //[2] \nConfData_out.OUT_i_Calib_CounterValue_White = msg.payload[3].value.value; //[3]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":400,"y":140,"wires":[["73fce045.9c5a98","52b3f0d.002fa9","7529f883.d26d3","534785ee.1459c4"]]},{"id":"59bdda37.4e8d64","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":80,"wires":[[]]},{"id":"73fce045.9c5a98","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.OUT_i_Calib_CounterValue_Blue; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":200,"wires":[["bf865603.79cba8"]]},{"id":"52b3f0d.002fa9","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.OUT_i_Calib_CounterValue_Red; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":260,"wires":[["4280e7e1.c6d68"]]},{"id":"7529f883.d26d3","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.OUT_i_Calib_CounterValue_White; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":320,"wires":[["8417baa2.b5b3a"]]},{"id":"bf865603.79cba8","type":"ui_numeric","z":"18869de1.83d712","name":"","label":"pushout val. blue:","tooltip":"","group":"9a003a94.59357","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":870,"y":200,"wires":[["9b408ae5.691678"]]},{"id":"4280e7e1.c6d68","type":"ui_numeric","z":"18869de1.83d712","name":"","label":"pushout val. red:","tooltip":"","group":"9a003a94.59357","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":870,"y":260,"wires":[["f9742693.d0de88"]]},{"id":"8417baa2.b5b3a","type":"ui_numeric","z":"18869de1.83d712","name":"","label":"pushout val. white:","tooltip":"","group":"9a003a94.59357","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":870,"y":320,"wires":[["ee0d9f41.9aa95"]]},{"id":"9b408ae5.691678","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":200,"wires":[["bceafa80.b54478"]]},{"id":"f9742693.d0de88","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":260,"wires":[["f94c1450.3cd"]]},{"id":"ee0d9f41.9aa95","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":320,"wires":[["be30d758.a4b678"]]},{"id":"bceafa80.b54478","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":200,"wires":[["7ea812c3.ebe8c4"]]},{"id":"f94c1450.3cd","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":260,"wires":[["5bd3697e.8b167"]]},{"id":"7ea812c3.ebe8c4","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":200,"wires":[[]]},{"id":"5bd3697e.8b167","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":260,"wires":[[]]},{"id":"be30d758.a4b678","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":320,"wires":[["2561848b.e8268c"]]},{"id":"2561848b.e8268c","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":320,"wires":[[]]},{"id":"51d380d3.743858","type":"ui_text","z":"18869de1.83d712","group":"9a003a94.59357","order":5,"width":6,"height":1,"name":"","label":"Set calibration value:","format":"","layout":"row-spread","x":140,"y":420,"wires":[]},{"id":"df3c0ad7.6c78e8","type":"ui_button","z":"18869de1.83d712","name":"","group":"9a003a94.59357","order":7,"width":2,"height":1,"passthru":false,"label":"SET","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":310,"y":420,"wires":[["e22a46a0.13e348"]]},{"id":"e22a46a0.13e348","type":"function","z":"18869de1.83d712","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_CounterValues\"',\n \"datatypeName\":'Boolean'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":480,"y":420,"wires":[["4e6fce37.dd753"]]},{"id":"4e6fce37.dd753","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":650,"y":420,"wires":[["3a2102a8.265316"]]},{"id":"3a2102a8.265316","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":810,"y":420,"wires":[[]]},{"id":"fb6cad35.1a97b8","type":"comment","z":"18869de1.83d712","name":"HMI - set calibration values","info":"","x":130,"y":380,"wires":[]},{"id":"c338235a.9153","type":"OPCUA-IIoT-Inject","z":"18869de1.83d712","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Blue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Red\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_White\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"x_Counter_Value_Calibration\"","datatypeName":""}],"x":110,"y":80,"wires":[["dd668562.8d5a98"]]},{"id":"dd668562.8d5a98","type":"OPCUA-IIoT-Listener","z":"18869de1.83d712","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":80,"wires":[["d2d7b546.3aac3"]]},{"id":"5d4797f3.9f3d38","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":14,"width":9,"height":1,"name":"","label":"Threshold red-blue","format":"{{msg.payload.OUT_w_Threshold_Red_Blue}}","layout":"row-spread","x":750,"y":420,"wires":[]},{"id":"a99bd513.d45fe8","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":13,"width":9,"height":1,"name":"","label":"Threshold white-red","format":"{{msg.payload.OUT_w_Threshold_White_Red}}","layout":"row-spread","x":760,"y":460,"wires":[]},{"id":"55d8536f.062084","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":15,"width":5,"height":1,"name":"","label":"Calculate threshold:","format":"","layout":"row-spread","x":160,"y":760,"wires":[]},{"id":"bf82dc14.b5c5","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":17,"width":3,"height":1,"passthru":false,"label":"CALCULATE","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":350,"y":760,"wires":[["34181bef.baf07c"]]},{"id":"34181bef.baf07c","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Calculate_Value_Color\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":520,"y":760,"wires":[["7daa72f3.a1efdc"]]},{"id":"7daa72f3.a1efdc","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":760,"wires":[["4b84541a.7f6004"]]},{"id":"4b84541a.7f6004","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":760,"wires":[[]]},{"id":"35fe850f.0411f2","type":"comment","z":"d157eff7.cfa8","name":"Calculate threshold","info":"","x":110,"y":720,"wires":[]},{"id":"62f72ee6.8ab928","type":"ui_text","z":"cc38a811.11de2","group":"c863b9e5.ef9b6","order":4,"width":6,"height":1,"name":"","label":"Acknowledge Errors:","format":"","layout":"row-spread","x":140,"y":400,"wires":[]},{"id":"220cbc3c.02615c","type":"ui_button","z":"cc38a811.11de2","name":"","group":"c863b9e5.ef9b6","order":6,"width":2,"height":1,"passthru":false,"label":"ACK","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":310,"y":400,"wires":[["aabd31a.b36ef5"]]},{"id":"aabd31a.b36ef5","type":"function","z":"cc38a811.11de2","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_AcknowledgeButton\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":400,"wires":[["c98dcac2.854b7"]]},{"id":"c98dcac2.854b7","type":"OPCUA-IIoT-Write","z":"cc38a811.11de2","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":400,"wires":[["b3b942ef.d11a3"]]},{"id":"b3b942ef.d11a3","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":400,"wires":[[]]},{"id":"4aa6f019.b9a278","type":"comment","z":"cc38a811.11de2","name":"Acknowledge Errors","info":"","x":110,"y":360,"wires":[]},{"id":"b4629dac.722198","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Home_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":520,"wires":[["c4648d08.4ddf1"]]},{"id":"c4648d08.4ddf1","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":520,"wires":[["28f7f1e6.dff286"]]},{"id":"28f7f1e6.dff286","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":520,"wires":[[]]},{"id":"e2e8b027.48b018","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n\n\nif (wert === true)\n { \n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n }\nelse\n {\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n msg.valuesToWrite = [wert,0];\n }\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":80,"wires":[["f449215.0186ce"]]},{"id":"c09cb4bc.f63ca8","type":"function","z":"4c072751.507d3","name":"filter out Master Tag","func":"var new_msg = { payload: \"\" };\nvar output = \"\" ;\n\noutput = msg.payload.workpiece.id; \n\nif (output.length === 8)\n{\n new_msg.payload = \"Master Tag\";\n}\nelse\n{\n new_msg.payload = \"\";\n}\n\nreturn new_msg;","outputs":1,"noerr":0,"x":760,"y":300,"wires":[[]]},{"id":"534785ee.1459c4","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = false ;\n\n\noutput = msg.payload.OUT_x_Counter_Value_Calibration; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":140,"wires":[["307102f8.b2f8ae"]]},{"id":"307102f8.b2f8ae","type":"ui_switch","z":"18869de1.83d712","name":"","label":"Calibrate push out","tooltip":"","group":"9a003a94.59357","order":1,"width":9,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":870,"y":140,"wires":[["e85e0816.44758"]]},{"id":"e85e0816.44758","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n msg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Counter_Value_Calibration\"',\n \"datatypeName\":'Boolean'\n },\n ]\n msg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1080,"y":140,"wires":[["3b28ce3e.bb91f2"]]},{"id":"3b28ce3e.bb91f2","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":140,"wires":[["662b7d1e.5dde34"]]},{"id":"662b7d1e.5dde34","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":140,"wires":[[]]},{"id":"f2bb1786.5fa028","type":"catch","z":"bcaa3a6a.3bdbe8","name":"","scope":null,"uncaught":false,"x":100,"y":420,"wires":[["7e77d832.b6f4e8"]]},{"id":"7e77d832.b6f4e8","type":"function","z":"bcaa3a6a.3bdbe8","name":"Message","func":"\nmsg.payload = \"File handling caused error. Check 'save/load config' flow for further information!\"\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":420,"wires":[["93ec523f.77fa28"]]},{"id":"93ec523f.77fa28","type":"ui_toast","z":"bcaa3a6a.3bdbe8","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":450,"y":420,"wires":[[]]},{"id":"d3654882.ecbf48","type":"comment","z":"bcaa3a6a.3bdbe8","name":"file handling error","info":"","x":130,"y":380,"wires":[]},{"id":"80c20135.6bff78","type":"comment","z":"cc38a811.11de2","name":"Restart OPCUA/MQTT Interface","info":"","x":150,"y":740,"wires":[]},{"id":"6e0239de.d05058","type":"ui_text","z":"cc38a811.11de2","group":"c863b9e5.ef9b6","order":7,"width":6,"height":1,"name":"","label":"Restart OPCUA/MQTT Interface","format":"","layout":"row-spread","x":170,"y":780,"wires":[]},{"id":"95ff8b30.0a897","type":"ui_button","z":"cc38a811.11de2","name":"","group":"c863b9e5.ef9b6","order":9,"width":2,"height":1,"passthru":false,"label":"RESTART","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":410,"y":780,"wires":[["c3c37f15.dbd6"]]},{"id":"b76fdee.dc44d2","type":"ui_button","z":"cc38a811.11de2","name":"A1","group":"82956c45.28a928","order":6,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":410,"y":920,"wires":[[]]},{"id":"79a3a8ee.c20d68","type":"function","z":"cc38a811.11de2","name":"col. A1","func":"var state = msg.payload.HBW_A1_s_state\nvar type = msg.payload.HBW_A1_s_type\nvar id = msg.payload.HBW_A1_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.A1_color===undefined)//test exists\n {\n local.A1_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.A1_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.A1_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.A1_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.A1_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":270,"y":1140,"wires":[["b76fdee.dc44d2"]]},{"id":"65dfcb6.79622b4","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":2,"width":3,"height":1,"name":"","label":"1","format":"{{msg.payload}}","layout":"row-center","x":410,"y":880,"wires":[]},{"id":"681e6d80.9416dc","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":3,"width":3,"height":1,"name":"","label":"2","format":"{{msg.payload}}","layout":"row-center","x":570,"y":880,"wires":[]},{"id":"a1692660.369e8","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":4,"width":3,"height":1,"name":"","label":"3","format":"{{msg.payload}}","layout":"row-center","x":750,"y":880,"wires":[]},{"id":"77c361a.48ce5a","type":"ui_button","z":"cc38a811.11de2","name":"A2","group":"82956c45.28a928","order":7,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":570,"y":920,"wires":[[]]},{"id":"4d16f76f.48f3b8","type":"ui_button","z":"cc38a811.11de2","name":"A3","group":"82956c45.28a928","order":8,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":920,"wires":[[]]},{"id":"361f7395.bf1354","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":5,"width":1,"height":1,"name":"","label":"A","format":"{{msg.payload}}","layout":"row-spread","x":230,"y":920,"wires":[]},{"id":"13fdf4e8.0e7a03","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":9,"width":1,"height":1,"name":"","label":"B","format":"{{msg.payload}}","layout":"row-spread","x":230,"y":960,"wires":[]},{"id":"fa1f6852.2a682","type":"ui_button","z":"cc38a811.11de2","name":"B1","group":"82956c45.28a928","order":10,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":410,"y":960,"wires":[[]]},{"id":"961ce14f.afb18","type":"ui_button","z":"cc38a811.11de2","name":"B2","group":"82956c45.28a928","order":11,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":570,"y":960,"wires":[[]]},{"id":"b6a6d9dc.21db88","type":"ui_button","z":"cc38a811.11de2","name":"B3","group":"82956c45.28a928","order":12,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":960,"wires":[[]]},{"id":"192d536d.d913ed","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":13,"width":1,"height":1,"name":"","label":"C","format":"{{msg.payload}}","layout":"row-spread","x":230,"y":1000,"wires":[]},{"id":"13482650.5cc49a","type":"ui_button","z":"cc38a811.11de2","name":"C1","group":"82956c45.28a928","order":14,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":410,"y":1000,"wires":[[]]},{"id":"c1ec6eed.6c4ee8","type":"ui_button","z":"cc38a811.11de2","name":"C2","group":"82956c45.28a928","order":15,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":570,"y":1000,"wires":[[]]},{"id":"85939166.c57078","type":"ui_button","z":"cc38a811.11de2","name":"C3","group":"82956c45.28a928","order":16,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":1000,"wires":[[]]},{"id":"d40d2590.549f98","type":"OPCUA-IIoT-Inject","z":"cc38a811.11de2","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"","datatypeName":""}],"x":90,"y":1080,"wires":[["d2a85064.4fd0f"]]},{"id":"d2a85064.4fd0f","type":"OPCUA-IIoT-Listener","z":"cc38a811.11de2","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":220,"y":1080,"wires":[["d46bbb03.35203"]]},{"id":"d46bbb03.35203","type":"function","z":"cc38a811.11de2","name":"values to read","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //ROW A\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,0].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,0].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,0].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,1].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,1].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,1].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,2].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,2].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,2].\"s_type\"',\n \"datatypeName\":'STRING'},\n //ROW B\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,0].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,0].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,0].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,1].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,1].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,1].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,2].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,2].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,2].\"s_type\"',\n \"datatypeName\":'STRING'},\n //ROW C\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,0].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,0].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,0].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,1].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,1].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,1].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,2].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,2].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,2].\"s_type\"',\n \"datatypeName\":'STRING'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":1080,"wires":[["401e28fa.91088"]]},{"id":"401e28fa.91088","type":"OPCUA-IIoT-Read","z":"cc38a811.11de2","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":570,"y":1080,"wires":[["e7c2b1e3.49f008","bbbfb804.25f95"]]},{"id":"e7c2b1e3.49f008","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":770,"y":1080,"wires":[[]]},{"id":"4e54723a.247904","type":"debug","z":"cc38a811.11de2","name":"HBW Rack state","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":300,"y":1260,"wires":[]},{"id":"bbbfb804.25f95","type":"function","z":"cc38a811.11de2","name":"Format Out","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n\n //declaration\n //HBW ROW A\n HBW_A1_s_id: \"\", //[0]\n HBW_A1_s_state: \"\", //[1]\n HBW_A1_s_type: \"\", //[2]\n HBW_A2_s_id: \"\", //[3]\n HBW_A2_s_state: \"\", //[4]\n HBW_A2_s_type: \"\", //[5]\n HBW_A3_s_id: \"\", //[6]\n HBW_A3_s_state: \"\", //[7]\n HBW_A3_s_type: \"\", //[8]\n\n //HBW ROW B\n HBW_B1_s_id: \"\", //[9]\n HBW_B1_s_state: \"\", //[10]\n HBW_B1_s_type: \"\", //[11]\n HBW_B2_s_id: \"\", //[12]\n HBW_B2_s_state: \"\", //[13]\n HBW_B2_s_type: \"\", //[14]\n HBW_B3_s_id: \"\", //[15]\n HBW_B3_s_state: \"\", //[16]\n HBW_B3_s_type: \"\", //[17]\n\n //HBW ROW C\n HBW_C1_s_id: \"\", //[18]\n HBW_C1_s_state: \"\", //[19]\n HBW_C1_s_type: \"\", //[20]\n HBW_C2_s_id: \"\", //[21]\n HBW_C2_s_state: \"\", //[22]\n HBW_C2_s_type: \"\", //[23]\n HBW_C3_s_id: \"\", //[24]\n HBW_C3_s_state: \"\", //[25]\n HBW_C3_s_type: \"\", //[26]\n }\n\n//HBW ROW A\nConfData_out.HBW_A1_s_id = msg.payload[0].value.value; //[0] \nConfData_out.HBW_A1_s_state = msg.payload[1].value.value; //[1] \nConfData_out.HBW_A1_s_type = msg.payload[2].value.value; //[2]\n\nConfData_out.HBW_A2_s_id = msg.payload[3].value.value; //[3] \nConfData_out.HBW_A2_s_state = msg.payload[4].value.value; //[4] \nConfData_out.HBW_A2_s_type = msg.payload[5].value.value; //[5]\n\nConfData_out.HBW_A3_s_id = msg.payload[6].value.value; //[6] \nConfData_out.HBW_A3_s_state = msg.payload[7].value.value; //[7] \nConfData_out.HBW_A3_s_type = msg.payload[8].value.value; //[8]\n\n//HBW ROW B\nConfData_out.HBW_B1_s_id = msg.payload[9].value.value; //[9] \nConfData_out.HBW_B1_s_state = msg.payload[10].value.value; //[10] \nConfData_out.HBW_B1_s_type = msg.payload[11].value.value; //[11]\n\nConfData_out.HBW_B2_s_id = msg.payload[12].value.value; //[12] \nConfData_out.HBW_B2_s_state = msg.payload[13].value.value; //[13] \nConfData_out.HBW_B2_s_type = msg.payload[14].value.value; //[14]\n\nConfData_out.HBW_B3_s_id = msg.payload[15].value.value; //[15] \nConfData_out.HBW_B3_s_state = msg.payload[16].value.value; //[16] \nConfData_out.HBW_B3_s_type = msg.payload[17].value.value; //[17]\n\n//HBW ROW C\nConfData_out.HBW_C1_s_id = msg.payload[18].value.value; //[18] \nConfData_out.HBW_C1_s_state = msg.payload[19].value.value; //[19] \nConfData_out.HBW_C1_s_type = msg.payload[20].value.value; //[20]\n\nConfData_out.HBW_C2_s_id = msg.payload[21].value.value; //[21] \nConfData_out.HBW_C2_s_state = msg.payload[22].value.value; //[22] \nConfData_out.HBW_C2_s_type = msg.payload[23].value.value; //[23]\n\nConfData_out.HBW_C3_s_id = msg.payload[24].value.value; //[24] \nConfData_out.HBW_C3_s_state = msg.payload[25].value.value; //[25] \nConfData_out.HBW_C3_s_type = msg.payload[26].value.value; //[26]\n\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":110,"y":1140,"wires":[["4e54723a.247904","79a3a8ee.c20d68","a5572c8f.c64f4","4ee7719.54fac9","163cc067.77a568","8a0d7436.fc4e9","b22b13ba.e01e18","b268839d.4e6f4","3b2820b0.daf038","390bb559.e9aa32"]]},{"id":"a5572c8f.c64f4","type":"function","z":"cc38a811.11de2","name":"col. A2","func":"var state = msg.payload.HBW_A2_s_state\nvar type = msg.payload.HBW_A2_s_type\nvar id = msg.payload.HBW_A2_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.A2_color===undefined)//test exists\n {\n local.A2_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.A2_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.A2_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.A2_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.A2_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":430,"y":1140,"wires":[["77c361a.48ce5a"]]},{"id":"4ee7719.54fac9","type":"function","z":"cc38a811.11de2","name":"col. A3","func":"var state = msg.payload.HBW_A3_s_state\nvar type = msg.payload.HBW_A3_s_type\nvar id = msg.payload.HBW_A3_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.A3_color===undefined)//test exists\n {\n local.A3_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.A3_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.A3_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.A3_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.A3_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":1140,"wires":[["4d16f76f.48f3b8"]]},{"id":"163cc067.77a568","type":"function","z":"cc38a811.11de2","name":"col. B1","func":"var state = msg.payload.HBW_B1_s_state\nvar type = msg.payload.HBW_B1_s_type\nvar id = msg.payload.HBW_B1_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.B1_color===undefined)//test exists\n {\n local.B1_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.B1_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.B1_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.B1_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.B1_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":270,"y":1180,"wires":[["fa1f6852.2a682"]]},{"id":"8a0d7436.fc4e9","type":"function","z":"cc38a811.11de2","name":"col. B2","func":"var state = msg.payload.HBW_B2_s_state\nvar type = msg.payload.HBW_B2_s_type\nvar id = msg.payload.HBW_B2_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.B2_color===undefined)//test exists\n {\n local.B2_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.B2_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.B2_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.B2_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.B2_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":430,"y":1180,"wires":[["961ce14f.afb18"]]},{"id":"b22b13ba.e01e18","type":"function","z":"cc38a811.11de2","name":"col. B3","func":"var state = msg.payload.HBW_B3_s_state\nvar type = msg.payload.HBW_B3_s_type\nvar id = msg.payload.HBW_B3_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.B3_color===undefined)//test exists\n {\n local.B3_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.B3_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.B3_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.B3_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.B3_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":1180,"wires":[["b6a6d9dc.21db88"]]},{"id":"6278b51f.416c94","type":"comment","z":"cc38a811.11de2","name":"End","info":"","x":70,"y":1320,"wires":[]},{"id":"b268839d.4e6f4","type":"function","z":"cc38a811.11de2","name":"col. C1","func":"var state = msg.payload.HBW_C1_s_state\nvar type = msg.payload.HBW_C1_s_type\nvar id = msg.payload.HBW_C1_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.C1_color===undefined)//test exists\n {\n local.C1_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.C1_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.C1_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.C1_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.C1_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":280,"y":1220,"wires":[["13482650.5cc49a"]]},{"id":"3b2820b0.daf038","type":"function","z":"cc38a811.11de2","name":"col. C2","func":"var state = msg.payload.HBW_C2_s_state\nvar type = msg.payload.HBW_C2_s_type\nvar id = msg.payload.HBW_C2_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.C2_color===undefined)//test exists\n {\n local.C2_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.C2_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.C2_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.C2_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.C2_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":440,"y":1220,"wires":[["c1ec6eed.6c4ee8"]]},{"id":"390bb559.e9aa32","type":"function","z":"cc38a811.11de2","name":"col. C3","func":"var state = msg.payload.HBW_C3_s_state\nvar type = msg.payload.HBW_C3_s_type\nvar id = msg.payload.HBW_C3_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.C3_color===undefined)//test exists\n {\n local.C3_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.C3_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.C3_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.C3_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.C3_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":600,"y":1220,"wires":[["85939166.c57078"]]},{"id":"db1538fd.3adec8","type":"function","z":"ac6244e8.d50e1","name":"Filter White","func":"var white_available = 0\nvar local=global.get('HBW_Rack_state') || {};\n\nif (local.A1_color === \"white\")\n {\n white_available = 1;\n }\nif (local.A2_color === \"white\")\n {\n white_available = 1;\n }\nif (local.A3_color === \"white\")\n {\n white_available = 1;\n }\nif (local.B1_color === \"white\")\n {\n white_available = 1;\n }\nif (local.B2_color === \"white\")\n {\n white_available = 1;\n }\nif (local.B3_color === \"white\")\n {\n white_available = 1;\n }\nif (local.C1_color === \"white\")\n {\n white_available = 1;\n }\nif (local.C2_color === \"white\")\n {\n white_available = 1;\n }\nif (local.C3_color === \"white\")\n {\n white_available = 1;\n }\n\nif (white_available === 1)\n {\n msg.payload.type = \"WHITE\";\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":660,"wires":[["1018789b.7e3fbf"]]},{"id":"6b53d33a.be9a14","type":"function","z":"ac6244e8.d50e1","name":"Filter Red","func":"var red_available = 0\nvar local=global.get('HBW_Rack_state') || {};\n\nif (local.A1_color === \"red\")\n {\n red_available = 1;\n }\nif (local.A2_color === \"red\")\n {\n red_available = 1;\n }\nif (local.A3_color === \"red\")\n {\n red_available = 1;\n }\nif (local.B1_color === \"red\")\n {\n red_available = 1;\n }\nif (local.B2_color === \"red\")\n {\n red_available = 1;\n }\nif (local.B3_color === \"red\")\n {\n red_available = 1;\n }\nif (local.C1_color === \"red\")\n {\n red_available = 1;\n }\nif (local.C2_color === \"red\")\n {\n red_available = 1;\n }\nif (local.C3_color === \"red\")\n {\n red_available = 1;\n }\n\nif (red_available === 1)\n {\n msg.payload.type = \"RED\";\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":700,"wires":[["1018789b.7e3fbf"]]},{"id":"8d108965.865058","type":"function","z":"ac6244e8.d50e1","name":"Filter Blue","func":"var blue_available = 0\nvar local=global.get('HBW_Rack_state') || {};\n\nif (local.A1_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.A2_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.A3_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.B1_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.B2_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.B3_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.C1_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.C2_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.C3_color === \"blue\")\n {\n blue_available = 1;\n }\n\nif (blue_available === 1)\n {\n msg.payload.type = \"BLUE\";\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":740,"wires":[["1018789b.7e3fbf"]]},{"id":"edff04e4.d46378","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":440,"wires":[["36f7c27f.217056"]]},{"id":"1018789b.7e3fbf","type":"switch","z":"ac6244e8.d50e1","name":"","property":"payload.type","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":590,"y":660,"wires":[["ea5cc20e.8a21e8"]]},{"id":"1a5358f5.542ca7","type":"status","z":"87526827.008ad8","name":"","scope":["1c70e1b9.c34746"],"x":100,"y":160,"wires":[["ef1f4707.88e9a","a73860df.fbac48"]]},{"id":"ef1f4707.88e9a","type":"function","z":"87526827.008ad8","name":"mqtt connected?","func":"if (msg.status.fill === \"green\")\n {\n msg.payload = {\"on\":true,\"fps\":2};\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;\n","outputs":1,"noerr":0,"x":290,"y":360,"wires":[["87c0d652.f0ef48"]]},{"id":"87c0d652.f0ef48","type":"switch","z":"87526827.008ad8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":360,"wires":[["ca38a602.b2a778"]]},{"id":"a73860df.fbac48","type":"function","z":"87526827.008ad8","name":"mqtt connected?","func":"if (msg.status.fill === \"green\")\n {\n msg.payload = {\"period\":3};\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;\n","outputs":1,"noerr":0,"x":290,"y":160,"wires":[["4a6404f4.6fe6ac"]]},{"id":"4a6404f4.6fe6ac","type":"switch","z":"87526827.008ad8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":160,"wires":[["74c2fc8f.82a9ec","7390b7be.8f9e08"]]},{"id":"98746a57.791448","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/i/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":2400,"wires":[["1d48181.44184e8","3dcef16a.9c6b86"]]},{"id":"1d48181.44184e8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2360,"wires":[]},{"id":"3dcef16a.9c6b86","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2400,"wires":[["fd424d35.584e18"]]},{"id":"fd424d35.584e18","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2360,"wires":[]},{"id":"81783bda.cf6638","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":420,"wires":[[]]},{"id":"a9af7a2.249d108","type":"comment","z":"4c072751.507d3","name":"NFC \"local in\" refreshes cloud dashboard","info":"","x":180,"y":300,"wires":[]},{"id":"ce5f008d.321c5","type":"mqtt out","z":"4c072751.507d3","name":"","topic":"f/i/nfc/ds","qos":"0","retain":"","broker":"788959e0.92f718","x":460,"y":360,"wires":[]},{"id":"31ae2fb.2c081d","type":"debug","z":"4c072751.507d3","name":"MQTT Local in","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":480,"y":320,"wires":[]},{"id":"6181d227.4a0744","type":"switch","z":"4c072751.507d3","name":"","property":"payload.workpiece.state","propertyType":"msg","rules":[{"t":"neq","v":"NONE","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":360,"wires":[["ce5f008d.321c5","31ae2fb.2c081d"]]}] \ No newline at end of file +[{"id":"9f657cfc.c7c8a8","type":"tab","label":"MQTT - pub","disabled":false,"info":""},{"id":"ac6244e8.d50e1","type":"tab","label":"MQTT - sub","disabled":false,"info":""},{"id":"87526827.008ad8","type":"tab","label":"MQTT - conf","disabled":false,"info":""},{"id":"d8972c0.715b4d8","type":"tab","label":"Interface Dashboard","disabled":false,"info":""},{"id":"1bbb875f.799c41","type":"tab","label":"TXT Data","disabled":false,"info":""},{"id":"b973f4d9.d701f8","type":"tab","label":"Pan Tilt Unit","disabled":false,"info":""},{"id":"4c072751.507d3","type":"tab","label":"NFC Reader","disabled":false,"info":""},{"id":"f27e9a4.d7269e8","type":"tab","label":"Order/Stock HBW","disabled":false,"info":""},{"id":"cc38a811.11de2","type":"tab","label":"HMI - Main","disabled":false,"info":""},{"id":"40d33793.7558d8","type":"tab","label":"HMI - HBW Positions","disabled":false,"info":""},{"id":"eac85a93.4f949","type":"tab","label":"HMI - run HBW axis","disabled":false,"info":""},{"id":"881fbb6.2d64cc8","type":"tab","label":"HMI - VGR Positions","disabled":false,"info":""},{"id":"b495b31e.fe8338","type":"tab","label":"HMI - run VGR axis","disabled":false,"info":""},{"id":"96ccbb8c.f85068","type":"tab","label":"HMI - SSC Positions","disabled":false,"info":""},{"id":"410fcde3.56d53c","type":"tab","label":"HMI - run SSC (camera) axis","disabled":false,"info":""},{"id":"d157eff7.cfa8","type":"tab","label":"HMI - Calibration color sensor","disabled":false,"info":""},{"id":"18869de1.83d712","type":"tab","label":"HMI - Calibration SLD pushout","disabled":false,"info":""},{"id":"bcaa3a6a.3bdbe8","type":"tab","label":"Save/Load Config Data","disabled":false,"info":""},{"id":"788959e0.92f718","type":"mqtt-broker","z":"","name":"","broker":"192.168.0.10","port":"1883","clientid":"Node-RED","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"7a04da17.be3684","type":"ui_group","z":"","name":"Monitoring - Temperature","tab":"7123cfb3.70e918","order":2,"disp":true,"width":"14","collapse":true},{"id":"127b3360.4e5a15","type":"ui_tab","z":"","name":"Factory - Overview","icon":"dashboard","order":9,"disabled":false,"hidden":false},{"id":"8e33f951.9d5c28","type":"ui_base","theme":{"name":"theme-custom","lightTheme":{"default":"#0094CE","baseColor":"#0069b4","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#0080c0","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"fischertechnik","default":"#4B7930","baseColor":"#0069b4","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","reset":false},"themeState":{"base-color":{"default":"#4B7930","value":"#0069b4","edited":true},"page-titlebar-backgroundColor":{"value":"#0069b4","edited":false},"page-backgroundColor":{"value":"#ebebeb","edited":true},"page-sidebar-backgroundColor":{"value":"#ebebeb","edited":true},"group-textColor":{"value":"#0069b4","edited":true},"group-borderColor":{"value":"#c8c8c8","edited":true},"group-backgroundColor":{"value":"#fdfdfd","edited":true},"widget-textColor":{"value":"#060606","edited":true},"widget-backgroundColor":{"value":"#0069b4","edited":false},"widget-borderColor":{"value":"#fcfcfc","edited":true},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"fischertechnik Node-RED Dashboard","hideToolbar":"false","allowSwipe":"true","lockMenu":"true","allowTempTheme":"true","dateFormat":"DD-MM-YYYY HH:MM:SS","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":1,"py":1}}},{"id":"eb3550b8.f56fd","type":"ui_group","z":"","name":"Order","tab":"127b3360.4e5a15","order":4,"disp":true,"width":8,"collapse":true},{"id":"bdcd0b28.1ddab","type":"ui_spacer","name":"spacer","group":"","order":1,"width":1,"height":1},{"id":"5911e125.55d648","type":"ui_spacer","name":"spacer","group":"","order":1,"width":1,"height":1},{"id":"4ca4e42e.6fa77c","type":"ui_group","z":"","name":"Camera","tab":"127b3360.4e5a15","order":1,"disp":true,"width":"8","collapse":true},{"id":"3ff02105.92e276","type":"ui_group","z":"","name":"Monitoring - Humidity","tab":"7123cfb3.70e918","order":3,"disp":true,"width":"14","collapse":true},{"id":"d8977677.16e66","type":"ui_group","z":"","name":"Monitoring - Pressure","tab":"7123cfb3.70e918","order":4,"disp":true,"width":"14","collapse":true},{"id":"21e46307.e38724","type":"ui_group","z":"","name":"Monitoring - Air Quality","tab":"7123cfb3.70e918","order":5,"disp":true,"width":"14","collapse":true},{"id":"ef8cbdb6.45dfb8","type":"ui_spacer","name":"spacer","group":"","order":1,"width":1,"height":1},{"id":"12c7d408.dba2d4","type":"ui_link","z":"","name":"ft Cloud","link":"https://www.fischertechnik-cloud.com","icon":"open_in_browser","target":"newtab","order":8},{"id":"3f05f1d2.27c6d6","type":"ui_group","z":"","name":"Monitoring - Brightness","tab":"7123cfb3.70e918","order":1,"disp":true,"width":"14","collapse":true},{"id":"a811398d.c6fe18","type":"ui_group","z":"","name":"Monitoring - Sensors","tab":"127b3360.4e5a15","order":3,"disp":true,"width":8,"collapse":true},{"id":"7123cfb3.70e918","type":"ui_tab","z":"","name":"Factory - Graph","icon":"dashboard","order":10,"disabled":false,"hidden":false},{"id":"81f41a6c.c5594","type":"ui_group","z":"","name":"Camera Control","tab":"127b3360.4e5a15","order":2,"disp":true,"width":8,"collapse":false},{"id":"6bb8ca6d.ccfd2c","type":"ui_group","z":"","name":"Factory Control","tab":"127b3360.4e5a15","order":5,"disp":true,"width":8,"collapse":false},{"id":"74a7d84.2350d28","type":"OPCUA-IIoT-Connector","z":"","discoveryUrl":"","endpoint":"opc.tcp://192.168.0.1:4840","keepSessionAlive":true,"loginEnabled":false,"securityPolicy":"None","securityMode":"NONE","name":"SIEMENS PLC@192.168.0.1","showErrors":true,"individualCerts":false,"publicCertificateFile":"","privateKeyFile":"","defaultSecureTokenLifetime":"","endpointMustExist":false,"autoSelectRightEndpoint":false,"strategyMaxRetry":"","strategyInitialDelay":"","strategyMaxDelay":"","strategyRandomisationFactor":"","requestedSessionTimeout":"","connectionStartDelay":"","reconnectDelay":"","maxBadSessionRequests":""},{"id":"f8b787c3.8b4878","type":"ui_spacer","name":"spacer","group":"","order":2,"width":2,"height":1},{"id":"c911b629.093fe8","type":"ui_spacer","name":"spacer","group":"","order":4,"width":2,"height":1},{"id":"f048c673.d5d95","type":"ui_spacer","name":"spacer","group":"","order":6,"width":2,"height":1},{"id":"a3ba7fbb.8f5ce8","type":"ui_tab","z":"","name":"HMI - HBW Positions","icon":"dashboard","order":3,"disabled":false,"hidden":false},{"id":"7f600873.485d1","type":"ui_group","z":"","name":"HBW","tab":"a3ba7fbb.8f5ce8","order":1,"disp":true,"width":"9","collapse":false},{"id":"a3007d55.6b202","type":"ui_group","z":"","name":"Position Belt","tab":"a3ba7fbb.8f5ce8","order":4,"disp":true,"width":9,"collapse":true},{"id":"8ab9db0e.d06c28","type":"ui_tab","z":"","name":"HMI - VGR Positions","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"8cacc4a1.8c2a2","type":"ui_group","z":"","name":"VGR","tab":"8ab9db0e.d06c28","order":1,"disp":true,"width":"9","collapse":false},{"id":"5353e4b6.26835c","type":"ui_group","z":"","name":"Position HBW","tab":"8ab9db0e.d06c28","order":7,"disp":true,"width":9,"collapse":true},{"id":"45b2e95e.e9c128","type":"ui_group","z":"","name":"Position DSI","tab":"8ab9db0e.d06c28","order":5,"disp":true,"width":9,"collapse":true},{"id":"b2b71f4e.623de8","type":"ui_group","z":"","name":"Position DSO","tab":"8ab9db0e.d06c28","order":6,"disp":true,"width":9,"collapse":true},{"id":"9fd654b1.4a21b","type":"ui_group","z":"","name":"Position Color Reader","tab":"8ab9db0e.d06c28","order":4,"disp":true,"width":9,"collapse":true},{"id":"b38d78a9.9c40e","type":"ui_group","z":"","name":"Position MPO","tab":"8ab9db0e.d06c28","order":8,"disp":true,"width":9,"collapse":true},{"id":"8505f695.7df0c8","type":"ui_group","z":"","name":"Position NFC","tab":"8ab9db0e.d06c28","order":9,"disp":true,"width":9,"collapse":true},{"id":"473e26bd.22581","type":"ui_group","z":"","name":"Position Rack","tab":"a3ba7fbb.8f5ce8","order":5,"disp":true,"width":"9","collapse":true},{"id":"6e361096.7da8e8","type":"ui_group","z":"","name":"Position Rack Row B","tab":"a3ba7fbb.8f5ce8","order":7,"disp":true,"width":"9","collapse":true},{"id":"9d24bd1.772d74","type":"ui_group","z":"","name":"Position Rack Row C","tab":"a3ba7fbb.8f5ce8","order":8,"disp":true,"width":"9","collapse":true},{"id":"f568aa06.b25238","type":"ui_tab","z":"","name":"HMI - Config Data","icon":"dashboard","order":7,"disabled":false,"hidden":false},{"id":"6bec7372.842fa4","type":"ui_group","z":"","name":"Save Data","tab":"f568aa06.b25238","order":1,"disp":true,"width":"6","collapse":false},{"id":"b5a8ed55.950378","type":"ui_group","z":"","name":"Load Data","tab":"f568aa06.b25238","order":2,"disp":true,"width":"6","collapse":false},{"id":"afaa8b63.c29268","type":"ui_group","z":"","name":"Position SLD","tab":"8ab9db0e.d06c28","order":11,"disp":true,"width":"9","collapse":true},{"id":"6357a333.f0fea4","type":"ui_group","z":"","name":"Position NiO","tab":"8ab9db0e.d06c28","order":10,"disp":true,"width":"9","collapse":true},{"id":"ea4864b0.48b81","type":"ui_group","z":"","name":"Position Rack Row A","tab":"a3ba7fbb.8f5ce8","order":6,"disp":true,"width":"9","collapse":true},{"id":"41be4504.78be34","type":"ui_tab","z":"","name":"HMI - SSC Positions","icon":"dashboard","order":5,"disabled":false,"hidden":false},{"id":"21394b3d.7fa8b4","type":"ui_group","z":"","name":"SSC","tab":"41be4504.78be34","order":1,"disp":true,"width":"9","collapse":false},{"id":"b07ee037.6d618","type":"ui_group","z":"","name":"Position Centre","tab":"41be4504.78be34","order":3,"disp":true,"width":"9","collapse":true},{"id":"7a5f99d9.a1dfe","type":"ui_group","z":"","name":"Position HBW","tab":"41be4504.78be34","order":4,"disp":true,"width":"9","collapse":true},{"id":"afad8954.d2ebc","type":"ui_spacer","name":"spacer","group":"","order":1,"width":5,"height":1},{"id":"2a0fe601.aef032","type":"ui_spacer","name":"spacer","group":"","order":2,"width":5,"height":1},{"id":"30a4ede4.d9de6a","type":"ui_spacer","name":"spacer","group":"","order":3,"width":5,"height":1},{"id":"7b144e6.268db3","type":"ui_spacer","name":"spacer","group":"","order":4,"width":5,"height":1},{"id":"e0793e27.57538","type":"ui_spacer","name":"spacer","group":"","order":5,"width":5,"height":1},{"id":"26b2794d.9c66e6","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":1,"width":5,"height":1},{"id":"9d37fb2a.cd225","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":2,"width":5,"height":1},{"id":"13d51a83.482805","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":3,"width":5,"height":1},{"id":"b7575961.1ba058","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":4,"width":5,"height":1},{"id":"e2f3c2ef.503bd8","type":"ui_spacer","name":"spacer","group":"5891725e.8cb84c","order":5,"width":5,"height":1},{"id":"9608e0f4.098128","type":"ui_group","z":"","name":"move to Position","tab":"a3ba7fbb.8f5ce8","order":3,"disp":true,"width":"6","collapse":false},{"id":"ef1d79ce.88a2d8","type":"ui_spacer","name":"spacer","group":"","order":1,"width":5,"height":1},{"id":"2e8749b7.a37e5e","type":"ui_spacer","name":"spacer","group":"","order":2,"width":5,"height":1},{"id":"962d8511.861798","type":"ui_spacer","name":"spacer","group":"","order":3,"width":5,"height":1},{"id":"c3a269dc.f0329","type":"ui_spacer","name":"spacer","group":"","order":4,"width":5,"height":1},{"id":"b9404ca8.05071","type":"ui_spacer","name":"spacer","group":"","order":5,"width":5,"height":1},{"id":"2f117237.36aff6","type":"ui_group","z":"","name":"move to Position","tab":"8ab9db0e.d06c28","order":3,"disp":true,"width":"6","collapse":false},{"id":"d418765.9bb9f88","type":"ui_group","z":"","name":"move to position","tab":"41be4504.78be34","order":2,"disp":true,"width":"6","collapse":false},{"id":"72acbed0.619f98","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":1,"width":5,"height":1},{"id":"41107a06.3e322c","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":2,"width":5,"height":1},{"id":"e6b17adf.53c628","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":3,"width":5,"height":1},{"id":"8e4312e4.77f84","type":"ui_spacer","name":"spacer","group":"7242e8a7.b95a4","order":4,"width":5,"height":1},{"id":"6add451a.91479c","type":"ui_spacer","name":"spacer","group":"","order":1,"width":6,"height":1},{"id":"d7d91ca7.0d9938","type":"ui_spacer","name":"spacer","group":"","order":2,"width":6,"height":1},{"id":"42691401.f657f4","type":"ui_spacer","name":"spacer","group":"","order":6,"width":6,"height":1},{"id":"16075f1d.0247e1","type":"ui_spacer","name":"spacer","group":"","order":2,"width":1,"height":1},{"id":"d3f29f15.6606d","type":"ui_spacer","name":"spacer","group":"","order":4,"width":1,"height":1},{"id":"3ab9a62d.05b032","type":"ui_spacer","name":"spacer","group":"","order":4,"width":1,"height":1},{"id":"f107a9a6.5d77f8","type":"ui_spacer","name":"spacer","group":"","order":7,"width":1,"height":1},{"id":"c11014fb.73009","type":"ui_spacer","name":"spacer","group":"","order":6,"width":1,"height":1},{"id":"8600dc5f.358488","type":"ui_tab","z":"","name":"HMI - Calibration","icon":"dashboard","order":6,"disabled":false,"hidden":false},{"id":"4dd8e20b.5429ac","type":"ui_group","z":"","name":"Color sensor calibration","tab":"8600dc5f.358488","order":2,"disp":true,"width":"9","collapse":true},{"id":"9a003a94.59357","type":"ui_group","z":"","name":"SLD push out counter","tab":"8600dc5f.358488","order":3,"disp":true,"width":"9","collapse":true},{"id":"1e4a1f68.4051f1","type":"ui_tab","z":"","name":"HMI - Main","icon":"dashboard","order":1,"disabled":false,"hidden":false},{"id":"4334b06.5f5075","type":"ui_group","z":"","name":"Camera view","tab":"1e4a1f68.4051f1","order":1,"disp":true,"width":"10","collapse":false},{"id":"c863b9e5.ef9b6","type":"ui_group","z":"","name":"Factory Control via OPCUA","tab":"1e4a1f68.4051f1","order":2,"disp":true,"width":"10","collapse":false},{"id":"11b8901b.4c9138","type":"ui_spacer","name":"spacer","group":"d418765.9bb9f88","order":1,"width":6,"height":1},{"id":"116af58f.f9d0ca","type":"ui_spacer","name":"spacer","group":"d418765.9bb9f88","order":7,"width":1,"height":1},{"id":"10573da9.7cc422","type":"ui_spacer","name":"spacer","group":"d418765.9bb9f88","order":10,"width":1,"height":1},{"id":"a92b0805.e714f","type":"ui_spacer","name":"spacer","group":"7f600873.485d1","order":1,"width":9,"height":1},{"id":"bc56fad3.9dca88","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":6,"width":1,"height":1},{"id":"4036f73.1f1ac88","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":9,"width":1,"height":1},{"id":"b2ced7c4.ed5cd8","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":12,"width":1,"height":1},{"id":"67e800c0.b1d308","type":"ui_spacer","name":"spacer","group":"9608e0f4.098128","order":15,"width":1,"height":1},{"id":"204d9775.013ef8","type":"ui_spacer","name":"spacer","group":"4dd8e20b.5429ac","order":3,"width":9,"height":1},{"id":"d4d09a1b.af0e38","type":"ui_spacer","name":"spacer","group":"4dd8e20b.5429ac","order":12,"width":9,"height":1},{"id":"f522b723.a3425","type":"ui_spacer","name":"spacer","group":"4dd8e20b.5429ac","order":16,"width":1,"height":1},{"id":"feaf73f.11bd19","type":"ui_spacer","name":"spacer","group":"9a003a94.59357","order":6,"width":1,"height":1},{"id":"82956c45.28a928","type":"ui_group","z":"","name":"HBW View","tab":"1e4a1f68.4051f1","order":3,"disp":true,"width":10,"collapse":false},{"id":"ba673a61.c513c8","type":"ui_spacer","name":"spacer","group":"c863b9e5.ef9b6","order":2,"width":2,"height":1},{"id":"c3f726f5.f6cd78","type":"ui_spacer","name":"spacer","group":"c863b9e5.ef9b6","order":5,"width":2,"height":1},{"id":"39d20017.924018","type":"ui_spacer","name":"spacer","group":"c863b9e5.ef9b6","order":8,"width":2,"height":1},{"id":"7f6177b6.e28bf","type":"ui_spacer","name":"spacer","group":"82956c45.28a928","order":1,"width":1,"height":1},{"id":"88a35404.8a459","type":"ui_spacer","name":"spacer","group":"81f41a6c.c5594","order":10,"width":4,"height":1},{"id":"7348f57a.29b584","type":"ui_spacer","name":"spacer","group":"eb3550b8.f56fd","order":2,"width":1,"height":1},{"id":"ee183995.168","type":"ui_spacer","name":"spacer","group":"eb3550b8.f56fd","order":4,"width":1,"height":1},{"id":"bbb46fb7.68f028","type":"ui_spacer","name":"spacer","group":"6bb8ca6d.ccfd2c","order":3,"width":2,"height":1},{"id":"77c2cef6.2a8958","type":"ui_spacer","name":"spacer","group":"6bb8ca6d.ccfd2c","order":6,"width":6,"height":1},{"id":"8b3dcb5d.9af8a","type":"ui_spacer","name":"spacer","group":"8cacc4a1.8c2a2","order":1,"width":9,"height":1},{"id":"64c7774e.b089f8","type":"ui_spacer","name":"spacer","group":"8cacc4a1.8c2a2","order":2,"width":9,"height":1},{"id":"67fb2afb.e0ef74","type":"ui_spacer","name":"spacer","group":"2f117237.36aff6","order":7,"width":1,"height":1},{"id":"6cae479b.257738","type":"ui_spacer","name":"spacer","group":"2f117237.36aff6","order":10,"width":1,"height":1},{"id":"70f6f249.8be7ac","type":"ui_spacer","name":"spacer","group":"2f117237.36aff6","order":13,"width":1,"height":1},{"id":"39d2d183.ba4c06","type":"ui_spacer","name":"spacer","group":"afaa8b63.c29268","order":4,"width":9,"height":1},{"id":"242237b0.8c5b2","type":"ui_spacer","name":"spacer","group":"afaa8b63.c29268","order":8,"width":9,"height":1},{"id":"60d28ced.b3f5bc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/bme680","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":140,"wires":[["812f38bd.a07a9","c0b75c24.e01498","620b8b6c.be3d9c","2fb6c01b.b3c6e8","fbf6f326.070978","d302dca8.3bf48","75ff536b.21e514"]]},{"id":"b0bccee6.26251","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"7a04da17.be3684","order":1,"width":0,"height":0,"label":"Temperature Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"-10","ymax":"30","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":540,"y":300,"wires":[[]]},{"id":"812f38bd.a07a9","type":"function","z":"9f657cfc.c7c8a8","name":"temp","func":"msg.payload = msg.payload.t;\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":260,"wires":[["b0bccee6.26251","601c49f6.4208e8","579fb2b0.826a04"]]},{"id":"601c49f6.4208e8","type":"debug","z":"9f657cfc.c7c8a8","name":"t","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":220,"wires":[]},{"id":"c0b75c24.e01498","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":140,"wires":[]},{"id":"620b8b6c.be3d9c","type":"function","z":"9f657cfc.c7c8a8","name":"humidity","func":"msg.payload = msg.payload.h;\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":380,"wires":[["95db81b0.49d48","e04a7125.35a6a8","46cf4486.b43974"]]},{"id":"95db81b0.49d48","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"3ff02105.92e276","order":1,"width":0,"height":0,"label":"Humidity Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":520,"y":420,"wires":[[]]},{"id":"e04a7125.35a6a8","type":"debug","z":"9f657cfc.c7c8a8","name":"h","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":340,"wires":[]},{"id":"2fb6c01b.b3c6e8","type":"function","z":"9f657cfc.c7c8a8","name":"pressure","func":"msg.payload = msg.payload.p;\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":500,"wires":[["b776b2be.f4a058","1e948a44.85511e","966b2b37.9ab568"]]},{"id":"fbf6f326.070978","type":"function","z":"9f657cfc.c7c8a8","name":"air quality index","func":"msg.payload = msg.payload.iaq;\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":620,"wires":[["eb69416b.607a78","3b21cfb.7b73e3","14a737a4.122f48"]]},{"id":"d7e8b055.8350c8","type":"comment","z":"9f657cfc.c7c8a8","name":"https://github.com/fischertechnik/txt_training_factory/blob/master/TxtSmartFactoryLib/doc/MqttInterface.md","info":"","x":380,"y":40,"wires":[]},{"id":"75ff536b.21e514","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\n//msg.payload = date;\nmsg.payload = date.toLocaleString('de-DE', { hour12:false });\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":180,"wires":[["4e7fa4cb.3844ec","84101a2.3b1f068"]]},{"id":"d302dca8.3bf48","type":"function","z":"9f657cfc.c7c8a8","name":"air quality score","func":"msg.payload = msg.payload.aq;\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":740,"wires":[["65fcd9c3.82e108","c820432.85c4fc"]]},{"id":"1e948a44.85511e","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"d8977677.16e66","order":1,"width":0,"height":0,"label":"Pressure Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"900","ymax":"1100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":520,"y":540,"wires":[[]]},{"id":"b776b2be.f4a058","type":"debug","z":"9f657cfc.c7c8a8","name":"p","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":460,"wires":[]},{"id":"3b21cfb.7b73e3","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"21e46307.e38724","order":1,"width":0,"height":0,"label":"Air Quality Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"200","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#808080","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":530,"y":660,"wires":[[]]},{"id":"eb69416b.607a78","type":"debug","z":"9f657cfc.c7c8a8","name":"iaq","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":580,"wires":[]},{"id":"65fcd9c3.82e108","type":"debug","z":"9f657cfc.c7c8a8","name":"aq","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":700,"wires":[]},{"id":"4e7fa4cb.3844ec","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":140,"wires":[]},{"id":"84101a2.3b1f068","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":1,"width":0,"height":0,"name":"","label":"timestamp BME680","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":180,"wires":[]},{"id":"66a2d434.06c7fc","type":"ui_template","z":"9f657cfc.c7c8a8","group":"4ca4e42e.6fa77c","name":"Camera view","order":2,"width":8,"height":6,"format":"\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":510,"y":1100,"wires":[[]]},{"id":"4e4dfc30.8b82ec","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/cam","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":1060,"wires":[["4b452284.b5022c","62a78ca1.6179ec","9ef24d19.94725"]]},{"id":"4b452284.b5022c","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1020,"wires":[]},{"id":"62a78ca1.6179ec","type":"function","z":"9f657cfc.c7c8a8","name":"data","func":"msg.payload = msg.payload.data;\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":1100,"wires":[["66a2d434.06c7fc"]]},{"id":"579fb2b0.826a04","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":2,"width":0,"height":0,"name":"","label":"temperature","format":"{{msg.payload}} °C","layout":"row-spread","x":510,"y":260,"wires":[]},{"id":"46cf4486.b43974","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":3,"width":0,"height":0,"name":"","label":"humidity","format":"{{msg.payload}} % r.H.","layout":"row-spread","x":500,"y":380,"wires":[]},{"id":"966b2b37.9ab568","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":4,"width":0,"height":0,"name":"","label":"pressure","format":"{{msg.payload}} hPa","layout":"row-spread","x":500,"y":500,"wires":[]},{"id":"14a737a4.122f48","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":5,"width":0,"height":0,"name":"","label":"air quality","format":"{{msg.payload}}","layout":"row-spread","x":500,"y":620,"wires":[]},{"id":"c820432.85c4fc","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":6,"width":0,"height":0,"name":"","label":"air quality accuracy","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":740,"wires":[]},{"id":"469d615e.63a76","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"eb3550b8.f56fd","order":1,"width":2,"height":1,"passthru":true,"label":"WHITE","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"type\":\"WHITE\"}","payloadType":"json","topic":"f/o/order","x":250,"y":660,"wires":[["db1538fd.3adec8"]]},{"id":"109d9f5f.bb1af1","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"eb3550b8.f56fd","order":3,"width":2,"height":1,"passthru":true,"label":"RED","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"type\":\"RED\"}","payloadType":"json","topic":"f/o/order","x":250,"y":700,"wires":[["6b53d33a.be9a14"]]},{"id":"9b4ede65.80119","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"eb3550b8.f56fd","order":5,"width":2,"height":1,"passthru":true,"label":"BLUE","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"type\":\"BLUE\"}","payloadType":"json","topic":"f/o/order","x":250,"y":740,"wires":[["8d108965.865058"]]},{"id":"5a9e242a.46dc4c","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":990,"y":620,"wires":[]},{"id":"ea5cc20e.8a21e8","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":770,"y":660,"wires":[["5a9e242a.46dc4c","c969f87a.2bf39"]]},{"id":"c969f87a.2bf39","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"f/o/order","qos":"0","retain":"","broker":"788959e0.92f718","x":980,"y":660,"wires":[]},{"id":"e734f37b.85d48","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":660,"wires":[["469d615e.63a76"]]},{"id":"31624c5b.6627f4","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":700,"wires":[["109d9f5f.bb1af1"]]},{"id":"c83dfa96.e5848","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":740,"wires":[["9b4ede65.80119"]]},{"id":"7921020f.dc1f3c","type":"comment","z":"ac6244e8.d50e1","name":"https://github.com/fischertechnik/txt_training_factory/blob/master/TxtSmartFactoryLib/doc/MqttInterface.md","info":"","x":380,"y":40,"wires":[]},{"id":"74415e5d.76122","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/ldr","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":840,"wires":[["2e2dd73.72941a8","371cf9d7.885d1e","ae74009f.4977a8"]]},{"id":"2e2dd73.72941a8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":800,"wires":[]},{"id":"5e7d105e.705ab","type":"mqtt out","z":"87526827.008ad8","name":"","topic":"c/ldr","qos":"0","retain":"","broker":"788959e0.92f718","x":830,"y":260,"wires":[]},{"id":"1e6f5178.f8b317","type":"inject","z":"87526827.008ad8","name":"","topic":"","payload":"{\"period\":3}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"3","x":450,"y":260,"wires":[["74c2fc8f.82a9ec"]]},{"id":"ce11d701.441f48","type":"debug","z":"87526827.008ad8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":850,"y":220,"wires":[]},{"id":"74c2fc8f.82a9ec","type":"function","z":"87526827.008ad8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":260,"wires":[["5e7d105e.705ab","ce11d701.441f48"]]},{"id":"2497f7cd.0baed8","type":"comment","z":"87526827.008ad8","name":"https://github.com/fischertechnik/txt_training_factory/blob/master/TxtSmartFactoryLib/doc/MqttInterface.md","info":"","x":380,"y":40,"wires":[]},{"id":"e65a8a6b.d9f1c8","type":"mqtt out","z":"87526827.008ad8","name":"","topic":"c/bme680","qos":"0","retain":"","broker":"788959e0.92f718","x":840,"y":160,"wires":[]},{"id":"ab74f582.68d728","type":"inject","z":"87526827.008ad8","name":"","topic":"","payload":"{\"period\":3}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"3","x":450,"y":120,"wires":[["7390b7be.8f9e08"]]},{"id":"ed44e2e8.83c75","type":"debug","z":"87526827.008ad8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":850,"y":120,"wires":[]},{"id":"7390b7be.8f9e08","type":"function","z":"87526827.008ad8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":160,"wires":[["e65a8a6b.d9f1c8","ed44e2e8.83c75"]]},{"id":"1c70e1b9.c34746","type":"mqtt out","z":"87526827.008ad8","name":"","topic":"c/cam","qos":"0","retain":"","broker":"788959e0.92f718","x":830,"y":360,"wires":[]},{"id":"84b8028c.eb88f8","type":"inject","z":"87526827.008ad8","name":"","topic":"","payload":"{\"on\":true,\"fps\":2}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"3","x":430,"y":320,"wires":[["ca38a602.b2a778"]]},{"id":"849c1549.00d428","type":"debug","z":"87526827.008ad8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":830,"y":320,"wires":[]},{"id":"ca38a602.b2a778","type":"function","z":"87526827.008ad8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":360,"wires":[["1c70e1b9.c34746","849c1549.00d428"]]},{"id":"9ef24d19.94725","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1060,"wires":[["d50b8f4b.49d6f8","a9519cc0.fff178"]]},{"id":"d50b8f4b.49d6f8","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1020,"wires":[]},{"id":"a9519cc0.fff178","type":"ui_text","z":"9f657cfc.c7c8a8","group":"4ca4e42e.6fa77c","order":1,"width":0,"height":0,"name":"","label":"timestamp Cam","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":1060,"wires":[]},{"id":"371cf9d7.885d1e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":840,"wires":[["ace724d2.777568","50949e8e.b064a8"]]},{"id":"ace724d2.777568","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":800,"wires":[]},{"id":"50949e8e.b064a8","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":7,"width":0,"height":0,"name":"","label":"timestamp LDR","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":840,"wires":[]},{"id":"bbbb8d6e.1c7728","type":"ui_chart","z":"9f657cfc.c7c8a8","name":"","group":"3f05f1d2.27c6d6","order":1,"width":0,"height":0,"label":"Brightness Graph","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":530,"y":960,"wires":[[]]},{"id":"ae74009f.4977a8","type":"function","z":"9f657cfc.c7c8a8","name":"brightness","func":"msg.payload = msg.payload.br;\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":920,"wires":[["bbbb8d6e.1c7728","df773d11.1960a8","6181e4a2.8b2d04"]]},{"id":"df773d11.1960a8","type":"debug","z":"9f657cfc.c7c8a8","name":"br","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":880,"wires":[]},{"id":"6181e4a2.8b2d04","type":"ui_text","z":"9f657cfc.c7c8a8","group":"a811398d.c6fe18","order":8,"width":0,"height":0,"name":"","label":"brightness","format":"{{msg.payload}} %","layout":"row-spread","x":509,"y":920,"wires":[]},{"id":"f4ae4e9f.663ff8","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/ptu/pos","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1200,"wires":[["25833043.8ce598","bb46bef0.bbb4e"]]},{"id":"67768e80.e94c1","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/alert","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":1300,"wires":[["fbaa96c3.c0b6f8","af94dca3.058e6"]]},{"id":"25833043.8ce598","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1160,"wires":[]},{"id":"fbaa96c3.c0b6f8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1260,"wires":[]},{"id":"bb46bef0.bbb4e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1200,"wires":[["e395dbe7.408ea"]]},{"id":"e395dbe7.408ea","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1160,"wires":[]},{"id":"af94dca3.058e6","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1300,"wires":[["b9fe827b.f73418"]]},{"id":"b9fe827b.f73418","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1260,"wires":[]},{"id":"461b988f.5ebd9","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"i/broadcast","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1400,"wires":[["cd5124e1.a12528","aece27f2.909228"]]},{"id":"cd5124e1.a12528","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1360,"wires":[]},{"id":"aece27f2.909228","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1400,"wires":[["14af6379.f2d61d"]]},{"id":"14af6379.f2d61d","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1360,"wires":[]},{"id":"3c2d74a9.8bedcc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/hbw","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":1500,"wires":[["e34c15e0.7210c","fe2022f2.3c8978"]]},{"id":"e34c15e0.7210c","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1460,"wires":[]},{"id":"fe2022f2.3c8978","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1500,"wires":[["2995d025.9a087"]]},{"id":"2995d025.9a087","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1460,"wires":[]},{"id":"e3f32425.b1a3b","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/vgr","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1600,"wires":[["aae36ef8.19bd9","b8a105b4.261f38"]]},{"id":"aae36ef8.19bd9","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1560,"wires":[]},{"id":"b8a105b4.261f38","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1600,"wires":[["8fd5ec12.e14ce"]]},{"id":"8fd5ec12.e14ce","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1560,"wires":[]},{"id":"bc50579a.a71e48","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/mpo","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":1700,"wires":[["36696fca.ad3708","b32da19c.ac4958"]]},{"id":"36696fca.ad3708","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1660,"wires":[]},{"id":"b32da19c.ac4958","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1700,"wires":[["e3283291.446938"]]},{"id":"e3283291.446938","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1660,"wires":[]},{"id":"2b192409.84bdd4","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/sld","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1800,"wires":[["2f78603d.db2ed","2284e06c.4abfc"]]},{"id":"2f78603d.db2ed","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1760,"wires":[]},{"id":"2284e06c.4abfc","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1800,"wires":[["11d08a89.a936bd"]]},{"id":"11d08a89.a936bd","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1760,"wires":[]},{"id":"18ec0e82.f80ee1","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/dsi","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":1900,"wires":[["d30f4848.a1694","fb3567ae.139988"]]},{"id":"d30f4848.a1694","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1860,"wires":[]},{"id":"fb3567ae.139988","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":1900,"wires":[["4bc20d41.372d8c"]]},{"id":"4bc20d41.372d8c","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1860,"wires":[]},{"id":"5f0942f.d7e76bc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/state/dso","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":2000,"wires":[["19213146.a02c4f","3c127876.b784e"]]},{"id":"19213146.a02c4f","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":1960,"wires":[]},{"id":"3c127876.b784e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2000,"wires":[["f6d79ba0.d37e88"]]},{"id":"f6d79ba0.d37e88","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":1960,"wires":[]},{"id":"f57fea84.ddf0f","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/stock","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":2100,"wires":[["d438ef5f.a413a","2233e65b.30e7aa"]]},{"id":"d438ef5f.a413a","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2060,"wires":[]},{"id":"2233e65b.30e7aa","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\n//msg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2100,"wires":[["1e54221e.d16566"]]},{"id":"1e54221e.d16566","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2060,"wires":[]},{"id":"4fe904ee.802424","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/order","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":2200,"wires":[["320266a.e86b69a","456c0b89.5ff26c"]]},{"id":"320266a.e86b69a","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2160,"wires":[]},{"id":"456c0b89.5ff26c","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2200,"wires":[["8f5f6b66.bdc06"]]},{"id":"8f5f6b66.bdc06","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2160,"wires":[]},{"id":"84635a36.ee1dc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"f/i/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":2300,"wires":[["677f7dbc.b4525c","f9987081.827ae8"]]},{"id":"677f7dbc.b4525c","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2260,"wires":[]},{"id":"f9987081.827ae8","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2300,"wires":[["a62c06fb.008708"]]},{"id":"a62c06fb.008708","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2260,"wires":[]},{"id":"edcf13e3.e36778","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"o/ptu","qos":"0","retain":"","broker":"788959e0.92f718","x":690,"y":140,"wires":[]},{"id":"c32ef581.4cd728","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":300,"wires":[["38b8c579.959692"]]},{"id":"e7dfb427.3d4b68","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":710,"y":100,"wires":[]},{"id":"e5f1f300.ac0068","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":140,"wires":[["edcf13e3.e36778","e7dfb427.3d4b68"]]},{"id":"202f8830.5eb9d","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"f/o/state/ack","qos":"0","retain":"","broker":"788959e0.92f718","x":710,"y":560,"wires":[]},{"id":"baebad7e.8ced8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"{\"period\":3}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":560,"wires":[["3b462ce1.1fc3bc"]]},{"id":"21b3674.9368218","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":710,"y":520,"wires":[]},{"id":"854fa779.7e1a9","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":560,"wires":[["202f8830.5eb9d","21b3674.9368218"]]},{"id":"38b8c579.959692","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":11,"width":2,"height":1,"passthru":true,"label":"STOP","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"stop\"}","payloadType":"json","topic":"","x":250,"y":300,"wires":[["e5f1f300.ac0068"]]},{"id":"6ecd8875.891cd8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":340,"wires":[["764d96a5.3d45b8"]]},{"id":"764d96a5.3d45b8","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":9,"width":2,"height":1,"passthru":true,"label":"HOME","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"home\"}","payloadType":"json","topic":"","x":250,"y":340,"wires":[["e5f1f300.ac0068"]]},{"id":"bc47beae.a812b8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":380,"wires":[["754b68cf.41636"]]},{"id":"754b68cf.41636","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":5,"width":2,"height":1,"passthru":true,"label":"<<","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"start_pan\"}","payloadType":"json","topic":"","x":250,"y":380,"wires":[["e5f1f300.ac0068"]]},{"id":"71be9898.77ccf8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":420,"wires":[["8f710ff9.ab3b88"]]},{"id":"8f710ff9.ab3b88","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":6,"width":2,"height":1,"passthru":true,"label":">>","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"end_pan\"}","payloadType":"json","topic":"","x":250,"y":420,"wires":[["e5f1f300.ac0068"]]},{"id":"72063d1f.bcffbc","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":460,"wires":[["dfe8bed5.a96b"]]},{"id":"dfe8bed5.a96b","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":7,"width":2,"height":1,"passthru":true,"label":"vv","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"start_tilt\"}","payloadType":"json","topic":"","x":250,"y":460,"wires":[["e5f1f300.ac0068"]]},{"id":"ddef70ab.541f8","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":500,"wires":[["58365993.d8ec"]]},{"id":"58365993.d8ec","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":8,"width":2,"height":1,"passthru":true,"label":"^^","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"end_tilt\"}","payloadType":"json","topic":"","x":250,"y":500,"wires":[["e5f1f300.ac0068"]]},{"id":"c6e27102.618e4","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":140,"wires":[["349e9c79.f30684"]]},{"id":"349e9c79.f30684","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":1,"width":2,"height":1,"passthru":true,"label":"<","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_left\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":140,"wires":[["e5f1f300.ac0068"]]},{"id":"eed528e0.fba488","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":180,"wires":[["7ebd653f.697084"]]},{"id":"7ebd653f.697084","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":2,"width":2,"height":1,"passthru":true,"label":">","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_right\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":180,"wires":[["e5f1f300.ac0068"]]},{"id":"1e647cba.85a3f3","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":220,"wires":[["c02a536e.81e71"]]},{"id":"c02a536e.81e71","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":3,"width":2,"height":1,"passthru":true,"label":"v","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_down\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":220,"wires":[["e5f1f300.ac0068"]]},{"id":"4678cc68.1d32d4","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":260,"wires":[["3c901c9d.232864"]]},{"id":"3c901c9d.232864","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"81f41a6c.c5594","order":4,"width":2,"height":1,"passthru":true,"label":"^","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"relmove_up\",\"degree\":10}","payloadType":"json","topic":"","x":250,"y":260,"wires":[["e5f1f300.ac0068"]]},{"id":"3b462ce1.1fc3bc","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":5,"width":2,"height":1,"passthru":true,"label":"ACK","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{}","payloadType":"json","topic":"f/o/state/ack","x":250,"y":560,"wires":[["854fa779.7e1a9"]]},{"id":"ab169cb4.e41fa","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/ssc/joy","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":180,"wires":[["de536f1e.d60cc8","9931697d.43f12"]]},{"id":"de536f1e.d60cc8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":140,"wires":[]},{"id":"9931697d.43f12","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":180,"wires":[["4b136cb8.4e6494"]]},{"id":"4b136cb8.4e6494","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":140,"wires":[]},{"id":"7524e3ec.f110f4","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/vgr/do","qos":"0","datatype":"json","broker":"788959e0.92f718","x":750,"y":280,"wires":[["11dd917a.841147","d15bc23a.c961c8"]]},{"id":"11dd917a.841147","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":240,"wires":[]},{"id":"d15bc23a.c961c8","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":280,"wires":[["2aed7005.76f35"]]},{"id":"2aed7005.76f35","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":240,"wires":[]},{"id":"7394939c.ae70bc","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/hbw/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":380,"wires":[["47ee3e64.1d3c18","8a676356.7d08e"]]},{"id":"47ee3e64.1d3c18","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":340,"wires":[]},{"id":"8a676356.7d08e","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":380,"wires":[["11c3842d.fa707c"]]},{"id":"11c3842d.fa707c","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":340,"wires":[]},{"id":"befdf27c.24aea8","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/mpo/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":480,"wires":[["9a62e192.66762","1820cc0d.ccedbc"]]},{"id":"9a62e192.66762","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":440,"wires":[]},{"id":"1820cc0d.ccedbc","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":480,"wires":[["46817d18.00fccc"]]},{"id":"46817d18.00fccc","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":440,"wires":[]},{"id":"35c3fed0.6267aa","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/sld/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":760,"y":580,"wires":[["fcd66841.24af6","5f59e463.f4ba54"]]},{"id":"fcd66841.24af6","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":970,"y":540,"wires":[]},{"id":"5f59e463.f4ba54","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":580,"wires":[["8207ceeb.b5a288"]]},{"id":"8207ceeb.b5a288","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1170,"y":540,"wires":[]},{"id":"4f6d05da.9487dc","type":"comment","z":"d8972c0.715b4d8","name":"Publish","info":"","x":70,"y":60,"wires":[]},{"id":"aa48c2f4.e60b68","type":"comment","z":"d8972c0.715b4d8","name":"Dashboard Ack. Button from MQTT ","info":"","x":150,"y":100,"wires":[]},{"id":"48a7bea4.763b88","type":"mqtt in","z":"d8972c0.715b4d8","name":"","topic":"f/o/state/ack","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":140,"wires":[["3c0bf468.2670ec"]]},{"id":"14269794.be7df8","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":140,"wires":[["ac80336f.fd0dc"]]},{"id":"78aff3f3.b6d954","type":"comment","z":"d8972c0.715b4d8","name":"Subscribe","info":"","x":80,"y":340,"wires":[]},{"id":"9d6c9558.802fa","type":"comment","z":"d8972c0.715b4d8","name":"Alert Message - from OPC UA to MQTT","info":"","x":170,"y":380,"wires":[]},{"id":"36f7c27f.217056","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":440,"wires":[["45d2f19d.87a89"]]},{"id":"4675f8c1.bdfdd","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/alert","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":440,"wires":[]},{"id":"4fb82fd7.3daa5","type":"comment","z":"d8972c0.715b4d8","name":"State DSI - actual values to MQTT","info":"","x":160,"y":520,"wires":[]},{"id":"6b9a4500.924dac","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":580,"wires":[["eebe6573.388c"]]},{"id":"eebe6573.388c","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":580,"wires":[["5fdaf37d.b1ac9c"]]},{"id":"478cd18.0cd01b","type":"debug","z":"d8972c0.715b4d8","name":"i/state/dsi","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":540,"wires":[]},{"id":"6081239f.099974","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/dsi","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":580,"wires":[]},{"id":"d04288b7.d7a6d8","type":"comment","z":"d8972c0.715b4d8","name":"State DSO - actual values to MQTT ","info":"","x":150,"y":760,"wires":[]},{"id":"befa7850.898a88","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/dso","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":820,"wires":[]},{"id":"14c16ca3.0a2953","type":"comment","z":"d8972c0.715b4d8","name":"State HBW - actual values to MQTT ","info":"","x":160,"y":1020,"wires":[]},{"id":"fcffd51b.ae1d28","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/hbw","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":1080,"wires":[]},{"id":"977644c6.ae04c8","type":"comment","z":"d8972c0.715b4d8","name":"State MPO - actual values to MQTT ","info":"","x":150,"y":1280,"wires":[]},{"id":"2036511b.98cc7e","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/mpo","qos":"0","retain":"","broker":"788959e0.92f718","x":1050,"y":1340,"wires":[]},{"id":"6821320f.a47244","type":"comment","z":"d8972c0.715b4d8","name":"State SLD - actual values to MQTT ","info":"","x":150,"y":1540,"wires":[]},{"id":"fd4114ad.a5aeb","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/sld","qos":"0","retain":"","broker":"788959e0.92f718","x":1070,"y":1600,"wires":[]},{"id":"9f615908.5356e8","type":"comment","z":"d8972c0.715b4d8","name":"State VGR - actual values to MQTT ","info":"","x":150,"y":1780,"wires":[]},{"id":"785ce783.613b7","type":"mqtt out","z":"d8972c0.715b4d8","name":"","topic":"f/i/state/vgr","qos":"0","retain":"","broker":"788959e0.92f718","x":1070,"y":1840,"wires":[]},{"id":"68812a7c.196704","type":"comment","z":"d8972c0.715b4d8","name":"Alert Message - normally coming from TXT not OPC UA?","info":"","x":560,"y":380,"wires":[]},{"id":"a1dae50.3e6a018","type":"mqtt out","z":"f27e9a4.d7269e8","name":"","topic":"f/i/stock","qos":"0","retain":"","broker":"788959e0.92f718","x":1120,"y":600,"wires":[]},{"id":"226e2ad3.bcdc56","type":"function","z":"f27e9a4.d7269e8","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":660,"wires":[["a1dae50.3e6a018"]]},{"id":"1d5499b5.089ece","type":"inject","z":"f27e9a4.d7269e8","name":"","topic":"","payload":"{\"stockItems\":[{\"workpiece\":{\"id\":\"123456789ABCDE\",\"type\":\"BLUE\",\"state\":\"PROCESSED\"},\"location\":\"A1\"},{\"workpiece\":{\"id\":\"123456789ABCDF\",\"type\":\"RED\",\"state\":\"PROCESSED\"},\"location\":\"A2\"},{\"workpiece\":{\"id\":\"123456789ABCDG\",\"type\":\"BLUE\",\"state\":\"PROCESSESD\"},\"location\":\"A3\"},{\"workpiece\":{\"id\":\"123456789ABCDH\",\"type\":\"\",\"state\":\"PROCESSED\"},\"location\":\"B1\"},{\"workpiece\":{\"id\":\"123456789ABCDI\",\"type\":\"WHITE\",\"state\":\"RAW\"},\"location\":\"B2\"},{\"workpiece\":{\"id\":\"123456789ABCDJ\",\"type\":\"\",\"state\":\"RAW\"},\"location\":\"B3\"},{\"workpiece\":{\"id\":\"123456789ABCDK\",\"type\":\"\",\"state\":\"RAW\"},\"location\":\"C1\"},{\"workpiece\":null,\"location\":\"C3\"}]}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":760,"y":660,"wires":[["226e2ad3.bcdc56"]]},{"id":"ce1a1028.d2d418","type":"comment","z":"f27e9a4.d7269e8","name":"Stock HBW - actual values to MQTT ","info":"","x":160,"y":560,"wires":[]},{"id":"5fdaf37d.b1ac9c","type":"function","z":"d8972c0.715b4d8","name":"read DSI state","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state DSI\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":580,"wires":[["45a06c82.3abdb4"]]},{"id":"45a06c82.3abdb4","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":580,"wires":[["a466fc32.76b258"]]},{"id":"a466fc32.76b258","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_dsi = {\n ts: \"\",\n station: \"dsi\",\n code: 0,\n description: \"Exakte Beschreibung\"\n }\n\nstate_dsi.code = msg.payload[0].value.value; //[0] = code\nstate_dsi.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_dsi.description = msg.payload[2].value.value; //[2] = description\nstate_dsi.station = msg.payload[3].value.value; //[3] = station\nstate_dsi.target = msg.payload[4].value.value; //[1] = target\nstate_dsi.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_dsi);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":580,"wires":[["6081239f.099974","478cd18.0cd01b"]]},{"id":"1dce1f60.7c53f9","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":680,"wires":[["a46a60e3.1696c"]]},{"id":"a46a60e3.1696c","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSI\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":680,"wires":[["d525d303.4b3aa8"]]},{"id":"d525d303.4b3aa8","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":680,"wires":[["a18711a9.f97bb"]]},{"id":"a18711a9.f97bb","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":680,"wires":[[]]},{"id":"4e81eede.4cc59","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state DSI","info":"","x":120,"y":640,"wires":[]},{"id":"14508b1.ea145f5","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":820,"wires":[["444b0489.73ec04"]]},{"id":"444b0489.73ec04","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":820,"wires":[["14047040.277b4"]]},{"id":"604103f1.1058dc","type":"debug","z":"d8972c0.715b4d8","name":"i/state/dso","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":780,"wires":[]},{"id":"14047040.277b4","type":"function","z":"d8972c0.715b4d8","name":"read DSO state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state DSO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":820,"wires":[["b0e068a6.c2a93"]]},{"id":"b0e068a6.c2a93","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":820,"wires":[["3c526a20.6b8936"]]},{"id":"3c526a20.6b8936","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_dso = {\n ts: \"\",\n station: \"dsi\",\n code: 0,\n description: \"Exakte Beschreibung\"\n }\n\nstate_dso.code = msg.payload[0].value.value; //[0] = code\nstate_dso.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_dso.description = msg.payload[2].value.value; //[2] = description\nstate_dso.station = msg.payload[3].value.value; //[3] = station\nstate_dso.target = msg.payload[4].value.value; //[1] = target\nstate_dso.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_dso);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":820,"wires":[["604103f1.1058dc","befa7850.898a88"]]},{"id":"3bb73be3.2e1f7c","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":920,"wires":[["725f5e6d.8fd61"]]},{"id":"725f5e6d.8fd61","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_DSO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":920,"wires":[["20fcb4aa.13fa5c"]]},{"id":"20fcb4aa.13fa5c","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":920,"wires":[["77d34599.9078f4"]]},{"id":"77d34599.9078f4","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":920,"wires":[[]]},{"id":"12de2060.3e27c8","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state DSO","info":"","x":120,"y":880,"wires":[]},{"id":"a52034f5.4a45a","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":1080,"wires":[["6235aa99.b52504"]]},{"id":"6235aa99.b52504","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":1080,"wires":[["84a4753b.c48e5"]]},{"id":"57e97102.13fc78","type":"debug","z":"d8972c0.715b4d8","name":"i/state/hbw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1050,"y":1040,"wires":[]},{"id":"84a4753b.c48e5","type":"function","z":"d8972c0.715b4d8","name":"read HBW state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state HBW\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":1080,"wires":[["a035c4d9.be8fc8"]]},{"id":"a035c4d9.be8fc8","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":1080,"wires":[["3d4d137d.0de5e4"]]},{"id":"3d4d137d.0de5e4","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_hbw = {\n ts: \"\",\n station: \"dsi\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"hbw\"}\n\n\nstate_hbw.code = msg.payload[0].value.value; //[0] = code\nstate_hbw.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_hbw.description = msg.payload[2].value.value; //[2] = description\nstate_hbw.station = msg.payload[3].value.value; //[3] = station\nstate_hbw.target = msg.payload[4].value.value; //[1] = target\nstate_hbw.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_hbw);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":1080,"wires":[["57e97102.13fc78","fcffd51b.ae1d28"]]},{"id":"3ab91027.fe2d7","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1180,"wires":[["d0d1fa6e.2b991"]]},{"id":"d0d1fa6e.2b991","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1180,"wires":[["628ac138.5c2628"]]},{"id":"628ac138.5c2628","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1180,"wires":[["4b6f6512.6ed9ec"]]},{"id":"4b6f6512.6ed9ec","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1180,"wires":[[]]},{"id":"54070d7.65da474","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state HBW","info":"","x":120,"y":1140,"wires":[]},{"id":"3f2b2cda.e1ebcc","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":1340,"wires":[["4f6e48e3.2b1b88"]]},{"id":"4f6e48e3.2b1b88","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":1340,"wires":[["ba6cb267.b075e8"]]},{"id":"809aa043.0376f8","type":"debug","z":"d8972c0.715b4d8","name":"i/state/mpo","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1050,"y":1300,"wires":[]},{"id":"ba6cb267.b075e8","type":"function","z":"d8972c0.715b4d8","name":"read MPO state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state MPO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":1340,"wires":[["1edf7e52.178c02"]]},{"id":"1edf7e52.178c02","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":1340,"wires":[["b088c56a.74932"]]},{"id":"b088c56a.74932","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_mpo = {\n ts: \"\",\n station: \"mpo\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"mpo\"}\n\n\nstate_mpo.code = msg.payload[0].value.value; //[0] = code\nstate_mpo.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_mpo.description = msg.payload[2].value.value; //[2] = description\nstate_mpo.station = msg.payload[3].value.value; //[3] = station\nstate_mpo.target = msg.payload[4].value.value; //[1] = target\nstate_mpo.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_mpo);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":1340,"wires":[["809aa043.0376f8","2036511b.98cc7e"]]},{"id":"c83842f4.1e779","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1440,"wires":[["e3aefda7.813c68"]]},{"id":"e3aefda7.813c68","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_MPO\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1440,"wires":[["b36e80c3.042b58"]]},{"id":"b36e80c3.042b58","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1440,"wires":[["234964b1.01f544"]]},{"id":"234964b1.01f544","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1440,"wires":[[]]},{"id":"53817ca2.4f227c","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state MPO","info":"","x":120,"y":1400,"wires":[]},{"id":"8845428c.a35388","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"ldt_ts\"","datatypeName":""}],"x":110,"y":1600,"wires":[["e3f044a1.7b83c"]]},{"id":"e3f044a1.7b83c","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":1600,"wires":[["1120b5a5.d9c70a"]]},{"id":"1120b5a5.d9c70a","type":"function","z":"d8972c0.715b4d8","name":"read SLD state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state MPO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":1600,"wires":[["7dacd9fd.799078"]]},{"id":"7dacd9fd.799078","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":1600,"wires":[["9a1bc815.f8657"]]},{"id":"9a1bc815.f8657","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_sld = {\n ts: \"\",\n station: \"sld\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"sld\"}\n\n\nstate_sld.code = msg.payload[0].value.value; //[0] = code\nstate_sld.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_sld.description = msg.payload[2].value.value; //[2] = description\nstate_sld.station = msg.payload[3].value.value; //[3] = station\nstate_sld.target = msg.payload[4].value.value; //[1] = target\nstate_sld.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_sld);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":830,"y":1600,"wires":[["27192396.b36a1c","fd4114ad.a5aeb"]]},{"id":"27192396.b36a1c","type":"debug","z":"d8972c0.715b4d8","name":"i/state/sld","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1060,"y":1560,"wires":[]},{"id":"b67342cd.f82ec8","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1680,"wires":[["e4e1804b.7d72e"]]},{"id":"e4e1804b.7d72e","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_SLD\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1680,"wires":[["90f9022d.52388"]]},{"id":"90f9022d.52388","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1680,"wires":[["d1931caf.598b9"]]},{"id":"d1931caf.598b9","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1680,"wires":[[]]},{"id":"53def95b.d41208","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state SLD","info":"","x":120,"y":1640,"wires":[]},{"id":"d5bdca11.691ac8","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"ldt_ts\"","datatypeName":""}],"x":110,"y":1840,"wires":[["3b758296.097116"]]},{"id":"3b758296.097116","type":"OPCUA-IIoT-Listener","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":1840,"wires":[["acf217e4.bd543"]]},{"id":"acf217e4.bd543","type":"function","z":"d8972c0.715b4d8","name":"read VGR state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state MPO\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"s_description\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"s_station\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"s_target\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"x_active\"',\n \"datatypeName\":'Bool'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":1840,"wires":[["cca12ac.b0f2058"]]},{"id":"cca12ac.b0f2058","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":1840,"wires":[["4ebd5476.9c979c"]]},{"id":"4ebd5476.9c979c","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_vgr = {\n ts: \"\",\n station: \"vgr\",\n code: 0,\n description: \"Exakte Beschreibung\",\n active: 1,\n target: \"vgr\"}\n\n\nstate_vgr.code = msg.payload[0].value.value; //[0] = code\nstate_vgr.ts = msg.payload[1].value.value; //[1] = timestamp\nstate_vgr.description = msg.payload[2].value.value; //[2] = description\nstate_vgr.station = msg.payload[3].value.value; //[3] = station\nstate_vgr.target = msg.payload[4].value.value; //[1] = target\nstate_vgr.active = msg.payload[5].value.value; //[2] = active\n\nnew_msg.payload = JSON.stringify(state_vgr);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":830,"y":1840,"wires":[["83c6e1ce.6331a","785ce783.613b7"]]},{"id":"83c6e1ce.6331a","type":"debug","z":"d8972c0.715b4d8","name":"i/state/vgr","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1060,"y":1800,"wires":[]},{"id":"efaeea88.8d55","type":"comment","z":"d8972c0.715b4d8","name":"Trigger state VGR","info":"","x":120,"y":1880,"wires":[]},{"id":"88587f49.ce2cb","type":"inject","z":"d8972c0.715b4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1920,"wires":[["54ad3cee.228c5c"]]},{"id":"54ad3cee.228c5c","type":"function","z":"d8972c0.715b4d8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_VGR\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":1920,"wires":[["2fc4373a.62965"]]},{"id":"2fc4373a.62965","type":"OPCUA-IIoT-Write","z":"d8972c0.715b4d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":1920,"wires":[["464d3595.56c79c"]]},{"id":"464d3595.56c79c","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":1920,"wires":[[]]},{"id":"ac80336f.fd0dc","type":"OPCUA-IIoT-Response","z":"d8972c0.715b4d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":580,"y":140,"wires":[["9f0398d5.5dfac"]]},{"id":"9f0398d5.5dfac","type":"debug","z":"d8972c0.715b4d8","name":"f/o/state/ack","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":750,"y":140,"wires":[]},{"id":"3c0bf468.2670ec","type":"function","z":"d8972c0.715b4d8","name":"value to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"ldt_AcknowledgeButton\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":140,"wires":[["14269794.be7df8"]]},{"id":"45d2f19d.87a89","type":"function","z":"d8972c0.715b4d8","name":"values to read","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"s_data\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":440,"wires":[["5dc02706.9d659"]]},{"id":"5dc02706.9d659","type":"OPCUA-IIoT-Read","z":"d8972c0.715b4d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":440,"wires":[["eb2df124.7a3b"]]},{"id":"eb2df124.7a3b","type":"function","z":"d8972c0.715b4d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { code: 0, data:\"\",id:\"\", ts:\"\" };\n\n\noutput.code = msg.payload[0].value.value; //[0] = code\noutput.data = msg.payload[1].value.value; //[1] = data\noutput.id = msg.payload[2].value.value; //[2] = id\noutput.ts = msg.payload[3].value.value; //[3] = timestamp\n\nnew_msg.payload = JSON.stringify(output);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":830,"y":440,"wires":[["1acdffbf.26fe3","4675f8c1.bdfdd"]]},{"id":"1acdffbf.26fe3","type":"debug","z":"d8972c0.715b4d8","name":"i/alert","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1050,"y":400,"wires":[]},{"id":"8e7ca773.57ce68","type":"mqtt out","z":"ac6244e8.d50e1","name":"","topic":"f/o/nfc/ds","qos":"0","retain":"","broker":"788959e0.92f718","x":700,"y":820,"wires":[]},{"id":"941cc170.2077f","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":820,"wires":[["de9a4d5.6dba8b"]]},{"id":"50e3d831.b0aaa","type":"debug","z":"ac6244e8.d50e1","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":710,"y":780,"wires":[]},{"id":"8481a142.77d748","type":"function","z":"ac6244e8.d50e1","name":"+ts UTC ISO8301","func":"var ts = new Date().toISOString();\nmsg.payload[\"ts\"] = ts;\nmsg.payload = JSON.stringify(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":820,"wires":[["8e7ca773.57ce68","50e3d831.b0aaa"]]},{"id":"de9a4d5.6dba8b","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":4,"width":2,"height":1,"passthru":true,"label":"NFC DELETE","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"delete\"}","payloadType":"json","topic":"f/o/nfc/ds","x":280,"y":820,"wires":[["8481a142.77d748"]]},{"id":"e891ffe6.baba5","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":860,"wires":[["3e75fdbc.f401a2"]]},{"id":"3e75fdbc.f401a2","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":1,"width":2,"height":1,"passthru":true,"label":"NFC READ","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"read\"}","payloadType":"json","topic":"f/o/nfc/ds","x":270,"y":860,"wires":[["8481a142.77d748"]]},{"id":"6916b3b7.5894ac","type":"inject","z":"ac6244e8.d50e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":900,"wires":[["8ddf48ed.db195"]]},{"id":"8ddf48ed.db195","type":"ui_button","z":"ac6244e8.d50e1","name":"","group":"6bb8ca6d.ccfd2c","order":2,"width":2,"height":1,"passthru":true,"label":"NFC READ_UID","tooltip":"","color":"","bgcolor":"","icon":"","payload":"{\"cmd\":\"read_uid\"}","payloadType":"json","topic":"f/o/nfc/ds","x":280,"y":900,"wires":[["8481a142.77d748"]]},{"id":"f79caa5.71a59d8","type":"comment","z":"4c072751.507d3","name":"NFC reader - control actions from MQTT","info":"","x":180,"y":40,"wires":[]},{"id":"63deb236.a8fd74","type":"mqtt in","z":"4c072751.507d3","name":"","topic":"f/o/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":80,"wires":[["4f4071ae.f69d18"]]},{"id":"ab901d1.7ac506","type":"debug","z":"4c072751.507d3","name":"write NFC command to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":630,"y":40,"wires":[]},{"id":"c39d13d0.22ce48","type":"comment","z":"4c072751.507d3","name":"PLC Subscribe","info":"","x":130,"y":160,"wires":[]},{"id":"4f4071ae.f69d18","type":"function","z":"4c072751.507d3","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"ActionButtonNFCModule\".\"s_cmd\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.cmd,\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":80,"wires":[["25f175ee.f8eb1a","ab901d1.7ac506"]]},{"id":"25f175ee.f8eb1a","type":"OPCUA-IIoT-Write","z":"4c072751.507d3","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":440,"y":80,"wires":[["aceba3f4.faa3d8"]]},{"id":"aceba3f4.faa3d8","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":80,"wires":[[]]},{"id":"6d6cbb3a.64ab34","type":"mqtt in","z":"4c072751.507d3","name":"","topic":"fl/i/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":100,"y":240,"wires":[["a7818371.2e3468","6181d227.4a0744"]]},{"id":"a7818371.2e3468","type":"function","z":"4c072751.507d3","name":"values to write","func":"var i;\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"Workpiece\".\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"Workpiece\".\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"Workpiece\".\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[0].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[0].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[1].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[1].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[2].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[2].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[3].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[3].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[4].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[4].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[5].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[5].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[6].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[6].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[7].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[7].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[8].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Subscribe\".\"State_NFC_Device\".\"History\"[8].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\n// for (i = 0; i < msg.payload.history.length; i++) {\n// }\n\n\nif (msg.payload.workpiece === null)\n { msg.payload.workpiece = {};\n msg.payload.workpiece.id = \"\";\n msg.payload.workpiece.state = \"\"; \n msg.payload.workpiece.type = \"\";\n }\n\nif (msg.payload.history === null)\n { msg.payload.history = []\n msg.payload.history[0] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[1] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[2] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 1)\n { msg.payload.history[1] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[2] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 2)\n { msg.payload.history[2] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 3)\n { msg.payload.history[3] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 4)\n { msg.payload.history[4] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 5)\n { msg.payload.history[5] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 6)\n { msg.payload.history[6] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 7)\n { msg.payload.history[7] = {\"code\":0,\"ts\":\"\"};\n msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\nif (msg.payload.history.length === 8)\n { msg.payload.history[8] = {\"code\":0,\"ts\":\"\"};\n }\n\n\nmsg.valuesToWrite = [\n msg.payload.ts,\n msg.payload.workpiece.id,\n msg.payload.workpiece.state,\n msg.payload.workpiece.type,\n msg.payload.history[0].code,\n msg.payload.history[0].ts,\n msg.payload.history[1].code,\n msg.payload.history[1].ts,\n msg.payload.history[2].code,\n msg.payload.history[2].ts,\n msg.payload.history[3].code,\n msg.payload.history[3].ts,\n msg.payload.history[4].code,\n msg.payload.history[4].ts,\n msg.payload.history[5].code,\n msg.payload.history[5].ts,\n msg.payload.history[6].code,\n msg.payload.history[6].ts,\n msg.payload.history[7].code,\n msg.payload.history[7].ts,\n msg.payload.history[8].code,\n msg.payload.history[8].ts,\n ]\n\nmsg.payload.hist_len = msg.payload.history.length;\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":240,"wires":[["d961fb7a.82b708","739370d1.a2891","c09cb4bc.f63ca8"]]},{"id":"d961fb7a.82b708","type":"OPCUA-IIoT-Write","z":"4c072751.507d3","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":570,"y":240,"wires":[["dc583c39.c44f1"]]},{"id":"739370d1.a2891","type":"debug","z":"4c072751.507d3","name":"write NFC input to OPC values","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":650,"y":200,"wires":[]},{"id":"dc583c39.c44f1","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":710,"y":240,"wires":[[]]},{"id":"d0afe70d.1022c","type":"comment","z":"4c072751.507d3","name":"NFC reader - deliver read values from MQTT to OPC UA","info":"","x":240,"y":200,"wires":[]},{"id":"cfa66d34.2082e","type":"comment","z":"4c072751.507d3","name":"NFC Reader actions from PLC","info":"","x":150,"y":440,"wires":[]},{"id":"b79ea3fe.a276c","type":"OPCUA-IIoT-Inject","z":"4c072751.507d3","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"","datatypeName":""}],"x":100,"y":480,"wires":[["8bbbf944.1e50f"]]},{"id":"8bbbf944.1e50f","type":"OPCUA-IIoT-Listener","z":"4c072751.507d3","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":250,"y":480,"wires":[["d4559cf5.61d818"]]},{"id":"d4559cf5.61d818","type":"function","z":"4c072751.507d3","name":"read NFC data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for NFC action\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"s_cmd\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"Workpiece\".\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"Workpiece\".\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"Workpiece\".\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[0].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[0].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[1].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[1].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[2].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[2].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[3].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[3].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[4].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[4].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[5].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[5].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[6].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[6].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[7].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[7].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[8].\"i_code\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"History\"[8].\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":480,"wires":[["edb8ae34.ff46f"]]},{"id":"edb8ae34.ff46f","type":"OPCUA-IIoT-Read","z":"4c072751.507d3","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":660,"y":480,"wires":[["9595e4a9.f713b8","81783bda.cf6638"]]},{"id":"9595e4a9.f713b8","type":"function","z":"4c072751.507d3","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar NFC_out = {\n ts: \"\",\n workpiece: {id:\"\",type:\"\",state:\"\"},\n cmd: \"\",\n history:[]\n }\n\nvar NFC = {\n ts: \"\",\n cmd: \"\",\n }\n\n\n NFC_out.cmd = msg.payload[0].value.value; //[0] = cmd\n NFC_out.ts = msg.payload[1].value.value; //[1] = timestamp\n\n NFC_out.workpiece.id = msg.payload[2].value.value; //[2] = wp.id\n NFC_out.workpiece.state = msg.payload[3].value.value; //[3] = wp.state\n NFC_out.workpiece.type = msg.payload[4].value.value; //[4] = wp.type\n\n\n if (msg.payload[5].value.value === 0)\n { NFC_out.history = [] }\n else\n { NFC_out.history[0] = {\"code\": msg.payload[5].value.value,\"ts\":msg.payload[6].value.value }; }\n\n if (msg.payload[7].value.value === 0)\n { }\n else\n { NFC_out.history[1] = {\"code\": msg.payload[7].value.value,\"ts\":msg.payload[8].value.value }; }\n\n if (msg.payload[9].value.value === 0)\n { }\n else\n { NFC_out.history[2] = {\"code\": msg.payload[9].value.value,\"ts\":msg.payload[10].value.value }; }\n\n if (msg.payload[11].value.value === 0)\n { }\n else\n { NFC_out.history[3] = {\"code\": msg.payload[11].value.value,\"ts\":msg.payload[12].value.value }; }\n\n if (msg.payload[13].value.value === 0)\n { }\n else\n { NFC_out.history[4] = {\"code\": msg.payload[13].value.value,\"ts\":msg.payload[14].value.value }; }\n\n\n if (msg.payload[15].value.value === 0)\n { }\n else\n { NFC_out.history[5] = {\"code\": msg.payload[15].value.value,\"ts\":msg.payload[16].value.value }; }\n\n if (msg.payload[17].value.value === 0)\n { }\n else\n { NFC_out.history[6] = {\"code\": msg.payload[17].value.value,\"ts\":msg.payload[18].value.value }; }\n\n if (msg.payload[19].value.value === 0)\n { }\n else\n { NFC_out.history[7] = {\"code\": msg.payload[19].value.value,\"ts\":msg.payload[20].value.value }; }\n\n if (msg.payload[21].value.value === 0)\n { }\n else\n { NFC_out.history[8] = {\"code\": msg.payload[21].value.value,\"ts\":msg.payload[22].value.value }; }\n\n\n if (NFC_out.cmd === \"write\" )\n { new_msg.payload = JSON.stringify(NFC_out); }\n else\n {NFC.cmd = NFC_out.cmd;\n NFC.ts = NFC_out.ts;\n new_msg.payload = JSON.stringify(NFC); }\n\nreturn new_msg;","outputs":1,"noerr":0,"x":860,"y":480,"wires":[["37bf2120.91a146","782c754f.0648fc"]]},{"id":"b50021c8.58c51","type":"inject","z":"4c072751.507d3","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":580,"wires":[["262cdf7d.826468"]]},{"id":"262cdf7d.826468","type":"function","z":"4c072751.507d3","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_TXT_Controler\".\"Publish\".\"ActionButtonNFCModule\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":580,"wires":[["1fedde32.72fba2"]]},{"id":"1fedde32.72fba2","type":"OPCUA-IIoT-Write","z":"4c072751.507d3","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":460,"y":580,"wires":[["bc612683.ad76e"]]},{"id":"bc612683.ad76e","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":610,"y":580,"wires":[[]]},{"id":"b394f419.ac14e8","type":"comment","z":"4c072751.507d3","name":"Trigger PLC NFC action","info":"","x":150,"y":540,"wires":[]},{"id":"37bf2120.91a146","type":"mqtt out","z":"4c072751.507d3","name":"","topic":"fl/o/nfc/ds","qos":"0","retain":"","broker":"788959e0.92f718","x":1090,"y":480,"wires":[]},{"id":"782c754f.0648fc","type":"debug","z":"4c072751.507d3","name":"PLC out to NFC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1110,"y":440,"wires":[]},{"id":"b145f37b.5f0858","type":"comment","z":"4c072751.507d3","name":"PLC Publish","info":"","x":110,"y":400,"wires":[]},{"id":"cf4f32a5.1c4f3","type":"comment","z":"b973f4d9.d701f8","name":"Publish","info":"","x":70,"y":60,"wires":[]},{"id":"dda4202e.cba3b8","type":"comment","z":"b973f4d9.d701f8","name":"pan/tilt unit - control actions from MQTT","info":"","x":170,"y":120,"wires":[]},{"id":"78d2e190.54f2d8","type":"mqtt in","z":"b973f4d9.d701f8","name":"","topic":"o/ptu","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":160,"wires":[["80286e18.ad8e5"]]},{"id":"80286e18.ad8e5","type":"function","z":"b973f4d9.d701f8","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"PosPanTiltUnit\".\"s_cmd\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"PosPanTiltUnit\".\"i_degree\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"PosPanTiltUnit\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\nif (typeof msg.payload.degree === 'number')\n { msg.payload.degree = msg.payload.degree; }\nelse\n { msg.payload.degree = 0; }\n\nmsg.valuesToWrite = [\n msg.payload.cmd,\n msg.payload.degree,\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":160,"wires":[["4ef133b2.4c7af4"]]},{"id":"4ef133b2.4c7af4","type":"OPCUA-IIoT-Write","z":"b973f4d9.d701f8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":430,"y":160,"wires":[["bf06b5b4.197498"]]},{"id":"bf06b5b4.197498","type":"OPCUA-IIoT-Response","z":"b973f4d9.d701f8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":580,"y":160,"wires":[["95109a78.96f57"]]},{"id":"95109a78.96f57","type":"debug","z":"b973f4d9.d701f8","name":"o/ptu","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":730,"y":160,"wires":[]},{"id":"d0e042f3.82f4f8","type":"comment","z":"b973f4d9.d701f8","name":"pan/tilt unit - actual values to MQTT","info":"","x":150,"y":300,"wires":[]},{"id":"5c7ca1ce.af1a2","type":"mqtt out","z":"b973f4d9.d701f8","name":"","topic":"i/ptu/pos","qos":"0","retain":"","broker":"788959e0.92f718","x":1040,"y":340,"wires":[]},{"id":"17aba46e.0ca034","type":"OPCUA-IIoT-Inject","z":"b973f4d9.d701f8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":340,"wires":[["a3e93a0c.f6954"]]},{"id":"a3e93a0c.f6954","type":"OPCUA-IIoT-Listener","z":"b973f4d9.d701f8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":340,"wires":[["91483793.941ab8"]]},{"id":"91483793.941ab8","type":"function","z":"b973f4d9.d701f8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"r_pan\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"r_tilt\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":340,"wires":[["e73fb775.950808"]]},{"id":"e73fb775.950808","type":"OPCUA-IIoT-Read","z":"b973f4d9.d701f8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":340,"wires":[["9af144c6.3f0f9"]]},{"id":"9af144c6.3f0f9","type":"function","z":"b973f4d9.d701f8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { pan: 0, tilt:0, ts:\"\" };\n\n//var ts = new Date().toISOString();\n\noutput.pan = msg.payload[0].value.value; //[0] = pan\noutput.tilt = msg.payload[1].value.value; //[1] = tilt\noutput.ts = msg.payload[2].value.value; //[2] = timestamp\n\nnew_msg.payload = JSON.stringify(output);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":340,"wires":[["5c7ca1ce.af1a2","b9716bca.8a72"]]},{"id":"b9716bca.8a72","type":"debug","z":"b973f4d9.d701f8","name":"i/ptu/pos","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":300,"wires":[]},{"id":"be8c44f0.34d648","type":"comment","z":"b973f4d9.d701f8","name":"Trigger state pto","info":"","x":120,"y":400,"wires":[]},{"id":"1e082af2.a98575","type":"inject","z":"b973f4d9.d701f8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":440,"wires":[["a66777a4.4a8f98"]]},{"id":"a66777a4.4a8f98","type":"function","z":"b973f4d9.d701f8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"PosPanTiltUnit\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":440,"wires":[["3f4093ef.9f3afc"]]},{"id":"3f4093ef.9f3afc","type":"OPCUA-IIoT-Write","z":"b973f4d9.d701f8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":440,"wires":[["47bed223.1582e4"]]},{"id":"47bed223.1582e4","type":"OPCUA-IIoT-Response","z":"b973f4d9.d701f8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":440,"wires":[[]]},{"id":"2fdb7f6.3f2578","type":"comment","z":"b973f4d9.d701f8","name":"Subscribe","info":"","x":80,"y":240,"wires":[]},{"id":"a92adbd9.b56498","type":"comment","z":"d8972c0.715b4d8","name":"End","info":"","x":90,"y":2020,"wires":[]},{"id":"a0626628.a45778","type":"comment","z":"b973f4d9.d701f8","name":"End","info":"","x":90,"y":540,"wires":[]},{"id":"53e78f28.2f9df8","type":"comment","z":"4c072751.507d3","name":"End","info":"","x":90,"y":640,"wires":[]},{"id":"c66ec048.6fdb5","type":"debug","z":"f27e9a4.d7269e8","name":"stock in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":680,"y":560,"wires":[]},{"id":"e580bfa9.62e2a8","type":"OPCUA-IIoT-Inject","z":"f27e9a4.d7269e8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":600,"wires":[["454dd175.42f528"]]},{"id":"454dd175.42f528","type":"OPCUA-IIoT-Listener","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":600,"wires":[["1542a9f7.37e86e"]]},{"id":"1542a9f7.37e86e","type":"function","z":"f27e9a4.d7269e8","name":"read data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for NFC action\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"s_location\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,0].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,0].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,0].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,1].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,1].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,1].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,2].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,2].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[0,2].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,0].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,0].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,0].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,1].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,1].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,1].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,2].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,2].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[1,2].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,0].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,0].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,0].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,1].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,1].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,1].\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,2].\"s_id\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,2].\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"StockItem\"[2,2].\"s_type\"',\n \"datatypeName\":'String'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":600,"wires":[["f8c5b876.630e38","c66ec048.6fdb5"]]},{"id":"f8c5b876.630e38","type":"OPCUA-IIoT-Read","z":"f27e9a4.d7269e8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":670,"y":600,"wires":[["e9789f89.465a98","4be6403c.29abd8"]]},{"id":"e9789f89.465a98","type":"function","z":"f27e9a4.d7269e8","name":"Format Output Message","func":"var new_msg = { payload: \"\", pl_obj: {} };\n\nvar HBW_stock_out = {\n ts: \"\",\n stockItems: [{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},\n {workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},\n {workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},{workpiece: {}, location: \"\"},\n ]\n };\n\n/*\n*/\n\n//HBW_stock_out.location = msg.payload[0].value.value; //[0] = location\nHBW_stock_out.ts = msg.payload[1].value.value; //[1] = timestamp\n\nif (msg.payload[2].value.value === \"\")\n { HBW_stock_out.stockItems[0].location === \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[0].workpiece = {};\n HBW_stock_out.stockItems[0].workpiece = {\n \"id\": msg.payload[2].value.value,\n \"state\":msg.payload[3].value.value,\n \"type\": msg.payload[4].value.value }; \n HBW_stock_out.stockItems[0].location = \"A1\"\n }\n\nif (msg.payload[5].value.value === \"\")\n { HBW_stock_out.stockItems[1].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[1].workpiece = {};\n HBW_stock_out.stockItems[1].workpiece = {\n \"id\": msg.payload[5].value.value,\n \"state\":msg.payload[6].value.value,\n \"type\": msg.payload[7].value.value }; \n HBW_stock_out.stockItems[1].location = \"A2\"\n}\n\n\nif (msg.payload[8].value.value === \"\")\n { HBW_stock_out.stockItems[2].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[2].workpiece = {};\n HBW_stock_out.stockItems[2].workpiece = {\n \"id\": msg.payload[8].value.value,\n \"state\":msg.payload[9].value.value,\n \"type\": msg.payload[10].value.value }; \n HBW_stock_out.stockItems[2].location = \"A3\"\n}\n\nif (msg.payload[11].value.value === \"\")\n { HBW_stock_out.stockItems[3].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[3].workpiece = {};\n HBW_stock_out.stockItems[3].workpiece = {\n \"id\": msg.payload[11].value.value,\n \"state\":msg.payload[12].value.value,\n \"type\": msg.payload[13].value.value }; \n HBW_stock_out.stockItems[3].location = \"B1\"\n}\n\nif (msg.payload[14].value.value === \"\")\n { HBW_stock_out.stockItems[4].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[4].workpiece = {};\n HBW_stock_out.stockItems[4].workpiece = {\n \"id\": msg.payload[14].value.value,\n \"state\":msg.payload[15].value.value,\n \"type\": msg.payload[16].value.value }; \n HBW_stock_out.stockItems[4].location = \"B2\"\n}\n\nif (msg.payload[17].value.value === \"\")\n { HBW_stock_out.stockItems[5].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[5].workpiece = {};\n HBW_stock_out.stockItems[5].workpiece = {\n \"id\": msg.payload[17].value.value,\n \"state\":msg.payload[18].value.value,\n \"type\": msg.payload[19].value.value }; \n HBW_stock_out.stockItems[5].location = \"B3\"\n}\n\nif (msg.payload[20].value.value === \"\")\n { HBW_stock_out.stockItems[6].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[6].workpiece = {};\n HBW_stock_out.stockItems[6].workpiece = {\n \"id\": msg.payload[20].value.value,\n \"state\":msg.payload[21].value.value,\n \"type\": msg.payload[22].value.value }; \n HBW_stock_out.stockItems[6].location = \"C1\"\n}\n\nif (msg.payload[23].value.value === \"\")\n { HBW_stock_out.stockItems[7].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[7].workpiece = {};\n HBW_stock_out.stockItems[7].workpiece = {\n \"id\": msg.payload[23].value.value,\n \"state\":msg.payload[24].value.value,\n \"type\": msg.payload[25].value.value }; \n HBW_stock_out.stockItems[7].location = \"C2\"\n}\n\n\nif (msg.payload[26].value.value === \"\")\n { HBW_stock_out.stockItems[8].location = \"\";\n }\nelse\n{ \n HBW_stock_out.stockItems[8].workpiece = {};\n HBW_stock_out.stockItems[8].workpiece = {\n \"id\": msg.payload[26].value.value,\n \"state\":msg.payload[27].value.value,\n \"type\": msg.payload[28].value.value }; \n HBW_stock_out.stockItems[8].location = \"C3\"\n}\n\nnew_msg.payload = JSON.stringify(HBW_stock_out);\nnew_msg.pl_obj = (HBW_stock_out);\nreturn new_msg;","outputs":1,"noerr":0,"x":870,"y":600,"wires":[["a42f27e9.9eebd","a1dae50.3e6a018"]]},{"id":"b60c6547.1adbf8","type":"inject","z":"f27e9a4.d7269e8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":700,"wires":[["7e81dbbd.876844"]]},{"id":"7e81dbbd.876844","type":"function","z":"f27e9a4.d7269e8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"Stock_HBW\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":700,"wires":[["264678cd.15c11"]]},{"id":"264678cd.15c11","type":"OPCUA-IIoT-Write","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":700,"wires":[["89d2c3b3.d6812"]]},{"id":"89d2c3b3.d6812","type":"OPCUA-IIoT-Response","z":"f27e9a4.d7269e8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":700,"wires":[[]]},{"id":"940bd4b.e3096a8","type":"comment","z":"f27e9a4.d7269e8","name":"Trigger HBW stock action","info":"","x":150,"y":660,"wires":[]},{"id":"a42f27e9.9eebd","type":"debug","z":"f27e9a4.d7269e8","name":"PLC out to HBW Stock","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1160,"y":560,"wires":[]},{"id":"3310a09f.ae8fa","type":"comment","z":"f27e9a4.d7269e8","name":"Subscribe","info":"","x":80,"y":520,"wires":[]},{"id":"43067afe.b82a0c","type":"comment","z":"f27e9a4.d7269e8","name":"End","info":"","x":70,"y":800,"wires":[]},{"id":"579f7729.835cb8","type":"comment","z":"f27e9a4.d7269e8","name":"Publish","info":"","x":70,"y":40,"wires":[]},{"id":"c96e1f89.5ae768","type":"comment","z":"f27e9a4.d7269e8","name":"Order Workpiece - control actions from MQTT","info":"","x":190,"y":80,"wires":[]},{"id":"eda38feb.2caaa8","type":"debug","z":"f27e9a4.d7269e8","name":"f/o/order","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":740,"y":120,"wires":[]},{"id":"e7426646.c0b36","type":"mqtt in","z":"f27e9a4.d7269e8","name":"","topic":"f/o/order","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":120,"wires":[["14b7cf8f.2c3cf8","b0aa04de.b7b368"]]},{"id":"14b7cf8f.2c3cf8","type":"function","z":"f27e9a4.d7269e8","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"OrderWorkpieceButton\".\"s_type\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Publish\".\"OrderWorkpieceButton\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.type,\n msg.payload.ts\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":120,"wires":[["1c3414b2.7ffe0b"]]},{"id":"1c3414b2.7ffe0b","type":"OPCUA-IIoT-Write","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":430,"y":120,"wires":[["4e03142f.9db8dc"]]},{"id":"4e03142f.9db8dc","type":"OPCUA-IIoT-Response","z":"f27e9a4.d7269e8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":580,"y":120,"wires":[["eda38feb.2caaa8"]]},{"id":"6709e4ea.97feb4","type":"comment","z":"f27e9a4.d7269e8","name":"State Order - actual values to MQTT ","info":"","x":160,"y":240,"wires":[]},{"id":"51d9b27a.f4f0e4","type":"OPCUA-IIoT-Inject","z":"f27e9a4.d7269e8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":280,"wires":[["bd7d059e.84cb8"]]},{"id":"62c1c99a.4ad388","type":"mqtt out","z":"f27e9a4.d7269e8","name":"","topic":"f/i/order","qos":"0","retain":"","broker":"788959e0.92f718","x":1040,"y":280,"wires":[]},{"id":"50e236ae.ece588","type":"comment","z":"f27e9a4.d7269e8","name":"Subscribe","info":"","x":80,"y":200,"wires":[]},{"id":"bd7d059e.84cb8","type":"OPCUA-IIoT-Listener","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":"5","name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":280,"wires":[["a54f69a6.6d0ec8"]]},{"id":"a54f69a6.6d0ec8","type":"function","z":"f27e9a4.d7269e8","name":"read Order state","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for state Order\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"s_state\"',\n \"datatypeName\":'String'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"s_type\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":280,"wires":[["99e78949.497c88"]]},{"id":"99e78949.497c88","type":"OPCUA-IIoT-Read","z":"f27e9a4.d7269e8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":280,"wires":[["d1811b9f.770d"]]},{"id":"d1811b9f.770d","type":"function","z":"f27e9a4.d7269e8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar state_order = {\n ts: \"\",\n state: \"\",\n type: \"\",\n }\n\nstate_order.state = msg.payload[0].value.value; //[0] = state\nstate_order.type = msg.payload[1].value.value; //[1] = type\nstate_order.ts = msg.payload[2].value.value; //[2] = timestamp\n\nnew_msg.payload = JSON.stringify(state_order);\n\nreturn new_msg;","outputs":1,"noerr":0,"x":810,"y":280,"wires":[["8cd3a33e.67f458","62c1c99a.4ad388"]]},{"id":"760fc958.ba97e","type":"inject","z":"f27e9a4.d7269e8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":380,"wires":[["b557589f.7c33b"]]},{"id":"b557589f.7c33b","type":"function","z":"f27e9a4.d7269e8","name":"declare values","func":"var ts = new Date().toISOString();\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"State_Order\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [ts];\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":380,"wires":[["9b3496d4.7005a8"]]},{"id":"9b3496d4.7005a8","type":"OPCUA-IIoT-Write","z":"f27e9a4.d7269e8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":450,"y":380,"wires":[["165fb096.b8ff07"]]},{"id":"165fb096.b8ff07","type":"OPCUA-IIoT-Response","z":"f27e9a4.d7269e8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":600,"y":380,"wires":[[]]},{"id":"d03b53e8.13e0b8","type":"comment","z":"f27e9a4.d7269e8","name":"Trigger state Order","info":"","x":130,"y":340,"wires":[]},{"id":"8cd3a33e.67f458","type":"debug","z":"f27e9a4.d7269e8","name":"f/i/order","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1040,"y":240,"wires":[]},{"id":"b0aa04de.b7b368","type":"debug","z":"f27e9a4.d7269e8","name":"mqtt order in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":250,"y":160,"wires":[]},{"id":"4be6403c.29abd8","type":"debug","z":"f27e9a4.d7269e8","name":"read in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":840,"y":560,"wires":[]},{"id":"38c6f16e.60b216","type":"mqtt in","z":"1bbb875f.799c41","name":"","topic":"i/cam","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":120,"wires":[["746e989a.9e1e48"]]},{"id":"746e989a.9e1e48","type":"function","z":"1bbb875f.799c41","name":"value to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"CameraPicture\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n// { \"name\":\"\",\n// \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"CameraPicture\".\"s_data\"',\n// \"datatypeName\":'String'},\n ]\nmsg.valuesToWrite = [\n msg.payload.ts,\n// msg.payload.data,\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":120,"wires":[["a744aaf9.607cf8","2b490d6a.7d923a"]]},{"id":"a744aaf9.607cf8","type":"OPCUA-IIoT-Write","z":"1bbb875f.799c41","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":120,"wires":[["ec740d86.a936e"]]},{"id":"ec740d86.a936e","type":"OPCUA-IIoT-Response","z":"1bbb875f.799c41","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":120,"wires":[[]]},{"id":"3afc4054.0803a","type":"comment","z":"1bbb875f.799c41","name":"Sensor Signals from TXT","info":"","x":130,"y":60,"wires":[]},{"id":"d318e897.cf6d8","type":"comment","z":"1bbb875f.799c41","name":"End","info":"","x":70,"y":460,"wires":[]},{"id":"14dc81ea.35b4f6","type":"mqtt in","z":"1bbb875f.799c41","name":"","topic":"i/bme680","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":240,"wires":[["3ac69873.ebbd68"]]},{"id":"8a37dfee.e935b","type":"mqtt in","z":"1bbb875f.799c41","name":"","topic":"i/ldr","qos":"0","datatype":"json","broker":"788959e0.92f718","x":70,"y":340,"wires":[["ecc1fb8d.138cd8"]]},{"id":"3ac69873.ebbd68","type":"function","z":"1bbb875f.799c41","name":"values to write","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"i_aq\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"di_gr\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_h\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"i_iaq\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_p\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_rh\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_rt\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"r_t\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"EnvironmentSensor\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.aq,\n msg.payload.gr,\n msg.payload.h,\n msg.payload.iaq,\n msg.payload.p,\n msg.payload.rh,\n msg.payload.rt,\n msg.payload.t,\n msg.payload.ts,\n]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":240,"wires":[["c381e352.557c98","371d4544.9d0042"]]},{"id":"c381e352.557c98","type":"OPCUA-IIoT-Write","z":"1bbb875f.799c41","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":240,"wires":[["e0151dc2.2d174"]]},{"id":"e0151dc2.2d174","type":"OPCUA-IIoT-Response","z":"1bbb875f.799c41","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":240,"wires":[[]]},{"id":"ecc1fb8d.138cd8","type":"function","z":"1bbb875f.799c41","name":"values to write","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"BrightnessSensor\".\"i_ldr\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"BrightnessSensor\".\"r_br\"',\n \"datatypeName\":'Float'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"BrightnessSensor\".\"ldt_ts\"',\n \"datatypeName\":'DateTime'},\n ]\n\nmsg.valuesToWrite = [\n msg.payload.ldr,\n msg.payload.br,\n msg.payload.ts,\n]\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":340,"wires":[["dc8e27a9.7bd0a","f5c18683.2ddb1"]]},{"id":"dc8e27a9.7bd0a","type":"OPCUA-IIoT-Write","z":"1bbb875f.799c41","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"x":430,"y":340,"wires":[["bb217b43.09e4a8"]]},{"id":"bb217b43.09e4a8","type":"OPCUA-IIoT-Response","z":"1bbb875f.799c41","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":590,"y":340,"wires":[[]]},{"id":"2b490d6a.7d923a","type":"debug","z":"1bbb875f.799c41","name":"write i/cam tmstmp to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":80,"wires":[]},{"id":"371d4544.9d0042","type":"debug","z":"1bbb875f.799c41","name":"write i/bme680 data to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":200,"wires":[]},{"id":"f5c18683.2ddb1","type":"debug","z":"1bbb875f.799c41","name":"write i/ldr data to OPC","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":620,"y":300,"wires":[]},{"id":"c19c3a95.da0e78","type":"OPCUA-IIoT-Inject","z":"40d33793.7558d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"x_Position_Reached\"","datatypeName":""}],"x":110,"y":80,"wires":[["1847b81e.0bb6f8"]]},{"id":"1847b81e.0bb6f8","type":"OPCUA-IIoT-Listener","z":"40d33793.7558d8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":80,"wires":[["9c60c1c7.2c8f18"]]},{"id":"9c60c1c7.2c8f18","type":"function","z":"40d33793.7558d8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Horizontal_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Vertical_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":80,"wires":[["758e1c3c.2ba854"]]},{"id":"758e1c3c.2ba854","type":"OPCUA-IIoT-Read","z":"40d33793.7558d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":80,"wires":[["fb542bb6.4c6878","af75b462.d672d8"]]},{"id":"fb542bb6.4c6878","type":"function","z":"40d33793.7558d8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { hz_axis_actpos: 0,\n hz_axis_targetpos: 0,\n hz_axis_posreached: 0,\n vert_axis_actpos: 0,\n vert_axis_targetpos: 0,\n vert_axis_posreached: 0\n };\n\n\noutput.hz_axis_actpos = msg.payload[0].value.value; \noutput.hz_axis_targetpos = msg.payload[1].value.value; \noutput.hz_axis_posreached = msg.payload[2].value.value; \noutput.vert_axis_actpos = msg.payload[3].value.value; \noutput.vert_axis_targetpos = msg.payload[4].value.value; \noutput.vert_axis_posreached = msg.payload[5].value.value; \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["68726228.04cd5c","3095523e.c04016","392670.07d5199","585eaba.0a1bfd4"]]},{"id":"68726228.04cd5c","type":"function","z":"40d33793.7558d8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"HBW_hz_axis_X\"\n\nmsg.top = 300\nmsg.left = 100\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.hz_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["8158f94b.ad1eb8"]]},{"id":"8158f94b.ad1eb8","type":"function","z":"40d33793.7558d8","name":"color all Items","func":"var lastState = flow.get('HBW_State') || {};\n\n// Colorize \nif (msg.payload.state == 1) \n{ msg.payload.color = '#5a5' } else\n{ msg.payload.color = '#a55' }\n\n\nlastState[msg.topic] = msg.payload; \nflow.set('HBW_State', lastState);\nreturn { \n \"topic\": msg.topic,\n \"payload\": lastState,\n \"url\": msg.url\n};\n","outputs":1,"noerr":0,"x":820,"y":160,"wires":[["14e063c3.f8b8ec"]]},{"id":"14e063c3.f8b8ec","type":"link out","z":"40d33793.7558d8","name":"toPicBox","links":["bb73551f.fa8d"],"x":975,"y":160,"wires":[]},{"id":"bb73551f.fa8d","type":"link in","z":"40d33793.7558d8","name":"PicBox","links":["14e063c3.f8b8ec","b54e35de.9e131"],"x":75,"y":360,"wires":[["bc1b61a8.b70418"]]},{"id":"bc1b61a8.b70418","type":"ui_template","z":"40d33793.7558d8","group":"7f600873.485d1","name":"Status Picture VGR","order":2,"width":9,"height":7,"format":"\n\n
\n\n
\n \n \n \n {{el.text}}\n \n
\n
\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":210,"y":360,"wires":[[]]},{"id":"6f5a2122.1f3448","type":"comment","z":"40d33793.7558d8","name":"HMI - Picture Box","info":"","x":120,"y":320,"wires":[]},{"id":"fcd8702c.5ee98","type":"comment","z":"40d33793.7558d8","name":"read real values from PLC","info":"","x":150,"y":40,"wires":[]},{"id":"3095523e.c04016","type":"function","z":"40d33793.7558d8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"HBW_hz_axis_W\"\n\nmsg.top = 320\nmsg.left = 100\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.hz_axis_targetpos\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":200,"wires":[["8158f94b.ad1eb8"]]},{"id":"ef0d76c0.9bac4","type":"debug","z":"40d33793.7558d8","name":"Read HBW Pos.","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":580,"y":480,"wires":[]},{"id":"392670.07d5199","type":"function","z":"40d33793.7558d8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"HBW_vert_axis_X\"\n\nmsg.top = 70\nmsg.left = 270\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.vert_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["8158f94b.ad1eb8"]]},{"id":"585eaba.0a1bfd4","type":"function","z":"40d33793.7558d8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"HBW_vert_axis_W\"\n\nmsg.top = 90\nmsg.left = 270\nmsg.url = \"url(http://192.168.0.5:1880/images/HBW.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.vert_axis_targetpos\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":300,"wires":[["8158f94b.ad1eb8"]]},{"id":"796bcf22.7b51a","type":"OPCUA-IIoT-Inject","z":"40d33793.7558d8","injectType":"inject","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"Init","payload":"","addressSpaceItems":[],"x":110,"y":480,"wires":[["b793ab10.b3a828"]]},{"id":"64c49f07.3e14c8","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":540,"wires":[["4877dca2.924d1c"]]},{"id":"4877dca2.924d1c","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":540,"wires":[["60fa7383.0e42e4"]]},{"id":"60fa7383.0e42e4","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":540,"wires":[[]]},{"id":"1cf34a00.49e556","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":600,"wires":[["ed9bc869.8af17"]]},{"id":"ed9bc869.8af17","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":600,"wires":[["8b2161fb.e9d6f8"]]},{"id":"8b2161fb.e9d6f8","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":600,"wires":[[]]},{"id":"1582d77c.dedc81","type":"comment","z":"40d33793.7558d8","name":"HMI - Positions","info":"","x":120,"y":440,"wires":[]},{"id":"9175e6d9.13dd48","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[0,0].\"di_PosRack_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":860,"wires":[["fea464cb.5396b8"]]},{"id":"fea464cb.5396b8","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":860,"wires":[["9eb98e.7b45de7"]]},{"id":"9eb98e.7b45de7","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":860,"wires":[[]]},{"id":"f175b82e.fe3c58","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[0,0].\"di_PosRack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":920,"wires":[["be9d8a7a.03353"]]},{"id":"be9d8a7a.03353","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":920,"wires":[["3536f0ea.2c34d"]]},{"id":"3536f0ea.2c34d","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":920,"wires":[[]]},{"id":"62e451c4.63d2f","type":"file","z":"bcaa3a6a.3bdbe8","name":"ConfigData.csv","filename":".node-red/pub/CSV/ConfigData.csv","appendNewline":true,"createDir":true,"overwriteFile":"true","encoding":"none","x":1120,"y":80,"wires":[[]]},{"id":"598108f7.a32b4","type":"csv","z":"bcaa3a6a.3bdbe8","name":"","sep":",","hdrin":true,"hdrout":true,"multi":"one","ret":"\\r\\n","temp":"Version_Index, HBW_di_PosBelt_Horizontal, HBW_di_PosBelt_Vertical, HBW_di_PosBelt_Offset_Vertical, HBW_di_PosRack_Offset_Vertical, HBW_di_PosRack_A1_Horizontal, HBW_di_PosRack_A1_Vertical, HBW_di_PosRack_B2_Horizontal, HBW_di_PosRack_B2_Vertical, HBW_di_PosRack_C3_Horizontal, HBW_di_PosRack_C3_Vertical, VGR_di_Pos_Color_horizontal, VGR_di_Pos_Color_vertical, VGR_di_Pos_Color_rotate, VGR_di_Pos_DSI_horizontal, VGR_di_Pos_DSI_Collect_vertical, VGR_di_Pos_DSI_Discard_vertical, VGR_di_Pos_DSI_rotate, VGR_di_Offset_Pos_DSI_NFC_vertical, VGR_di_Pos_DSO_horizontal, VGR_di_Pos_DSO_Collect_vertical, VGR_di_Pos_DSO_Discard_vertical, VGR_di_Pos_DSO_rotate, VGR_di_Offset_Pos_DSO_vertical, VGR_di_Pos_HBW_horizontal, VGR_di_Pos_HBW_Collect_vertical, VGR_di_Pos_HBW_Discard_vertical, VGR_di_Pos_HBW_rotate, VGR_di_Offset_Pos_HBW_horizontal, VGR_di_Offset_Pos_HBW_vertical, VGR_di_Pos_MPO_horizontal, VGR_di_Pos_MPO_vertical, VGR_di_Pos_MPO_rotate, VGR_di_Offset_Pos_MPO_vertical, VGR_di_Pos_NFC_horizontal, VGR_di_Pos_NFC_vertical, VGR_di_Pos_NFC_rotate, VGR_di_Pos_NiO_horizontal, VGR_di_Pos_NiO_vertical, VGR_di_Pos_NiO_rotate, VGR_di_Pos_SLD_Blue_horizontal, VGR_di_Pos_SLD_Blue_vertical, VGR_di_Pos_SLD_Blue_rotate, VGR_di_Pos_SLD_Red_horizontal, VGR_di_Pos_SLD_Red_vertical, VGR_di_Pos_SLD_Red_rotate, VGR_di_Pos_SLD_White_horizontal, VGR_di_Pos_SLD_White_vertical, VGR_di_Pos_SLD_White_rotate, SSC_di_PosCentre_Horizontal, SSC_di_PosCentre_Vertical, SSC_di_PosHBW_Horizontal, SSC_di_PosHBW_Vertical, SSC_w_Threshold_Red_Blue, SSC_w_Threshold_White_Red, SLD_w_Threshold_Red_Blue, SLD_w_Threshold_White_Red, SLD_i_CounterValue_Blue, SLD_i_CounterValue_Red, SLD_i_CounterValue_White","skip":0,"strings":true,"x":950,"y":80,"wires":[["62e451c4.63d2f"]]},{"id":"d7e62043.7ba3d","type":"http in","z":"bcaa3a6a.3bdbe8","name":"downloads","url":"/downloads","method":"get","upload":false,"swaggerDoc":"","x":120,"y":140,"wires":[["bbbc5437.d371c8"]]},{"id":"1bdac880.bfc6d8","type":"http response","z":"bcaa3a6a.3bdbe8","name":"response","statusCode":"200","headers":{"content-type":"text/plain"},"x":440,"y":140,"wires":[]},{"id":"bbbc5437.d371c8","type":"ui_template","z":"bcaa3a6a.3bdbe8","group":"6bec7372.842fa4","name":"","order":3,"width":6,"height":1,"format":"
\nDownload ConfigData.csv\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":280,"y":140,"wires":[["1bdac880.bfc6d8"]]},{"id":"e1799448.4ec238","type":"comment","z":"bcaa3a6a.3bdbe8","name":"Save config data (with Download Link)","info":"","x":190,"y":40,"wires":[]},{"id":"45f7dad0.91549c","type":"function","z":"bcaa3a6a.3bdbe8","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":80,"wires":[["8f4d5755.e5e118"]]},{"id":"8f4d5755.e5e118","type":"OPCUA-IIoT-Read","z":"bcaa3a6a.3bdbe8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":550,"y":80,"wires":[["df5838a3.8e2b18","ba104c4f.f439c8"]]},{"id":"df5838a3.8e2b18","type":"function","z":"bcaa3a6a.3bdbe8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //Version Index\n Version_Index: \"1.0\", //[]\n //HBW\n HBW_di_PosBelt_Horizontal: 1, //[0]\n HBW_di_PosBelt_Vertical: 1, //[1]\n HBW_di_PosBelt_Offset_Vertical: 1, //[2]\n \n HBW_di_PosRack_Offset_Vertical: 1, //[3]\n HBW_di_PosRack_A1_Horizontal: 1, //[4]\n HBW_di_PosRack_A1_Vertical: 1, //[5]\n\n HBW_di_PosRack_B2_Horizontal: 1, //[6]\n HBW_di_PosRack_B2_Vertical: 1, //[7]\n\n HBW_di_PosRack_C3_Horizontal: 1, //[8]\n HBW_di_PosRack_C3_Vertical: 1, //[9]\n\n //VGR\n VGR_di_Pos_Color_horizontal: 1, //[10]\n VGR_di_Pos_Color_vertical: 1, //[11]\n VGR_di_Pos_Color_rotate: 1, //[12]\n //Pos DSI\n VGR_di_Pos_DSI_horizontal: 1, //[13]\n VGR_di_Pos_DSI_Collect_vertical: 1, //[14]\n VGR_di_Pos_DSI_Discard_vertical: 1, //[15]\n VGR_di_Pos_DSI_rotate: 1, //[16]\n VGR_di_Offset_Pos_DSI_NFC_vertical: 1, //[17]\n //Pos DSO\n VGR_di_Pos_DSO_horizontal: 1, //[18] \n VGR_di_Pos_DSO_Collect_vertical: 1, //[19]\n VGR_di_Pos_DSO_Discard_vertical: 1, //[20] \n VGR_di_Pos_DSO_rotate: 1, //[21] \n VGR_di_Offset_Pos_DSO_vertical: 1, //[22]\n //Pos HBW\n VGR_di_Pos_HBW_horizontal: 1, //[23] \n VGR_di_Pos_HBW_Collect_vertical: 1, //[24] \n VGR_di_Pos_HBW_Discard_vertical: 1, //[25] \n VGR_di_Pos_HBW_rotate: 1, //[26] \n VGR_di_Offset_Pos_HBW_horizontal: 1, //[27] \n VGR_di_Offset_Pos_HBW_vertical: 1, //[28] \n //Pos MPO\n VGR_di_Pos_MPO_horizontal: 1, //[29] \n VGR_di_Pos_MPO_vertical: 1, //[30] \n VGR_di_Pos_MPO_rotate: 1, //[31] \n VGR_di_Offset_Pos_MPO_vertical: 1, //[32]\n //Pos NFC\n VGR_di_Pos_NFC_horizontal: 1, //[33] \n VGR_di_Pos_NFC_vertical: 1, //[34] \n VGR_di_Pos_NFC_rotate: 1, //[35] \n //Pos NiO\n VGR_di_Pos_NiO_horizontal: 1, //[36] \n VGR_di_Pos_NiO_vertical: 1, //[37] \n VGR_di_Pos_NiO_rotate: 1, //[38] \n //Pos SLD Blue\n VGR_di_Pos_SLD_Blue_horizontal: 1, //[39] \n VGR_di_Pos_SLD_Blue_vertical: 1, //[40] \n VGR_di_Pos_SLD_Blue_rotate: 1, //[41] \n //Pos SLD Red\n VGR_di_Pos_SLD_Red_horizontal:1, //[42] \n VGR_di_Pos_SLD_Red_vertical:1, //[43] \n VGR_di_Pos_SLD_Red_rotate:1, //[44] \n //Pos SLD White\n VGR_di_Pos_SLD_White_horizontal: 1, //[45] \n VGR_di_Pos_SLD_White_vertical: 1, //[46] \n VGR_di_Pos_SLD_White_rotate: 1, //[47] \n\n //SSC\n //Centre\n SSC_di_PosCentre_Horizontal: 1, //[48]\n SSC_di_PosCentre_Vertical: 1, //[49]\n //HBW\n SSC_di_PosHBW_Horizontal: 1, //[50]\n SSC_di_PosHBW_Vertical: 1, //[51]\n\n //Color Sensor Calibration\n //DSI\n SSC_w_Threshold_Red_Blue: 1, //[52]\n SSC_w_Threshold_White_Red: 1, //[53]\n\n //Color Sensor Calibration\n //SLD\n SLD_w_Threshold_Red_Blue: 1, //[54]\n SLD_w_Threshold_White_Red: 1, //[55]\n \n //Pushout Counter\n //SLD\n SLD_i_CounterValue_Blue: 1, //[56]\n SLD_i_CounterValue_Red: 1, //[57]\n SLD_i_CounterValue_White: 1, //[58]\n\n }\n\n\n\n\nConfData_out.Version_Index = \"1.0\";\n//HBW\nConfData_out.HBW_di_PosBelt_Horizontal = msg.payload[0].value.value; //[0] \nConfData_out.HBW_di_PosBelt_Vertical = msg.payload[1].value.value; //[1] \nConfData_out.HBW_di_PosBelt_Offset_Vertical= msg.payload[2].value.value; //[2]\n\nConfData_out.HBW_di_PosRack_Offset_Vertical= msg.payload[3].value.value; //[3]\nConfData_out.HBW_di_PosRack_A1_Horizontal = msg.payload[4].value.value; //[4] \nConfData_out.HBW_di_PosRack_A1_Vertical = msg.payload[5].value.value; //[5]\n\nConfData_out.HBW_di_PosRack_B2_Horizontal = msg.payload[6].value.value; //[6] \nConfData_out.HBW_di_PosRack_B2_Vertical = msg.payload[7].value.value; //[7]\n\nConfData_out.HBW_di_PosRack_C3_Horizontal = msg.payload[8].value.value; //[8] \nConfData_out.HBW_di_PosRack_C3_Vertical = msg.payload[9].value.value; //[9]\n\n//VGR\n//Pos Color\nConfData_out.VGR_di_Pos_Color_horizontal = msg.payload[10].value.value; //[10] \nConfData_out.VGR_di_Pos_Color_vertical = msg.payload[11].value.value; //[11] \nConfData_out.VGR_di_Pos_Color_rotate = msg.payload[12].value.value; //[12] \n//Pos DSI\nConfData_out.VGR_di_Pos_DSI_horizontal = msg.payload[13].value.value; //[13] \nConfData_out.VGR_di_Pos_DSI_Collect_vertical = msg.payload[14].value.value; //[14] \nConfData_out.VGR_di_Pos_DSI_Discard_vertical = msg.payload[15].value.value; //[15] \nConfData_out.VGR_di_Pos_DSI_rotate = msg.payload[16].value.value; //[16] \nConfData_out.VGR_di_Offset_Pos_DSI_NFC_vertical = msg.payload[17].value.value; //[17] \n//Pos DSO\nConfData_out.VGR_di_Pos_DSO_horizontal = msg.payload[18].value.value; //[18] \nConfData_out.VGR_di_Pos_DSO_Collect_vertical = msg.payload[19].value.value; //[19] \nConfData_out.VGR_di_Pos_DSO_Discard_vertical = msg.payload[20].value.value; //[20] \nConfData_out.VGR_di_Pos_DSO_rotate = msg.payload[21].value.value; //[21] \nConfData_out.VGR_di_Offset_Pos_DSO_vertical = msg.payload[22].value.value; //[22] \n//Pos HBW\nConfData_out.VGR_di_Pos_HBW_horizontal = msg.payload[23].value.value; //[23] \nConfData_out.VGR_di_Pos_HBW_Collect_vertical = msg.payload[24].value.value; //[24] \nConfData_out.VGR_di_Pos_HBW_Discard_vertical = msg.payload[25].value.value; //[25] \nConfData_out.VGR_di_Pos_HBW_rotate = msg.payload[26].value.value; //[26] \nConfData_out.VGR_di_Offset_Pos_HBW_horizontal = msg.payload[27].value.value; //[27] \nConfData_out.VGR_di_Offset_Pos_HBW_vertical = msg.payload[28].value.value; //[28] \n//Pos MPO\nConfData_out.VGR_di_Pos_MPO_horizontal = msg.payload[29].value.value; //[29] \nConfData_out.VGR_di_Pos_MPO_vertical = msg.payload[30].value.value; //[30] \nConfData_out.VGR_di_Pos_MPO_rotate = msg.payload[31].value.value; //[31] \nConfData_out.VGR_di_Offset_Pos_MPO_vertical = msg.payload[32].value.value; //[32] \n//Pos NFC\nConfData_out.VGR_di_Pos_NFC_horizontal = msg.payload[33].value.value; //[33] \nConfData_out.VGR_di_Pos_NFC_vertical = msg.payload[34].value.value; //[34] \nConfData_out.VGR_di_Pos_NFC_rotate = msg.payload[35].value.value; //[35] \n//Pos NiO\nConfData_out.VGR_di_Pos_NiO_horizontal = msg.payload[36].value.value; //[36] \nConfData_out.VGR_di_Pos_NiO_vertical = msg.payload[37].value.value; //[37] \nConfData_out.VGR_di_Pos_NiO_rotate = msg.payload[38].value.value; //[38] \n//Pos SLD Blue\nConfData_out.VGR_di_Pos_SLD_Blue_horizontal = msg.payload[39].value.value; //[39] \nConfData_out.VGR_di_Pos_SLD_Blue_vertical = msg.payload[40].value.value; //[40] \nConfData_out.VGR_di_Pos_SLD_Blue_rotate = msg.payload[41].value.value; //[41] \n//Pos SLD Red\nConfData_out.VGR_di_Pos_SLD_Red_horizontal = msg.payload[42].value.value; //[42] \nConfData_out.VGR_di_Pos_SLD_Red_vertical = msg.payload[43].value.value; //[43] \nConfData_out.VGR_di_Pos_SLD_Red_rotate = msg.payload[44].value.value; //[44] \n//Pos SLD White\nConfData_out.VGR_di_Pos_SLD_White_horizontal = msg.payload[45].value.value; //[45] \nConfData_out.VGR_di_Pos_SLD_White_vertical = msg.payload[46].value.value; //[46] \nConfData_out.VGR_di_Pos_SLD_White_rotate = msg.payload[47].value.value; //[47] \n\n//SSC\n//Pos Centre\nConfData_out.SSC_di_PosCentre_Horizontal = msg.payload[48].value.value; //[48] \nConfData_out.SSC_di_PosCentre_Vertical = msg.payload[49].value.value; //[49] \n//Pos HBW\nConfData_out.SSC_di_PosHBW_Horizontal = msg.payload[50].value.value; //[50]\nConfData_out.SSC_di_PosHBW_Vertical = msg.payload[51].value.value; //[51]\n\n//Color Sensor Calibration\n//DSI\nConfData_out.SSC_w_Threshold_Red_Blue = msg.payload[52].value.value; //[52]\nConfData_out.SSC_w_Threshold_White_Red = msg.payload[53].value.value; //[53]\n\n//Color Sensor Calibration\n//SLD\nConfData_out.SLD_w_Threshold_Red_Blue = msg.payload[54].value.value; //[54]\nConfData_out.SLD_w_Threshold_White_Red = msg.payload[55].value.value; //[55]\n \n//Pushout Counter\n//SLD\nConfData_out.SLD_i_CounterValue_Blue = msg.payload[56].value.value; //[56]\nConfData_out.SLD_i_CounterValue_Red = msg.payload[57].value.value; //[57]\nConfData_out.SLD_i_CounterValue_White = msg.payload[58].value.value; //[58]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":750,"y":80,"wires":[["598108f7.a32b4","e33b94f0.11d828"]]},{"id":"80690a67.faa2","type":"file in","z":"bcaa3a6a.3bdbe8","name":"ConfigData.csv","filename":".node-red/pub/CSV/ConfigData.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":320,"y":260,"wires":[["b0a17a71.115998"]]},{"id":"b0a17a71.115998","type":"csv","z":"bcaa3a6a.3bdbe8","name":"","sep":",","hdrin":true,"hdrout":false,"multi":"one","ret":"\\r\\n","temp":"Version_Index, HBW_di_PosBelt_Horizontal, HBW_di_PosBelt_Vertical, HBW_di_PosBelt_Offset_Vertical, HBW_di_PosRack_Offset_Vertical, HBW_di_PosRack_A1_Horizontal, HBW_di_PosRack_A1_Vertical, HBW_di_PosRack_B2_Horizontal, HBW_di_PosRack_B2_Vertical, HBW_di_PosRack_C3_Horizontal, HBW_di_PosRack_C3_Vertical, VGR_di_Pos_Color_horizontal, VGR_di_Pos_Color_vertical, VGR_di_Pos_Color_rotate, VGR_di_Pos_DSI_horizontal, VGR_di_Pos_DSI_Collect_vertical, VGR_di_Pos_DSI_Discard_vertical, VGR_di_Pos_DSI_rotate, VGR_di_Offset_Pos_DSI_NFC_vertical, VGR_di_Pos_DSO_horizontal, VGR_di_Pos_DSO_Collect_vertical, VGR_di_Pos_DSO_Discard_vertical, VGR_di_Pos_DSO_rotate, VGR_di_Offset_Pos_DSO_vertical, VGR_di_Pos_HBW_horizontal, VGR_di_Pos_HBW_Collect_vertical, VGR_di_Pos_HBW_Discard_vertical, VGR_di_Pos_HBW_rotate, VGR_di_Offset_Pos_HBW_horizontal, VGR_di_Offset_Pos_HBW_vertical, VGR_di_Pos_MPO_horizontal, VGR_di_Pos_MPO_vertical, VGR_di_Pos_MPO_rotate, VGR_di_Offset_Pos_MPO_vertical, VGR_di_Pos_NFC_horizontal, VGR_di_Pos_NFC_vertical, VGR_di_Pos_NFC_rotate, VGR_di_Pos_NiO_horizontal, VGR_di_Pos_NiO_vertical, VGR_di_Pos_NiO_rotate, VGR_di_Pos_SLD_Blue_horizontal, VGR_di_Pos_SLD_Blue_vertical, VGR_di_Pos_SLD_Blue_rotate, VGR_di_Pos_SLD_Red_horizontal, VGR_di_Pos_SLD_Red_vertical, VGR_di_Pos_SLD_Red_rotate, VGR_di_Pos_SLD_White_horizontal, VGR_di_Pos_SLD_White_vertical, VGR_di_Pos_SLD_White_rotate, SSC_di_PosCentre_Horizontal, SSC_di_PosCentre_Vertical, SSC_di_PosHBW_Horizontal, SSC_di_PosHBW_Vertical, SSC_w_Threshold_Red_Blue, SSC_w_Threshold_White_Red, SLD_w_Threshold_Red_Blue, SLD_w_Threshold_White_Red, SLD_i_CounterValue_Blue, SLD_i_CounterValue_Red, SLD_i_CounterValue_White","skip":0,"strings":true,"x":490,"y":260,"wires":[["72a051c6.5b7af","b5f92d7c.873f38"]]},{"id":"72a051c6.5b7af","type":"function","z":"bcaa3a6a.3bdbe8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\n\nmsg.valuesToWrite = [\n //HBW\n msg.payload.HBW_di_PosBelt_Horizontal, //[0]\n msg.payload.HBW_di_PosBelt_Vertical, //[1]\n msg.payload.HBW_di_PosBelt_Offset_Vertical, //[2]\n\n msg.payload.HBW_di_PosRack_Offset_Vertical, //[3]\n msg.payload.HBW_di_PosRack_A1_Horizontal, //[4]\n msg.payload.HBW_di_PosRack_A1_Vertical, //[5]\n\n msg.payload.HBW_di_PosRack_B2_Horizontal, //[6]\n msg.payload.HBW_di_PosRack_B2_Vertical, //[7]\n\n msg.payload.HBW_di_PosRack_C3_Horizontal, //[8]\n msg.payload.HBW_di_PosRack_C3_Vertical, //[9]\n\n //VGR\n msg.payload.VGR_di_Pos_Color_horizontal, //[10]\n msg.payload.VGR_di_Pos_Color_vertical, //[11]\n msg.payload.VGR_di_Pos_Color_rotate, //[12]\n //Pos DSI\n msg.payload.VGR_di_Pos_DSI_horizontal, //[13]\n msg.payload.VGR_di_Pos_DSI_Collect_vertical, //[14]\n msg.payload.VGR_di_Pos_DSI_Discard_vertical, //[15]\n msg.payload.VGR_di_Pos_DSI_rotate, //[16]\n msg.payload.VGR_di_Offset_Pos_DSI_NFC_vertical, //[17]\n //Pos DSO\n msg.payload.VGR_di_Pos_DSO_horizontal, //[18] \n msg.payload.VGR_di_Pos_DSO_Collect_vertical, //[19]\n msg.payload.VGR_di_Pos_DSO_Discard_vertical, //[20] \n msg.payload.VGR_di_Pos_DSO_rotate, //[21] \n msg.payload.VGR_di_Offset_Pos_DSO_vertical, //[22]\n //Pos HBW\n msg.payload.VGR_di_Pos_HBW_horizontal, //[23] \n msg.payload.VGR_di_Pos_HBW_Collect_vertical, //[24] \n msg.payload.VGR_di_Pos_HBW_Discard_vertical, //[25] \n msg.payload.VGR_di_Pos_HBW_rotate, //[26] \n msg.payload.VGR_di_Offset_Pos_HBW_horizontal, //[27] \n msg.payload.VGR_di_Offset_Pos_HBW_vertical, //[28] \n //Pos MPO\n msg.payload.VGR_di_Pos_MPO_horizontal, //[29] \n msg.payload.VGR_di_Pos_MPO_vertical, //[30] \n msg.payload.VGR_di_Pos_MPO_rotate, //[31] \n msg.payload.VGR_di_Offset_Pos_MPO_vertical, //[32]\n //Pos NFC\n msg.payload.VGR_di_Pos_NFC_horizontal, //[33] \n msg.payload.VGR_di_Pos_NFC_vertical, //[34] \n msg.payload.VGR_di_Pos_NFC_rotate, //[35] \n //Pos NiO\n msg.payload.VGR_di_Pos_NiO_horizontal, //[36] \n msg.payload.VGR_di_Pos_NiO_vertical, //[37] \n msg.payload.VGR_di_Pos_NiO_rotate, //[38] \n //Pos SLD Blue\n msg.payload.VGR_di_Pos_SLD_Blue_horizontal, //[39] \n msg.payload.VGR_di_Pos_SLD_Blue_vertical, //[40] \n msg.payload.VGR_di_Pos_SLD_Blue_rotate, //[41] \n //Pos SLD Red\n msg.payload.VGR_di_Pos_SLD_Red_horizontal, //[42] \n msg.payload.VGR_di_Pos_SLD_Red_vertical, //[43] \n msg.payload.VGR_di_Pos_SLD_Red_rotate, //[44] \n //Pos SLD White\n msg.payload.VGR_di_Pos_SLD_White_horizontal, //[45] \n msg.payload.VGR_di_Pos_SLD_White_vertical, //[46] \n msg.payload.VGR_di_Pos_SLD_White_rotate, //[47] \n //SSC\n //Centre\n msg.payload.SSC_di_PosCentre_Horizontal, //[48]\n msg.payload.SSC_di_PosCentre_Vertical, //[49]\n //HBW\n msg.payload.SSC_di_PosHBW_Horizontal, //[50]\n msg.payload.SSC_di_PosHBW_Vertical, //[51]\n\n //Color Sensor Calibration\n //DSI\n msg.payload.SSC_w_Threshold_Red_Blue, //[52]\n msg.payload.SSC_w_Threshold_White_Red, //[53]\n\n //Color Sensor Calibration\n //SLD\n msg.payload.SLD_w_Threshold_Red_Blue, //[54]\n msg.payload.SLD_w_Threshold_White_Red, //[55]\n \n //Pushout Counter\n //SLD\n msg.payload.SLD_i_CounterValue_Blue, //[56]\n msg.payload.SLD_i_CounterValue_Red, //[57]\n msg.payload.SLD_i_CounterValue_White, //[58]\n\n ];\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":140,"y":320,"wires":[["fe1c17d9.37e568"]]},{"id":"fe1c17d9.37e568","type":"OPCUA-IIoT-Write","z":"bcaa3a6a.3bdbe8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":310,"y":320,"wires":[["a8d3157f.e1dfb8"]]},{"id":"a8d3157f.e1dfb8","type":"OPCUA-IIoT-Response","z":"bcaa3a6a.3bdbe8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":490,"y":320,"wires":[["68692c0.dac22d4"]]},{"id":"275b294b.b7ae96","type":"comment","z":"bcaa3a6a.3bdbe8","name":"Load config data to PLC","info":"","x":150,"y":220,"wires":[]},{"id":"ba104c4f.f439c8","type":"OPCUA-IIoT-Response","z":"bcaa3a6a.3bdbe8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":710,"y":120,"wires":[[]]},{"id":"53758868.1fdaf8","type":"link out","z":"bcaa3a6a.3bdbe8","name":"Load config data","links":["bd9747b7.6cf028","9ee547e9.5da9e8","62fed044.76c68"],"x":815,"y":320,"wires":[]},{"id":"bd9747b7.6cf028","type":"link in","z":"40d33793.7558d8","name":"","links":["53758868.1fdaf8"],"x":115,"y":660,"wires":[["b793ab10.b3a828"]]},{"id":"68692c0.dac22d4","type":"function","z":"bcaa3a6a.3bdbe8","name":"Load tmstmp ","func":"var new_msg = {};\nvar now = Date().toLocaleString('de-DE', { hour12:false });\n\nnew_msg.payload = now;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":320,"wires":[["53758868.1fdaf8"]]},{"id":"887e2037.98cbd8","type":"comment","z":"40d33793.7558d8","name":"Load config data to PLC","info":"","x":150,"y":620,"wires":[]},{"id":"fbf9fc2f.b61e58","type":"OPCUA-IIoT-Inject","z":"881fbb6.2d64cc8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"x_Position_Reached\"","datatypeName":""}],"x":110,"y":80,"wires":[["1b5aff67.e09a09"]]},{"id":"1b5aff67.e09a09","type":"OPCUA-IIoT-Listener","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":80,"wires":[["46fa3579.5e60ac"]]},{"id":"46fa3579.5e60ac","type":"function","z":"881fbb6.2d64cc8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"horizontal_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"vertical_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"rotate_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":80,"wires":[["fa08ef6c.ef669"]]},{"id":"fa08ef6c.ef669","type":"OPCUA-IIoT-Read","z":"881fbb6.2d64cc8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":630,"y":80,"wires":[["66783481.d3494c","f9d0324b.ce4b5"]]},{"id":"66783481.d3494c","type":"function","z":"881fbb6.2d64cc8","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { hz_axis_actpos: 0,\n vert_axis_actpos: 0,\n rot_axis_actpos: 0,\n hz_axis_targetpos: 0,\n vert_axis_targetpos: 0,\n rot_axis_targetpos: 0,\n hz_axis_posreached: 0,\n vert_axis_posreached: 0,\n rot_axis_posreached: 0\n };\noutput.hz_axis_actpos = msg.payload[0].value.value; \noutput.vert_axis_actpos = msg.payload[1].value.value; \noutput.rot_axis_actpos = msg.payload[2].value.value; \noutput.hz_axis_targetpos = msg.payload[3].value.value; \noutput.vert_axis_targetpos = msg.payload[4].value.value; \noutput.rot_axis_targetpos = msg.payload[5].value.value; \noutput.hz_axis_posreached = msg.payload[6].value.value; \noutput.vert_axis_posreached = msg.payload[7].value.value; \noutput.rot_axis_posreached = msg.payload[8].value.value; \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["445dd8e6.c5fe2","3c6f2241.68e77e","6e134a1e.8b4d3c","84e61de6.25047","cdb4a03c.8dc64","9a2b5890.4f57a","4524a46c.15acec"]]},{"id":"445dd8e6.c5fe2","type":"function","z":"881fbb6.2d64cc8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"VGR_hz_axis_X\"\n\nmsg.top = 60\nmsg.left = 40\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.hz_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hz. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["f16cc2e4.e07d88"]]},{"id":"f16cc2e4.e07d88","type":"function","z":"881fbb6.2d64cc8","name":"color all Items","func":"var lastState = flow.get('VGR_State') || {};\n\n// Colorize \nif (msg.payload.state == 1) \n{ msg.payload.color = '#5a5' } else\n{ msg.payload.color = '#a55' }\n\n\nlastState[msg.topic] = msg.payload; \nflow.set('VGR_State', lastState);\nreturn { \n \"topic\": msg.topic,\n \"payload\": lastState,\n \"url\": msg.url\n};\n","outputs":1,"noerr":0,"x":820,"y":300,"wires":[["76c272d9.4f18c4"]]},{"id":"76c272d9.4f18c4","type":"link out","z":"881fbb6.2d64cc8","name":"toPicBox","links":["f7ce17d0.639b98"],"x":975,"y":300,"wires":[]},{"id":"f7ce17d0.639b98","type":"link in","z":"881fbb6.2d64cc8","name":"PicBox","links":["76c272d9.4f18c4"],"x":75,"y":360,"wires":[["ee1590af.545c7"]]},{"id":"ee1590af.545c7","type":"ui_template","z":"881fbb6.2d64cc8","group":"8cacc4a1.8c2a2","name":"Status Picture VGR","order":3,"width":9,"height":7,"format":"\n\n
\n\n
\n \n \n \n {{el.text}}\n \n
\n
\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":210,"y":360,"wires":[[]]},{"id":"ee766efa.5777a8","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Picture Box","info":"","x":120,"y":320,"wires":[]},{"id":"a9085074.d8e5c8","type":"comment","z":"881fbb6.2d64cc8","name":"read real values from PLC","info":"","x":150,"y":40,"wires":[]},{"id":"3c6f2241.68e77e","type":"function","z":"881fbb6.2d64cc8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"VGR_hz_axis_W\"\n\nmsg.top = 80\nmsg.left = 40\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.hz_axis_targetpos\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hz. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":200,"wires":[["f16cc2e4.e07d88"]]},{"id":"cdb4a03c.8dc64","type":"debug","z":"881fbb6.2d64cc8","name":"act. Val. VGR","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":800,"y":160,"wires":[]},{"id":"6e134a1e.8b4d3c","type":"function","z":"881fbb6.2d64cc8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"VGR_vert_axis_X\"\n\nmsg.top = 80\nmsg.left = 280\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.vert_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["f16cc2e4.e07d88"]]},{"id":"84e61de6.25047","type":"function","z":"881fbb6.2d64cc8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"VGR_vert_axis_W\"\n\nmsg.top = 100\nmsg.left = 280\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.vert_axis_targetpos\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":300,"wires":[["f16cc2e4.e07d88"]]},{"id":"3f2b2126.0fe44e","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":600,"wires":[["8c2f785e.986d"]]},{"id":"8c2f785e.986d","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":600,"wires":[["e1309d48.5c8ce8"]]},{"id":"e1309d48.5c8ce8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":600,"wires":[[]]},{"id":"315e5775.d8984","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'\n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":660,"wires":[["7db60124.933948"]]},{"id":"7db60124.933948","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":660,"wires":[["8a473973.401d9"]]},{"id":"8a473973.401d9","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":660,"wires":[[]]},{"id":"5c337444.3799ac","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions","info":"","x":120,"y":500,"wires":[]},{"id":"102c3c27.3b9a14","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":820,"wires":[["47246981.fcc64"]]},{"id":"47246981.fcc64","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":820,"wires":[["450869c5.4ec228"]]},{"id":"450869c5.4ec228","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":820,"wires":[[]]},{"id":"2470a838.60e6e8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":880,"wires":[["cc4fe3eb.d2da"]]},{"id":"cc4fe3eb.d2da","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":880,"wires":[[]]},{"id":"d5bab92d.5f0f28","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1160,"wires":[["f3962ac8.cec468"]]},{"id":"f3962ac8.cec468","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1160,"wires":[["c6bd85b4.44c3c8"]]},{"id":"c6bd85b4.44c3c8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1160,"wires":[[]]},{"id":"67e594bd.2e143c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1220,"wires":[["a86d4f5b.67f328"]]},{"id":"a86d4f5b.67f328","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1220,"wires":[["9ef79aff.9ec578"]]},{"id":"9ef79aff.9ec578","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1220,"wires":[[]]},{"id":"8c3ef105.a6bb8","type":"debug","z":"881fbb6.2d64cc8","name":"Read VGR Pos.","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":640,"y":520,"wires":[]},{"id":"406252c4.ee950c","type":"function","z":"881fbb6.2d64cc8","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\n//Items for NFC action\nmsg.addressSpaceItems = [\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":560,"wires":[["1098da46.8d104e"]]},{"id":"1098da46.8d104e","type":"OPCUA-IIoT-Read","z":"881fbb6.2d64cc8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":110,"y":620,"wires":[["9901784a.d8867","6e33cae3.93fb0c"]]},{"id":"6e33cae3.93fb0c","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":350,"y":660,"wires":[[]]},{"id":"9901784a.d8867","type":"function","z":"881fbb6.2d64cc8","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n VGR_di_Pos_Color_horizontal: 1, //[0]\n VGR_di_Pos_Color_vertical: 1, //[1]\n VGR_di_Pos_Color_rotate: 1, //[2]\n //Pos DSI\n VGR_di_Pos_DSI_horizontal: 1, //[3]\n VGR_di_Pos_DSI_Collect_vertical: 1, //[4]\n VGR_di_Pos_DSI_Discard_vertical: 1, //[5]\n VGR_di_Pos_DSI_rotate: 1, //[6]\n VGR_di_Offset_Pos_DSI_NFC_vertical: 1, //[7]\n //Pos DSO\n VGR_di_Pos_DSO_horizontal:1, //[8] \n VGR_di_Pos_DSO_Collect_vertical:1, //[9]\n VGR_di_Pos_DSO_Discard_vertical:1, //[10] \n VGR_di_Pos_DSO_rotate:1, //[11] \n VGR_di_Offset_Pos_DSO_vertical: 1, //[12]\n //Pos HBW\n VGR_di_Pos_HBW_horizontal:1, //[13] \n VGR_di_Pos_HBW_Collect_vertical:1, //[14] \n VGR_di_Pos_HBW_Discard_vertical:1, //[15] \n VGR_di_Pos_HBW_rotate:1, //[16] \n VGR_di_Offset_Pos_HBW_horizontal:1, //[17] \n VGR_di_Offset_Pos_HBW_vertical:1, //[18] \n //Pos MPO\n VGR_di_Pos_MPO_horizontal:1, //[19] \n VGR_di_Pos_MPO_vertical:1, //[20] \n VGR_di_Pos_MPO_rotate:1, //[21] \n VGR_di_Offset_Pos_MPO_vertical: 1, //[22]\n //Pos NFC\n VGR_di_Pos_NFC_horizontal:1, //[23] \n VGR_di_Pos_NFC_vertical:1, //[24] \n VGR_di_Pos_NFC_rotate:1, //[25] \n //Pos NiO\n VGR_di_Pos_NiO_horizontal:1, //[26] \n VGR_di_Pos_NiO_vertical:1, //[27] \n VGR_di_Pos_NiO_rotate:1, //[28] \n //Pos SLD Blue\n VGR_di_Pos_SLD_Blue_horizontal:1, //[29] \n VGR_di_Pos_SLD_Blue_vertical:1, //[30] \n VGR_di_Pos_SLD_Blue_rotate:1, //[31] \n //Pos SLD Red\n VGR_di_Pos_SLD_Red_horizontal:1, //[32] \n VGR_di_Pos_SLD_Red_vertical:1, //[33] \n VGR_di_Pos_SLD_Red_rotate:1, //[34] \n //Pos SLD White\n VGR_di_Pos_SLD_White_horizontal :1, //[35] \n VGR_di_Pos_SLD_White_vertical:1, //[36] \n VGR_di_Pos_SLD_White_rotate:1, //[37] \n }\n\n\n//Pos Color\nConfData_out.VGR_di_Pos_Color_horizontal = msg.payload[0].value.value; //[0] \nConfData_out.VGR_di_Pos_Color_vertical = msg.payload[1].value.value; //[1] \nConfData_out.VGR_di_Pos_Color_rotate = msg.payload[2].value.value; //[2] \n//Pos DSI\nConfData_out.VGR_di_Pos_DSI_horizontal = msg.payload[3].value.value; //[3] \nConfData_out.VGR_di_Pos_DSI_Collect_vertical = msg.payload[4].value.value; //[4] \nConfData_out.VGR_di_Pos_DSI_Discard_vertical = msg.payload[5].value.value; //[5] \nConfData_out.VGR_di_Pos_DSI_rotate = msg.payload[6].value.value; //[6] \nConfData_out.VGR_di_Offset_Pos_DSI_NFC_vertical = msg.payload[7].value.value; //[7] \n//Pos DSO\nConfData_out.VGR_di_Pos_DSO_horizontal = msg.payload[8].value.value; //[8] \nConfData_out.VGR_di_Pos_DSO_Collect_vertical = msg.payload[9].value.value; //[9] \nConfData_out.VGR_di_Pos_DSO_Discard_vertical = msg.payload[10].value.value; //[10] \nConfData_out.VGR_di_Pos_DSO_rotate = msg.payload[11].value.value; //[11] \nConfData_out.VGR_di_Offset_Pos_DSO_vertical = msg.payload[12].value.value; //[12] \n//Pos HBW\nConfData_out.VGR_di_Pos_HBW_horizontal = msg.payload[13].value.value; //[13] \nConfData_out.VGR_di_Pos_HBW_Collect_vertical = msg.payload[14].value.value; //[14] \nConfData_out.VGR_di_Pos_HBW_Discard_vertical = msg.payload[15].value.value; //[15] \nConfData_out.VGR_di_Pos_HBW_rotate = msg.payload[16].value.value; //[16] \nConfData_out.VGR_di_Offset_Pos_HBW_horizontal = msg.payload[17].value.value; //[17] \nConfData_out.VGR_di_Offset_Pos_HBW_vertical = msg.payload[18].value.value; //[18] \n//Pos MPO\nConfData_out.VGR_di_Pos_MPO_horizontal = msg.payload[19].value.value; //[19] \nConfData_out.VGR_di_Pos_MPO_vertical = msg.payload[20].value.value; //[20] \nConfData_out.VGR_di_Pos_MPO_rotate = msg.payload[21].value.value; //[21] \nConfData_out.VGR_di_Offset_Pos_MPO_vertical = msg.payload[22].value.value; //[22] \n//Pos NFC\nConfData_out.VGR_di_Pos_NFC_horizontal = msg.payload[23].value.value; //[23] \nConfData_out.VGR_di_Pos_NFC_vertical = msg.payload[24].value.value; //[24] \nConfData_out.VGR_di_Pos_NFC_rotate = msg.payload[25].value.value; //[25] \n//Pos NiO\nConfData_out.VGR_di_Pos_NiO_horizontal = msg.payload[26].value.value; //[26] \nConfData_out.VGR_di_Pos_NiO_vertical = msg.payload[27].value.value; //[27] \nConfData_out.VGR_di_Pos_NiO_rotate = msg.payload[28].value.value; //[28] \n//Pos SLD Blue\nConfData_out.VGR_di_Pos_SLD_Blue_horizontal = msg.payload[29].value.value; //[29] \nConfData_out.VGR_di_Pos_SLD_Blue_vertical = msg.payload[30].value.value; //[30] \nConfData_out.VGR_di_Pos_SLD_Blue_rotate = msg.payload[31].value.value; //[31] \n//Pos SLD Red\nConfData_out.VGR_di_Pos_SLD_Red_horizontal = msg.payload[32].value.value; //[32] \nConfData_out.VGR_di_Pos_SLD_Red_vertical = msg.payload[33].value.value; //[33] \nConfData_out.VGR_di_Pos_SLD_Red_rotate = msg.payload[34].value.value; //[34] \n//Pos SLD White\nConfData_out.VGR_di_Pos_SLD_White_horizontal = msg.payload[35].value.value; //[35] \nConfData_out.VGR_di_Pos_SLD_White_vertical = msg.payload[36].value.value; //[36] \nConfData_out.VGR_di_Pos_SLD_White_rotate = msg.payload[37].value.value; //[37] \n\n//new_msg.payload = JSON.stringify(ConfData_out);\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":360,"y":620,"wires":[["c44039e5.daa138","8c3ef105.a6bb8","4fc26b74.804d8c","6406d29b.995be4","859ece4b.25471","cd543917.476a8","f26bfe0.32e26","1322b09f.ce70d7","57ac77b4.9c0b38","72959b18.9d2644","62e1b919.a8cfa","71d4e66a.2755a8","92cf74b1.65dae8","39fb0b50.f37504","3ee64a4f.6572de","9193d23f.cac3e","f80006c2.e807c8","8b1683f3.3407a","56e01414.cbbd24","43ea292a.470dd8","253c460b.7d4a6a","277cc8ed.656778","63bcc8.f67a6b38","db964c1e.da9468","70f2dac5.aa521c","15d638e1.976ed7","3bd0540a.9bdddc","d14f176e.8f2d7","1b47041d.d9e4b4","b8c83989.8a80b","7c403132.bb3148","f07b734e.247d8","efd673bd.679a18","62ebf3dd.1a428c","f34f8093.e76208","ef552e5f.6d173","ddc4874a.2c8448","a92834a2.51ba9","9893d785.54f7e"]]},{"id":"6668eed3.17db2","type":"OPCUA-IIoT-Inject","z":"881fbb6.2d64cc8","injectType":"inject","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"Init","payload":"","addressSpaceItems":[],"x":110,"y":560,"wires":[["406252c4.ee950c"]]},{"id":"95208776.418cf","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":720,"wires":[["5b15f2f3.3d04cc"]]},{"id":"5b15f2f3.3d04cc","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":720,"wires":[["100356d2.7c62e9"]]},{"id":"100356d2.7c62e9","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":720,"wires":[[]]},{"id":"c44039e5.daa138","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_Color_horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":600,"wires":[["17bddab6.10d3ad"]]},{"id":"4fc26b74.804d8c","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":820,"wires":[["9dd6c0cc.904ef8"]]},{"id":"6d87fa80.8dda4c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":880,"wires":[["2470a838.60e6e8"]]},{"id":"6406d29b.995be4","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_Collect_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":880,"wires":[["a0947f48.3fa6c"]]},{"id":"859ece4b.25471","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_Color_vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":660,"wires":[["200e1f63.7cf2a8"]]},{"id":"cd543917.476a8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_Color_rotate; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":720,"wires":[["e1522b32.d0edf8"]]},{"id":"f26bfe0.32e26","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1000,"wires":[["693540e8.345de"]]},{"id":"3af1c81a.b27fe","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1000,"wires":[["55e691d1.e9ac2"]]},{"id":"55e691d1.e9ac2","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1000,"wires":[["2a704ee3.455fd2"]]},{"id":"2a704ee3.455fd2","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1000,"wires":[[]]},{"id":"e76217de.1a8608","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - DSI","info":"","x":650,"y":780,"wires":[]},{"id":"1322b09f.ce70d7","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_DSI_NFC_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1060,"wires":[["e9314c87.c23e4"]]},{"id":"41bb3419.82f8a4","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1060,"wires":[["f19a56d9.f270b8"]]},{"id":"f19a56d9.f270b8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1060,"wires":[["c296f1d0.2d2298"]]},{"id":"c296f1d0.2d2298","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1060,"wires":[[]]},{"id":"57ac77b4.9c0b38","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1160,"wires":[["4d21f945.03ee6"]]},{"id":"72959b18.9d2644","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_Collect_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1220,"wires":[["41e489e7.e785a"]]},{"id":"62e1b919.a8cfa","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1340,"wires":[["7a382885.2cee78"]]},{"id":"a93df711.ac90d8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1340,"wires":[["90abbffd.52a908"]]},{"id":"90abbffd.52a908","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1340,"wires":[["edfea0cb.751c7"]]},{"id":"edfea0cb.751c7","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1340,"wires":[[]]},{"id":"45843c.f19093c4","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - DSO","info":"","x":660,"y":1120,"wires":[]},{"id":"732c5e17.29f5c8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1500,"wires":[["45f7aa9e.eb4d3c"]]},{"id":"45f7aa9e.eb4d3c","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1500,"wires":[["96330cf6.5a2418"]]},{"id":"96330cf6.5a2418","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1500,"wires":[[]]},{"id":"948b197f.5e8f18","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1560,"wires":[["4770fcb3.d47f2c"]]},{"id":"4770fcb3.d47f2c","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1560,"wires":[[]]},{"id":"71d4e66a.2755a8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1500,"wires":[["4a6ed881.5fc1a8"]]},{"id":"c74204e0.a4f298","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1560,"wires":[["948b197f.5e8f18"]]},{"id":"92cf74b1.65dae8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_Collect_vertical\n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1560,"wires":[["57f22339.c700cc"]]},{"id":"39fb0b50.f37504","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1680,"wires":[["cef08d22.d4373"]]},{"id":"bdcd2e34.7a61f8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1680,"wires":[["d3ea94be.5e6f48"]]},{"id":"d3ea94be.5e6f48","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1680,"wires":[["4d51a85c.4e94a"]]},{"id":"4d51a85c.4e94a","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1680,"wires":[[]]},{"id":"9a5f82c8.dd21b8","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - HBW","info":"","x":660,"y":1460,"wires":[]},{"id":"3ee64a4f.6572de","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_HBW_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1740,"wires":[["a4e19aec.6ea288"]]},{"id":"b54423ee.50aee","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1000,"y":1740,"wires":[["d4d1702c.6278e"]]},{"id":"d4d1702c.6278e","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1740,"wires":[["16b049ca.71237e"]]},{"id":"16b049ca.71237e","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1740,"wires":[[]]},{"id":"9193d23f.cac3e","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_HBW_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1800,"wires":[["e3793fd0.41e8d8"]]},{"id":"b23796bd.423a88","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1800,"wires":[["888d6d60.ead018"]]},{"id":"888d6d60.ead018","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1800,"wires":[["768e5f06.cd0c98"]]},{"id":"768e5f06.cd0c98","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1800,"wires":[[]]},{"id":"9596458e.46568","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1900,"wires":[["995011d1.e0f1c8"]]},{"id":"995011d1.e0f1c8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1900,"wires":[["4a6bf8e0.de698"]]},{"id":"4a6bf8e0.de698","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1900,"wires":[[]]},{"id":"11f1447d.75dc6c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1960,"wires":[["d317392b.8d2bd"]]},{"id":"d317392b.8d2bd","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1960,"wires":[["1fcbab2.3ed5555"]]},{"id":"1fcbab2.3ed5555","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1960,"wires":[[]]},{"id":"9893d785.54f7e","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_MPO_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1900,"wires":[["55f07ba1.c6a6a4"]]},{"id":"f80006c2.e807c8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_MPO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1960,"wires":[["3f0b80fb.5b5fd"]]},{"id":"8b1683f3.3407a","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_MPO_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2020,"wires":[["bb8e6b3f.fc2cc8"]]},{"id":"52b11f95.cb8da8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2020,"wires":[["7d333457.a3bd14"]]},{"id":"7d333457.a3bd14","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2020,"wires":[["68dc9397.250034"]]},{"id":"68dc9397.250034","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2020,"wires":[[]]},{"id":"f00286d4.c63638","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - MPO","info":"","x":660,"y":1860,"wires":[]},{"id":"9895c6db.9b7cb","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2180,"wires":[["bbac144f.6e9af"]]},{"id":"bbac144f.6e9af","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2180,"wires":[["bed4af59.ba16b8"]]},{"id":"bed4af59.ba16b8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2180,"wires":[[]]},{"id":"32289ad2.582e06","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2240,"wires":[["2355aa64.aadb26"]]},{"id":"2355aa64.aadb26","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2240,"wires":[[]]},{"id":"56e01414.cbbd24","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NFC_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2180,"wires":[["559af1f6.41cce"]]},{"id":"651e1072.cfbee8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2240,"wires":[["32289ad2.582e06"]]},{"id":"43ea292a.470dd8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NFC_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2240,"wires":[["9d86730a.d6679"]]},{"id":"253c460b.7d4a6a","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NFC_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2300,"wires":[["46047037.c36b48"]]},{"id":"553943c4.b70a7c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2300,"wires":[["98208bb5.20317"]]},{"id":"98208bb5.20317","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2300,"wires":[["6f106b14.c3f7e4"]]},{"id":"6f106b14.c3f7e4","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2300,"wires":[[]]},{"id":"bd5d9d3e.73e5d","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - NFC","info":"","x":660,"y":2140,"wires":[]},{"id":"e33b94f0.11d828","type":"debug","z":"bcaa3a6a.3bdbe8","name":"Save Config Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":990,"y":120,"wires":[]},{"id":"b5f92d7c.873f38","type":"debug","z":"bcaa3a6a.3bdbe8","name":"Load Config Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":690,"y":260,"wires":[]},{"id":"9ee547e9.5da9e8","type":"link in","z":"881fbb6.2d64cc8","name":"","links":["53758868.1fdaf8"],"x":75,"y":740,"wires":[["406252c4.ee950c"]]},{"id":"b793ab10.b3a828","type":"function","z":"40d33793.7558d8","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":480,"wires":[["385ab57e.0467a2"]]},{"id":"385ab57e.0467a2","type":"OPCUA-IIoT-Read","z":"40d33793.7558d8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":110,"y":540,"wires":[["579d8fc.3617e7","c3f047b.e36a338"]]},{"id":"579d8fc.3617e7","type":"function","z":"40d33793.7558d8","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //HBW\n HBW_di_PosBelt_Horizontal: 1,\n HBW_di_PosBelt_Vertical: 1,\n HBW_di_PosBelt_Offset_Vertical: 1,\n \n HBW_di_PosRack_Offset_Vertical: 1,\n HBW_di_PosRack_A1_Horizontal: 1,\n HBW_di_PosRack_A1_Vertical: 1,\n\n HBW_di_PosRack_B2_Horizontal: 1,\n HBW_di_PosRack_B2_Vertical: 1,\n\n HBW_di_PosRack_C3_Horizontal: 1,\n HBW_di_PosRack_C3_Vertical: 1,\n }\n\nConfData_out.HBW_di_PosBelt_Horizontal = msg.payload[0].value.value; //[0] \nConfData_out.HBW_di_PosBelt_Vertical = msg.payload[1].value.value; //[1] \nConfData_out.HBW_di_PosBelt_Offset_Vertical= msg.payload[2].value.value; //[2]\n\nConfData_out.HBW_di_PosRack_Offset_Vertical= msg.payload[3].value.value; //[3]\nConfData_out.HBW_di_PosRack_A1_Horizontal = msg.payload[4].value.value; //[4] \nConfData_out.HBW_di_PosRack_A1_Vertical = msg.payload[5].value.value; //[5]\n \nConfData_out.HBW_di_PosRack_B2_Horizontal = msg.payload[6].value.value; //[6] \nConfData_out.HBW_di_PosRack_B2_Vertical = msg.payload[7].value.value; //[7]\n\nConfData_out.HBW_di_PosRack_C3_Horizontal = msg.payload[8].value.value; //[8] \nConfData_out.HBW_di_PosRack_C3_Vertical = msg.payload[9].value.value; //[9]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":360,"y":540,"wires":[["12e24fc8.47fc4","ef0d76c0.9bac4","5914a608.ec0d1","88443721.1abe08","ee00c763.b0816","f453f728.bedce8","13ec438f.8b986c","1fb7ab10.63f635","53f37005.028fb","fb30ab25.15f0b","9cd501f5.32273"]]},{"id":"c3f047b.e36a338","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":350,"y":580,"wires":[[]]},{"id":"12e24fc8.47fc4","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosBelt_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":540,"wires":[["e4f60edf.43afd"]]},{"id":"5914a608.ec0d1","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosBelt_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":600,"wires":[["fa6cdea2.08b458"]]},{"id":"88443721.1abe08","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_A1_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":860,"wires":[["ac5cfa02.41e0a8"]]},{"id":"ee00c763.b0816","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosRack_A1_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":920,"wires":[["a372a3ff.11256"]]},{"id":"ac9706f.90c2278","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack A1","info":"","x":600,"y":820,"wires":[]},{"id":"b768493e.e2ef98","type":"comment","z":"881fbb6.2d64cc8","name":"Load config data to PLC","info":"","x":130,"y":700,"wires":[]},{"id":"b60a93ea.ccf63","type":"ui_button","z":"bcaa3a6a.3bdbe8","name":"","group":"6bec7372.842fa4","order":2,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fa-save fa-2x","payload":"","payloadType":"str","topic":"","x":90,"y":80,"wires":[["45f7dad0.91549c"]]},{"id":"48f5d20e.17e504","type":"ui_button","z":"bcaa3a6a.3bdbe8","name":"","group":"b5a8ed55.950378","order":2,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fa-download fa-2x","payload":"","payloadType":"str","topic":"","x":90,"y":260,"wires":[["80690a67.faa2"]]},{"id":"fe4ab5c6.81748","type":"ui_text","z":"bcaa3a6a.3bdbe8","group":"6bec7372.842fa4","order":1,"width":4,"height":1,"name":"","label":"save Config Data to file","format":"{{msg.payload}}","layout":"row-spread","x":470,"y":40,"wires":[]},{"id":"49fe7d18.d314e4","type":"ui_text","z":"bcaa3a6a.3bdbe8","group":"b5a8ed55.950378","order":1,"width":4,"height":1,"name":"","label":"load Config Data to PLC","format":"{{msg.payload}}","layout":"row-spread","x":390,"y":220,"wires":[]},{"id":"277cc8ed.656778","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSI_Discard_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":940,"wires":[["33b1cac3.2e722e"]]},{"id":"d0e7bcf5.1fff38","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":940,"wires":[["afa85957.152c18"]]},{"id":"afa85957.152c18","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":940,"wires":[["67bebcca.6a1f9c"]]},{"id":"67bebcca.6a1f9c","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":940,"wires":[[]]},{"id":"63bcc8.f67a6b38","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_DSO_Discard_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1280,"wires":[["5182428c.b78d6c"]]},{"id":"77b4f933.922ed8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1280,"wires":[["139f22fb.ba2335"]]},{"id":"139f22fb.ba2335","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1280,"wires":[["b7e6769d.f01388"]]},{"id":"b7e6769d.f01388","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1280,"wires":[[]]},{"id":"db964c1e.da9468","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_DSO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1400,"wires":[["ed9a4b7c.1d4d7"]]},{"id":"db098de7.10304","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1400,"wires":[["f79b4b67.abebe"]]},{"id":"f79b4b67.abebe","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1400,"wires":[["9abe63af.b634e"]]},{"id":"9abe63af.b634e","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1400,"wires":[[]]},{"id":"70f2dac5.aa521c","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_HBW_Discard_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":1620,"wires":[["cbd08044.ae4ed"]]},{"id":"53b4b0e0.bf186","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1620,"wires":[["1773f883.afa737"]]},{"id":"1773f883.afa737","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":1620,"wires":[["735f9eb8.3976e8"]]},{"id":"735f9eb8.3976e8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":1620,"wires":[[]]},{"id":"15d638e1.976ed7","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Offset_Pos_MPO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2080,"wires":[["1f88cf38.c28061"]]},{"id":"44816851.c0cfc8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'\n \n },\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2080,"wires":[["f747b957.268a5"]]},{"id":"f747b957.268a5","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2080,"wires":[["5813e6f4.a9f458"]]},{"id":"5813e6f4.a9f458","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2080,"wires":[[]]},{"id":"696757c8.d35fc","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2400,"wires":[["635ac96c.b3ebd"]]},{"id":"635ac96c.b3ebd","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2400,"wires":[["2131e373.a3b314"]]},{"id":"2131e373.a3b314","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2400,"wires":[[]]},{"id":"45efe42a.20d3a4","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2460,"wires":[["6ac8ee82.6564c8"]]},{"id":"6ac8ee82.6564c8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2460,"wires":[[]]},{"id":"3bd0540a.9bdddc","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NiO_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2400,"wires":[["502a24ae.17f714"]]},{"id":"12d80646.3dce4a","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2460,"wires":[["45efe42a.20d3a4"]]},{"id":"d14f176e.8f2d7","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NiO_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2460,"wires":[["712ccd2b.c1b89c"]]},{"id":"1b47041d.d9e4b4","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_NiO_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2520,"wires":[["d5a120dd.4dd568"]]},{"id":"a23013b4.ef0e28","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2520,"wires":[["b7db6dec.610ef8"]]},{"id":"b7db6dec.610ef8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2520,"wires":[["79bcaa6a.785d44"]]},{"id":"79bcaa6a.785d44","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2520,"wires":[[]]},{"id":"ba55aa28.b314b","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - NiO","info":"","x":650,"y":2360,"wires":[]},{"id":"d0603be8.c279a","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2620,"wires":[["2b59238e.e325b4"]]},{"id":"2b59238e.e325b4","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2620,"wires":[["4f7fc59a.1158d4"]]},{"id":"4f7fc59a.1158d4","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2620,"wires":[[]]},{"id":"5bade62c.0628a8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2680,"wires":[["37bbfcf1.e19d14"]]},{"id":"37bbfcf1.e19d14","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2680,"wires":[[]]},{"id":"b8c83989.8a80b","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Blue_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2620,"wires":[["d55328c.40529d8"]]},{"id":"f914c736.00a8e","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2680,"wires":[["5bade62c.0628a8"]]},{"id":"7c403132.bb3148","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Blue_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2680,"wires":[["64f54be8.8fc4b4"]]},{"id":"f07b734e.247d8","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Blue_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2740,"wires":[["1df495af.c4cd0a"]]},{"id":"f6736dd5.b63b8","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2740,"wires":[["700e8fb8.37b0a"]]},{"id":"700e8fb8.37b0a","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2740,"wires":[["aeb6c85a.a062d"]]},{"id":"aeb6c85a.a062d","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2740,"wires":[[]]},{"id":"1a989be0.93a39c","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - Blue","info":"","x":660,"y":2580,"wires":[]},{"id":"2401e3ee.a3373c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2840,"wires":[["f44e0cf3.1f4e4"]]},{"id":"f44e0cf3.1f4e4","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2840,"wires":[["f88a3753.3df5c8"]]},{"id":"f88a3753.3df5c8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2840,"wires":[[]]},{"id":"9cb22a64.55a36","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2900,"wires":[["3e448182.055936"]]},{"id":"3e448182.055936","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2900,"wires":[[]]},{"id":"efd673bd.679a18","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Red_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2840,"wires":[["6e51b3c6.e57984"]]},{"id":"7284e408.43618c","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2900,"wires":[["9cb22a64.55a36"]]},{"id":"62ebf3dd.1a428c","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Red_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2900,"wires":[["394ded76.8a5f4a"]]},{"id":"f34f8093.e76208","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_Red_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":2960,"wires":[["6bcd9f12.404788"]]},{"id":"ac9fb19b.cb4668","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":2960,"wires":[["fe2ca3d7.7c9be8"]]},{"id":"fe2ca3d7.7c9be8","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":2960,"wires":[["880eb3e6.52dbd8"]]},{"id":"880eb3e6.52dbd8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":2960,"wires":[[]]},{"id":"9d321ebc.d3adf8","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - Red","info":"","x":660,"y":2800,"wires":[]},{"id":"9a2b5890.4f57a","type":"function","z":"881fbb6.2d64cc8","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"VGR_rot_axis_X\"\n\nmsg.top = 230\nmsg.left = 20\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nif (msg.payload.rot_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.rot_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"rot. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":360,"wires":[["f16cc2e4.e07d88"]]},{"id":"4524a46c.15acec","type":"function","z":"881fbb6.2d64cc8","name":"place Item setpoint","func":"// real value\nmsg.topic = \"VGR_rot_axis_W\"\n\nmsg.top = 250\nmsg.left = 20\nmsg.url = \"url(http://192.168.0.5:1880/images/VGR.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.rot_axis_targetpos\n\nif (msg.payload.rot_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"rot. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":400,"wires":[["f16cc2e4.e07d88"]]},{"id":"6b88c6ee.e66b98","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1000,"y":3060,"wires":[["31f0ba59.5a41de"]]},{"id":"31f0ba59.5a41de","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":3060,"wires":[["2eddca3e.64fcae"]]},{"id":"2eddca3e.64fcae","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":3060,"wires":[[]]},{"id":"2949ef98.e76a98","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":3120,"wires":[["e122b65c.8074f"]]},{"id":"e122b65c.8074f","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":3120,"wires":[[]]},{"id":"ef552e5f.6d173","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_White_horizontal\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":3060,"wires":[["81b28d61.7da558"]]},{"id":"9ca680b0.6f874","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":3120,"wires":[["2949ef98.e76a98"]]},{"id":"ddc4874a.2c8448","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_White_vertical\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":3120,"wires":[["3205dbac.b651cc"]]},{"id":"a92834a2.51ba9","type":"function","z":"881fbb6.2d64cc8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.VGR_di_Pos_SLD_White_rotate\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":630,"y":3180,"wires":[["600bcf5c.d8b608"]]},{"id":"6d76d171.e75098","type":"function","z":"881fbb6.2d64cc8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":3180,"wires":[["93ad6d2c.d8fde"]]},{"id":"93ad6d2c.d8fde","type":"OPCUA-IIoT-Write","z":"881fbb6.2d64cc8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1150,"y":3180,"wires":[["6ae8a889.572aa8"]]},{"id":"6ae8a889.572aa8","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1310,"y":3180,"wires":[[]]},{"id":"8b19189d.e42c2","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - White","info":"","x":660,"y":3020,"wires":[]},{"id":"c3f4d4df.76cd28","type":"comment","z":"881fbb6.2d64cc8","name":"HMI - Positions - Color Reader","info":"","x":690,"y":560,"wires":[]},{"id":"f453f728.bedce8","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosBelt_Offset_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":660,"wires":[["72a09b6a.17c51c"]]},{"id":"a42e8cbd.62f6b8","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":660,"wires":[["66a308ce.314a9"]]},{"id":"66a308ce.314a9","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":660,"wires":[["22ea4fc1.6854f"]]},{"id":"22ea4fc1.6854f","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":660,"wires":[[]]},{"id":"2aa43791.e0c5","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack","info":"","x":590,"y":720,"wires":[]},{"id":"13ec438f.8b986c","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_Offset_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":760,"wires":[["20f69031.d3694"]]},{"id":"573e4ed6.c8741","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":760,"wires":[["ef026001.294a78"]]},{"id":"ef026001.294a78","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":760,"wires":[["3b7a3f3.0a9ac4"]]},{"id":"3b7a3f3.0a9ac4","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":760,"wires":[[]]},{"id":"b99c4fdc.99401","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[1,1].\"di_PosRack_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1040,"wires":[["7640e0ef.7755"]]},{"id":"7640e0ef.7755","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1040,"wires":[["aadda1e9.f02a38"]]},{"id":"aadda1e9.f02a38","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1040,"wires":[[]]},{"id":"23382617.7b103a","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[1,1].\"di_PosRack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1100,"wires":[["bc5ded02.92b438"]]},{"id":"bc5ded02.92b438","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1100,"wires":[["979c5ec1.abab48"]]},{"id":"979c5ec1.abab48","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1100,"wires":[[]]},{"id":"594ed4e9.4f1834","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack B2","info":"","x":600,"y":1000,"wires":[]},{"id":"1fb7ab10.63f635","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_B2_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1040,"wires":[["90d6cad9.6e2f2"]]},{"id":"53f37005.028fb","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosRack_B2_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1100,"wires":[["956b93ff.90aad8"]]},{"id":"cb9e76e4.6f9b08","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[2,2].\"di_PosRack_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1220,"wires":[["28c8f27b.84ec9e"]]},{"id":"28c8f27b.84ec9e","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1220,"wires":[["262828c8.d7ab38"]]},{"id":"262828c8.d7ab38","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1220,"wires":[[]]},{"id":"32338c0b.0ae58c","type":"function","z":"40d33793.7558d8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Pos\"[2,2].\"di_PosRack_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":1280,"wires":[["ec94259b.0eb1b"]]},{"id":"ec94259b.0eb1b","type":"OPCUA-IIoT-Write","z":"40d33793.7558d8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":1280,"wires":[["be70113d.5c7a"]]},{"id":"be70113d.5c7a","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":1280,"wires":[[]]},{"id":"9cd501f5.32273","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.HBW_di_PosRack_C3_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1280,"wires":[["36424d3f.1e7422"]]},{"id":"fb30ab25.15f0b","type":"function","z":"40d33793.7558d8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.HBW_di_PosRack_C3_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":1220,"wires":[["9a6ef164.790a5"]]},{"id":"577b7eda.5e57b8","type":"comment","z":"40d33793.7558d8","name":"HMI - Position Rack C3","info":"","x":600,"y":1180,"wires":[]},{"id":"f9d0324b.ce4b5","type":"OPCUA-IIoT-Response","z":"881fbb6.2d64cc8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":790,"y":80,"wires":[[]]},{"id":"af75b462.d672d8","type":"OPCUA-IIoT-Response","z":"40d33793.7558d8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":790,"y":80,"wires":[[]]},{"id":"4a488fa3.6bd7d","type":"OPCUA-IIoT-Inject","z":"96ccbb8c.f85068","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"x_Position_Reached\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Actual_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Target_Position\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"x_Position_Reached\"","datatypeName":""}],"x":110,"y":80,"wires":[["c92a3080.807d18"]]},{"id":"c92a3080.807d18","type":"OPCUA-IIoT-Listener","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":260,"y":80,"wires":[["4c600ea3.3cd76"]]},{"id":"4c600ea3.3cd76","type":"function","z":"96ccbb8c.f85068","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Horizontal_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Actual_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"di_Target_Position\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"Vertical_Axis\".\"x_Position_Reached\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":80,"wires":[["43eff686.a2311"]]},{"id":"43eff686.a2311","type":"OPCUA-IIoT-Read","z":"96ccbb8c.f85068","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":80,"wires":[["27d456f8.e4a13a","c357fa19.b47d1"]]},{"id":"27d456f8.e4a13a","type":"function","z":"96ccbb8c.f85068","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { hz_axis_actpos: 0,\n hz_axis_targetpos: 0,\n hz_axis_posreached: 0,\n vert_axis_actpos: 0,\n vert_axis_targetpos: 0,\n vert_axis_posreached: 0\n };\n\n\noutput.hz_axis_actpos = msg.payload[0].value.value; \noutput.hz_axis_targetpos = msg.payload[1].value.value; \noutput.hz_axis_posreached = msg.payload[2].value.value; \noutput.vert_axis_actpos = msg.payload[3].value.value; \noutput.vert_axis_targetpos = msg.payload[4].value.value; \noutput.vert_axis_posreached = msg.payload[5].value.value; \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["a13f2bc2.d4e128","3996e024.d46d48","a45a5416.e4c08","7d226c0b.d65ab4"]]},{"id":"a13f2bc2.d4e128","type":"function","z":"96ccbb8c.f85068","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"SSC_hz_axis_X\"\n\nmsg.top = 290\nmsg.left = 210\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.hz_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":160,"wires":[["af8fd5fe.0e309"]]},{"id":"af8fd5fe.0e309","type":"function","z":"96ccbb8c.f85068","name":"color all Items","func":"var lastState = flow.get('SSC_State') || {};\n\n// Colorize \nif (msg.payload.state == 1) \n{ msg.payload.color = '#5a5' } else\n{ msg.payload.color = '#a55' }\n\n\nlastState[msg.topic] = msg.payload; \nflow.set('SSC_State', lastState);\nreturn { \n \"topic\": msg.topic,\n \"payload\": lastState,\n \"url\": msg.url\n};\n","outputs":1,"noerr":0,"x":820,"y":160,"wires":[["6f7c4a26.3e6a2c"]]},{"id":"b3cad1.c6349d3","type":"comment","z":"96ccbb8c.f85068","name":"HMI - Picture Box","info":"","x":120,"y":320,"wires":[]},{"id":"622cea69.70ee34","type":"comment","z":"96ccbb8c.f85068","name":"read real values from PLC","info":"","x":150,"y":40,"wires":[]},{"id":"3996e024.d46d48","type":"function","z":"96ccbb8c.f85068","name":"place Item setpoint","func":"// real value\nmsg.topic = \"SSC_hz_axis_W\"\n\nmsg.top = 310\nmsg.left = 210\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.hz_axis_targetpos\n\nif (msg.payload.hz_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"hor. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":200,"wires":[["af8fd5fe.0e309"]]},{"id":"a45a5416.e4c08","type":"function","z":"96ccbb8c.f85068","name":"place Item actual Value","func":"// actual value\nmsg.topic = \"SSC_vert_axis_X\"\n\nmsg.top = 50\nmsg.left = 260\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\n//msg.payload.hz_axis_posreached === true ? msg.state = 1 : msg.state = 0\n\n\nmsg.text = msg.payload.vert_axis_actpos\n\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. act. Pos.: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":570,"y":260,"wires":[["af8fd5fe.0e309"]]},{"id":"7d226c0b.d65ab4","type":"function","z":"96ccbb8c.f85068","name":"place Item setpoint","func":"// real value\nmsg.topic = \"SSC_vert_axis_W\"\n\nmsg.top = 70\nmsg.left = 260\nmsg.url = \"url(http://192.168.0.5:1880/images/CAM.png) center/contain no-repeat\";\n\nmsg.text = msg.payload.vert_axis_targetpos\n\nif (msg.payload.vert_axis_posreached === true)\n { \n msg.state = 1 \n msg.color = '#5a5' \n }\nelse\n {\n msg.state = 0\n msg.color = '#a55' \n }\n\nreturn {\n \"topic\": (msg.topic),\n \"url\" : (msg.url),\n \"payload\": {\n \"icon\":\"label\",\n \"top\": (msg.top),\n \"left\":(msg.left),\n \"color\":(msg.color),\n \"state\": (msg.state),\n \"text\": (\"vert. setpoint: \" + msg.text)\n\n }\n\n};\n","outputs":1,"noerr":0,"x":550,"y":300,"wires":[["af8fd5fe.0e309"]]},{"id":"c357fa19.b47d1","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":790,"y":80,"wires":[[]]},{"id":"6f7c4a26.3e6a2c","type":"ui_template","z":"96ccbb8c.f85068","group":"21394b3d.7fa8b4","name":"Status Picture SSC","order":1,"width":9,"height":7,"format":"\n\n
\n\n
\n \n \n \n {{el.text}}\n \n
\n
\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":190,"y":360,"wires":[[]]},{"id":"e4f60edf.43afd","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"horizontal:","tooltip":"","group":"a3007d55.6b202","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":540,"wires":[["64c49f07.3e14c8"]]},{"id":"fa6cdea2.08b458","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"vertical:","tooltip":"","group":"a3007d55.6b202","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":740,"y":600,"wires":[["1cf34a00.49e556"]]},{"id":"72a09b6a.17c51c","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"vertical Offset:","tooltip":"","group":"a3007d55.6b202","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":760,"y":660,"wires":[["a42e8cbd.62f6b8"]]},{"id":"20f69031.d3694","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"vertical Offset:","tooltip":"","group":"473e26bd.22581","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":760,"y":760,"wires":[["573e4ed6.c8741"]]},{"id":"ac5cfa02.41e0a8","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"A1 horizontal:","tooltip":"","group":"ea4864b0.48b81","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":760,"y":860,"wires":[["9175e6d9.13dd48"]]},{"id":"a372a3ff.11256","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"A1 vertical:","tooltip":"","group":"ea4864b0.48b81","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":920,"wires":[["f175b82e.fe3c58"]]},{"id":"90d6cad9.6e2f2","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"B2 horizontal:","tooltip":"","group":"6e361096.7da8e8","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":760,"y":1040,"wires":[["b99c4fdc.99401"]]},{"id":"956b93ff.90aad8","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"B2 vertical:","tooltip":"","group":"6e361096.7da8e8","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":1100,"wires":[["23382617.7b103a"]]},{"id":"9a6ef164.790a5","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"C3 horizontal:","tooltip":"","group":"9d24bd1.772d74","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":760,"y":1220,"wires":[["cb9e76e4.6f9b08"]]},{"id":"36424d3f.1e7422","type":"ui_numeric","z":"40d33793.7558d8","name":"","label":"C3 vertical:","tooltip":"","group":"9d24bd1.772d74","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":1280,"wires":[["32338c0b.0ae58c"]]},{"id":"17bddab6.10d3ad","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"9fd654b1.4a21b","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":600,"wires":[["3f2b2126.0fe44e"]]},{"id":"200e1f63.7cf2a8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"9fd654b1.4a21b","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":660,"wires":[["315e5775.d8984"]]},{"id":"e9314c87.c23e4","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"45b2e95e.e9c128","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":1060,"wires":[["41bb3419.82f8a4"]]},{"id":"e1522b32.d0edf8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"9fd654b1.4a21b","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":720,"wires":[["95208776.418cf"]]},{"id":"9dd6c0cc.904ef8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"45b2e95e.e9c128","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":820,"wires":[["102c3c27.3b9a14"]]},{"id":"a0947f48.3fa6c","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Collect:","tooltip":"","group":"45b2e95e.e9c128","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":880,"wires":[["6d87fa80.8dda4c"]]},{"id":"33b1cac3.2e722e","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Discard:","tooltip":"","group":"45b2e95e.e9c128","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":940,"wires":[["d0e7bcf5.1fff38"]]},{"id":"693540e8.345de","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"45b2e95e.e9c128","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":1000,"wires":[["3af1c81a.b27fe"]]},{"id":"4d21f945.03ee6","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"b2b71f4e.623de8","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":1160,"wires":[["d5bab92d.5f0f28"]]},{"id":"41e489e7.e785a","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Collect:","tooltip":"","group":"b2b71f4e.623de8","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1220,"wires":[["67e594bd.2e143c"]]},{"id":"5182428c.b78d6c","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Discard:","tooltip":"","group":"b2b71f4e.623de8","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1280,"wires":[["77b4f933.922ed8"]]},{"id":"7a382885.2cee78","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"b2b71f4e.623de8","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":1340,"wires":[["a93df711.ac90d8"]]},{"id":"ed9a4b7c.1d4d7","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"b2b71f4e.623de8","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":1400,"wires":[["db098de7.10304"]]},{"id":"4a6ed881.5fc1a8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"5353e4b6.26835c","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":1500,"wires":[["732c5e17.29f5c8"]]},{"id":"57f22339.c700cc","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Collect:","tooltip":"","group":"5353e4b6.26835c","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1560,"wires":[["c74204e0.a4f298"]]},{"id":"cbd08044.ae4ed","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Discard:","tooltip":"","group":"5353e4b6.26835c","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":1620,"wires":[["53b4b0e0.bf186"]]},{"id":"cef08d22.d4373","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"5353e4b6.26835c","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":1680,"wires":[["bdcd2e34.7a61f8"]]},{"id":"e3793fd0.41e8d8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"5353e4b6.26835c","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":1800,"wires":[["b23796bd.423a88"]]},{"id":"a4e19aec.6ea288","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal Offset:","tooltip":"","group":"5353e4b6.26835c","order":6,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":810,"y":1740,"wires":[["b54423ee.50aee"]]},{"id":"55f07ba1.c6a6a4","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"b38d78a9.9c40e","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":1900,"wires":[["9596458e.46568"]]},{"id":"1f88cf38.c28061","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical Offset:","tooltip":"","group":"b38d78a9.9c40e","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":"-8000","max":"8000","step":1,"x":800,"y":2080,"wires":[["44816851.c0cfc8"]]},{"id":"bb8e6b3f.fc2cc8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"b38d78a9.9c40e","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":2020,"wires":[["52b11f95.cb8da8"]]},{"id":"3f0b80fb.5b5fd","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"b38d78a9.9c40e","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":1960,"wires":[["11f1447d.75dc6c"]]},{"id":"559af1f6.41cce","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"8505f695.7df0c8","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2180,"wires":[["9895c6db.9b7cb"]]},{"id":"9d86730a.d6679","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"8505f695.7df0c8","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":2240,"wires":[["651e1072.cfbee8"]]},{"id":"46047037.c36b48","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"8505f695.7df0c8","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":2300,"wires":[["553943c4.b70a7c"]]},{"id":"502a24ae.17f714","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal:","tooltip":"","group":"6357a333.f0fea4","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2400,"wires":[["696757c8.d35fc"]]},{"id":"712ccd2b.c1b89c","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical:","tooltip":"","group":"6357a333.f0fea4","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":780,"y":2460,"wires":[["12d80646.3dce4a"]]},{"id":"d5a120dd.4dd568","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate:","tooltip":"","group":"6357a333.f0fea4","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":770,"y":2520,"wires":[["a23013b4.ef0e28"]]},{"id":"d55328c.40529d8","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal blue:","tooltip":"","group":"afaa8b63.c29268","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":2620,"wires":[["d0603be8.c279a"]]},{"id":"64f54be8.8fc4b4","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical blue:","tooltip":"","group":"afaa8b63.c29268","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2680,"wires":[["f914c736.00a8e"]]},{"id":"1df495af.c4cd0a","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate blue:","tooltip":"","group":"afaa8b63.c29268","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2740,"wires":[["f6736dd5.b63b8"]]},{"id":"6e51b3c6.e57984","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal red:","tooltip":"","group":"afaa8b63.c29268","order":5,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":2840,"wires":[["2401e3ee.a3373c"]]},{"id":"394ded76.8a5f4a","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical red:","tooltip":"","group":"afaa8b63.c29268","order":6,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2900,"wires":[["7284e408.43618c"]]},{"id":"6bcd9f12.404788","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate red:","tooltip":"","group":"afaa8b63.c29268","order":7,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":2960,"wires":[["ac9fb19b.cb4668"]]},{"id":"81b28d61.7da558","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"horizontal white:","tooltip":"","group":"afaa8b63.c29268","order":9,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":3060,"wires":[["6b88c6ee.e66b98"]]},{"id":"3205dbac.b651cc","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"vertical white:","tooltip":"","group":"afaa8b63.c29268","order":10,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":800,"y":3120,"wires":[["9ca680b0.6f874"]]},{"id":"600bcf5c.d8b608","type":"ui_numeric","z":"881fbb6.2d64cc8","name":"","label":"rotate white:","tooltip":"","group":"afaa8b63.c29268","order":11,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":790,"y":3180,"wires":[["6d76d171.e75098"]]},{"id":"800916f5.33e278","type":"debug","z":"96ccbb8c.f85068","name":"Read SSC Pos.","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":580,"y":460,"wires":[]},{"id":"69c292f5.a6e98c","type":"OPCUA-IIoT-Inject","z":"96ccbb8c.f85068","injectType":"inject","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"Init","payload":"","addressSpaceItems":[],"x":110,"y":460,"wires":[["a9dbc99d.b4b588"]]},{"id":"684c44ac.f3b1b4","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":520,"wires":[["8030657e.b5cb4"]]},{"id":"8030657e.b5cb4","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":520,"wires":[["c0bcf262.cafc"]]},{"id":"c0bcf262.cafc","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":520,"wires":[[]]},{"id":"100407.aab61bf9","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":580,"wires":[["10c00fae.8edff8"]]},{"id":"10c00fae.8edff8","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":580,"wires":[["e47b150.a5048e8"]]},{"id":"e47b150.a5048e8","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":580,"wires":[[]]},{"id":"65b6f4a4.2c4ccc","type":"comment","z":"96ccbb8c.f85068","name":"HMI - Positions","info":"","x":120,"y":420,"wires":[]},{"id":"df9184a1.1ffc88","type":"comment","z":"96ccbb8c.f85068","name":"Load config data to PLC","info":"","x":150,"y":600,"wires":[]},{"id":"a9dbc99d.b4b588","type":"function","z":"96ccbb8c.f85068","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":320,"y":460,"wires":[["1c9524c4.ee6923"]]},{"id":"1c9524c4.ee6923","type":"OPCUA-IIoT-Read","z":"96ccbb8c.f85068","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":110,"y":520,"wires":[["2184c029.7a45b8","6523368c.55d07"]]},{"id":"2184c029.7a45b8","type":"function","z":"96ccbb8c.f85068","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //SSC\n SSC_di_PosCentre_Horizontal: 1,\n SSC_di_PosCentre_Vertical: 1,\n //HBW\n SSC_di_PosHBW_Horizontal: 1,\n SSC_di_PosHBW_Vertical: 1,\n }\n\nConfData_out.SSC_di_PosCentre_Horizontal = msg.payload[0].value.value; //[0] \nConfData_out.SSC_di_PosCentre_Vertical = msg.payload[1].value.value; //[1] \n\nConfData_out.SSC_di_PosHBW_Horizontal= msg.payload[2].value.value; //[2]\nConfData_out.SSC_di_PosHBW_Vertical= msg.payload[3].value.value; //[3]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":360,"y":520,"wires":[["f8b070e9.2ff978","800916f5.33e278","5a813bf2.a83014","e4fb8e01.61e4c","be77a25a.fb7378"]]},{"id":"6523368c.55d07","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":350,"y":560,"wires":[[]]},{"id":"f8b070e9.2ff978","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.SSC_di_PosCentre_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":520,"wires":[["38e4e946.bfc026"]]},{"id":"5a813bf2.a83014","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.SSC_di_PosCentre_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":580,"wires":[["6c2884a2.e2ce8c"]]},{"id":"38e4e946.bfc026","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"horizontal:","tooltip":"","group":"b07ee037.6d618","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":520,"wires":[["684c44ac.f3b1b4"]]},{"id":"6c2884a2.e2ce8c","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"vertical:","tooltip":"","group":"b07ee037.6d618","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":740,"y":580,"wires":[["100407.aab61bf9"]]},{"id":"ca13ca6e.463098","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":640,"wires":[["14123e42.c7962a"]]},{"id":"14123e42.c7962a","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":640,"wires":[["5fe459e1.7f17b8"]]},{"id":"5fe459e1.7f17b8","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":640,"wires":[[]]},{"id":"ebb0402c.ea9ee","type":"function","z":"96ccbb8c.f85068","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":960,"y":700,"wires":[["9aae0202.80be98"]]},{"id":"9aae0202.80be98","type":"OPCUA-IIoT-Write","z":"96ccbb8c.f85068","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1130,"y":700,"wires":[["823f87a8.6c42e8"]]},{"id":"823f87a8.6c42e8","type":"OPCUA-IIoT-Response","z":"96ccbb8c.f85068","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1290,"y":700,"wires":[[]]},{"id":"e4fb8e01.61e4c","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.SSC_di_PosHBW_Horizontal; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":640,"wires":[["d874b451.615718"]]},{"id":"be77a25a.fb7378","type":"function","z":"96ccbb8c.f85068","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.SSC_di_PosHBW_Vertical; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":700,"wires":[["3afaff66.c18f98"]]},{"id":"d874b451.615718","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"horizontal:","tooltip":"","group":"7a5f99d9.a1dfe","order":1,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":750,"y":640,"wires":[["ca13ca6e.463098"]]},{"id":"3afaff66.c18f98","type":"ui_numeric","z":"96ccbb8c.f85068","name":"","label":"vertical:","tooltip":"","group":"7a5f99d9.a1dfe","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":740,"y":700,"wires":[["ebb0402c.ea9ee"]]},{"id":"62fed044.76c68","type":"link in","z":"96ccbb8c.f85068","name":"","links":["53758868.1fdaf8"],"x":55,"y":640,"wires":[["a9dbc99d.b4b588"]]},{"id":"9295eebb.3b604","type":"ui_dropdown","z":"eac85a93.4f949","name":"","label":"HBW Positions:","tooltip":"","place":"Select option","group":"9608e0f4.098128","order":2,"width":6,"height":1,"passthru":true,"options":[{"label":"Select position","value":0,"type":"num"},{"label":"Belt","value":21,"type":"num"},{"label":"Rack A1","value":22,"type":"num"},{"label":"Rack B2","value":23,"type":"num"},{"label":"Rack C3","value":24,"type":"num"}],"payload":"","topic":"HBW_position_no","x":880,"y":220,"wires":[["9d5e3e95.cdca7","d68f8bf9.41c9f"]]},{"id":"9d5e3e95.cdca7","type":"function","z":"eac85a93.4f949","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1080,"y":220,"wires":[["c2ec22d1.f87908"]]},{"id":"c2ec22d1.f87908","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1230,"y":220,"wires":[["5f34cd9d.a81834"]]},{"id":"5f34cd9d.a81834","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1370,"y":220,"wires":[[]]},{"id":"fbaa4cd3.d064e8","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":5,"width":3,"height":1,"name":"","label":"Start positioning:","format":"","layout":"row-spread","x":150,"y":580,"wires":[]},{"id":"8457eeb5.c62358","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":7,"width":2,"height":1,"passthru":false,"label":"START","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":340,"y":580,"wires":[["4531d795.eebae"]]},{"id":"4531d795.eebae","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":580,"wires":[["ff43ce7f.d435"]]},{"id":"ff43ce7f.d435","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":580,"wires":[["f0095366.5153e8"]]},{"id":"f0095366.5153e8","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":580,"wires":[[]]},{"id":"b02c4a3e.1d553","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":8,"width":3,"height":1,"name":"","label":"Final positioning:","format":"","layout":"row-spread","x":150,"y":640,"wires":[]},{"id":"4034ffcc.837cb","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":10,"width":2,"height":1,"passthru":false,"label":"FINAL","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":640,"wires":[["291bd25c.8768fe"]]},{"id":"291bd25c.8768fe","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Final_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":640,"wires":[["7114856f.ed899c"]]},{"id":"7114856f.ed899c","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":640,"wires":[["3b728052.45a2d"]]},{"id":"3b728052.45a2d","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":640,"wires":[[]]},{"id":"1629f689.e002f1","type":"OPCUA-IIoT-Inject","z":"eac85a93.4f949","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"di_Pos_Horizontal\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"di_Pos_Vertical\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"di_Pos_Rotate\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"","datatypeName":""}],"x":110,"y":420,"wires":[["ac9f0d45.7102d8"]]},{"id":"ac9f0d45.7102d8","type":"OPCUA-IIoT-Listener","z":"eac85a93.4f949","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":420,"wires":[["2a981b73.7cdfec","8a93ef88.964df"]]},{"id":"2a981b73.7cdfec","type":"function","z":"eac85a93.4f949","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"di_Pos_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"di_Pos_Vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"di_Pos_Rotate\"',\n \"datatypeName\":'Int32'},\n ]\n\n\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":420,"wires":[["344b68f6.bd2248"]]},{"id":"344b68f6.bd2248","type":"OPCUA-IIoT-Read","z":"eac85a93.4f949","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":590,"y":420,"wires":[["c617df16.69db08","18344eb6.2cecc9","e52f49c1.3dda9"]]},{"id":"c617df16.69db08","type":"function","z":"eac85a93.4f949","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { act_pos_horizontal: 0, act_pos_vertical: 0, act_pos_rotate: 0};\n\noutput.act_pos_horizontal = msg.payload[0].value.value; //[0]\noutput.act_pos_vertical = msg.payload[1].value.value; //[1] \noutput.act_pos_rotate = msg.payload[2].value.value; //[2] \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":790,"y":420,"wires":[["f1d9f14.016979","947fb27e.725c2","9a90d538.4961a"]]},{"id":"f1d9f14.016979","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":3,"width":6,"height":1,"name":"","label":"Pos. value horizontal:","format":"{{msg.payload.act_pos_horizontal}}","layout":"row-spread","x":1080,"y":420,"wires":[]},{"id":"947fb27e.725c2","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":4,"width":6,"height":1,"name":"","label":"Pos. value vertical:","format":"{{msg.payload.act_pos_vertical}}","layout":"row-spread","x":1070,"y":460,"wires":[]},{"id":"24ccb90.36b3948","type":"ui_switch","z":"eac85a93.4f949","name":"","label":"Activate pos. move","tooltip":"","group":"9608e0f4.098128","order":1,"width":6,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":890,"y":80,"wires":[["a8f8a4d7.b4b1c"]]},{"id":"f6656a48.9ca298","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1230,"y":80,"wires":[["94fc48a6.795f28"]]},{"id":"94fc48a6.795f28","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1370,"y":80,"wires":[[]]},{"id":"6c0427e.687afd8","type":"comment","z":"eac85a93.4f949","name":"HMI - move to position","info":"","x":120,"y":40,"wires":[]},{"id":"3b427abe.feab36","type":"comment","z":"eac85a93.4f949","name":"HMI - position setpoints","info":"","x":120,"y":380,"wires":[]},{"id":"ffc1e825.74109","type":"comment","z":"eac85a93.4f949","name":"HMI - start positioning","info":"","x":120,"y":540,"wires":[]},{"id":"ac25230.dd2c9e","type":"ui_dropdown","z":"b495b31e.fe8338","name":"","label":"VGR Positions:","tooltip":"","place":"Select option","group":"2f117237.36aff6","order":2,"width":6,"height":1,"passthru":true,"options":[{"label":"Select position","value":0,"type":"num"},{"label":"Color Reader","value":41,"type":"num"},{"label":"DSI collect","value":42,"type":"num"},{"label":"DSI discard","value":43,"type":"num"},{"label":"DSO collect","value":44,"type":"num"},{"label":"DSO discard","value":45,"type":"num"},{"label":"HBW collect","value":46,"type":"num"},{"label":"HBW discard","value":47,"type":"num"},{"label":"MPO","value":48,"type":"num"},{"label":"NFC","value":49,"type":"num"},{"label":"NiO","value":50,"type":"num"},{"label":"SLD blue","value":51,"type":"num"},{"label":"SLD red","value":52,"type":"num"},{"label":"SLD white","value":53,"type":"num"}],"payload":"","topic":"VGR_Position_no","x":360,"y":180,"wires":[["6b7ab88d.1ec6f8","8d261637.39ebd"]]},{"id":"6b7ab88d.1ec6f8","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":180,"wires":[["35b22fbd.5a372"]]},{"id":"35b22fbd.5a372","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":180,"wires":[["f58632ea.77e108"]]},{"id":"f58632ea.77e108","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":180,"wires":[[]]},{"id":"e4706d5f.5a0e18","type":"comment","z":"b495b31e.fe8338","name":"HMI - select position","info":"","x":110,"y":140,"wires":[]},{"id":"6fc831c2.e6ddb","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":6,"width":3,"height":1,"name":"","label":"Start positioning:","format":"","layout":"row-spread","x":150,"y":460,"wires":[]},{"id":"3902d474.a31b04","type":"ui_button","z":"b495b31e.fe8338","name":"","group":"2f117237.36aff6","order":8,"width":2,"height":1,"passthru":false,"label":"Start","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":460,"wires":[["99788681.3d7ef"]]},{"id":"99788681.3d7ef","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":460,"wires":[["b6fa00da.2d58a"]]},{"id":"b6fa00da.2d58a","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":460,"wires":[["dde4555f.eed578"]]},{"id":"dde4555f.eed578","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":460,"wires":[[]]},{"id":"d410e23b.6fb178","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":9,"width":3,"height":1,"name":"","label":"Final positioning:","format":"","layout":"row-spread","x":150,"y":520,"wires":[]},{"id":"e75b0f38.83bc58","type":"ui_button","z":"b495b31e.fe8338","name":"","group":"2f117237.36aff6","order":11,"width":2,"height":1,"passthru":false,"label":"Final","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":520,"wires":[["324f6e2c.b1624a"]]},{"id":"324f6e2c.b1624a","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Final_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":520,"wires":[["c8b9cbe6.2508d8"]]},{"id":"c8b9cbe6.2508d8","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":520,"wires":[["71fa2044.b623"]]},{"id":"71fa2044.b623","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":520,"wires":[[]]},{"id":"fb890757.29594","type":"function","z":"b495b31e.fe8338","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { act_pos_horizontal: 0, act_pos_vertical: 0, act_pos_rotate: 0};\n\noutput.act_pos_horizontal = msg.payload[0].value.value; //[0]\noutput.act_pos_vertical = msg.payload[1].value.value; //[1] \noutput.act_pos_rotate = msg.payload[2].value.value; //[2] \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":300,"wires":[["5b90e7b1.4e993","ccc59dc2.96367","2903299d.ff97d6"]]},{"id":"5b90e7b1.4e993","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":3,"width":6,"height":1,"name":"","label":"Pos. value horizontal:","format":"{{msg.payload.act_pos_horizontal}}","layout":"row-spread","x":820,"y":300,"wires":[]},{"id":"ccc59dc2.96367","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":4,"width":6,"height":1,"name":"","label":"Pos. value vertical:","format":"{{msg.payload.act_pos_vertical}}","layout":"row-spread","x":810,"y":340,"wires":[]},{"id":"2903299d.ff97d6","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":5,"width":6,"height":1,"name":"","label":"Pos. value rotation:","format":"{{msg.payload.act_pos_rotate}}","layout":"row-spread","x":810,"y":380,"wires":[]},{"id":"5a2d21fb.9cf6a8","type":"ui_switch","z":"b495b31e.fe8338","name":"","label":"Activate pos. move","tooltip":"","group":"2f117237.36aff6","order":1,"width":6,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":370,"y":80,"wires":[["36828d72.71cb62"]]},{"id":"f55743a4.b20de8","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":80,"wires":[["c8857749.d79a4"]]},{"id":"c8857749.d79a4","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":80,"wires":[[]]},{"id":"8c25c151.4185b8","type":"comment","z":"b495b31e.fe8338","name":"HMI - move to position","info":"","x":120,"y":40,"wires":[]},{"id":"2756e6c3.e1f03a","type":"comment","z":"b495b31e.fe8338","name":"HMI - position setpoints","info":"","x":120,"y":260,"wires":[]},{"id":"c467d1ea.e6f42","type":"comment","z":"b495b31e.fe8338","name":"HMI - start positioning","info":"","x":120,"y":420,"wires":[]},{"id":"9492869b.670f5","type":"ui_dropdown","z":"410fcde3.56d53c","name":"","label":"SSC Positions:","tooltip":"","place":"Select option","group":"d418765.9bb9f88","order":3,"width":6,"height":1,"passthru":true,"options":[{"label":"Select position","value":0,"type":"num"},{"label":"Center","value":1,"type":"num"},{"label":"HBW","value":2,"type":"num"}],"payload":"","topic":"SSC_position_no","x":360,"y":180,"wires":[["ac8f7502.bd7648","d74711da.31d8d"]]},{"id":"ac8f7502.bd7648","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":180,"wires":[["495aa3f9.cc0604"]]},{"id":"495aa3f9.cc0604","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":180,"wires":[["2a5ea273.c770ae"]]},{"id":"2a5ea273.c770ae","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":180,"wires":[[]]},{"id":"e17528e4.48c6a","type":"comment","z":"410fcde3.56d53c","name":"HMI - select position","info":"","x":110,"y":140,"wires":[]},{"id":"fd0e3ad4.7f859","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":6,"width":3,"height":1,"name":"","label":"Start positioning:","format":"","layout":"row-spread","x":150,"y":460,"wires":[]},{"id":"b2de1e22.6c4bc","type":"ui_button","z":"410fcde3.56d53c","name":"","group":"d418765.9bb9f88","order":8,"width":2,"height":1,"passthru":false,"label":"Start","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":460,"wires":[["6b343bc3.96af44"]]},{"id":"6b343bc3.96af44","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":460,"wires":[["3e0c703a.dc6a9"]]},{"id":"3e0c703a.dc6a9","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":460,"wires":[["f581f0e0.4d6f78"]]},{"id":"f581f0e0.4d6f78","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":460,"wires":[[]]},{"id":"c34dbd09.f2df48","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":9,"width":3,"height":1,"name":"","label":"Home positioning:","format":"","layout":"row-spread","x":150,"y":520,"wires":[]},{"id":"ddc9646c.ad8e4","type":"ui_button","z":"410fcde3.56d53c","name":"","group":"d418765.9bb9f88","order":11,"width":2,"height":1,"passthru":false,"label":"Home","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":520,"wires":[["b4629dac.722198"]]},{"id":"fa5d1fae.4d4248","type":"function","z":"410fcde3.56d53c","name":"Format Output Message","func":"var new_msg = { payload: \"\" };\nvar output = { act_pos_horizontal: 0, act_pos_vertical: 0, act_pos_rotate: 0};\n\noutput.act_pos_horizontal = msg.payload[0].value.value; //[0]\noutput.act_pos_vertical = msg.payload[1].value.value; //[1] \noutput.act_pos_rotate = msg.payload[2].value.value; //[2] \n\nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":570,"y":300,"wires":[["9b54a5d.e075bd8","268bd0e2.9462d8"]]},{"id":"9b54a5d.e075bd8","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":4,"width":6,"height":1,"name":"","label":"Pos. value horizontal:","format":"{{msg.payload.act_pos_horizontal}}","layout":"row-spread","x":820,"y":300,"wires":[]},{"id":"268bd0e2.9462d8","type":"ui_text","z":"410fcde3.56d53c","group":"d418765.9bb9f88","order":5,"width":6,"height":1,"name":"","label":"Pos. value vertical:","format":"{{msg.payload.act_pos_vertical}}","layout":"row-spread","x":810,"y":340,"wires":[]},{"id":"7272cf1b.9cd6c","type":"ui_switch","z":"410fcde3.56d53c","name":"","label":"Activate pos. move","tooltip":"","group":"d418765.9bb9f88","order":2,"width":6,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":370,"y":80,"wires":[["e2e8b027.48b018"]]},{"id":"f449215.0186ce","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":770,"y":80,"wires":[["361b56fe.f7caba"]]},{"id":"361b56fe.f7caba","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":930,"y":80,"wires":[[]]},{"id":"3107be83.db4a8a","type":"comment","z":"410fcde3.56d53c","name":"HMI - move to position","info":"","x":120,"y":40,"wires":[]},{"id":"7a86fed6.d6fc2","type":"comment","z":"410fcde3.56d53c","name":"HMI - position setpoints","info":"","x":120,"y":260,"wires":[]},{"id":"149674ca.029313","type":"comment","z":"410fcde3.56d53c","name":"HMI - start positioning","info":"","x":120,"y":420,"wires":[]},{"id":"8d261637.39ebd","type":"function","z":"b495b31e.fe8338","name":"switch UI Groups","func":"switch(msg.payload)\n{\n case 0:\n msg.group = { \"hide\": [\"nix\",\n ],\n \"show\": [\"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n\n case 41:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n ],\n \"focus\": true\n };\n break;\n\n\n case 42:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSI\",\n ],\n \"focus\": true\n };\n break;\n case 43:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSI\",\n ],\n \"focus\": true\n };\n break;\n case 44:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSO\",\n ],\n \"focus\": true\n };\n break;\n case 45:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_DSO\",\n ],\n \"focus\": true\n };\n break;\n case 46:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\n case 47:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\n case 48:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_MPO\",\n ],\n \"focus\": true\n };\n break;\n\n case 49:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NiOC\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_NFC\",\n ],\n \"focus\": true\n };\n break;\n \n case 50:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"focus\": true\n };\n break;\n\n case 51:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n\n case 52:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n \n case 53:\n msg.group = { \"hide\": [\n \"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n ],\n \"show\": [\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n };\n break;\n\n default:\n msg.group = { \"hide\": [\"nix\",\n ],\n \"show\": [\"HMI_-_VGR_Positions_Position_Color_Reader\",\n \"HMI_-_VGR_Positions_Position_DSI\",\n \"HMI_-_VGR_Positions_Position_DSO\",\n \"HMI_-_VGR_Positions_Position_HBW\",\n \"HMI_-_VGR_Positions_Position_MPO\",\n \"HMI_-_VGR_Positions_Position_NFC\",\n \"HMI_-_VGR_Positions_Position_NiO\",\n \"HMI_-_VGR_Positions_Position_SLD\",\n ],\n \"focus\": true\n }; \n\n} \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"group\" : msg.group,\n \"BG_colour\": \"\",\n \"Background\":\"gray\",\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":240,"wires":[["44c77f1e.2f8328"]]},{"id":"44c77f1e.2f8328","type":"ui_ui_control","z":"b495b31e.fe8338","name":"","events":"all","x":780,"y":240,"wires":[[]]},{"id":"5a74ebc3.de637c","type":"link in","z":"b495b31e.fe8338","name":"","links":["18344eb6.2cecc9","7439e071.a0cf88"],"x":215,"y":300,"wires":[["fb890757.29594"]]},{"id":"18344eb6.2cecc9","type":"link out","z":"eac85a93.4f949","name":"listen setpoints","links":["5a74ebc3.de637c","54edf023.f8361"],"x":735,"y":480,"wires":[]},{"id":"e9f4ad3c.3535a","type":"link out","z":"eac85a93.4f949","name":"listen position","links":["59c24cc2.a5cea4","65c4b6d0.5b07c"],"x":815,"y":280,"wires":[]},{"id":"b10c7e10.c9ceb","type":"link out","z":"eac85a93.4f949","name":"listen activate","links":["e6fc1737.c6e3","43ee5c44.013afc"],"x":815,"y":140,"wires":[]},{"id":"59c24cc2.a5cea4","type":"link in","z":"b495b31e.fe8338","name":"","links":["e9f4ad3c.3535a","924334b7.b5acc"],"x":215,"y":180,"wires":[["ac25230.dd2c9e"]]},{"id":"e6fc1737.c6e3","type":"link in","z":"b495b31e.fe8338","name":"","links":["b10c7e10.c9ceb","a32d40c.6a0c8c"],"x":215,"y":80,"wires":[["5a2d21fb.9cf6a8"]]},{"id":"54edf023.f8361","type":"link in","z":"410fcde3.56d53c","name":"","links":["18344eb6.2cecc9","7439e071.a0cf88"],"x":215,"y":300,"wires":[["fa5d1fae.4d4248"]]},{"id":"65c4b6d0.5b07c","type":"link in","z":"410fcde3.56d53c","name":"","links":["e9f4ad3c.3535a","924334b7.b5acc"],"x":215,"y":180,"wires":[["9492869b.670f5"]]},{"id":"43ee5c44.013afc","type":"link in","z":"410fcde3.56d53c","name":"","links":["b10c7e10.c9ceb","a32d40c.6a0c8c"],"x":215,"y":80,"wires":[["7272cf1b.9cd6c"]]},{"id":"a8f8a4d7.b4b1c","type":"function","z":"eac85a93.4f949","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n\n\nif (wert === true)\n { \n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n }\nelse\n {\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n msg.valuesToWrite = [wert,0];\n }\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1080,"y":80,"wires":[["f6656a48.9ca298"]]},{"id":"d68f8bf9.41c9f","type":"function","z":"eac85a93.4f949","name":"switch UI Groups","func":"switch(msg.payload)\n{\n case 0:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"focus\": true\n };\n break;\n case 21:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n ],\n \"focus\": true\n };\n break;\n case 22:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n ],\n \"focus\": true\n };\n break;\n case 23:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n ],\n \"focus\": true\n };\n break;\n case 24:\n msg.group = { \"hide\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"focus\": true\n };\n break;\n\n default:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_HBW_Positions_Position_Belt\",\n \"HMI_-_HBW_Positions_Position_Rack\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_A\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_B\",\n \"HMI_-_HBW_Positions_Position_Rack_Row_C\",\n ],\n \"focus\": true\n };\n\n} \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"group\" : msg.group,\n \"BG_colour\": \"\",\n \"Background\":\"gray\",\n }\n};\n","outputs":1,"noerr":0,"x":130,"y":320,"wires":[["e65573b7.f70738"]]},{"id":"e65573b7.f70738","type":"ui_ui_control","z":"eac85a93.4f949","name":"","events":"all","x":300,"y":320,"wires":[["8a93ef88.964df"]]},{"id":"36828d72.71cb62","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n\n\nif (wert === true)\n { \n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n }\nelse\n {\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n msg.valuesToWrite = [wert,0];\n }\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":80,"wires":[["f55743a4.b20de8"]]},{"id":"d74711da.31d8d","type":"function","z":"410fcde3.56d53c","name":"switch UI Groups","func":"switch(msg.payload)\n{\n case 0:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\n case 1:\n msg.group = { \"hide\": [\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n ],\n \"focus\": true\n };\n break;\n\n case 2:\n msg.group = { \"hide\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n break;\n\ndefault:\n msg.group = { \"hide\": [\n \"nix\",\n ],\n \"show\": [\n \"HMI_-_SSC_Positions_Position_Centre\",\n \"HMI_-_SSC_Positions_Position_HBW\",\n ],\n \"focus\": true\n };\n\n} \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n //\"tab\": \"run Task\",\n \"group\" : msg.group,\n \"BG_colour\": \"\",\n \"Background\":\"gray\",\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":240,"wires":[["bf879f3c.63c1c8"]]},{"id":"bf879f3c.63c1c8","type":"ui_ui_control","z":"410fcde3.56d53c","name":"","events":"all","x":780,"y":240,"wires":[[]]},{"id":"8a93ef88.964df","type":"function","z":"eac85a93.4f949","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":160,"y":80,"wires":[["b60f1571.9347"]]},{"id":"b60f1571.9347","type":"OPCUA-IIoT-Read","z":"eac85a93.4f949","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":350,"y":80,"wires":[["e9e617d9.70a588","ca2c8580.e92f5"]]},{"id":"e9e617d9.70a588","type":"function","z":"eac85a93.4f949","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //value out\n OUT_x_activate_pos_move: false,\n OUT_i_position_no: 0,\n }\n\nConfData_out.OUT_x_activate_pos_move = msg.payload[0].value.value; //[0] \nConfData_out.OUT_i_position_no = msg.payload[1].value.value; //[1] \n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":520,"y":80,"wires":[["a5c44498.4e7798","48f88314.93f024"]]},{"id":"ca2c8580.e92f5","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":510,"y":140,"wires":[[]]},{"id":"a5c44498.4e7798","type":"function","z":"eac85a93.4f949","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = false ;\n\n\noutput = msg.payload.OUT_x_activate_pos_move; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":690,"y":80,"wires":[["24ccb90.36b3948","b10c7e10.c9ceb"]]},{"id":"48f88314.93f024","type":"function","z":"eac85a93.4f949","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0;\n\n\noutput = msg.payload.OUT_i_position_no; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":690,"y":220,"wires":[["9295eebb.3b604","e9f4ad3c.3535a"]]},{"id":"75b937ba.b62f1","type":"comment","z":"eac85a93.4f949","name":"HMI - change tab triggers OPCUA read","info":"","x":170,"y":280,"wires":[]},{"id":"b723e255.ca7818","type":"comment","z":"eac85a93.4f949","name":"Position change triggers group visibility","info":"","x":950,"y":180,"wires":[]},{"id":"32c6df9e.c32dc","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":8,"width":3,"height":1,"name":"","label":"Set calibration value:","format":"","layout":"row-spread","x":160,"y":540,"wires":[]},{"id":"45f9ab9d.f0bb04","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":11,"width":2,"height":1,"passthru":false,"label":"BLUE","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":540,"wires":[["2daabc9d.c95bcc"]]},{"id":"2daabc9d.c95bcc","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Calib_Value_Color_Blue\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":540,"wires":[["658b340.ec386cc"]]},{"id":"658b340.ec386cc","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":540,"wires":[["28c3ae3e.5d6b22"]]},{"id":"28c3ae3e.5d6b22","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":540,"wires":[[]]},{"id":"f5eb975.0f8efe8","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":4,"width":9,"height":1,"name":"","label":"Color sensor actual value:","format":"{{msg.payload.OUT_w_Actual_ColorValue}}","layout":"row-spread","x":780,"y":260,"wires":[]},{"id":"ac345810.bf1ec8","type":"ui_switch","z":"d157eff7.cfa8","name":"","label":"Calibrate color sensor","tooltip":"","group":"4dd8e20b.5429ac","order":1,"width":9,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":940,"y":140,"wires":[["5216ed9e.0bbe6c"]]},{"id":"44d78c5d.f91bd4","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1290,"y":140,"wires":[["109afc2b.6ca8c4"]]},{"id":"109afc2b.6ca8c4","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1450,"y":140,"wires":[[]]},{"id":"7d7b0864.ebfc5","type":"comment","z":"d157eff7.cfa8","name":"HMI - read color sensor calibration data","info":"","x":170,"y":40,"wires":[]},{"id":"b5fc50a7.d720e","type":"comment","z":"d157eff7.cfa8","name":"HMI - calibrate color sensor","info":"","x":140,"y":500,"wires":[]},{"id":"5216ed9e.0bbe6c","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Color_Sensor_Calibration\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1140,"y":140,"wires":[["44d78c5d.f91bd4"]]},{"id":"f8445134.1ecd","type":"OPCUA-IIoT-Read","z":"d157eff7.cfa8","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":550,"y":80,"wires":[["d8b12e3e.fc945","790b47ee.800598"]]},{"id":"d8b12e3e.fc945","type":"function","z":"d157eff7.cfa8","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n //value out\n OUT_x_Calib_Color_Sensor: false,\n OUT_i_Color_Sensor_Selection:0,\n OUT_w_Calib_ColorValue_Blue: 0,\n OUT_w_Calib_ColorValue_Red: 0,\n OUT_w_Calib_ColorValue_White: 0,\n OUT_w_Actual_ColorValue:0,\n OUT_w_Threshold_Red_Blue:0,\n OUT_w_Threshold_White_Red:0,\n }\n\n\n\nConfData_out.OUT_x_Calib_Color_Sensor = msg.payload[0].value.value; //[0] \nConfData_out.OUT_i_Color_Sensor_Selection = msg.payload[1].value.value; //[1]\nConfData_out.OUT_w_Calib_ColorValue_Blue = msg.payload[2].value.value; //[2] \nConfData_out.OUT_w_Calib_ColorValue_Red = msg.payload[3].value.value; //[3] \nConfData_out.OUT_w_Calib_ColorValue_White = msg.payload[4].value.value; //[4] \nConfData_out.OUT_w_Actual_ColorValue = msg.payload[5].value.value; //[5] \nConfData_out.OUT_w_Threshold_Red_Blue = msg.payload[6].value.value; //[6] \nConfData_out.OUT_w_Threshold_White_Red = msg.payload[7].value.value; //[7] \n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":400,"y":140,"wires":[["805b24fb.fcac1","f5eb975.0f8efe8","eee817a7.0958a","db0fa8a6.088158","13b0d732.b7a3e1","c8bcfa0c.6312a8","5d4797f3.9f3d38","a99bd513.d45fe8","fea95398.9ce5d8"]]},{"id":"790b47ee.800598","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":750,"y":80,"wires":[[]]},{"id":"805b24fb.fcac1","type":"function","z":"d157eff7.cfa8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = false ;\n\n\noutput = msg.payload.OUT_x_Calib_Color_Sensor; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":730,"y":140,"wires":[["ac345810.bf1ec8"]]},{"id":"6db2b73c.7f70d8","type":"OPCUA-IIoT-Inject","z":"d157eff7.cfa8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"x_Color_Sensor_Calibration\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Color_Sensor_Selection\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Blue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Red\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_White\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Actual_ColorValue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Threshold_Red_Blue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"w_Threshold_White_Red\"","datatypeName":""}],"x":110,"y":80,"wires":[["abe069d3.73e238"]]},{"id":"abe069d3.73e238","type":"OPCUA-IIoT-Listener","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":80,"wires":[["32821c52.ea1854"]]},{"id":"c562c78a.eba3e","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":10,"width":2,"height":1,"passthru":false,"label":"RED","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":600,"wires":[["a27cc2e4.95e818"]]},{"id":"a27cc2e4.95e818","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Calib_Value_Color_Red\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":600,"wires":[["93271351.381d3"]]},{"id":"93271351.381d3","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":600,"wires":[["d62c7a74.3a4458"]]},{"id":"d62c7a74.3a4458","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":600,"wires":[[]]},{"id":"d00261eb.c343b8","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":9,"width":2,"height":1,"passthru":false,"label":"WHITE","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":330,"y":660,"wires":[["2b705fc4.b6eae"]]},{"id":"2b705fc4.b6eae","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Calib_Value_Color_White\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":660,"wires":[["cd04300c.8f045"]]},{"id":"cd04300c.8f045","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":660,"wires":[["7f567681.534c5"]]},{"id":"7f567681.534c5","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":660,"wires":[[]]},{"id":"945e6945.5edfa","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":14,"width":3,"height":1,"name":"","label":"Home positioning:","format":"","layout":"row-spread","x":150,"y":700,"wires":[]},{"id":"451fb4c2.48777c","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":16,"width":2,"height":1,"passthru":false,"label":"HOME","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":700,"wires":[["297b82be.021c2e"]]},{"id":"297b82be.021c2e","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Home_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":700,"wires":[["cd518c81.89ac4"]]},{"id":"cd518c81.89ac4","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":700,"wires":[["1dcb12d.a88ff6d"]]},{"id":"1dcb12d.a88ff6d","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":700,"wires":[[]]},{"id":"46a3fcd4.1a442c","type":"ui_text","z":"eac85a93.4f949","group":"9608e0f4.098128","order":11,"width":3,"height":1,"name":"","label":"Start offset:","format":"","layout":"row-spread","x":130,"y":760,"wires":[]},{"id":"9d584f86.b6b758","type":"ui_button","z":"eac85a93.4f949","name":"","group":"9608e0f4.098128","order":13,"width":2,"height":1,"passthru":false,"label":"OFFSET","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":340,"y":760,"wires":[["af48288e.999d58"]]},{"id":"af48288e.999d58","type":"function","z":"eac85a93.4f949","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Offset\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":760,"wires":[["cda8b2e8.d8fee"]]},{"id":"cda8b2e8.d8fee","type":"OPCUA-IIoT-Write","z":"eac85a93.4f949","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":760,"wires":[["d6a051d4.d4a6d"]]},{"id":"d6a051d4.d4a6d","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":760,"wires":[[]]},{"id":"e52f49c1.3dda9","type":"OPCUA-IIoT-Response","z":"eac85a93.4f949","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":610,"y":480,"wires":[[]]},{"id":"eee817a7.0958a","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":7,"width":9,"height":1,"name":"","label":"Color value blue:","format":"{{msg.payload.OUT_w_Calib_ColorValue_Blue}}","layout":"row-spread","x":750,"y":300,"wires":[]},{"id":"db0fa8a6.088158","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":6,"width":9,"height":1,"name":"","label":"Color value red:","format":"{{msg.payload.OUT_w_Calib_ColorValue_Red}}","layout":"row-spread","x":740,"y":340,"wires":[]},{"id":"fea95398.9ce5d8","type":"debug","z":"d157eff7.cfa8","name":"Color sensor calib. data","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":790,"y":40,"wires":[]},{"id":"13b0d732.b7a3e1","type":"function","z":"d157eff7.cfa8","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0;\n\n\noutput = msg.payload.OUT_i_Color_Sensor_Selection; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":730,"y":200,"wires":[["753a0d68.64687c"]]},{"id":"753a0d68.64687c","type":"ui_dropdown","z":"d157eff7.cfa8","name":"","label":"Sensor selection:","tooltip":"","place":"Select option","group":"4dd8e20b.5429ac","order":2,"width":9,"height":1,"passthru":true,"options":[{"label":"Select sensor","value":"0","type":"str"},{"label":"DSI","value":1,"type":"num"},{"label":"SLD","value":"2","type":"str"}],"payload":"","topic":"HBW_position_no","x":930,"y":200,"wires":[["c7401ab2.21b9e"]]},{"id":"c7401ab2.21b9e","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Color_Sensor_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1140,"y":200,"wires":[["dbcf7d3.61bc58"]]},{"id":"dbcf7d3.61bc58","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1290,"y":200,"wires":[["eadaef82.408ca8"]]},{"id":"eadaef82.408ca8","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1450,"y":200,"wires":[[]]},{"id":"32821c52.ea1854","type":"function","z":"d157eff7.cfa8","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Color_Sensor_Calibration\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Color_Sensor_Selection\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Blue\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_Red\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Calib_ColorValue_White\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Actual_ColorValue\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'Word'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'Word'},\n ]\n \n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":80,"wires":[["f8445134.1ecd"]]},{"id":"9a90d538.4961a","type":"debug","z":"eac85a93.4f949","name":"new position values","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1070,"y":380,"wires":[]},{"id":"c8bcfa0c.6312a8","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":5,"width":9,"height":1,"name":"","label":"Color value white:","format":"{{msg.payload.OUT_w_Calib_ColorValue_White}}","layout":"row-spread","x":750,"y":380,"wires":[]},{"id":"7c1c763f.cc7f18","type":"ui_template","z":"cc38a811.11de2","group":"4334b06.5f5075","name":"Camera view","order":2,"width":10,"height":8,"format":"\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":530,"y":180,"wires":[[]]},{"id":"987de9dd.1d35f","type":"mqtt in","z":"cc38a811.11de2","name":"","topic":"i/cam","qos":"0","datatype":"json","broker":"788959e0.92f718","x":90,"y":140,"wires":[["3c2feecf.f5a97a","34cec622.ac7462","21f4ee2b.f86e3a"]]},{"id":"3c2feecf.f5a97a","type":"debug","z":"cc38a811.11de2","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":310,"y":100,"wires":[]},{"id":"34cec622.ac7462","type":"function","z":"cc38a811.11de2","name":"data","func":"msg.payload = msg.payload.data;\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":180,"wires":[["7c1c763f.cc7f18"]]},{"id":"21f4ee2b.f86e3a","type":"function","z":"cc38a811.11de2","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":140,"wires":[["dadb82ab.dbbdc","acdbb5d4.864318"]]},{"id":"dadb82ab.dbbdc","type":"debug","z":"cc38a811.11de2","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":510,"y":100,"wires":[]},{"id":"acdbb5d4.864318","type":"ui_text","z":"cc38a811.11de2","group":"4334b06.5f5075","order":1,"width":0,"height":0,"name":"","label":"timestamp Cam","format":"{{msg.payload}}","layout":"row-spread","x":540,"y":140,"wires":[]},{"id":"e36baf84.6f3b98","type":"comment","z":"cc38a811.11de2","name":"Camera view HMI - Main","info":"","x":130,"y":40,"wires":[]},{"id":"a6a48de6.18e81","type":"ui_text","z":"cc38a811.11de2","group":"c863b9e5.ef9b6","order":1,"width":6,"height":1,"name":"","label":"Clear HBW rack:","format":"","layout":"row-spread","x":130,"y":300,"wires":[]},{"id":"d9e572a3.d32ab","type":"ui_button","z":"cc38a811.11de2","name":"","group":"c863b9e5.ef9b6","order":3,"width":2,"height":1,"passthru":false,"label":"CLEAR","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":320,"y":300,"wires":[["1aa5f912.641677"]]},{"id":"1aa5f912.641677","type":"function","z":"cc38a811.11de2","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Clean_Rack_HBW\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":300,"wires":[["3f1f9ce0.458064"]]},{"id":"3f1f9ce0.458064","type":"OPCUA-IIoT-Write","z":"cc38a811.11de2","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":300,"wires":[["9cfd2553.726cd"]]},{"id":"9cfd2553.726cd","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":300,"wires":[[]]},{"id":"efcac8c9.532898","type":"comment","z":"cc38a811.11de2","name":"Clear HBW Rack","info":"","x":100,"y":260,"wires":[]},{"id":"5de1eda6.9de83c","type":"status","z":"cc38a811.11de2","name":"","scope":["c38758b9.c5c21"],"x":100,"y":620,"wires":[["42590122.2fe46"]]},{"id":"7122421c.98a41c","type":"trigger","z":"cc38a811.11de2","op1":"0","op2":"1","op1type":"str","op2type":"num","duration":"10","extend":false,"units":"s","reset":"0","bytopic":"all","name":"","x":490,"y":620,"wires":[["3fb7aba9.f81d34"]]},{"id":"42590122.2fe46","type":"function","z":"cc38a811.11de2","name":"connection lost?","func":"var local=global.get('data') || {};\nif (local.OPC_con_loss===undefined)//test exists\n {\n local.OPC_con_loss=0;\n }\n\n\n//if (msg.payload === \"Internal Error\")\n// { \n// msg.state = 1 ;\n// }\n//else\n// {\n msg.status.text === \"listening (1)\" ? msg.state = 0 : msg.state = 1\n// }\n\n\nif (msg.status.text === \"listening (1)\")\n {\n local.OPC_con_loss=0; \n global.set('data',local);\n }\n\nreturn {\"payload\": msg.state}","outputs":1,"noerr":0,"x":300,"y":620,"wires":[["7122421c.98a41c"]]},{"id":"c3c37f15.dbd6","type":"function","z":"cc38a811.11de2","name":"Request Token","func":"msg.payload = {\n \"client_id\": \"node-red-editor\",\n \"grant_type\": \"password\",\n \"scope\": \"*\",\n \"username\": \"type or username\",\n \"password\": \"type your password\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":680,"wires":[["f0934e34.1bcd6"]]},{"id":"f0934e34.1bcd6","type":"http request","z":"cc38a811.11de2","name":"Token","method":"POST","ret":"txt","paytoqs":false,"url":"http://localhost:1880/auth/token","tls":"","persist":false,"proxy":"","authType":"","x":470,"y":680,"wires":[["cbad7e2b.6c1ac"]]},{"id":"cbad7e2b.6c1ac","type":"function","z":"cc38a811.11de2","name":"Confirm token","func":"var status = msg.statusCode;\nvar token = '';\nmsg.headers ={};\n\n\nswitch(status){\n case 200:\n node.log(\"Secure restart\");\n token = JSON.parse(msg.payload);\n token = 'Bearer '+token.access_token;\n msg.headers = {\n \"Authorization\": token,\n \"Node-RED-Deployment-Type\":\"reload\"\n }\nmsg.payload =\"\";\n break;\n case 204:\n node.log(\"Secure without restart\");\n global.set('result','\tSuccess - with no further content');\n break;\n case 400:\n node.warn(\"Bad request\");\n break;\n case 401:\n node.warn(\"Not authorized\");\n break;\n case 403:\n node.warn(\"Forbidden\");\n break;\n case 404:\n node.log(\"Unsecure restart\");\n msg.headers = {\n \"Node-RED-Deployment-Type\":\"reload\"\n }\n break;\n case 409:\n node.warn(\"Version mismatch\");\n break;\n case 500:\n node.error(\"Server Error\");\n break;\n default:\n node.warn(\"Unknown Error\");\n break;\n}\n\nmsg.payload = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":680,"y":680,"wires":[["34e0253c.498f22"]],"info":"Restart of Node-Red flows.\nWill check if the action needs security or not.\nNote: if the first 5 attemps return a statuscode 403 'forbidden'\nthen the server will break and only way to recover is then to\nrestart the service"},{"id":"34e0253c.498f22","type":"http request","z":"cc38a811.11de2","name":"Restart","method":"POST","ret":"txt","paytoqs":false,"url":"http://localhost:1880/flows","tls":"","persist":false,"proxy":"","authType":"","x":860,"y":680,"wires":[[]]},{"id":"11509da5.1813f2","type":"comment","z":"cc38a811.11de2","name":"Restart Flows when OPC UA connection is lost","info":"","x":200,"y":480,"wires":[]},{"id":"3fb7aba9.f81d34","type":"function","z":"cc38a811.11de2","name":"count connection loss","func":"var count=0;\nvar local=global.get('data') || {};\nif (local.OPC_con_loss===undefined)//test exists\n{\nlocal.OPC_con_loss=0;\n}\n\ncount = local.OPC_con_loss;\nif (msg.payload === 1)\n{\ncount = count + 1;\nlocal.OPC_con_loss = count;\nglobal.set('data',local);\n}\n\nif (local.OPC_con_loss > 5)\n{\nmsg.payload = 0;\n}\n\nmsg.con_loss = local.OPC_con_loss; \n\nreturn {\n \"topic\": msg.topic,\n \"payload\": msg.payload,\n \"con_loss\": msg.con_loss,\n};\n\n","outputs":1,"noerr":0,"x":700,"y":620,"wires":[["ff963ba.def7d48","8fc0bc00.7f2438","619f2be0.909c44"]]},{"id":"63c6cc41.c4bbb4","type":"ui_toast","z":"cc38a811.11de2","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":1230,"y":620,"wires":[[]]},{"id":"ff963ba.def7d48","type":"rbe","z":"cc38a811.11de2","name":"","func":"deadband","gap":"","start":"","inout":"in","property":"payload","x":110,"y":680,"wires":[["c3c37f15.dbd6"]]},{"id":"8fc0bc00.7f2438","type":"switch","z":"cc38a811.11de2","name":"","property":"con_loss","propertyType":"msg","rules":[{"t":"gt","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":620,"wires":[["a5f99cdd.ec9b58"]]},{"id":"a5f99cdd.ec9b58","type":"function","z":"cc38a811.11de2","name":"Message","func":"\nmsg.payload = \"OPC UA Connection failed check cables!\"\n\nreturn msg;","outputs":1,"noerr":0,"x":1060,"y":620,"wires":[["63c6cc41.c4bbb4"]]},{"id":"13fe8b8d.a39fb4","type":"comment","z":"cc38a811.11de2","name":"HBW View","info":"","x":80,"y":840,"wires":[]},{"id":"619f2be0.909c44","type":"debug","z":"cc38a811.11de2","name":"OPC connection lost?","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":960,"y":580,"wires":[]},{"id":"f673eef.ae18a9","type":"OPCUA-IIoT-Inject","z":"cc38a811.11de2","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"x_Clean_Rack_HBW\"","datatypeName":""}],"x":90,"y":520,"wires":[["c38758b9.c5c21"]]},{"id":"c38758b9.c5c21","type":"OPCUA-IIoT-Listener","z":"cc38a811.11de2","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":520,"wires":[["3daf23cf.f2fb4c"]]},{"id":"3daf23cf.f2fb4c","type":"function","z":"cc38a811.11de2","name":"values to read","func":"\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n {\"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Clean_Rack_HBW\"',\n \"datatypeName\":'Boolean'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":520,"wires":[["1726826e.42e1b6"]]},{"id":"1726826e.42e1b6","type":"OPCUA-IIoT-Read","z":"cc38a811.11de2","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":610,"y":520,"wires":[["eecdce4e.35b18"]]},{"id":"eecdce4e.35b18","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":770,"y":520,"wires":[[]]},{"id":"2788f23f.05cf66","type":"ui_text","z":"b495b31e.fe8338","group":"2f117237.36aff6","order":12,"width":3,"height":1,"name":"","label":"Home positioning:","format":"","layout":"row-spread","x":150,"y":580,"wires":[]},{"id":"53314054.a909c","type":"ui_button","z":"b495b31e.fe8338","name":"","group":"2f117237.36aff6","order":14,"width":2,"height":1,"passthru":false,"label":"HOME","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal2","x":330,"y":580,"wires":[["4ba1b27f.2078f4"]]},{"id":"4ba1b27f.2078f4","type":"function","z":"b495b31e.fe8338","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Home_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":680,"y":580,"wires":[["c2244e10.04ad78"]]},{"id":"c2244e10.04ad78","type":"OPCUA-IIoT-Write","z":"b495b31e.fe8338","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":870,"y":580,"wires":[["b5679967.39116"]]},{"id":"b5679967.39116","type":"OPCUA-IIoT-Response","z":"b495b31e.fe8338","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1030,"y":580,"wires":[[]]},{"id":"b6bcaa83.2ee618","type":"comment","z":"18869de1.83d712","name":"HMI - Calibrate SLD push out values","info":"","x":160,"y":40,"wires":[]},{"id":"9b68f1a6.7514a","type":"OPCUA-IIoT-Read","z":"18869de1.83d712","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":650,"y":80,"wires":[["4b39a2c4.a8556c","59bdda37.4e8d64"]]},{"id":"d2d7b546.3aac3","type":"function","z":"18869de1.83d712","name":"read config data from PLC","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //Pos. Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Counter_Value_Calibration\"',\n \"datatypeName\":'Boolean'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n //Pos. Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n //Pos White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":80,"wires":[["9b68f1a6.7514a"]]},{"id":"4b39a2c4.a8556c","type":"function","z":"18869de1.83d712","name":"Output Object","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n OUT_x_Counter_Value_Calibration: false,\n OUT_i_Calib_CounterValue_Blue: 1,\n OUT_i_Calib_CounterValue_Red: 1,\n OUT_i_Calib_CounterValue_White: 1,\n }\n\nConfData_out.OUT_x_Counter_Value_Calibration = msg.payload[0].value.value; //[0]\nConfData_out.OUT_i_Calib_CounterValue_Blue = msg.payload[1].value.value; //[1] \nConfData_out.OUT_i_Calib_CounterValue_Red = msg.payload[2].value.value; //[2] \nConfData_out.OUT_i_Calib_CounterValue_White = msg.payload[3].value.value; //[3]\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":400,"y":140,"wires":[["73fce045.9c5a98","52b3f0d.002fa9","7529f883.d26d3","534785ee.1459c4"]]},{"id":"59bdda37.4e8d64","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":80,"wires":[[]]},{"id":"73fce045.9c5a98","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.OUT_i_Calib_CounterValue_Blue; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":200,"wires":[["bf865603.79cba8"]]},{"id":"52b3f0d.002fa9","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\noutput = msg.payload.OUT_i_Calib_CounterValue_Red; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":260,"wires":[["4280e7e1.c6d68"]]},{"id":"7529f883.d26d3","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = 0 ;\n\n\noutput = msg.payload.OUT_i_Calib_CounterValue_White; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":320,"wires":[["8417baa2.b5b3a"]]},{"id":"bf865603.79cba8","type":"ui_numeric","z":"18869de1.83d712","name":"","label":"pushout val. blue:","tooltip":"","group":"9a003a94.59357","order":4,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":870,"y":200,"wires":[["9b408ae5.691678"]]},{"id":"4280e7e1.c6d68","type":"ui_numeric","z":"18869de1.83d712","name":"","label":"pushout val. red:","tooltip":"","group":"9a003a94.59357","order":3,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":870,"y":260,"wires":[["f9742693.d0de88"]]},{"id":"8417baa2.b5b3a","type":"ui_numeric","z":"18869de1.83d712","name":"","label":"pushout val. white:","tooltip":"","group":"9a003a94.59357","order":2,"width":9,"height":1,"wrap":false,"passthru":true,"topic":"","format":"{{msg.payload}}","min":0,"max":"8000","step":1,"x":870,"y":320,"wires":[["ee0d9f41.9aa95"]]},{"id":"9b408ae5.691678","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":200,"wires":[["bceafa80.b54478"]]},{"id":"f9742693.d0de88","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":260,"wires":[["f94c1450.3cd"]]},{"id":"ee0d9f41.9aa95","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":320,"wires":[["be30d758.a4b678"]]},{"id":"bceafa80.b54478","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":200,"wires":[["7ea812c3.ebe8c4"]]},{"id":"f94c1450.3cd","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":260,"wires":[["5bd3697e.8b167"]]},{"id":"7ea812c3.ebe8c4","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":200,"wires":[[]]},{"id":"5bd3697e.8b167","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":260,"wires":[[]]},{"id":"be30d758.a4b678","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":320,"wires":[["2561848b.e8268c"]]},{"id":"2561848b.e8268c","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":320,"wires":[[]]},{"id":"51d380d3.743858","type":"ui_text","z":"18869de1.83d712","group":"9a003a94.59357","order":5,"width":6,"height":1,"name":"","label":"Set calibration value:","format":"","layout":"row-spread","x":140,"y":420,"wires":[]},{"id":"df3c0ad7.6c78e8","type":"ui_button","z":"18869de1.83d712","name":"","group":"9a003a94.59357","order":7,"width":2,"height":1,"passthru":false,"label":"SET","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":310,"y":420,"wires":[["e22a46a0.13e348"]]},{"id":"e22a46a0.13e348","type":"function","z":"18869de1.83d712","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_CounterValues\"',\n \"datatypeName\":'Boolean'},\n ]\n\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":480,"y":420,"wires":[["4e6fce37.dd753"]]},{"id":"4e6fce37.dd753","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":650,"y":420,"wires":[["3a2102a8.265316"]]},{"id":"3a2102a8.265316","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":810,"y":420,"wires":[[]]},{"id":"fb6cad35.1a97b8","type":"comment","z":"18869de1.83d712","name":"HMI - set calibration values","info":"","x":130,"y":380,"wires":[]},{"id":"c338235a.9153","type":"OPCUA-IIoT-Inject","z":"18869de1.83d712","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"12","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Blue\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_Red\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"i_Calib_CounterValue_White\"","datatypeName":""},{"name":"","nodeId":"ns=3;s=\"gtyp_Setup\".\"x_Counter_Value_Calibration\"","datatypeName":""}],"x":110,"y":80,"wires":[["dd668562.8d5a98"]]},{"id":"dd668562.8d5a98","type":"OPCUA-IIoT-Listener","z":"18869de1.83d712","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":240,"y":80,"wires":[["d2d7b546.3aac3"]]},{"id":"5d4797f3.9f3d38","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":14,"width":9,"height":1,"name":"","label":"Threshold red-blue","format":"{{msg.payload.OUT_w_Threshold_Red_Blue}}","layout":"row-spread","x":750,"y":420,"wires":[]},{"id":"a99bd513.d45fe8","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":13,"width":9,"height":1,"name":"","label":"Threshold white-red","format":"{{msg.payload.OUT_w_Threshold_White_Red}}","layout":"row-spread","x":760,"y":460,"wires":[]},{"id":"55d8536f.062084","type":"ui_text","z":"d157eff7.cfa8","group":"4dd8e20b.5429ac","order":15,"width":5,"height":1,"name":"","label":"Calculate threshold:","format":"","layout":"row-spread","x":160,"y":760,"wires":[]},{"id":"bf82dc14.b5c5","type":"ui_button","z":"d157eff7.cfa8","name":"","group":"4dd8e20b.5429ac","order":17,"width":3,"height":1,"passthru":false,"label":"CALCULATE","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":350,"y":760,"wires":[["34181bef.baf07c"]]},{"id":"34181bef.baf07c","type":"function","z":"d157eff7.cfa8","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Calculate_Value_Color\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":520,"y":760,"wires":[["7daa72f3.a1efdc"]]},{"id":"7daa72f3.a1efdc","type":"OPCUA-IIoT-Write","z":"d157eff7.cfa8","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":690,"y":760,"wires":[["4b84541a.7f6004"]]},{"id":"4b84541a.7f6004","type":"OPCUA-IIoT-Response","z":"d157eff7.cfa8","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":850,"y":760,"wires":[[]]},{"id":"35fe850f.0411f2","type":"comment","z":"d157eff7.cfa8","name":"Calculate threshold","info":"","x":110,"y":720,"wires":[]},{"id":"62f72ee6.8ab928","type":"ui_text","z":"cc38a811.11de2","group":"c863b9e5.ef9b6","order":4,"width":6,"height":1,"name":"","label":"Acknowledge Errors:","format":"","layout":"row-spread","x":140,"y":400,"wires":[]},{"id":"220cbc3c.02615c","type":"ui_button","z":"cc38a811.11de2","name":"","group":"c863b9e5.ef9b6","order":6,"width":2,"height":1,"passthru":false,"label":"ACK","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":310,"y":400,"wires":[["aabd31a.b36ef5"]]},{"id":"aabd31a.b36ef5","type":"function","z":"cc38a811.11de2","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_AcknowledgeButton\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":400,"wires":[["c98dcac2.854b7"]]},{"id":"c98dcac2.854b7","type":"OPCUA-IIoT-Write","z":"cc38a811.11de2","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":400,"wires":[["b3b942ef.d11a3"]]},{"id":"b3b942ef.d11a3","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":400,"wires":[[]]},{"id":"4aa6f019.b9a278","type":"comment","z":"cc38a811.11de2","name":"Acknowledge Errors","info":"","x":110,"y":360,"wires":[]},{"id":"b4629dac.722198","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Home_Positioning\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":500,"y":520,"wires":[["c4648d08.4ddf1"]]},{"id":"c4648d08.4ddf1","type":"OPCUA-IIoT-Write","z":"410fcde3.56d53c","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":670,"y":520,"wires":[["28f7f1e6.dff286"]]},{"id":"28f7f1e6.dff286","type":"OPCUA-IIoT-Response","z":"410fcde3.56d53c","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":520,"wires":[[]]},{"id":"e2e8b027.48b018","type":"function","z":"410fcde3.56d53c","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n\n\nif (wert === true)\n { \n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n ]\n msg.valuesToWrite = [wert];\n }\nelse\n {\n msg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"',\n \"datatypeName\":'Boolean'},\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"',\n \"datatypeName\":'Int16'},\n ]\n msg.valuesToWrite = [wert,0];\n }\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":580,"y":80,"wires":[["f449215.0186ce"]]},{"id":"c09cb4bc.f63ca8","type":"function","z":"4c072751.507d3","name":"filter out Master Tag","func":"var new_msg = { payload: \"\" };\nvar output = \"\" ;\n\noutput = msg.payload.workpiece.id; \n\nif (output.length === 8)\n{\n new_msg.payload = \"Master Tag\";\n}\nelse\n{\n new_msg.payload = \"\";\n}\n\nreturn new_msg;","outputs":1,"noerr":0,"x":760,"y":300,"wires":[[]]},{"id":"534785ee.1459c4","type":"function","z":"18869de1.83d712","name":"single value","func":"var new_msg = { payload: \"\" };\nvar output = false ;\n\n\noutput = msg.payload.OUT_x_Counter_Value_Calibration; \nnew_msg.payload = output;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":670,"y":140,"wires":[["307102f8.b2f8ae"]]},{"id":"307102f8.b2f8ae","type":"ui_switch","z":"18869de1.83d712","name":"","label":"Calibrate push out","tooltip":"","group":"9a003a94.59357","order":1,"width":9,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":870,"y":140,"wires":[["e85e0816.44758"]]},{"id":"e85e0816.44758","type":"function","z":"18869de1.83d712","name":"declare values","func":"var wert = msg.payload\n\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\n msg.addressSpaceItems = [\n {\n \"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Counter_Value_Calibration\"',\n \"datatypeName\":'Boolean'\n },\n ]\n msg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":1080,"y":140,"wires":[["3b28ce3e.bb91f2"]]},{"id":"3b28ce3e.bb91f2","type":"OPCUA-IIoT-Write","z":"18869de1.83d712","connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":true,"x":1250,"y":140,"wires":[["662b7d1e.5dde34"]]},{"id":"662b7d1e.5dde34","type":"OPCUA-IIoT-Response","z":"18869de1.83d712","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":1410,"y":140,"wires":[[]]},{"id":"f2bb1786.5fa028","type":"catch","z":"bcaa3a6a.3bdbe8","name":"","scope":null,"uncaught":false,"x":100,"y":420,"wires":[["7e77d832.b6f4e8"]]},{"id":"7e77d832.b6f4e8","type":"function","z":"bcaa3a6a.3bdbe8","name":"Message","func":"\nmsg.payload = \"File handling caused error. Check 'save/load config' flow for further information!\"\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":420,"wires":[["93ec523f.77fa28"]]},{"id":"93ec523f.77fa28","type":"ui_toast","z":"bcaa3a6a.3bdbe8","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":450,"y":420,"wires":[[]]},{"id":"d3654882.ecbf48","type":"comment","z":"bcaa3a6a.3bdbe8","name":"file handling error","info":"","x":130,"y":380,"wires":[]},{"id":"80c20135.6bff78","type":"comment","z":"cc38a811.11de2","name":"Restart OPCUA/MQTT Interface","info":"","x":150,"y":740,"wires":[]},{"id":"6e0239de.d05058","type":"ui_text","z":"cc38a811.11de2","group":"c863b9e5.ef9b6","order":7,"width":6,"height":1,"name":"","label":"Restart OPCUA/MQTT Interface","format":"","layout":"row-spread","x":170,"y":780,"wires":[]},{"id":"95ff8b30.0a897","type":"ui_button","z":"cc38a811.11de2","name":"","group":"c863b9e5.ef9b6","order":9,"width":2,"height":1,"passthru":false,"label":"RESTART","tooltip":"","color":"","bgcolor":"","icon":"done","payload":"true","payloadType":"bool","topic":"Signal1","x":410,"y":780,"wires":[["c3c37f15.dbd6"]]},{"id":"b76fdee.dc44d2","type":"ui_button","z":"cc38a811.11de2","name":"A1","group":"82956c45.28a928","order":6,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":410,"y":920,"wires":[[]]},{"id":"79a3a8ee.c20d68","type":"function","z":"cc38a811.11de2","name":"col. A1","func":"var state = msg.payload.HBW_A1_s_state\nvar type = msg.payload.HBW_A1_s_type\nvar id = msg.payload.HBW_A1_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.A1_color===undefined)//test exists\n {\n local.A1_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.A1_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.A1_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.A1_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.A1_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":270,"y":1140,"wires":[["b76fdee.dc44d2"]]},{"id":"65dfcb6.79622b4","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":2,"width":3,"height":1,"name":"","label":"1","format":"{{msg.payload}}","layout":"row-center","x":410,"y":880,"wires":[]},{"id":"681e6d80.9416dc","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":3,"width":3,"height":1,"name":"","label":"2","format":"{{msg.payload}}","layout":"row-center","x":570,"y":880,"wires":[]},{"id":"a1692660.369e8","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":4,"width":3,"height":1,"name":"","label":"3","format":"{{msg.payload}}","layout":"row-center","x":750,"y":880,"wires":[]},{"id":"77c361a.48ce5a","type":"ui_button","z":"cc38a811.11de2","name":"A2","group":"82956c45.28a928","order":7,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":570,"y":920,"wires":[[]]},{"id":"4d16f76f.48f3b8","type":"ui_button","z":"cc38a811.11de2","name":"A3","group":"82956c45.28a928","order":8,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":920,"wires":[[]]},{"id":"361f7395.bf1354","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":5,"width":1,"height":1,"name":"","label":"A","format":"{{msg.payload}}","layout":"row-spread","x":230,"y":920,"wires":[]},{"id":"13fdf4e8.0e7a03","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":9,"width":1,"height":1,"name":"","label":"B","format":"{{msg.payload}}","layout":"row-spread","x":230,"y":960,"wires":[]},{"id":"fa1f6852.2a682","type":"ui_button","z":"cc38a811.11de2","name":"B1","group":"82956c45.28a928","order":10,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":410,"y":960,"wires":[[]]},{"id":"961ce14f.afb18","type":"ui_button","z":"cc38a811.11de2","name":"B2","group":"82956c45.28a928","order":11,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":570,"y":960,"wires":[[]]},{"id":"b6a6d9dc.21db88","type":"ui_button","z":"cc38a811.11de2","name":"B3","group":"82956c45.28a928","order":12,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":960,"wires":[[]]},{"id":"192d536d.d913ed","type":"ui_text","z":"cc38a811.11de2","group":"82956c45.28a928","order":13,"width":1,"height":1,"name":"","label":"C","format":"{{msg.payload}}","layout":"row-spread","x":230,"y":1000,"wires":[]},{"id":"13482650.5cc49a","type":"ui_button","z":"cc38a811.11de2","name":"C1","group":"82956c45.28a928","order":14,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":410,"y":1000,"wires":[[]]},{"id":"c1ec6eed.6c4ee8","type":"ui_button","z":"cc38a811.11de2","name":"C2","group":"82956c45.28a928","order":15,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":570,"y":1000,"wires":[[]]},{"id":"85939166.c57078","type":"ui_button","z":"cc38a811.11de2","name":"C3","group":"82956c45.28a928","order":16,"width":3,"height":1,"passthru":false,"label":"{{payload.label}}","tooltip":"","color":"{{payload.TXT_color}}","bgcolor":"{{payload.BG_color}}","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":1000,"wires":[[]]},{"id":"d40d2590.549f98","type":"OPCUA-IIoT-Inject","z":"cc38a811.11de2","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"10","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"","datatypeName":""}],"x":90,"y":1080,"wires":[["d2a85064.4fd0f"]]},{"id":"d2a85064.4fd0f","type":"OPCUA-IIoT-Listener","z":"cc38a811.11de2","connector":"74a7d84.2350d28","action":"subscribe","queueSize":10,"name":"","topic":"","justValue":true,"useGroupItems":false,"showStatusActivities":false,"showErrors":true,"x":220,"y":1080,"wires":[["d46bbb03.35203"]]},{"id":"d46bbb03.35203","type":"function","z":"cc38a811.11de2","name":"values to read","func":"msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //ROW A\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,0].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,0].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,0].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,1].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,1].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,1].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,2].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,2].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[0,2].\"s_type\"',\n \"datatypeName\":'STRING'},\n //ROW B\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,0].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,0].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,0].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,1].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,1].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,1].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,2].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,2].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[1,2].\"s_type\"',\n \"datatypeName\":'STRING'},\n //ROW C\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,0].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,0].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,0].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,1].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,1].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,1].\"s_type\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,2].\"s_id\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,2].\"s_state\"',\n \"datatypeName\":'STRING'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"Rack_Workpiece\"[2,2].\"s_type\"',\n \"datatypeName\":'STRING'},\n ]\n\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":1080,"wires":[["401e28fa.91088"]]},{"id":"401e28fa.91088","type":"OPCUA-IIoT-Read","z":"cc38a811.11de2","attributeId":"13","maxAge":1,"depth":1,"connector":"74a7d84.2350d28","name":"","justValue":true,"showStatusActivities":false,"showErrors":false,"parseStrings":false,"historyDays":"","serverMaxItemsToRead":"","x":570,"y":1080,"wires":[["e7c2b1e3.49f008","bbbfb804.25f95"]]},{"id":"e7c2b1e3.49f008","type":"OPCUA-IIoT-Response","z":"cc38a811.11de2","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":770,"y":1080,"wires":[[]]},{"id":"4e54723a.247904","type":"debug","z":"cc38a811.11de2","name":"HBW Rack state","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":300,"y":1260,"wires":[]},{"id":"bbbfb804.25f95","type":"function","z":"cc38a811.11de2","name":"Format Out","func":"var new_msg = { payload: \"\" };\nvar ConfData_out = {\n\n //declaration\n //HBW ROW A\n HBW_A1_s_id: \"\", //[0]\n HBW_A1_s_state: \"\", //[1]\n HBW_A1_s_type: \"\", //[2]\n HBW_A2_s_id: \"\", //[3]\n HBW_A2_s_state: \"\", //[4]\n HBW_A2_s_type: \"\", //[5]\n HBW_A3_s_id: \"\", //[6]\n HBW_A3_s_state: \"\", //[7]\n HBW_A3_s_type: \"\", //[8]\n\n //HBW ROW B\n HBW_B1_s_id: \"\", //[9]\n HBW_B1_s_state: \"\", //[10]\n HBW_B1_s_type: \"\", //[11]\n HBW_B2_s_id: \"\", //[12]\n HBW_B2_s_state: \"\", //[13]\n HBW_B2_s_type: \"\", //[14]\n HBW_B3_s_id: \"\", //[15]\n HBW_B3_s_state: \"\", //[16]\n HBW_B3_s_type: \"\", //[17]\n\n //HBW ROW C\n HBW_C1_s_id: \"\", //[18]\n HBW_C1_s_state: \"\", //[19]\n HBW_C1_s_type: \"\", //[20]\n HBW_C2_s_id: \"\", //[21]\n HBW_C2_s_state: \"\", //[22]\n HBW_C2_s_type: \"\", //[23]\n HBW_C3_s_id: \"\", //[24]\n HBW_C3_s_state: \"\", //[25]\n HBW_C3_s_type: \"\", //[26]\n }\n\n//HBW ROW A\nConfData_out.HBW_A1_s_id = msg.payload[0].value.value; //[0] \nConfData_out.HBW_A1_s_state = msg.payload[1].value.value; //[1] \nConfData_out.HBW_A1_s_type = msg.payload[2].value.value; //[2]\n\nConfData_out.HBW_A2_s_id = msg.payload[3].value.value; //[3] \nConfData_out.HBW_A2_s_state = msg.payload[4].value.value; //[4] \nConfData_out.HBW_A2_s_type = msg.payload[5].value.value; //[5]\n\nConfData_out.HBW_A3_s_id = msg.payload[6].value.value; //[6] \nConfData_out.HBW_A3_s_state = msg.payload[7].value.value; //[7] \nConfData_out.HBW_A3_s_type = msg.payload[8].value.value; //[8]\n\n//HBW ROW B\nConfData_out.HBW_B1_s_id = msg.payload[9].value.value; //[9] \nConfData_out.HBW_B1_s_state = msg.payload[10].value.value; //[10] \nConfData_out.HBW_B1_s_type = msg.payload[11].value.value; //[11]\n\nConfData_out.HBW_B2_s_id = msg.payload[12].value.value; //[12] \nConfData_out.HBW_B2_s_state = msg.payload[13].value.value; //[13] \nConfData_out.HBW_B2_s_type = msg.payload[14].value.value; //[14]\n\nConfData_out.HBW_B3_s_id = msg.payload[15].value.value; //[15] \nConfData_out.HBW_B3_s_state = msg.payload[16].value.value; //[16] \nConfData_out.HBW_B3_s_type = msg.payload[17].value.value; //[17]\n\n//HBW ROW C\nConfData_out.HBW_C1_s_id = msg.payload[18].value.value; //[18] \nConfData_out.HBW_C1_s_state = msg.payload[19].value.value; //[19] \nConfData_out.HBW_C1_s_type = msg.payload[20].value.value; //[20]\n\nConfData_out.HBW_C2_s_id = msg.payload[21].value.value; //[21] \nConfData_out.HBW_C2_s_state = msg.payload[22].value.value; //[22] \nConfData_out.HBW_C2_s_type = msg.payload[23].value.value; //[23]\n\nConfData_out.HBW_C3_s_id = msg.payload[24].value.value; //[24] \nConfData_out.HBW_C3_s_state = msg.payload[25].value.value; //[25] \nConfData_out.HBW_C3_s_type = msg.payload[26].value.value; //[26]\n\n\nnew_msg.payload = ConfData_out;\n\nreturn new_msg;","outputs":1,"noerr":0,"x":110,"y":1140,"wires":[["4e54723a.247904","79a3a8ee.c20d68","a5572c8f.c64f4","4ee7719.54fac9","163cc067.77a568","8a0d7436.fc4e9","b22b13ba.e01e18","b268839d.4e6f4","3b2820b0.daf038","390bb559.e9aa32"]]},{"id":"a5572c8f.c64f4","type":"function","z":"cc38a811.11de2","name":"col. A2","func":"var state = msg.payload.HBW_A2_s_state\nvar type = msg.payload.HBW_A2_s_type\nvar id = msg.payload.HBW_A2_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.A2_color===undefined)//test exists\n {\n local.A2_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.A2_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.A2_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.A2_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.A2_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":430,"y":1140,"wires":[["77c361a.48ce5a"]]},{"id":"4ee7719.54fac9","type":"function","z":"cc38a811.11de2","name":"col. A3","func":"var state = msg.payload.HBW_A3_s_state\nvar type = msg.payload.HBW_A3_s_type\nvar id = msg.payload.HBW_A3_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.A3_color===undefined)//test exists\n {\n local.A3_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.A3_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.A3_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.A3_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.A3_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":1140,"wires":[["4d16f76f.48f3b8"]]},{"id":"163cc067.77a568","type":"function","z":"cc38a811.11de2","name":"col. B1","func":"var state = msg.payload.HBW_B1_s_state\nvar type = msg.payload.HBW_B1_s_type\nvar id = msg.payload.HBW_B1_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.B1_color===undefined)//test exists\n {\n local.B1_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.B1_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.B1_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.B1_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.B1_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":270,"y":1180,"wires":[["fa1f6852.2a682"]]},{"id":"8a0d7436.fc4e9","type":"function","z":"cc38a811.11de2","name":"col. B2","func":"var state = msg.payload.HBW_B2_s_state\nvar type = msg.payload.HBW_B2_s_type\nvar id = msg.payload.HBW_B2_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.B2_color===undefined)//test exists\n {\n local.B2_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.B2_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.B2_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.B2_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.B2_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":430,"y":1180,"wires":[["961ce14f.afb18"]]},{"id":"b22b13ba.e01e18","type":"function","z":"cc38a811.11de2","name":"col. B3","func":"var state = msg.payload.HBW_B3_s_state\nvar type = msg.payload.HBW_B3_s_type\nvar id = msg.payload.HBW_B3_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.B3_color===undefined)//test exists\n {\n local.B3_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.B3_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.B3_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.B3_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.B3_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":590,"y":1180,"wires":[["b6a6d9dc.21db88"]]},{"id":"6278b51f.416c94","type":"comment","z":"cc38a811.11de2","name":"End","info":"","x":70,"y":1320,"wires":[]},{"id":"b268839d.4e6f4","type":"function","z":"cc38a811.11de2","name":"col. C1","func":"var state = msg.payload.HBW_C1_s_state\nvar type = msg.payload.HBW_C1_s_type\nvar id = msg.payload.HBW_C1_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.C1_color===undefined)//test exists\n {\n local.C1_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.C1_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.C1_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.C1_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.C1_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":280,"y":1220,"wires":[["13482650.5cc49a"]]},{"id":"3b2820b0.daf038","type":"function","z":"cc38a811.11de2","name":"col. C2","func":"var state = msg.payload.HBW_C2_s_state\nvar type = msg.payload.HBW_C2_s_type\nvar id = msg.payload.HBW_C2_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.C2_color===undefined)//test exists\n {\n local.C2_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.C2_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.C2_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.C2_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.C2_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":440,"y":1220,"wires":[["c1ec6eed.6c4ee8"]]},{"id":"390bb559.e9aa32","type":"function","z":"cc38a811.11de2","name":"col. C3","func":"var state = msg.payload.HBW_C3_s_state\nvar type = msg.payload.HBW_C3_s_type\nvar id = msg.payload.HBW_C3_s_id\n\nvar local=global.get('HBW_Rack_state') || {};\nif (local.C3_color===undefined)//test exists\n {\n local.C3_color=\"\";\n }\n\nswitch(state)\n{\n case \"RAW\":\n msg.label = \"\";\n break;\n case \"PROCESSED\":\n msg.label = \"\";\n break;\n default:\n // label löschen\n msg.label = \"\";\n} \n\nswitch(type)\n{\n case \"WHITE\":\n msg.TXT_color = \"white\";\n local.C3_color = \"white\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"RED\":\n msg.TXT_color = \"red\";\n local.C3_color = \"red\"; \n global.set('HBW_Rack_state',local);\n break;\n \n case \"BLUE\":\n msg.TXT_color = \"blue\";\n local.C3_color = \"blue\"; \n global.set('HBW_Rack_state',local);\n break;\n\n default:\n // Farbe auf normal setzen\n msg.TXT_color = \"white\";\n local.C3_color = \"\"; \n global.set('HBW_Rack_state',local);\n\n} \n\n\nswitch(id)\n{\n case \"\":\n msg.BG_colour = \"white\";\n msg.TXT_colour = \"white\";\n msg.label = \"\";\n break;\n\n case \"0\":\n msg.BG_colour = \"lightgray\";\n msg.TXT_color = \"lightgray\";\n msg.label = \"\";\n break;\n\n default:\n // Farbe auf normal setzen\n msg.BG_colour = \"lightgray\";\n} \n\n\n\nreturn {\n \"topic\": msg.topic,\n \"payload\": {\n \"topic\": (msg.topic),\n \"label\": (msg.label),\n \"BG_color\":(msg.BG_colour),\n \"TXT_color\":(msg.TXT_color),\n\n }\n};\n","outputs":1,"noerr":0,"x":600,"y":1220,"wires":[["85939166.c57078"]]},{"id":"db1538fd.3adec8","type":"function","z":"ac6244e8.d50e1","name":"Filter White","func":"var white_available = 0\nvar local=global.get('HBW_Rack_state') || {};\n\nif (local.A1_color === \"white\")\n {\n white_available = 1;\n }\nif (local.A2_color === \"white\")\n {\n white_available = 1;\n }\nif (local.A3_color === \"white\")\n {\n white_available = 1;\n }\nif (local.B1_color === \"white\")\n {\n white_available = 1;\n }\nif (local.B2_color === \"white\")\n {\n white_available = 1;\n }\nif (local.B3_color === \"white\")\n {\n white_available = 1;\n }\nif (local.C1_color === \"white\")\n {\n white_available = 1;\n }\nif (local.C2_color === \"white\")\n {\n white_available = 1;\n }\nif (local.C3_color === \"white\")\n {\n white_available = 1;\n }\n\nif (white_available === 1)\n {\n msg.payload.type = \"WHITE\";\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":660,"wires":[["1018789b.7e3fbf"]]},{"id":"6b53d33a.be9a14","type":"function","z":"ac6244e8.d50e1","name":"Filter Red","func":"var red_available = 0\nvar local=global.get('HBW_Rack_state') || {};\n\nif (local.A1_color === \"red\")\n {\n red_available = 1;\n }\nif (local.A2_color === \"red\")\n {\n red_available = 1;\n }\nif (local.A3_color === \"red\")\n {\n red_available = 1;\n }\nif (local.B1_color === \"red\")\n {\n red_available = 1;\n }\nif (local.B2_color === \"red\")\n {\n red_available = 1;\n }\nif (local.B3_color === \"red\")\n {\n red_available = 1;\n }\nif (local.C1_color === \"red\")\n {\n red_available = 1;\n }\nif (local.C2_color === \"red\")\n {\n red_available = 1;\n }\nif (local.C3_color === \"red\")\n {\n red_available = 1;\n }\n\nif (red_available === 1)\n {\n msg.payload.type = \"RED\";\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":700,"wires":[["1018789b.7e3fbf"]]},{"id":"8d108965.865058","type":"function","z":"ac6244e8.d50e1","name":"Filter Blue","func":"var blue_available = 0\nvar local=global.get('HBW_Rack_state') || {};\n\nif (local.A1_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.A2_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.A3_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.B1_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.B2_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.B3_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.C1_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.C2_color === \"blue\")\n {\n blue_available = 1;\n }\nif (local.C3_color === \"blue\")\n {\n blue_available = 1;\n }\n\nif (blue_available === 1)\n {\n msg.payload.type = \"BLUE\";\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":740,"wires":[["1018789b.7e3fbf"]]},{"id":"edff04e4.d46378","type":"OPCUA-IIoT-Inject","z":"d8972c0.715b4d8","injectType":"listen","payloadType":"num","topic":"","repeat":"","crontab":"","once":true,"startDelay":"8","name":"listen","payload":"1000","addressSpaceItems":[{"name":"","nodeId":"ns=3;s=\"gtyp_Interface_Dashboard\".\"Subscribe\".\"AlertMessage\".\"ldt_ts\"","datatypeName":""}],"x":90,"y":440,"wires":[["36f7c27f.217056"]]},{"id":"1018789b.7e3fbf","type":"switch","z":"ac6244e8.d50e1","name":"","property":"payload.type","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":590,"y":660,"wires":[["ea5cc20e.8a21e8"]]},{"id":"1a5358f5.542ca7","type":"status","z":"87526827.008ad8","name":"","scope":["1c70e1b9.c34746"],"x":100,"y":160,"wires":[["ef1f4707.88e9a","a73860df.fbac48"]]},{"id":"ef1f4707.88e9a","type":"function","z":"87526827.008ad8","name":"mqtt connected?","func":"if (msg.status.fill === \"green\")\n {\n msg.payload = {\"on\":true,\"fps\":2};\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;\n","outputs":1,"noerr":0,"x":290,"y":360,"wires":[["87c0d652.f0ef48"]]},{"id":"87c0d652.f0ef48","type":"switch","z":"87526827.008ad8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":360,"wires":[["ca38a602.b2a778"]]},{"id":"a73860df.fbac48","type":"function","z":"87526827.008ad8","name":"mqtt connected?","func":"if (msg.status.fill === \"green\")\n {\n msg.payload = {\"period\":3};\n }\nelse\n {\n msg.payload = {};\n }\n\nreturn msg;\n","outputs":1,"noerr":0,"x":290,"y":160,"wires":[["4a6404f4.6fe6ac"]]},{"id":"4a6404f4.6fe6ac","type":"switch","z":"87526827.008ad8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":160,"wires":[["74c2fc8f.82a9ec","7390b7be.8f9e08"]]},{"id":"98746a57.791448","type":"mqtt in","z":"9f657cfc.c7c8a8","name":"","topic":"fl/i/nfc/ds","qos":"0","datatype":"json","broker":"788959e0.92f718","x":80,"y":2400,"wires":[["1d48181.44184e8","3dcef16a.9c6b86"]]},{"id":"1d48181.44184e8","type":"debug","z":"9f657cfc.c7c8a8","name":"raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":290,"y":2360,"wires":[]},{"id":"3dcef16a.9c6b86","type":"function","z":"9f657cfc.c7c8a8","name":"timestamp","func":"var date = new Date(msg.payload.ts);\nmsg.payload = date.toLocaleString('de-DE');\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2400,"wires":[["fd424d35.584e18"]]},{"id":"fd424d35.584e18","type":"debug","z":"9f657cfc.c7c8a8","name":"ts","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":2360,"wires":[]},{"id":"81783bda.cf6638","type":"OPCUA-IIoT-Response","z":"4c072751.507d3","name":"","compressStructure":false,"showStatusActivities":false,"showErrors":false,"activateUnsetFilter":false,"activateFilters":false,"negateFilter":false,"filters":[],"x":830,"y":420,"wires":[[]]},{"id":"a9af7a2.249d108","type":"comment","z":"4c072751.507d3","name":"NFC \"local in\" refreshes cloud dashboard","info":"","x":180,"y":300,"wires":[]},{"id":"ce5f008d.321c5","type":"mqtt out","z":"4c072751.507d3","name":"","topic":"f/i/nfc/ds","qos":"0","retain":"","broker":"788959e0.92f718","x":460,"y":360,"wires":[]},{"id":"31ae2fb.2c081d","type":"debug","z":"4c072751.507d3","name":"MQTT Local in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":480,"y":320,"wires":[]},{"id":"6181d227.4a0744","type":"switch","z":"4c072751.507d3","name":"","property":"payload.workpiece.state","propertyType":"msg","rules":[{"t":"neq","v":"NONE","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":360,"wires":[["ce5f008d.321c5","31ae2fb.2c081d"]]}] \ No newline at end of file diff --git a/Node-RED/flows_IOTpi2_pretty.json b/Node-RED/flows_IOTpi2_pretty.json index adadf07..02bc5ac 100644 --- a/Node-RED/flows_IOTpi2_pretty.json +++ b/Node-RED/flows_IOTpi2_pretty.json @@ -1066,69 +1066,6 @@ "width": "10", "collapse": false }, - { - "id": "90b4565f.31f758", - "type": "ui_spacer", - "name": "spacer", - "group": "8cacc4a1.8c2a2", - "order": 1, - "width": 9, - "height": "2" - }, - { - "id": "1cf4786b.c171e", - "type": "ui_spacer", - "name": "spacer", - "group": "2f117237.36aff6", - "order": 7, - "width": 1, - "height": 1 - }, - { - "id": "bdb2e574.64c788", - "type": "ui_spacer", - "name": "spacer", - "group": "2f117237.36aff6", - "order": 10, - "width": 1, - "height": 1 - }, - { - "id": "d3a81696.aa74d", - "type": "ui_spacer", - "name": "spacer", - "group": "2f117237.36aff6", - "order": 13, - "width": 1, - "height": 1 - }, - { - "id": "dde55429.6a3398", - "type": "ui_spacer", - "name": "spacer", - "group": "2f117237.36aff6", - "order": 16, - "width": 1, - "height": 1 - }, - { - "id": "429a901c.8a8dc", - "type": "ui_spacer", - "name": "spacer", - "group": "afaa8b63.c29268", - "order": 4, - "width": 9, - "height": 1 - }, - { - "id": "568d96e2.40a8a8", - "type": "ui_spacer", - "name": "spacer", - "group": "afaa8b63.c29268", - "order": 8, - "width": 9, - "height": 1 - }, { "id": "11b8901b.4c9138", "type": "ui_spacer", @@ -1329,6 +1266,69 @@ "width": 6, "height": 1 }, + { + "id": "8b3dcb5d.9af8a", + "type": "ui_spacer", + "name": "spacer", + "group": "8cacc4a1.8c2a2", + "order": 1, + "width": 9, + "height": 1 + }, + { + "id": "64c7774e.b089f8", + "type": "ui_spacer", + "name": "spacer", + "group": "8cacc4a1.8c2a2", + "order": 2, + "width": 9, + "height": 1 + }, + { + "id": "67fb2afb.e0ef74", + "type": "ui_spacer", + "name": "spacer", + "group": "2f117237.36aff6", + "order": 7, + "width": 1, + "height": 1 + }, + { + "id": "6cae479b.257738", + "type": "ui_spacer", + "name": "spacer", + "group": "2f117237.36aff6", + "order": 10, + "width": 1, + "height": 1 + }, + { + "id": "70f6f249.8be7ac", + "type": "ui_spacer", + "name": "spacer", + "group": "2f117237.36aff6", + "order": 13, + "width": 1, + "height": 1 + }, + { + "id": "39d2d183.ba4c06", + "type": "ui_spacer", + "name": "spacer", + "group": "afaa8b63.c29268", + "order": 4, + "width": 9, + "height": 1 + }, + { + "id": "242237b0.8c5b2", + "type": "ui_spacer", + "name": "spacer", + "group": "afaa8b63.c29268", + "order": 8, + "width": 9, + "height": 1 + }, { "id": "60d28ced.b3f5bc", "type": "mqtt in", @@ -8354,7 +8354,7 @@ "type": "function", "z": "bcaa3a6a.3bdbe8", "name": "read config data from PLC", - "func": "msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nreturn msg;", + "func": "msg.nodetype = \"inject\";\nmsg.injectType = \"read\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 340, @@ -8451,7 +8451,7 @@ "type": "function", "z": "bcaa3a6a.3bdbe8", "name": "declare values", - "func": "var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'WORD'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'WORD'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\n\nmsg.valuesToWrite = [\n //HBW\n msg.payload.HBW_di_PosBelt_Horizontal, //[0]\n msg.payload.HBW_di_PosBelt_Vertical, //[1]\n msg.payload.HBW_di_PosBelt_Offset_Vertical, //[2]\n\n msg.payload.HBW_di_PosRack_Offset_Vertical, //[3]\n msg.payload.HBW_di_PosRack_A1_Horizontal, //[4]\n msg.payload.HBW_di_PosRack_A1_Vertical, //[5]\n\n msg.payload.HBW_di_PosRack_B2_Horizontal, //[6]\n msg.payload.HBW_di_PosRack_B2_Vertical, //[7]\n\n msg.payload.HBW_di_PosRack_C3_Horizontal, //[8]\n msg.payload.HBW_di_PosRack_C3_Vertical, //[9]\n\n //VGR\n msg.payload.VGR_di_Pos_Color_horizontal, //[10]\n msg.payload.VGR_di_Pos_Color_vertical, //[11]\n msg.payload.VGR_di_Pos_Color_rotate, //[12]\n //Pos DSI\n msg.payload.VGR_di_Pos_DSI_horizontal, //[13]\n msg.payload.VGR_di_Pos_DSI_Collect_vertical, //[14]\n msg.payload.VGR_di_Pos_DSI_Discard_vertical, //[15]\n msg.payload.VGR_di_Pos_DSI_rotate, //[16]\n msg.payload.VGR_di_Offset_Pos_DSI_NFC_vertical, //[17]\n //Pos DSO\n msg.payload.VGR_di_Pos_DSO_horizontal, //[18] \n msg.payload.VGR_di_Pos_DSO_Collect_vertical, //[19]\n msg.payload.VGR_di_Pos_DSO_Discard_vertical, //[20] \n msg.payload.VGR_di_Pos_DSO_rotate, //[21] \n msg.payload.VGR_di_Offset_Pos_DSO_vertical, //[22]\n //Pos HBW\n msg.payload.VGR_di_Pos_HBW_horizontal, //[23] \n msg.payload.VGR_di_Pos_HBW_Collect_vertical, //[24] \n msg.payload.VGR_di_Pos_HBW_Discard_vertical, //[25] \n msg.payload.VGR_di_Pos_HBW_rotate, //[26] \n msg.payload.VGR_di_Offset_Pos_HBW_horizontal, //[27] \n msg.payload.VGR_di_Offset_Pos_HBW_vertical, //[28] \n //Pos MPO\n msg.payload.VGR_di_Pos_MPO_horizontal, //[29] \n msg.payload.VGR_di_Pos_MPO_vertical, //[30] \n msg.payload.VGR_di_Pos_MPO_rotate, //[31] \n msg.payload.VGR_di_Offset_Pos_MPO_vertical, //[32]\n //Pos NFC\n msg.payload.VGR_di_Pos_NFC_horizontal, //[33] \n msg.payload.VGR_di_Pos_NFC_vertical, //[34] \n msg.payload.VGR_di_Pos_NFC_rotate, //[35] \n //Pos NiO\n msg.payload.VGR_di_Pos_NiO_horizontal, //[36] \n msg.payload.VGR_di_Pos_NiO_vertical, //[37] \n msg.payload.VGR_di_Pos_NiO_rotate, //[38] \n //Pos SLD Blue\n msg.payload.VGR_di_Pos_SLD_Blue_horizontal, //[39] \n msg.payload.VGR_di_Pos_SLD_Blue_vertical, //[40] \n msg.payload.VGR_di_Pos_SLD_Blue_rotate, //[41] \n //Pos SLD Red\n msg.payload.VGR_di_Pos_SLD_Red_horizontal, //[42] \n msg.payload.VGR_di_Pos_SLD_Red_vertical, //[43] \n msg.payload.VGR_di_Pos_SLD_Red_rotate, //[44] \n //Pos SLD White\n msg.payload.VGR_di_Pos_SLD_White_horizontal, //[45] \n msg.payload.VGR_di_Pos_SLD_White_vertical, //[46] \n msg.payload.VGR_di_Pos_SLD_White_rotate, //[47] \n //SSC\n //Centre\n msg.payload.SSC_di_PosCentre_Horizontal, //[48]\n msg.payload.SSC_di_PosCentre_Vertical, //[49]\n //HBW\n msg.payload.SSC_di_PosHBW_Horizontal, //[50]\n msg.payload.SSC_di_PosHBW_Vertical, //[51]\n\n //Color Sensor Calibration\n //DSI\n msg.payload.SSC_w_Threshold_Red_Blue, //[52]\n msg.payload.SSC_w_Threshold_White_Red, //[53]\n\n //Color Sensor Calibration\n //SLD\n msg.payload.SLD_w_Threshold_Red_Blue, //[54]\n msg.payload.SLD_w_Threshold_White_Red, //[55]\n \n //Pushout Counter\n //SLD\n msg.payload.SLD_i_CounterValue_Blue, //[56]\n msg.payload.SLD_i_CounterValue_Red, //[57]\n msg.payload.SLD_i_CounterValue_White, //[58]\n\n ];\nreturn msg;\n\n\n", + "func": "var wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n //HBW\n //Pos. Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosBelt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Belt\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Belt_Vertical\"',\n \"datatypeName\":'Int32'},\n //Offset Rack\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_Offset_Pos_Rack_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack A1\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_A1_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack B2\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_B2_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos. Rack C3\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_HBW\".\"di_PosRack_C3_Vertical\"',\n \"datatypeName\":'Int32'},\n//VGR\n//Pos Color\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_Color_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSI_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSI_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos DSO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_DSO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_DSO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Collect_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_Discard_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_HBW_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_HBW_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos MPO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_MPO_rotate\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Offset_Pos_MPO_vertical\"',\n \"datatypeName\":'Int32'},\n//Pos NFC\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NFC_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos NiO\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_NiO_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Blue\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Blue_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD Red\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_Red_rotate\"',\n \"datatypeName\":'Int32'},\n//Pos SLD White\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_vertical\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_VGR\".\"di_Pos_SLD_White_rotate\"',\n \"datatypeName\":'Int32'},\n //SSC \n //Pos. Centre\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_Centre_Vertical\"',\n \"datatypeName\":'Int32'},\n //Pos HBW\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Horizontal\"',\n \"datatypeName\":'Int32'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"di_Pos_HBW_Vertical\"',\n \"datatypeName\":'Int32'},\n\n //Color Sensor Calibration\n //DSI\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SSC\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n\n //Color Sensor Calibration\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_Red_Blue\"',\n \"datatypeName\":'UInt16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"w_Threshold_White_Red\"',\n \"datatypeName\":'UInt16'},\n //Pushout Counter\n //SLD\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Blue\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_Red\"',\n \"datatypeName\":'Int16'},\n { \"name\":\"\",\n \"nodeId\":'ns=3;s=\"gtyp_SLD\".\"i_CounterValue_White\"',\n \"datatypeName\":'Int16'},\n ]\n\n\nmsg.valuesToWrite = [\n //HBW\n msg.payload.HBW_di_PosBelt_Horizontal, //[0]\n msg.payload.HBW_di_PosBelt_Vertical, //[1]\n msg.payload.HBW_di_PosBelt_Offset_Vertical, //[2]\n\n msg.payload.HBW_di_PosRack_Offset_Vertical, //[3]\n msg.payload.HBW_di_PosRack_A1_Horizontal, //[4]\n msg.payload.HBW_di_PosRack_A1_Vertical, //[5]\n\n msg.payload.HBW_di_PosRack_B2_Horizontal, //[6]\n msg.payload.HBW_di_PosRack_B2_Vertical, //[7]\n\n msg.payload.HBW_di_PosRack_C3_Horizontal, //[8]\n msg.payload.HBW_di_PosRack_C3_Vertical, //[9]\n\n //VGR\n msg.payload.VGR_di_Pos_Color_horizontal, //[10]\n msg.payload.VGR_di_Pos_Color_vertical, //[11]\n msg.payload.VGR_di_Pos_Color_rotate, //[12]\n //Pos DSI\n msg.payload.VGR_di_Pos_DSI_horizontal, //[13]\n msg.payload.VGR_di_Pos_DSI_Collect_vertical, //[14]\n msg.payload.VGR_di_Pos_DSI_Discard_vertical, //[15]\n msg.payload.VGR_di_Pos_DSI_rotate, //[16]\n msg.payload.VGR_di_Offset_Pos_DSI_NFC_vertical, //[17]\n //Pos DSO\n msg.payload.VGR_di_Pos_DSO_horizontal, //[18] \n msg.payload.VGR_di_Pos_DSO_Collect_vertical, //[19]\n msg.payload.VGR_di_Pos_DSO_Discard_vertical, //[20] \n msg.payload.VGR_di_Pos_DSO_rotate, //[21] \n msg.payload.VGR_di_Offset_Pos_DSO_vertical, //[22]\n //Pos HBW\n msg.payload.VGR_di_Pos_HBW_horizontal, //[23] \n msg.payload.VGR_di_Pos_HBW_Collect_vertical, //[24] \n msg.payload.VGR_di_Pos_HBW_Discard_vertical, //[25] \n msg.payload.VGR_di_Pos_HBW_rotate, //[26] \n msg.payload.VGR_di_Offset_Pos_HBW_horizontal, //[27] \n msg.payload.VGR_di_Offset_Pos_HBW_vertical, //[28] \n //Pos MPO\n msg.payload.VGR_di_Pos_MPO_horizontal, //[29] \n msg.payload.VGR_di_Pos_MPO_vertical, //[30] \n msg.payload.VGR_di_Pos_MPO_rotate, //[31] \n msg.payload.VGR_di_Offset_Pos_MPO_vertical, //[32]\n //Pos NFC\n msg.payload.VGR_di_Pos_NFC_horizontal, //[33] \n msg.payload.VGR_di_Pos_NFC_vertical, //[34] \n msg.payload.VGR_di_Pos_NFC_rotate, //[35] \n //Pos NiO\n msg.payload.VGR_di_Pos_NiO_horizontal, //[36] \n msg.payload.VGR_di_Pos_NiO_vertical, //[37] \n msg.payload.VGR_di_Pos_NiO_rotate, //[38] \n //Pos SLD Blue\n msg.payload.VGR_di_Pos_SLD_Blue_horizontal, //[39] \n msg.payload.VGR_di_Pos_SLD_Blue_vertical, //[40] \n msg.payload.VGR_di_Pos_SLD_Blue_rotate, //[41] \n //Pos SLD Red\n msg.payload.VGR_di_Pos_SLD_Red_horizontal, //[42] \n msg.payload.VGR_di_Pos_SLD_Red_vertical, //[43] \n msg.payload.VGR_di_Pos_SLD_Red_rotate, //[44] \n //Pos SLD White\n msg.payload.VGR_di_Pos_SLD_White_horizontal, //[45] \n msg.payload.VGR_di_Pos_SLD_White_vertical, //[46] \n msg.payload.VGR_di_Pos_SLD_White_rotate, //[47] \n //SSC\n //Centre\n msg.payload.SSC_di_PosCentre_Horizontal, //[48]\n msg.payload.SSC_di_PosCentre_Vertical, //[49]\n //HBW\n msg.payload.SSC_di_PosHBW_Horizontal, //[50]\n msg.payload.SSC_di_PosHBW_Vertical, //[51]\n\n //Color Sensor Calibration\n //DSI\n msg.payload.SSC_w_Threshold_Red_Blue, //[52]\n msg.payload.SSC_w_Threshold_White_Red, //[53]\n\n //Color Sensor Calibration\n //SLD\n msg.payload.SLD_w_Threshold_Red_Blue, //[54]\n msg.payload.SLD_w_Threshold_White_Red, //[55]\n \n //Pushout Counter\n //SLD\n msg.payload.SLD_i_CounterValue_Blue, //[56]\n msg.payload.SLD_i_CounterValue_Red, //[57]\n msg.payload.SLD_i_CounterValue_White, //[58]\n\n ];\nreturn msg;\n\n\n", "outputs": 1, "noerr": 0, "x": 140, @@ -8800,7 +8800,7 @@ "z": "881fbb6.2d64cc8", "group": "8cacc4a1.8c2a2", "name": "Status Picture VGR", - "order": 2, + "order": 3, "width": 9, "height": 7, "format": "\n\n
\n\n
\n \n \n \n {{el.text}}\n \n
\n
\n\n\n\n", @@ -14856,6 +14856,16 @@ "name": "", "nodeId": "ns=3;s=\"gtyp_Setup\".\"di_Pos_Rotate\"", "datatypeName": "" + }, + { + "name": "", + "nodeId": "ns=3;s=\"gtyp_Setup\".\"i_Pos_Selection\"", + "datatypeName": "" + }, + { + "name": "", + "nodeId": "ns=3;s=\"gtyp_Setup\".\"x_Set_Pos_Activ\"", + "datatypeName": "" } ], "x": 110, @@ -14883,7 +14893,8 @@ "y": 420, "wires": [ [ - "2a981b73.7cdfec" + "2a981b73.7cdfec", + "8a93ef88.964df" ] ] }, @@ -17885,7 +17896,7 @@ "type": "ui_text", "z": "b495b31e.fe8338", "group": "2f117237.36aff6", - "order": 15, + "order": 12, "width": 3, "height": 1, "name": "", @@ -17902,7 +17913,7 @@ "z": "b495b31e.fe8338", "name": "", "group": "2f117237.36aff6", - "order": 17, + "order": 14, "width": 2, "height": 1, "passthru": false, @@ -17973,99 +17984,6 @@ [] ] }, - { - "id": "f9fc48e4.9a3b68", - "type": "ui_text", - "z": "b495b31e.fe8338", - "group": "2f117237.36aff6", - "order": 12, - "width": 3, - "height": 1, - "name": "", - "label": "Start offset:", - "format": "", - "layout": "row-spread", - "x": 130, - "y": 640, - "wires": [] - }, - { - "id": "974adc30.c65b18", - "type": "ui_button", - "z": "b495b31e.fe8338", - "name": "", - "group": "2f117237.36aff6", - "order": 14, - "width": 2, - "height": 1, - "passthru": false, - "label": "OFFSET", - "tooltip": "", - "color": "", - "bgcolor": "", - "icon": "done", - "payload": "true", - "payloadType": "bool", - "topic": "Signal2", - "x": 340, - "y": 640, - "wires": [ - [ - "7015f25.bb3f58c" - ] - ] - }, - { - "id": "7015f25.bb3f58c", - "type": "function", - "z": "b495b31e.fe8338", - "name": "declare values", - "func": "//var ts = new Date().toISOString();\nvar wert = msg.payload\n\nmsg.nodetype = \"inject\";\nmsg.injectType = \"write\";\n\nmsg.addressSpaceItems = [\n {\"nodeId\":'ns=3;s=\"gtyp_Setup\".\"x_Start_Offset\"',\n \"datatypeName\":'Boolean'},\n ]\n\n//msg.payload[\"ts\"] = ts;\nmsg.valuesToWrite = [wert];\n\nreturn msg;\n\n\n", - "outputs": 1, - "noerr": 0, - "x": 680, - "y": 640, - "wires": [ - [ - "674ed7e9.51898" - ] - ] - }, - { - "id": "674ed7e9.51898", - "type": "OPCUA-IIoT-Write", - "z": "b495b31e.fe8338", - "connector": "74a7d84.2350d28", - "name": "", - "justValue": true, - "showStatusActivities": false, - "showErrors": true, - "x": 870, - "y": 640, - "wires": [ - [ - "d166f9ba.ad6c08" - ] - ] - }, - { - "id": "d166f9ba.ad6c08", - "type": "OPCUA-IIoT-Response", - "z": "b495b31e.fe8338", - "name": "", - "compressStructure": false, - "showStatusActivities": false, - "showErrors": false, - "activateUnsetFilter": false, - "activateFilters": false, - "negateFilter": false, - "filters": [], - "x": 1030, - "y": 640, - "wires": [ - [] - ] - }, { "id": "b6bcaa83.2ee618", "type": "comment", @@ -20047,7 +19965,7 @@ "type": "debug", "z": "4c072751.507d3", "name": "MQTT Local in", - "active": true, + "active": false, "tosidebar": true, "console": false, "tostatus": false, diff --git a/PLC_S7_1500/LearningFactory_4_0_24V.zap16 b/PLC_S7_1500/LearningFactory_4_0_24V.zap16 index ac0d2ce..4920ac0 100644 Binary files a/PLC_S7_1500/LearningFactory_4_0_24V.zap16 and b/PLC_S7_1500/LearningFactory_4_0_24V.zap16 differ diff --git a/PLC_SCL_sources/Cyclic_interrupt.scl b/PLC_SCL_sources/Cyclic_interrupt.scl index 073d912..ace6bad 100644 --- a/PLC_SCL_sources/Cyclic_interrupt.scl +++ b/PLC_SCL_sources/Cyclic_interrupt.scl @@ -179,7 +179,6 @@ TITLE = Global DB SSC { S7_Optimized_Access := 'TRUE' } AUTHOR : 'A.Schaefer' VERSION : 0.0 -NON_RETAIN "typ_SSC" BEGIN @@ -338,7 +337,6 @@ TITLE = Global DB VGR { S7_Optimized_Access := 'TRUE' } AUTHOR : 'A.Schaefer' VERSION : 0.0 -NON_RETAIN "typ_VGR" BEGIN @@ -363,6 +361,7 @@ BEGIN di_Pos_DSI_rotate := 30; di_Pos_DSO_horizontal := 2070; di_Pos_DSO_Discard_vertical := 1480; + di_Offset_Pos_DSO_vertical := 500; di_Pos_DSO_rotate := 970; di_Pos_Color_horizontal := 150; di_Pos_Color_vertical := 2450; @@ -378,7 +377,7 @@ BEGIN di_Offset_Pos_HBW_horizontal := 0; di_Pos_HBW_Collect_vertical := 650; di_Pos_HBW_Discard_vertical := 200; - di_Offset_Pos_HBW_vertical := 0; + di_Offset_Pos_HBW_vertical := 100; di_Pos_HBW_rotate := 5350; di_Pos_NiO_horizontal := 0; di_Pos_NiO_vertical := 2700; diff --git a/PLC_SCL_sources/Main.scl b/PLC_SCL_sources/Main.scl index a2c3d13..c3ae18c 100644 --- a/PLC_SCL_sources/Main.scl +++ b/PLC_SCL_sources/Main.scl @@ -1124,7 +1124,6 @@ TITLE = Global DB VGR { S7_Optimized_Access := 'TRUE' } AUTHOR : 'A.Schaefer' VERSION : 0.0 -NON_RETAIN "typ_VGR" BEGIN @@ -1149,6 +1148,7 @@ BEGIN di_Pos_DSI_rotate := 30; di_Pos_DSO_horizontal := 2070; di_Pos_DSO_Discard_vertical := 1480; + di_Offset_Pos_DSO_vertical := 500; di_Pos_DSO_rotate := 970; di_Pos_Color_horizontal := 150; di_Pos_Color_vertical := 2450; @@ -1164,7 +1164,7 @@ BEGIN di_Offset_Pos_HBW_horizontal := 0; di_Pos_HBW_Collect_vertical := 650; di_Pos_HBW_Discard_vertical := 200; - di_Offset_Pos_HBW_vertical := 0; + di_Offset_Pos_HBW_vertical := 100; di_Pos_HBW_rotate := 5350; di_Pos_NiO_horizontal := 0; di_Pos_NiO_vertical := 2700; @@ -1203,7 +1203,6 @@ TITLE = Global DB SSC { S7_Optimized_Access := 'TRUE' } AUTHOR : 'A.Schaefer' VERSION : 0.0 -NON_RETAIN "typ_SSC" BEGIN @@ -1326,7 +1325,9 @@ BEGIN // Deciding which state // Setup - Calibration State - IF "gtyp_Setup".x_Set_Pos_Activ OR "gtyp_Setup".x_Clean_Rack_HBW THEN + IF "gtyp_Setup".x_Set_Pos_Activ OR "gtyp_Setup".x_Color_Sensor_Calibration + OR "gtyp_Setup".x_Counter_Value_Calibration + OR "gtyp_Setup".x_Clean_Rack_HBW THEN "QX_SSC_LED_Green_Q5" := #lfb_blinker_config.outx_blinker; "QX_SSC_LED_Yellow_Q6" := #lfb_blinker_config.outx_blinker; "QX_SSC_LED_Red_Q7" := #lfb_blinker_config.outx_blinker; @@ -2974,6 +2975,20 @@ BEGIN "gtyp_VGR".History[#li_Counter].ldt_ts := DT#1990-01-01-00:00:00; END_FOR; + "gtyp_VGR".x_NFC_Start_First := FALSE; + "gtyp_VGR".x_NFC_Start := FALSE; + "gtyp_VGR".x_NFC_Completed := FALSE; + "gtyp_VGR".x_HBW_Storage := FALSE; + "gtyp_VGR".x_HBW_Outsource := FALSE; + "gtyp_VGR".s_HBW_Outsource_Typ := ''; + "gtyp_VGR".x_HBW_Discards := FALSE; + "gtyp_VGR".x_HBW_PickedUp := FALSE; + "gtyp_VGR".x_MPO_Req_Discard := FALSE; + "gtyp_VGR".x_MPO_Discards := FALSE; + "gtyp_VGR".x_Ready_For_Outsource := FALSE; + "gtyp_VGR".x_State_Process := FALSE; + "gtyp_VGR".x_Workpiece_NiO := FALSE; + #li_Lights := 1; #lx_Init := TRUE; END_IF; @@ -2988,6 +3003,7 @@ VERSION : 0.0 lx_Init { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; lx_Start_TON_Wait { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; lx_Start_Positioning_m { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; + lx_Start_FinalPositioning_m { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; lx_Start_TON_State { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; lt_TON_Wait { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Time; ldt_MQTT { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Date_And_Time; @@ -3040,7 +3056,102 @@ BEGIN END_IF; END_IF; - // step chain HBW + // Set Positioning activ? + IF "gtyp_Setup".x_Set_Pos_Activ + AND (("gtyp_Setup".i_Pos_Selection > 40) + AND ("gtyp_Setup".i_Pos_Selection < 61)) + AND ((#li_StepCase = 80) + OR (#li_StepCase = 120) + OR (#li_StepCase = 140)) THEN + + // Deciding which Position + // Position - Color + IF "gtyp_Setup".i_Pos_Selection = 41 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_Color_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_Color_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_Color_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; + // Position - DSI Collect + ELSIF "gtyp_Setup".i_Pos_Selection = 42 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSI_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSI_Collect_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSI_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; + // Position - DSI Discard + ELSIF "gtyp_Setup".i_Pos_Selection = 43 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSI_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSI_Discard_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSI_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; + // Position - DSO Collect + ELSIF "gtyp_Setup".i_Pos_Selection = 44 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSO_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSO_Collect_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSO_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSO_vertical; + // Position - DSO Discard + ELSIF "gtyp_Setup".i_Pos_Selection = 45 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSO_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSO_Discard_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSO_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSO_vertical; + // Position - HBW Collect + ELSIF "gtyp_Setup".i_Pos_Selection = 46 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_HBW_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_HBW_Collect_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_HBW_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_HBW_vertical; + // Position - HBW Discard + ELSIF "gtyp_Setup".i_Pos_Selection = 47 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_HBW_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_HBW_Discard_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_HBW_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_HBW_vertical; + // Position - MPO + ELSIF "gtyp_Setup".i_Pos_Selection = 48 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_MPO_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_MPO_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_MPO_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_MPO_vertical; + // Position - NFC + ELSIF "gtyp_Setup".i_Pos_Selection = 49 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_NFC_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_NFC_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_NFC_rotate; + #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; + // Position - NiO + ELSIF "gtyp_Setup".i_Pos_Selection = 50 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_NiO_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_NiO_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_NiO_rotate; + #ldi_Offset_Vertical := 500; + // Position - SLD Blue + ELSIF "gtyp_Setup".i_Pos_Selection = 51 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_SLD_Blue_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_SLD_Blue_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_SLD_Blue_rotate; + #ldi_Offset_Vertical := 500; + // Position - SLD Red + ELSIF "gtyp_Setup".i_Pos_Selection = 52 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_SLD_Red_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_SLD_Red_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_SLD_Red_rotate; + #ldi_Offset_Vertical := 500; + // Position - SLD White + ELSIF "gtyp_Setup".i_Pos_Selection = 53 THEN + #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_SLD_White_horizontal; + #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_SLD_White_vertical; + #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_SLD_White_rotate; + #ldi_Offset_Vertical := 500; + END_IF; + END_IF; + + // Set Positioning activ? + IF NOT "gtyp_Setup".x_Set_Pos_Activ THEN + "gtyp_Setup".i_Pos_Selection := 0; + END_IF; + + // step chain HBW CASE #li_StepCase OF 0: // init @@ -3051,82 +3162,6 @@ BEGIN IF "gtyp_Setup".x_Set_Pos_Activ AND (("gtyp_Setup".i_Pos_Selection > 40) AND ("gtyp_Setup".i_Pos_Selection < 61)) THEN - // Deciding which Position - // Position - Color - IF "gtyp_Setup".i_Pos_Selection = 41 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_Color_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_Color_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_Color_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; - // Position - DSI Collect - ELSIF "gtyp_Setup".i_Pos_Selection = 42 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSI_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSI_Collect_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSI_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; - // Position - DSI Discard - ELSIF "gtyp_Setup".i_Pos_Selection = 43 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSI_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSI_Discard_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSI_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; - // Position - DSO Collect - ELSIF "gtyp_Setup".i_Pos_Selection = 44 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSO_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSO_Collect_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSO_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSO_vertical; - // Position - DSO Discard - ELSIF "gtyp_Setup".i_Pos_Selection = 45 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_DSO_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_DSO_Discard_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_DSO_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSO_vertical; - // Position - HBW Collect - ELSIF "gtyp_Setup".i_Pos_Selection = 46 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_HBW_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_HBW_Collect_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_HBW_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_HBW_vertical; - // Position - HBW Discard - ELSIF "gtyp_Setup".i_Pos_Selection = 47 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_HBW_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_HBW_Discard_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_HBW_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_HBW_vertical; - // Position - MPO - ELSIF "gtyp_Setup".i_Pos_Selection = 48 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_MPO_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_MPO_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_MPO_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_MPO_vertical; - // Position - NFC - ELSIF "gtyp_Setup".i_Pos_Selection = 49 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_NFC_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_NFC_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_NFC_rotate; - #ldi_Offset_Vertical := "gtyp_VGR".di_Offset_Pos_DSI_NFC_vertical; - // Position - NiO - ELSIF "gtyp_Setup".i_Pos_Selection = 50 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_NiO_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_NiO_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_NiO_rotate; - // Position - SLD Blue - ELSIF "gtyp_Setup".i_Pos_Selection = 51 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_SLD_Blue_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_SLD_Blue_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_SLD_Blue_rotate; - // Position - SLD Red - ELSIF "gtyp_Setup".i_Pos_Selection = 52 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_SLD_Red_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_SLD_Red_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_SLD_Red_rotate; - // Position - SLD White - ELSIF "gtyp_Setup".i_Pos_Selection = 53 THEN - #ldi_Pos_Horizontal := "gtyp_VGR".di_Pos_SLD_White_horizontal; - #ldi_Pos_Vertical := "gtyp_VGR".di_Pos_SLD_White_vertical; - #ldi_Pos_Rotate := "gtyp_VGR".di_Pos_SLD_White_rotate; - END_IF; "gtyp_VGR".horizontal_Axis.x_Start_Positioning := FALSE; "gtyp_VGR".vertical_Axis.x_Start_Positioning := FALSE; @@ -3181,7 +3216,7 @@ BEGIN END_IF; 80: // Start Positioning Step next - IF "gtyp_Setup".x_Start_Positioning OR #lx_Start_Positioning_m THEN + IF "gtyp_Setup".x_Start_Positioning OR #lx_Start_Positioning_m OR #lx_Start_FinalPositioning_m THEN #lx_Start_Positioning_m := FALSE; #li_StepCase := 90; END_IF; @@ -3223,14 +3258,15 @@ BEGIN 120: // Deciding which doing // Start new Positioning - IF "gtyp_Setup".x_Start_Positioning OR "gtyp_Setup".x_Home_Positioning THEN + IF "gtyp_Setup".x_Start_Positioning THEN #lx_Start_Positioning_m := TRUE; #li_StepCase := 10; // Start Final Positioning - ELSIF "gtyp_Setup".x_Final_Positioning THEN + ELSIF "gtyp_Setup".x_Final_Positioning OR #lx_Start_FinalPositioning_m THEN + #lx_Start_FinalPositioning_m := FALSE; #li_StepCase := 130; // Deaktivate Set Positioning - ELSIF #lfb_R_Trig_Deaktivate.Q THEN + ELSIF #lfb_R_Trig_Deaktivate.Q OR "gtyp_Setup".x_Home_Positioning THEN "gtyp_Setup".x_Home_Positioning := FALSE; #li_StepCase := 150; END_IF; @@ -3243,20 +3279,22 @@ BEGIN AND ("gtyp_VGR".vertical_Axis.di_Actual_Position >= (#ldi_Pos_Vertical - "gtyp_VGR".vertical_Axis.Config.di_Pos_Window)) AND "gtyp_VGR".vertical_Axis.x_Position_Reached THEN "gtyp_VGR".vertical_Axis.x_Start_Positioning := FALSE; - "gtyp_Setup".x_Start_Positioning := FALSE; + "gtyp_Setup".x_Final_Positioning := FALSE; #li_StepCase := 140; END_IF; 140: // Deciding which doing // Start new Positioning - IF "gtyp_Setup".x_Start_Positioning OR "gtyp_Setup".x_Home_Positioning THEN + IF "gtyp_Setup".x_Start_Positioning THEN + #lx_Start_Positioning_m := TRUE; #li_StepCase := 10; // Start Final Positioning ELSIF "gtyp_Setup".x_Final_Positioning THEN + #lx_Start_FinalPositioning_m := TRUE; #li_StepCase := 10; - // Deaktivate Set Positioning - ELSIF #lfb_R_Trig_Deaktivate.Q THEN + // Start Final Positioning + ELSIF #lfb_R_Trig_Deaktivate.Q OR "gtyp_Setup".x_Home_Positioning THEN "gtyp_Setup".x_Home_Positioning := FALSE; #li_StepCase := 150; END_IF; @@ -3348,6 +3386,30 @@ BEGIN END_IF; END_IF; + // Set Positioning activ? + IF "gtyp_Setup".x_Set_Pos_Activ + AND (("gtyp_Setup".i_Pos_Selection > 0) + AND ("gtyp_Setup".i_Pos_Selection < 21)) + AND ((#li_StepCase = 40) + OR (#li_StepCase = 60)) THEN + + // Deciding which Position + // Position - Centre + IF "gtyp_Setup".i_Pos_Selection = 1 THEN + #ldi_Pos_Horizontal := "gtyp_SSC".di_Pos_Centre_Horizontal; + #ldi_Pos_Vertical := "gtyp_SSC".di_Pos_Centre_Vertical; + // Position - HBW + ELSIF "gtyp_Setup".i_Pos_Selection = 2 THEN + #ldi_Pos_Horizontal := "gtyp_SSC".di_Pos_HBW_Horizontal; + #ldi_Pos_Vertical := "gtyp_SSC".di_Pos_HBW_Vertical; + END_IF; + END_IF; + + // Set Positioning activ? + IF NOT "gtyp_Setup".x_Set_Pos_Activ THEN + "gtyp_Setup".i_Pos_Selection := 0; + END_IF; + // step chain HBW CASE #li_StepCase OF @@ -3359,18 +3421,6 @@ BEGIN IF "gtyp_Setup".x_Set_Pos_Activ AND (("gtyp_Setup".i_Pos_Selection > 0) AND ("gtyp_Setup".i_Pos_Selection < 21)) THEN - - // Deciding which Position - // Position - Centre - IF "gtyp_Setup".i_Pos_Selection = 1 THEN - #ldi_Pos_Horizontal := "gtyp_SSC".di_Pos_Centre_Horizontal; - #ldi_Pos_Vertical := "gtyp_SSC".di_Pos_Centre_Vertical; - // Position - HBW - ELSIF "gtyp_Setup".i_Pos_Selection = 2 THEN - #ldi_Pos_Horizontal := "gtyp_SSC".di_Pos_HBW_Horizontal; - #ldi_Pos_Vertical := "gtyp_SSC".di_Pos_HBW_Vertical; - END_IF; - "gtyp_SSC".Horizontal_Axis.x_Start_Positioning := FALSE; "gtyp_SSC".Vertical_Axis.x_Start_Positioning := FALSE; "gtyp_SSC".Horizontal_Axis.x_Reference := FALSE; @@ -4463,6 +4513,12 @@ BEGIN END_FOR; END_FOR; + "gtyp_HBW".x_HBW_PickedUp_Accepted := FALSE; + "gtyp_HBW".x_HBW_Discards_Accepted := FALSE; + "gtyp_HBW".x_HBW_PickUp_Ready := FALSE; + "gtyp_HBW".x_HBW_Container_Available := FALSE; + "gtyp_HBW".x_Error := FALSE; + #li_Lights := 1; #lx_Init := TRUE; END_IF; @@ -4809,6 +4865,7 @@ BEGIN END_CASE; ELSE + "gtyp_SLD".x_Error := FALSE; #li_Lights := 1; #lx_Init := TRUE; END_IF; @@ -4859,6 +4916,8 @@ VERSION : 0.0 lx_Init { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; lx_Start_TON_Wait { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; lx_Start_Positioning_m { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; + lx_Start_FinalPositioning_m { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; + lx_Start_Offset_m { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Bool; lt_TON_Wait { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Time; li_Counter_Hor { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Int; li_Counter_Ver { ExternalAccessible := 'False'; ExternalVisible := 'False'; ExternalWritable := 'False'} : Int; @@ -4901,6 +4960,44 @@ BEGIN END_IF; END_IF; + // Set Positioning activ? + IF "gtyp_Setup".x_Set_Pos_Activ + AND (("gtyp_Setup".i_Pos_Selection > 20) + AND ("gtyp_Setup".i_Pos_Selection < 41)) + AND ((#li_StepCase = 40) + OR (#li_StepCase = 60) + OR (#li_StepCase = 80) + OR (#li_StepCase = 100)) THEN + + // Deciding which Position + // Position - Belt + IF "gtyp_Setup".i_Pos_Selection = 21 THEN + #ldi_Pos_Horizontal := "gtyp_HBW".di_PosBelt_Horizontal; + #ldi_Pos_Vertical := "gtyp_HBW".di_PosBelt_Vertical; + #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Belt_Vertical; + // Position - A1 + ELSIF "gtyp_Setup".i_Pos_Selection = 22 THEN + #ldi_Pos_Horizontal := "gtyp_HBW".di_PosRack_A1_Horizontal; + #ldi_Pos_Vertical := "gtyp_HBW".di_PosRack_A1_Vertical; + #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Rack_Vertical; + // Position - B2 + ELSIF "gtyp_Setup".i_Pos_Selection = 23 THEN + #ldi_Pos_Horizontal := "gtyp_HBW".di_PosRack_B2_Horizontal; + #ldi_Pos_Vertical := "gtyp_HBW".di_PosRack_B2_Vertical; + #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Rack_Vertical; + // Position - C3 + ELSIF "gtyp_Setup".i_Pos_Selection = 24 THEN + #ldi_Pos_Horizontal := "gtyp_HBW".di_PosRack_C3_Horizontal; + #ldi_Pos_Vertical := "gtyp_HBW".di_PosRack_C3_Vertical; + #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Rack_Vertical; + END_IF; + END_IF; + + // Set Positioning activ? + IF NOT "gtyp_Setup".x_Set_Pos_Activ THEN + "gtyp_Setup".i_Pos_Selection := 0; + END_IF; + // step chain HBW CASE #li_StepCase OF @@ -4913,29 +5010,6 @@ BEGIN AND (("gtyp_Setup".i_Pos_Selection > 20) AND ("gtyp_Setup".i_Pos_Selection < 41)) THEN - // Deciding which Position - // Position - Belt - IF "gtyp_Setup".i_Pos_Selection = 21 THEN - #ldi_Pos_Horizontal := "gtyp_HBW".di_PosBelt_Horizontal; - #ldi_Pos_Vertical := "gtyp_HBW".di_PosBelt_Vertical; - #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Belt_Vertical; - // Position - A1 - ELSIF "gtyp_Setup".i_Pos_Selection = 22 THEN - #ldi_Pos_Horizontal := "gtyp_HBW".di_PosRack_A1_Horizontal; - #ldi_Pos_Vertical := "gtyp_HBW".di_PosRack_A1_Vertical; - #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Rack_Vertical; - // Position - B2 - ELSIF "gtyp_Setup".i_Pos_Selection = 23 THEN - #ldi_Pos_Horizontal := "gtyp_HBW".di_PosRack_B2_Horizontal; - #ldi_Pos_Vertical := "gtyp_HBW".di_PosRack_B2_Vertical; - #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Rack_Vertical; - // Position - C3 - ELSIF "gtyp_Setup".i_Pos_Selection = 24 THEN - #ldi_Pos_Horizontal := "gtyp_HBW".di_PosRack_C3_Horizontal; - #ldi_Pos_Vertical := "gtyp_HBW".di_PosRack_C3_Vertical; - #ldi_Offset_Vertical := "gtyp_HBW".di_Offset_Pos_Rack_Vertical; - END_IF; - "gtyp_HBW".Horizontal_Axis.x_Start_Positioning := FALSE; "gtyp_HBW".Vertical_Axis.x_Start_Positioning := FALSE; "gtyp_HBW".Horizontal_Axis.x_Reference := FALSE; @@ -4973,7 +5047,7 @@ BEGIN END_IF; 40: // Start Positioning Step next - IF "gtyp_Setup".x_Start_Positioning OR #lx_Start_Positioning_m THEN + IF "gtyp_Setup".x_Start_Positioning OR #lx_Start_Positioning_m OR #lx_Start_FinalPositioning_m OR #lx_Start_Offset_m THEN #lx_Start_Positioning_m := FALSE; #li_StepCase := 50; END_IF; @@ -5015,7 +5089,8 @@ BEGIN #lx_Start_Positioning_m := TRUE; #li_StepCase := 10; // Start Final Positioning - ELSIF "gtyp_Setup".x_Final_Positioning THEN + ELSIF "gtyp_Setup".x_Final_Positioning OR #lx_Start_FinalPositioning_m OR #lx_Start_Offset_m THEN + #lx_Start_FinalPositioning_m := FALSE; #li_StepCase := 70; // Deaktivate Set Positioning ELSIF #lfb_R_Trig_Deaktivate.Q OR "gtyp_Setup".x_Home_Positioning THEN @@ -5043,9 +5118,11 @@ BEGIN #li_StepCase := 110; // Start Final Positioning ELSIF "gtyp_Setup".x_Final_Positioning THEN - #li_StepCase := 70; + #lx_Start_FinalPositioning_m := TRUE; + #li_StepCase := 110; // Start Final Positioning - ELSIF "gtyp_Setup".x_Start_Offset THEN + ELSIF "gtyp_Setup".x_Start_Offset OR #lx_Start_Offset_m THEN + #lx_Start_Offset_m := FALSE; #li_StepCase := 90; // Deaktivate Set Positioning ELSIF #lfb_R_Trig_Deaktivate.Q OR "gtyp_Setup".x_Home_Positioning THEN @@ -5073,10 +5150,11 @@ BEGIN #li_StepCase := 110; // Start Final Positioning ELSIF "gtyp_Setup".x_Final_Positioning THEN - #lx_Start_Positioning_m := TRUE; + #lx_Start_FinalPositioning_m := TRUE; #li_StepCase := 110; // Start Final Positioning ELSIF "gtyp_Setup".x_Start_Offset THEN + #lx_Start_Offset_m := true; #li_StepCase := 110; // Deaktivate Set Positioning ELSIF #lfb_R_Trig_Deaktivate.Q OR "gtyp_Setup".x_Home_Positioning THEN @@ -6148,6 +6226,8 @@ BEGIN ELSE #lx_Init := TRUE; #lx_FirstCentre := TRUE; + + "gtyp_SSC".x_Error := FALSE; END_IF; END_FUNCTION_BLOCK