This code I posted earlier (lets call it VERSION 1)...
node.send({
payload: {
'fc': 3,
'unitid': 3,
'address': 6003,
'quantity': 1
}
});
node.send({
payload: {
'fc': 3,
'unitid': 3,
'address': 200,
'quantity': 10
}
});
node.send({
payload: {
'fc': 3,
'unitid': 3,
'address': 0,
'quantity': 53
}
});
is exactly the same as what you are asking for...
var msg1 = {
payload: {
'fc': 3,
'unitid': 3,
'address': 0,
'quantity': 53
}
};
var msg2 = {
payload: {
'fc': 3,
'unitid': 3,
'address': 200,
'quantity': 10
}
};
var msg3 = {
payload: {
'fc': 3,
'unitid': 3,
'address': 0,
'quantity': 53
}
};
return [[msg1,msg2,msg3]]
All 3 messages are sent out one after the other.
If you want a function node with 3 outputs then change the return to return [msg1,msg2,msg3];
BUT since you send the outputs of your functions to the same place - there is literally zero point in sending separate outputs. In fact the first version (VERSION 1) that I first posted will guarantee the order of events.