It seems that I first have to resolve the wiring of the 5axis bob and SPINx1 board, then to move on to wiring the SPINx1 to Sinamics VFD.
Most of the output pins are free, but what to wire where?
Also, from what I understood, I should add a separate power supply for SPINx1?
Any help/advice is apreciated
It works just to let others that try to do something similar. Now to see how to properly configure .hal so it works with interrupter too, and to set the scale properly so the actual rpm is the same as the commanded one.
It seems I need some more help to get the spindle working through VFD.
Now, my spindle speeds up to full speed slowly, and I wanted to insert spindle-at-speed option into HAL. I followed the instructions found online, but I get error messages, until I use a file like one attached (pc5.hal attached). And then, tool starts cutting even if the spindle isnt at full speed. I guess that hal has to be modified some more - its missing something.
Second problem - when I issue M3 command in MDI, spindle starts to turn. It also starts to turn if I use subroutines. However, if I start a saved gcode, with M3 Sxxxx command, spindle stays still (example code attached). I guess that is something simple, I just fail to see it.
Third problem, fine tuning the pwm. My spindle motor is capable of 2715 rpm. Pulley is calculated to correspond to max 2500 rpm. However I enter those values in hal, I cant get over 2000 rpm. Also, If I issue S500 I get 500 rpm. If I issue s1000 I get 1100 rpm. S1500 I get 1800 (and that is about max). Can I do something to get those values a bit closer (setting up a 25% near margin seems a bit much?).
pc5-old.hal is the first setup that gave sign of life for controls.
Any advice is appreciated.
Thanks to Andy from linuxcnc forum, its sorted out (except fine tuning pwm, that still has to be tinkered with)! Attached is proper configuration. Spindle not turning with M3/4 command - configuration stops the spindle for tool change, so I had to rearrange gcode a bit As for threading and interrupter setup.......one should clean the interrupter from time to time in order to have it work properly - my bad.