/* Modbus definition file for a Automation-Direct GS10 VFD */ /* The format of the channel descriptors is: {TYPE, FUNC, ADDR, COUNT, pin_name} TYPE is one of HAL_BIT, HAL_FLOAT, HAL_S32, HAL_U32 FUNC = 1, 2, 3, 4, 5, 6, 15, 16 - Modbus commands COUNT = number of coils/registers to read */ #define MAX_MSG_LEN 200 // may be increased if necessary to max 251 static const hm2_modbus_chan_descriptor_t channels[] = { /* {TYPE, FUNC, ADDR, COUNT, pin_name} */ {HAL_U32, 3, 0x0611, 1, "error_code"}, {HAL_U32, 3, 0x2101, 1, "status"}, {HAL_U32, 3, 0x2105, 1, "bus_voltage"}, {HAL_U32, 6, 0x2001, 1, "frequency_command"}, {HAL_U32, 6, 0x2000, 1, "operation_command"} }; /* Optionally #define DEBUG to aid with troubleshooting. Use 3 to see a lot of information about the modbus internal workings. 1 is default (errors only) */