H100 communications for speed reference using mb2hal modbus
- davmer42
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 3
26 Jun 2026 16:30 #347349
by davmer42
H100 communications for speed reference using mb2hal modbus was created 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.
Transactions 00 and 01 work fine
Any ideas would be appreciated.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 21701
- Thank you received: 7417
26 Jun 2026 16:58 #347352
by tommylight
Replied by tommylight on topic H100 communications for speed reference using mb2hal modbus
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.
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.
- NWE
-
- Offline
- Elite Member
-
Less
More
- Posts: 215
- Thank you received: 64
28 Jun 2026 05:05 - 28 Jun 2026 05:06 #347364
by NWE
Replied by NWE on topic H100 communications for speed reference using mb2hal modbus
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?
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
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 3
28 Jun 2026 23:26 - 28 Jun 2026 23:27 #347380
by davmer42
Replied by davmer42 on topic H100 communications for speed reference using mb2hal modbus
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
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 3
29 Jun 2026 00:38 #347382
by davmer42
Replied by davmer42 on topic H100 communications for speed reference using mb2hal modbus
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
[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