Mb2hal speed irregular timing of reversing of spindle

More
31 Mar 2017 01:48 #90622 by Charlieslasher
I am having trouble with fwd/rev spindle delays 0-2sec variance when using modbus 2 hal userspace progam.
I have baud rate as high as i can for the x200 vfd. But it seems like the internal timing of the user space mb2hal is too slow.

Is there a way to get linuxcnc to output fwd/reverse over rs485 at consistant sub second speed. Rigid tap dose not like delays in reversing.

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

More
31 Mar 2017 04:36 #90625 by Todd Zuercher
Have you tried checking the debugging messages for mb2hal while Linuxcnc is running? Large delays can be caused by communication errors (I have seen this myself, but haven't been able to do much about it.)

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

More
31 Mar 2017 06:13 - 31 Mar 2017 07:52 #90627 by Charlieslasher
Havnt seen any debug messages. I look into it. I have started to look at the mb2hal file to try understand how it works.

I checked ther mb2hal.num_error pins in hal and they all change 0 to 1. So i guess this means illegal function.
Last edit: 31 Mar 2017 07:52 by Charlieslasher.

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

More
31 Mar 2017 12:33 #90640 by Todd Zuercher
You set the debuging level in the mb2hal.ini file, then the messages are printed out in the terminal when you start Linuxcnc from the command prompt.

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

More
31 Mar 2017 15:34 #90652 by VNR
For maximum speed check this:
SLOWDOWN=0.0
MAX_UPDATE_RATE=0.0

also for serial link check this
SERIAL_BAUD= highest as posible
SERIAL_DELAY_MS=0

set the debug levels to see information
INIT_DEBUG
DEBUG

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

More
31 Mar 2017 15:40 #90653 by VNR

But it seems like the internal timing of the user space mb2hal is too slow.

The problem is not mb2hal, it is as fast as your link throughput or VFD response.

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

More
02 Apr 2017 04:15 - 02 Apr 2017 04:56 #90755 by Charlieslasher
Can you explain in more detail how to run linux from comand prompt . I tried opening terminal and running linux cnc from there but didnt get any error log messages.

I changed serial delay to 10ms this made it faster and more consistant but i think im still geting modbus errors.

Overtravel rigid tapping can be upto 8mm at 600 rpm due to the delay. Crashing tools.
Last edit: 02 Apr 2017 04:56 by Charlieslasher.

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

More
02 Apr 2017 05:43 #90756 by rodw
just type linuxcnc in a terminal window. The error messges are just printed to the console in that window, not to an error log.

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

More
03 Apr 2017 00:34 #90783 by Charlieslasher
Thanks go it to work. Was using a shortcut to linuxcnc.

With some testing update rate is 6hz. And no errors idle.

I think i might be losing data from interference. Possible reason for random timing behaviour.
I dont have terminating resistors at the vfd. So i will work on this and see if things change. No oscilloscope to test.

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

More
03 Apr 2017 04:37 #90786 by Charlieslasher
All fixed and running very nice! Main problem was data com errors caused by vfd noise.

Grounding the 485 cable at the serial converter on the pc fixed all the errors. Grounding the cable at the vfd had little to noneffect. I used cat 6 sheilded cable 3m length with no terminating resistors.

Response is 10hz and repeatable timing plenty fast enough for rigid tapping spindle control.

Thanks for all the directions to fix the problems.

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

Time to create page: 0.141 seconds
Powered by Kunena Forum