Mesa modbus and pktUart
07 Sep 2023 20:23 - 07 Sep 2023 20:26 #280227
by Donno
Replied by Donno on topic Mesa modbus and pktUart
Last edit: 07 Sep 2023 20:26 by Donno.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
08 Sep 2023 06:40 #280247
by Donno
Replied by Donno on topic Mesa modbus and pktUart
After re-write of driver everything works as expected :
pktuart for modbus is much better than usb to modbus with mb2hal. On pktuart i get modbus checksum error but that is to be expected as i am using unshielded modbus wires and these chinese servo drives are noisy ! I manage to remove all exsta resistor from tty2modbus and everything still works, signal is alot more noisy without 620 ohm resisitors.
In modcompile if u use it like ./modcompile to compile mod file i get error that it can't find makefile so i had to include dir on line 45
to
if someone can commit it ?
// Lichuan A5 AC Servo Drive Driver
#define MAX_MSG_LEN 16 // may be increased if necessary to max 251
#define DEBUG 3
static const hm2_modbus_chan_descriptor_t channels[] = {
/* {TYPE, FUNC, ADDR, COUNT, pin_name} */
{HAL_FLOAT, 3, 0x9C8, 1, "speed-actual"},
{HAL_FLOAT, 3, 0x9C9, 1, "speed-instruction"},
{HAL_FLOAT, 3, 0x9CA, 1, "torque-instruction"},
{HAL_FLOAT, 3, 0x9D4, 1, "avg-load-rate"},
{HAL_FLOAT, 3, 0x9E0, 1, "phase-current"},
{HAL_FLOAT, 3, 0x9E2, 1, "bus-voltage"},
{HAL_FLOAT, 3, 0x9E3, 1, "tempreture"},
{HAL_S32, 6, 0x4CB, 1, "set-speed"}
};
pktuart for modbus is much better than usb to modbus with mb2hal. On pktuart i get modbus checksum error but that is to be expected as i am using unshielded modbus wires and these chinese servo drives are noisy ! I manage to remove all exsta resistor from tty2modbus and everything still works, signal is alot more noisy without 620 ohm resisitors.
In modcompile if u use it like ./modcompile to compile mod file i get error that it can't find makefile so i had to include dir on line 45
for e in ['src', 'etc/linuxcnc', '/etc/linuxcnc', 'share/linuxcnc']:
to
for e in ['../src','src', 'etc/linuxcnc', '/etc/linuxcnc', 'share/linuxcnc']:
if someone can commit it ?
Attachments:
The following user(s) said Thank You: tommylight, COFHAL
Please Log in or Create an account to join the conversation.
Time to create page: 0.121 seconds