Closed michealp closed 11 years ago
These functions are only for debugging purpose so don't expect too much from them :) It will better to provide a clean support of this function code.
If you would to pursue your quick hack you need to tweak compute_meta_length_after_function() to learn it about your new function code.
I think it's better to talk about new features on libmodbus mailing list.
I am using the mod bus library to talk to a WEG drive. For the WEG drive it has an additional function:
An example usage looks like:
.::Request::.
Slave Address Function MEI Type Reading Code Object Number CRC low CRC High
[01][2B][0E][01][00][70][77]
.::Response::.
Slave Address Function MEI Type Reading Code Confirmity Level More Follows Next Object Number of Objects Object Code Object Size Object Value ... CRC low CRC High
[01][2B][0E][01][81][00][02][01][1B][Hex of 'CFW-11 220 - 230 V 10A /8A'][02][05][Hex of 'V4.50'][B2][8F]
So to send this request I am using the following code (just experimental code, nothing special):
With modbus debug mode enabled I am seeing the following output:
It looks like maybe the WEG drive is not writting the full response, or modbus isn't properly reading it? The <01><81> should be 'Reading Code' and 'Conformity Level', but modbus library thinks it is the CRC because it is at the end of the response.