Mesa modbus and pktUart

More
13 Aug 2023 21:41 #277880 by PCW
Replied by PCW on topic Mesa modbus and pktUart
That's weird, I'll have to try and duplicate this tomorrow.

Have you considered posting an issue on the LinuxCNC github?
I can do this if I can duplicate the fault.

Is this with spindle synchronized motion?

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

More
14 Aug 2023 21:02 #278000 by PCW
Replied by PCW on topic Mesa modbus and pktUart
I tried to duplicate this but found no issues with following errors
either with stepgen or encoder feedback and mesa_modbus
running and switching a relay module.

I wonder if  this is related to your sigv

Can you post your .mod file?

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

More
14 Aug 2023 22:53 #278009 by JPL
Replied by JPL on topic Mesa modbus and pktUart

...
A better approach might be to attract Andy's attention and work with his shiny new component. I'm sure he'll help as that was his intended use.
​​​​
It seems I missed Andy's new component, can you please help me finding it? Thanks!
 

I think rodw was referring to this: forum.linuxcnc.org/29-forum-announcement...river-for-mesa-cards
 

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

More
18 Aug 2023 21:44 - 18 Aug 2023 21:51 #278418 by persei8
Replied by persei8 on topic Mesa modbus and pktUart
Apologies for the delay. I'm adding a rotary axis to my machine. Anyway, I attached the .mod file and the component I need in front of it. The architecture is shown in the attached pdf file. I see no way to use the mesa_modbus component otherwise because the motor on/off and speed commands must be converted to a specific format for the Huanyang GT series VFD.
Jim
(remove .txt from .mod file, extension not allowed)

EDIT: What's a sigv?
 
Attachments:
Last edit: 18 Aug 2023 21:51 by persei8.

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

More
18 Aug 2023 22:06 - 18 Aug 2023 22:08 #278419 by PCW
Replied by PCW on topic Mesa modbus and pktUart
Sorry is was not sigv it was sig8 = floating point error.
I think these the are likely caused by a divide by zero.

There are some divide by zero possibilities in your component, for example
what happens if max-speed and speed-in are both  0?

Also why did you comment out the MAX_MSG_LENGTH definition?
I would set this quite high based on what I reported about serial noise/
garbage possible exceeding this threshold and causing a crash
(at least until mesa_modbus has some protection against too-long
input data)
Last edit: 18 Aug 2023 22:08 by PCW.

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

More
18 Aug 2023 22:32 - 18 Aug 2023 23:00 #278421 by persei8
Replied by persei8 on topic Mesa modbus and pktUart
Good point on the divide by zeros. Will take care of that.
The mesa_modbus template has this line commented out and since I had no clue otherwise, I just left it. I'll set it to a high number and try it out again. 
Jim
EDIT: Now that I think of it, that explains why the sig8 error disappears if I set the parameters first and then addf the component. After that, there is no possibility of divide by zero as long as I don't intentionally set max_speed to 0.
EDIT again: In fact, I'll do the same to the mesa_modbus component, ie. params first, then addf.
Last edit: 18 Aug 2023 23:00 by persei8.

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

More
30 Aug 2023 10:52 #279365 by MennilTossFlykune
I get a following error on joint 1 when I try to home the y-axis (XYYZ).
If I restart LinuxCNC I instead get a following error as soon as I click machine on. If I power cycle my 7i96s and restart LinuxCNC I can attempt homing again with the same result.
Everything else works fine. The fault pin was "blinking" intermittently in halshow but I think it went away when I increased the baudrate to the maximum 115200.

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

More
30 Aug 2023 14:49 #279380 by PCW
Replied by PCW on topic Mesa modbus and pktUart
Can you plot the feedback and commanded positions with halscope when this happens?

The baud rate sensitivity may be due to the timeout value being too short for
the lower baudrates.

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

More
31 Aug 2023 10:59 #279464 by MennilTossFlykune
Turns out the solution was very simple. I set the value of the update-hz pin to 1 and the following error went away.
I lowered it to a ridiculously low number and it still works. Basically, anything above 0 works.
If I home the machine and then set it to 0 again this happens:



(The update-hz pin is documented in the docs but not on github which is what I had looked at earlier, so I didn't know about it.)
The following user(s) said Thank You: rodw

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

More
31 Aug 2023 11:01 #279465 by rodw
Replied by rodw on topic Mesa modbus and pktUart

(The update-hz pin is documented in the docs but not on github which is what I had looked at earlier, so I didn't know about it.)

Thats becasuse the man pages are documented from content embedded into the component's source code.

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

Time to create page: 0.084 seconds
Powered by Kunena Forum