[moderator note: fixed flow so it could be copied]
[{"id":"5ce253b4.6b9864","type":"ui_ui_control","z":"74993f0abb9af782","name":"","events":"all","x":220,"y":200,"wires":[["b6b6f332.9b9b5"]]},{"id":"b6b6f332.9b9b5","type":"change","z":"74993f0abb9af782","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":200,"wires":[["c4004ac2.a0e16","6178007a.9be93c"]]},{"id":"c4004ac2.a0e16","type":"function","z":"74993f0abb9af782","name":"Process Data","func":"const MAX_ROWS = 5; // Maximum number of rows in the table\n\n// Initialize an array to store the table data\nlet tableData = flow.get('tableData') || [];\n\n// Injected data from the payload\nlet injectedValue = msg.payload;\n\n// Add the new value to the beginning of the tableData array\ntableData.unshift(injectedValue);\n\n// Limit the table data to a maximum of MAX_ROWS items\nif (tableData.length > MAX_ROWS) {\n tableData.pop(); // Remove the last (oldest) row\n}\n\n// Update the context with the modified tableData array\nflow.set('tableData', tableData);\n\n// Prepare data for display in the ui_table\nmsg.payload = tableData.map(item => [\n item.type,\n item.waht,\n item.volt\n]);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":200,"wires":[["a14e9f16.b4c43"]]},{"id":"a14e9f16.b4c43","type":"ui_table","z":"74993f0abb9af782","group":"dbb04962.5721c8","name":"","order":0,"width":"8","height":"6","columns":[{"field":"type","title":"Type"},{"field":"waht","title":"WAHT"},{"field":"volt","title":"Volt"}],"outputs":0,"cts":false,"x":780,"y":200,"wires":[]},{"id":"6178007a.9be93c","type":"debug","z":"74993f0abb9af782","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":260,"wires":[]},{"id":"dbb04962.5721c8","type":"ui_group","name":"Table Group","tab":"b76d228f.48ea2","order":1,"disp":true,"width":"8","collapse":false},{"id":"b76d228f.48ea2","type":"ui_tab","name":"Table Tab","icon":"dashboard","order":3,"disabled":false,"hidden":false}]