Help to use a node-red-contrib-ui-etable

I am developing a solution for irrigation, I already have functional communication with the PLC, via RS232, but I want to create a simple interface to enter the irrigation schedules (there are 16 sectors and 32 irrigation cycles per sector), which is best to use this node, I can already read the periods recorded in the PLC and populate the table, however I would like to write that value in the PLC when I change some value, but when I change the values the block does not release any output, if someone can give me a help I would be very grateful .

I managed to make it work, the block did not generate any output due to a configuration, changing it it started to give feedback.
attached my config files:

var tabledata = [
    { id: 1, trigger: "01:33", s1: 150 },
    { id: 2, trigger: "03:40", s1: 30 },
    { id: 3, trigger: "00:40", s1: 20 },
    { id: 4, trigger: "00:40", s1: 20 },
    { id: 5, trigger: "01:45", s1: 20 },
    { id: 6, trigger: "03:40", s1: 20 },
    { id: 7, trigger: "00:40", s1: 20 },
    { id: 8, trigger: "00:43", s1: 33 }

var EditoParamsTimer = {
    min: 0,
    max: 32000,
    step: 10,
    elementAttributes: {
        maxlength: "5", //set the maximum character length of the input element to 10 characters
    mask: "999",
    selectContents: true,
    verticalNavigation: "table", //up and down arrow keys navigate away from cell without changing value

msg = {
    // payload: tabledata,//load row data from arraycar:true
    payload: msg.payload,
    config: {
        options: {
            layout: "fitColumns",      //fit columns to width of table
            height: "480px",
            // autoResize: true,
            // responsiveLayout: "hide",  //hide columns that dont fit on the table
            tooltips: true,            //show tool tips on cells
            // addRowPos: "top",          //when adding a new row, add it to the top of the table
            history: true,             //allow undo and redo actions on the table
            pagination: "local",       //paginate the data
            paginationSize: 16,         //allow 7 rows per page of data
            movableColumns: false,      //allow column order to be changed
            resizableRows: false,       //allow row order to be changed
            // initialSort: [             //set the initial sort order of the data
            //     { column: "trigger", dir: "asc" }, // << here is a problem, afther comment this all works fine
            // ]
        columns: [                 //define the table columns
            { title: "Ciclo", field: "id", hozAlign: "center", width: "30"},
            { title: "Horario Inicio", field: "trigger", hozAlign: "center", width: "20%", editor: true },
            {title: "S1", field: "s1", hozAlign: "center", editor: "number", editorParams: EditoParamsTimer},
            //    {title:"Driver", field:"car", hozAlign:"center", sorter:"boolean", editor:true},

return msg
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.