Controlling a Parker AC10 VFD via MB2HAL
Here is just a quick summary:
- You need LinuxCNC > 2.7.14 (e.g. the next release as of October 2018), the master branch or need to compile mb2hal yourself with the pull requests [#487] and [#489].
- Configure the AC10 so your spindle is working. Then set F203 to 10. Then you can control it via ModBus. Use register 0x2000 to start/stop and set direction, register 0x010d (F113) to set the speed and register 0x1000+ to read the current status (see manual for more information).
You can use the following configuration files to get you started. Just place them in your machine directory (remove "ac10_" from the names) or adapt you existing files:
Please be aware that you certain values need to be set in custom.hal:
- Minimum and maximum frequencies
- The frequencies need to be set in the AC10 configuration registers (F111 and F112) and in the lines setp limit1.freq.min 10000 and setp limit1.freq.max 40000.
- Gear ratio
- The line setp comp.status-ok.in1 25603 contains the gear ratio and the max. status of the VFD that is not an error. 25603 = 0x6403 is the gear ratio * 100 in the MSB and the status (< 0x03 = OK) in the LSB. (The clean way to do this would be to AND info.status with 0x00ff, but I don't know how to do this with HAL commands.)
- Motor poles
- setp mult2.freq.in1 1.666667 sets the value to multiply the desired speed with to get the freqency to set. The correct value is 100 / 120 * motor poles. 1.666667 is correct if your spindle motor has 2 poles.
If everything works you should be able to control the spindle speed amd direction with LinuxCNC, see the current spindle speed, if the spindle is at speed, the temperature of the VFD and the E-Stop should be triggered if the VFD throws an error.