Mesa modbus and pktUart

More
1 year 7 months ago - 1 year 7 months ago #323880 by vre
Replied by vre on topic Mesa modbus and pktUart
Seems to be related also to this
forum.linuxcnc.org/27-driver-boards/5432...v2d-firmware?start=0

If after startup set update-hz to 0.0001 or something non zero problem seem to stops..
Is this division by zero bug?

Code:
#define MAX_MSG_LEN 16 // may be increased if necessary to max 251 #define DEBUG 2 static const hm2_modbus_chan_descriptor_t channels = { /* {TYPE, FUNC, ADDR, COUNT, pin_name} */ {HAL_BIT, 2, 0x0000, 32, "in"}, {HAL_BIT, 15, 0x0000, 32, "out"}, // {HAL_U32, 6, 0x00FE, 1, "setbaud"}, // {HAL_U32, 3, 0x00FE, 1, "baud"}, };  
Last edit: 1 year 7 months ago by vre.

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

More
1 year 7 months ago #323882 by PCW
Replied by PCW on topic Mesa modbus and pktUart
Yes, this is a long known bug, never set the update rate to 0.

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

More
1 year 7 months ago - 1 year 7 months ago #323883 by vre
Replied by vre on topic Mesa modbus and pktUart
This is the reason for crazy data readings on encoders ?
I make now a config that encoder.count and encoder.velocity goes crazy to see if it stops by setting update-hz to non zero

Yes problem of noise in encoders resolves by non zero value to update-hz
verified by different configs that produced random data to different encoders.
All random data stop to encoders if update-hz is non zero but stop and modbus device to work.
 
Last edit: 1 year 7 months ago by vre.

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

More
1 year 7 months ago #323901 by vre
Replied by vre on topic Mesa modbus and pktUart
If i set non zero update-hz problem of crazy data reading on encoders stop
but also stops working modbus device so no solution here..

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

More
1 year 7 months ago #323927 by PCW
Replied by PCW on topic Mesa modbus and pktUart
If you ever set the update rate to 0, you can never change it again or the driver will hang (this is a known bug)

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

More
1 year 7 months ago - 1 year 7 months ago #323934 by vre
Replied by vre on topic Mesa modbus and pktUart
I start with 0.1 in hal file setting and does not work
if change it to 0 from halshow starts working but encoder reads crazy data.
Also if change functions order in vhdl pin file changes affected encoder number and pins.
Seems to be bug in vhdl because the functions order affects the encoder that is affected
in one config affected encoder.00.input-a and b
and in other config encoder.04.velocity and count.
Also when modbus device working the encoder reads crazy data when not working
by removing power supply/unwiring or stop it by setting update-hz to non zero
the same time stops the problem to encoder.
Seems like electric noise problem internaly in fpga
The same module works ok with mb2hal so it is not the module
Last edit: 1 year 7 months ago by vre.

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

Time to create page: 0.325 seconds
Powered by Kunena Forum