You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Sofar's Fault registers start from 0x0405 to 0x416, each register splits into two bytes and each byte splits into eight bits. How can I modify your code to read Faults?
platform: modbus_controller ## Inverter Fault Message ##
modbus_controller_id: zcs ## Fault 1 ##
name: Errore Inverter
id: inverter_fault_message
register_type: holding
address: 0x0405
skip_updates: 20
response_size: 2
lambda: |-
std::string z = "";
int idx = item->offset;
//byte[0]
if ((data[idx] & 0x1) != 0) z += "ID001 GridOVP,";
if ((data[idx] & 0x2) != 0) z += "ID002 GridUVP,";
if ((data[idx] & 0x4) != 0) z += "ID003 GridOFP,";
if ((data[idx] & 0x8) != 0) z += "ID004 GridUFP,";
if ((data[idx] & 0x128) != 0) z += "ID008 IslandFault,";
what should be written here?
if(z.length() > 0){
z.pop_back();
}
return {z};
The text was updated successfully, but these errors were encountered:
My Sofar's Fault registers start from 0x0405 to 0x416, each register splits into two bytes and each byte splits into eight bits. How can I modify your code to read Faults?
modbus_controller_id: zcs ## Fault 1 ##
name: Errore Inverter
id: inverter_fault_message
register_type: holding
address: 0x0405
skip_updates: 20
response_size: 2
lambda: |-
std::string z = "";
int idx = item->offset;
//byte[0]
if ((data[idx] & 0x1) != 0) z += "ID001 GridOVP,";
if ((data[idx] & 0x2) != 0) z += "ID002 GridUVP,";
if ((data[idx] & 0x4) != 0) z += "ID003 GridOFP,";
if ((data[idx] & 0x8) != 0) z += "ID004 GridUFP,";
if ((data[idx] & 0x128) != 0) z += "ID008 IslandFault,";
what should be written here?
The text was updated successfully, but these errors were encountered: