Mesa modbus and pktUart

More
3 years 2 months ago - 3 years 2 months ago #279484 by PCW
Replied by PCW on topic Mesa modbus and pktUart
There is a known bug where if you set the update-hz to 0 it cannot be set again
can you try setting it to a high value in your hal file?

Also can you post your .mod file?

Also a plot of the commanded position and feedback position might help isolate the issue


 
Last edit: 3 years 2 months ago by PCW.

Please Log in or Create an account to join the conversation.

More
3 years 2 months ago #279616 by Donno
Replied by Donno on topic Mesa modbus and pktUart
I am trying to compile .mod file using modcompile but keep getting error
Code:
[color=#5454ff]~/linuxcnc-dev/bin[/color][color=#000000]$ sudo ./modcompile mesa_modbus_A5_Driver.mod [/color] /tmp/tmpwmbs48kd/mesa_modbus.c make: *** No rule to make target 'mesa_modbus.c', needed by 'mesa_modbus.o'.  Stop.

I build linuxcnc on kubuntu 22.04 using the following commands
Code:
git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-devcd linuxcnc-dev/debian ./configure uspace no-docs cd .. dpkg-buildpackage -b -uc

I then copied modcompile from linuxcnc-dev/bin/ to linuxcnc else i get following error because of wrong path :
Code:
[color=#000000]mesa_modbus.c:21:10:[/color][color=#000000] [/color][color=#ff5454]fatal error: [/color][color=#000000]rtapi.h: No such file or directory [/color]   21 | #include [color=#ff5454]"rtapi.h"[/color][color=#000000] [/color]      |          [color=#ff5454]^~~~~~~~~[/color]

If i try and compile it now i get the following :
Code:
[color=#000000]sudo ./modcompile mesa_modbus_A5_Driver.mod [/color] /tmp/tmp31lc1kki/mesa_modbus.c make: *** No rule to make target 'mesa_modbus.c', needed by 'mesa_modbus.o'.  Stop.

Here is my driver file :
Code:
// Lichuan A5 AC Servo Drive Driver #define MAX_MSG_LEN 16   // may be increased if necessary to max 251 #define DEBUG 1 static const hm2_modbus_chan_descriptor_t channels[] = { /*  {TYPE,     FUNC, ADDR,   COUNT, pin_name} */     {HAL_U32,   3,   0x9C8, 1,     "speed-actual"},     {HAL_U32,   3,   0x9C9, 1,     "speed-instruction"},     {HAL_U32,   3,   0x9CA, 1,     "torque-instruction"},     {HAL_U32,   3,   0x9D4, 1,     "avg-load-rate"},     {HAL_U32,   3,   0x9E0, 1,     "phase-current"},     {HAL_U32,   3,   0x9E2, 1,     "bus-voltage"},     {HAL_U32,   6,   0x9E3, 1,     "tempreture"}, };

Any help please ? image missing /media/kunena/emoticons/unsure.png

Please Log in or Create an account to join the conversation.

More
3 years 2 months ago #279618 by PCW
Replied by PCW on topic Mesa modbus and pktUart
Have you tried building LinuxCNC from source the normal RIP way?
That works for me with master and the modbus component

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #279619 by Donno
Replied by Donno on topic Mesa modbus and pktUart
Can you maybe give instructions please ?

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #279621 by PCW
Replied by PCW on topic Mesa modbus and pktUart
Just the standard build from source instructions:

linuxcnc.org/docs/devel/html/code/building-linuxcnc.html
 

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago - 3 years 1 month ago #279629 by Donno
Replied by Donno on topic Mesa modbus and pktUart
That manage to do the trickimage missing /media/kunena/emoticons/cool.png

I deleted ~/linuxcnc-dev and did the following command:
Code:
git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-dev cd linuxcnc-dev/src ./autogen.sh ./configure --with-realtime=uspace make sudo make setuid source ../scripts/rip-environment cd ~/linuxcnc-dev/bin ./modcompile mesa_modbus_A5_Driver.mod
Last edit: 3 years 1 month ago by Donno. Reason: code tag breaks when copying

Please Log in or Create an account to join the conversation.

Time to create page: 0.433 seconds
Powered by Kunena Forum