The flow would be the following,
[{"id":"2493d0f1b4d72d1b","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"76460868d3713d74","type":"s7 in","z":"2493d0f1b4d72d1b","endpoint":"0f29c96eb80de212","mode":"all","variable":"COATEC: Product_Name","diff":true,"name":"","x":390,"y":200,"wires":[["388c8d8f28a47fe1"]]},{"id":"388c8d8f28a47fe1","type":"function","z":"2493d0f1b4d72d1b","name":"funciona_perfecto_v3","func":"var productName = msg.payload['COATEC: Product_Name'];\nvar productNumber = msg.payload['COATEC: Product_Number'];\nvar reportDateMonth = msg.payload['COATEC: Report.Date.Month'];\nvar reportDateYear = msg.payload['COATEC: Report.Date.Year'];\nvar reportDateDay = msg.payload['COATEC: Report.Date.Day'];\nvar date = msg.payload.date || (reportDateMonth + '/' + reportDateDay + '/' + reportDateYear);\nvar reportStartHour = msg.payload['COATEC: Report.Start.Hour'];\nvar reportStartMinute = msg.payload['COATEC: Report.Start.Minute'];\nvar startTime = msg.payload.startTime || (reportStartHour + ' : ' + reportStartMinute);\nvar reportEndHour = msg.payload['COATEC: Report.End.Hour'];\nvar reportEndMinute = msg.payload['COATEC: Report.End.Minute'];\nvar endTime = msg.payload.endTime || (reportEndHour + ' : ' + reportEndMinute);\nvar TotalHours = msg.payload['COATEC: Total_Hours'];\nvar TotalSeconds = msg.payload['COATEC: Total_Seconds'];\nvar TotalMinutes = msg.payload['COATEC: Total_Minutes'];\nvar cycleTime = msg.payload.cycleTime || (TotalHours + ' : ' + TotalMinutes + ' : ' + TotalSeconds);\nvar pauseTotalHours = msg.payload['COATEC: Total_Hours_Pause'];\nvar pauseTotalMinutes = msg.payload['COATEC: Total_Minutes_Pause'];\nvar pauseTotalSeconds = msg.payload['COATEC: Total_Seconds_Pause'];\nvar pauseTime = msg.payload.pauseTime || (pauseTotalHours + ' : ' + pauseTotalMinutes + ' : ' + pauseTotalSeconds);\nvar tank1Total = msg.payload['COATEC: Total_Tank_1'] + \" kg\";\nvar tank2Total = msg.payload['COATEC: Total_Tank_2'] + \" kg\";\nvar minAirTemperature = (parseFloat(msg.payload['COATEC: Minimum_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar mediumAirTemperature = (parseFloat(msg.payload['COATEC: Medium_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar maxAirTemperature = (parseFloat(msg.payload['COATEC: Maximum_Air_Temperature']) / 10).toFixed(1).replace('.', ',');\nvar minFlow = parseInt(msg.payload['COATEC: Minimum_Flow']);\nvar mediumFlow = parseInt(msg.payload['COATEC: Medium_Flow']);\nvar maxFlow = parseInt(msg.payload['COATEC: Maximum_Flow']);\nvar minHumidity = (parseFloat(msg.payload['COATEC: Minimum_Humidity']) / 10).toFixed(1).replace('.',\",\");\nvar mediumHumidity = (parseFloat(msg.payload['COATEC: Medium_Humidity']) / 10).toFixed(1).replace('.',\",\");\nvar maxHumidity = (parseFloat(msg.payload['COATEC: Maximum_Humidity']) / 10).toFixed(1).replace('.',\",\");\n\nmsg.productName = productName;\nmsg.productNumber = productNumber;\nmsg.date = date;\nmsg.startTime = startTime;\nmsg.endTime = endTime;\nmsg.cycleTime = cycleTime;\nmsg.pauseTime = pauseTime;\nmsg.tank1Total = tank1Total;\nmsg.tank2Total = tank2Total;\nmsg.minAirTemperature = \"+\" + minAirTemperature + \" ºC\";\nmsg.mediumAirTemperature = \"+\" + mediumAirTemperature + \" ºC\";\nmsg.maxAirTemperature = \"+\" + maxAirTemperature + \" ºC\";\nmsg.minFlow = \"+\" + minFlow + \" m3/h\";\nmsg.mediumFlow = \"+\" + mediumFlow + \" m3/h\";\nmsg.maxFlow = \"+\" + maxFlow + \" m3/h\";\nmsg.minHumidity = \"+\" + minHumidity + \" g/kg\";\nmsg.mediumHumidity = \"+\" + mediumHumidity + \" g/kg\";\nmsg.maxHumidity = \"+\" + maxHumidity + \" g/kg\";\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":200,"wires":[["99b5b4494ee48de6"]]},{"id":"99b5b4494ee48de6","type":"ui_template","z":"2493d0f1b4d72d1b","group":"ca2bf62245caf5ae","name":"funciona_perfecto_v4","order":3,"width":8,"height":10,"format":"<p><strong>Work report:</strong></p>\n<table style=\"border-collapse: collapse; font-size: 13px; font-weight: bold ;margin-top: 20px; height: 1000px;\" border=\"1\">\n <tbody>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NAME</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.productName}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>PRODUCT NUMBER</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.productNumber}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>DATE</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.date}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>START TIME</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.startTime}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>END TIME</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.endTime}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>CYCLE TIME</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.cycleTime}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>PAUSE TIME</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.pauseTime}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>TANK 1 TOTAL</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.tank1Total}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>TANK 2 TOTAL</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.tank2Total}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MINIMUM AIR TEMPERATURE</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.minAirTemperature}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MEDIUM AIR TEMPERATURE</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.mediumAirTemperature}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM AIR TEMPERATURE</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.maxAirTemperature}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MINIMUM FLOW</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.minFlow}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MEDIUM FLOW</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.mediumFlow}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM FLOW</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.maxFlow}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MINIMUM HUMIDITY</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.minHumidity}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MEDIUM HUMIDITY</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.mediumHumidity}}</td>\n </tr>\n <tr>\n <td style=\"white-space: nowrap;\"><p><strong>MAXIMUM HUMIDITY</strong></p></td>\n <td style=\"white-space: nowrap;\">{{msg.maxHumidity}}</td>\n </tr>\n </tbody>\n</table>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":920,"y":200,"wires":[[]]},{"id":"0f29c96eb80de212","type":"s7 endpoint","transport":"iso-on-tcp","address":"192.168.250.55","port":"102","rack":"0","slot":"1","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","adapter":"","busaddr":"2","cycletime":"1000","timeout":"2000","name":"PLC_1_COATEC_(REPORTS)","vartable":[{"addr":"DB300,S8.30","name":"COATEC: Product_Name"},{"addr":"DB300,R40","name":"COATEC: Product_Number"},{"addr":"DB300,WORD0","name":"COATEC: Report.Date.Year"},{"addr":"DB300,I44","name":"COATEC: Total_Hours"},{"addr":"DB300,I46","name":"COATEC: Total_Seconds"},{"addr":"DB300,I48","name":"COATEC: Total_Minutes"},{"addr":"DB300,I54","name":"COATEC: Total_Hours_Pause"},{"addr":"DB300,I56","name":"COATEC: Total_Minutes_Pause"},{"addr":"DB300,I58","name":"COATEC: Total_Seconds_Pause"},{"addr":"DB300,I50","name":"COATEC: Total_Tank_1"},{"addr":"DB300,I52","name":"COATEC: Total_Tank_2"},{"addr":"DB300,I60","name":"COATEC: Minimum_Air_Temperature"},{"addr":"DB300,I62","name":"COATEC: Maximum_Air_Temperature"},{"addr":"DB300,I64","name":"COATEC: Medium_Air_Temperature"},{"addr":"DB300,R72","name":"COATEC: Minimum_Flow"},{"addr":"DB300,R76","name":"COATEC: Maximum_Flow"},{"addr":"DB300,R80","name":"COATEC: Medium_Flow"},{"addr":"DB300,I66","name":"COATEC: Minimum_Humidity"},{"addr":"DB300,I68","name":"COATEC: Maximum_Humidity"},{"addr":"DB300,I70","name":"COATEC: Medium_Humidity"},{"addr":"DB300,B2","name":"COATEC: Report.Date.Day"},{"addr":"DB300,B3","name":"COATEC: Report.Date.Month"},{"addr":"DB300,B4","name":"COATEC: Report.Start.Hour"},{"addr":"DB300,B5","name":"COATEC: Report.Start.Minute"},{"addr":"DB300,B6","name":"COATEC: Report.End.Hour"},{"addr":"DB300,B7","name":"COATEC: Report.End.Minute"}]},{"id":"ca2bf62245caf5ae","type":"ui_group","name":"reports","tab":"667d76cb38039bc5","order":1,"disp":false,"width":"25","collapse":false,"className":""},{"id":"667d76cb38039bc5","type":"ui_tab","name":"REPORTS","icon":"dashboard","order":12,"disabled":false,"hidden":true}]
an in node of the plc, then a function and finally a template node that shows the information of the PLC variables on the dashboard.
The requirement would be to create a csv as shown in the template with its respective columns and rows.
Thank you very much!