H100 communications for speed reference using mb2hal modbus

More
4 months 4 days ago #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.

Please Log in to join the conversation.

More
4 months 4 days ago #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 to join the conversation.

More
4 months 3 days ago #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?

Please Log in to join the conversation.

More
4 months 2 days ago #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

Please Log in to join the conversation.

More
4 months 2 days ago #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

Please Log in to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum