H100 communications for speed reference using mb2hal modbus

  • davmer42
  • davmer42's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
26 Jun 2026 16:30 #347349 by davmer42
I am in need of some help. In mb2hal.ini transaction 02, I can not get the set speed working. The crash message states that " mb2hal.spindle-set-speed does not exist ". I have stated it in the custom_postgui.hal file. I am wanting to have the " run speed slider " populate the set speed parameter in the drive.
Transactions 00 and 01 work fine

Any ideas would be appreciated.
Attachments:

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
26 Jun 2026 16:58 #347352 by tommylight
Hal files are loaded in sequence as listed in the ini file, is the ordering there set correctly?
Check for typos in the pin names.
Check the ordering of hal files as if you call on a pin that has not yet been loaded, it will fail.

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

More
28 Jun 2026 05:05 - 28 Jun 2026 05:06 #347364 by NWE
I would suggest commenting out the offending line till you can get LinuxCNC to load. Then check what pins mb2hal created. I question whether mb2hal actually creates mb2hal.spindle-set-speed, usually I see pins something like mb2hal.0.1 where the first number is the transaction number and the second is the element number.

Or am I missing something? Is there a method to have mb2hal create labeled pins?
Last edit: 28 Jun 2026 05:06 by NWE.

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

  • davmer42
  • davmer42's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
28 Jun 2026 23:26 - 28 Jun 2026 23:27 #347380 by davmer42
transactions 00 and 01 load and work fine. if you use nelements, pin names are not required. And no, spindle-set-speed is not being created. 00 is spindle-speed and 01 is spindle-at-speed. These are being created, and work fine via axis
Last edit: 28 Jun 2026 23:27 by davmer42.
The following user(s) said Thank You: NWE

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

  • davmer42
  • davmer42's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
29 Jun 2026 00:38 #347382 by davmer42
So, I got it working, one line in the manual saying set speed is 201h (513d). Totally missed it. And the pyvcp value had to have a F after the label


[TRANSACTION_02]
FIRST_ELEMENT=513
NELEMENTS=1
MB_TX_CODE=fnct_06_write_single_register
MB_RESPONSE_TIMEOUT_MS=500
MB_BYTE_TIMEOUT_MS=500
HAL_TX_NAME=spindle-set-speed
MAX_UPDATE_RATE=0.0
DEBUG=1


## connect the PyVCP run speed slider to mb2hal input pin
net spindle-set-speed mb2hal.spindle-set-speed.01.float <= pyvcp.spindle-set-speed-F
The following user(s) said Thank You: NWE

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

Time to create page: 0.273 seconds
Powered by Kunena Forum