MB2hal interface to a H100 inverter

More
1 year 1 month ago #335639 by davmer42
Hi guys and gals. I have been spending hours and hours trying to get a H-100 inverter to talk to linux cnc. The documentation is just foggy enough that I am at a loss. I can connect the spindle(0) bits to the MB2hal transaction names but apparently I'm not using the correct addresses and int's / float's. And the limited instructions don't give me enough crayons. I have defined a pin called mb2hal.readhldreg.start but do not know how to tie it to the correct register. 

All I see is mb2hal.m.n.float or int or bit. I do not know what m or n is.

This is rather embarrassing as I spent a career in plc's and programming.

If someone could give me some examples, it would be greatly appreciated.

Thank you, David

Please Log in to join the conversation.

More
1 year 4 weeks ago #335652 by Hakan
No expert by any means, but I got it to work so here are some snippets from that

in custom_sinusM.hal
Code:
# Load mb2hal for modbus operation of the sinusM vfd loadusr -Wn sinusM mb2hal config=sinusM_spindle.ini ... # Set max limit rpm for spindle # net spindle-max-freq       sinusM.05.read-max-freq.float spindlemax.max         # Max frequency(rps) for motor net  spindle-speed-scale   spindle.0.speed-out-rps-abs   sinusM.01.set-freq     # Just the principle net spindle-vel-positive    mux4.0.sel0           abs.spindle-speed.sign net spindle-enable          mux4.0.sel1 net spindle-cmd-out         mux4.0.out            sinusM.04.run-command  # Stop/fwd/rev

In sinusM_spindle.ini
Code:
... [TRANSACTION_01] MB_TX_CODE=fnct_06_write_single_register FIRST_ELEMENT=4 NELEMENTS=1 PIN_NAMES=set-freq MAX_UPDATE_RATE=0.0 [TRANSACTION_04] MB_TX_CODE=fnct_06_write_single_register FIRST_ELEMENT=5 NELEMENTS=1 PIN_NAMES=run-command MAX_UPDATE_RATE=0.0 [TRANSACTION_05] MB_TX_CODE=fnct_03_read_holding_registers FIRST_ELEMENT=41492 NELEMENTS=1 PIN_NAMES=read-max-freq MAX_UPDATE_RATE=0.0
 

The above communication works with the vfd. But hal code is probably mixing Hz and rpms so it won't necessarily work for that reason.

Please Log in to join the conversation.

Time to create page: 0.227 seconds
Powered by Kunena Forum