Great, thanks for your reply and help.
I was able to do what I wanted, I give you some code snippets to make several messages via a for loop,
I'm not a code proffesional but this works:
// Initialize messages
MyMessage msgInA(0,V_CURRENT);
MyMessage msgWhA(0,V_WATT);
#define NSENSORS 6 //used current sensors
void setup()
{
//initialize energy monitor CurrentSensor
for (int i=0; i<NSENSORS; i++)
{
wh[i] = { 0.0 }; //initialize wh
lwhtime[i] = {0}; //initialize time
present(i, S_MULTIMETER);
}
for (int i=0; i<NSENSORS; i++)
{
present(i, S_POWER);
}
}
void loop()
{
for (int i=0; i<NSENSORS; i++)
{
send(msgInA.setSensor(i).set(Irms[i], 1));
send(msgWhA.setSensor(i).set(wh[i], 1));
}
}
Thanks