Wiki Search Terms
Siemens V20
Controller Board
6x CNC Controller
Machine Description
3 axis CNC using stepperonline NEMA 23 closed loop motors with CL57T-V41 drivers, with 1.5kW china spindle on a Siemens V20 VFD
Input Circuits
Configuration file
board: 6 Pack CNC by Bart Dring
name: JaRa CNC
meta: 2025-02-14 RMkcontrol:
safetydoorpin: NO_PIN
resetpin: NOPIN
feedholdpin: gpio.2:low:pu
i2so:
bck_pin: gpio.22
data_pin: gpio.21
ws_pin: gpio.17
spi:
miso_pin: gpio.19
mosi_pin: gpio.23
sck_pin: gpio.18
sdcard:
carddetectpin: NO_PIN
cs_pin: gpio.5
start:
must_home: false
SiemensV20:
uart:
txd_pin: gpio.15
rxd_pin: gpio.16
rts_pin: gpio.14
baud: 9600
mode: 8E1
modbus_id: 1
tool_num: 0
spinup_ms: 500
spindown_ms: 500
speed_map: 0=0% 1=12.5% 3000=37.5% 9000=37.5% 24000=100%
offonalarm: true
stepping:
engine: I2S_STREAM
#we never disable the output pins automatically, so set to 255
idle_ms: 255
the CL57T can handle stepping frequencies up to 200 kHz, so in theory 2.5us pulses should be possible.
other sources claim 500kHz, so we could go with 1us pulses
5 limits to 100kHz
pulse_us: 6
dirdelayus: 6
disabledelayus: 0
segments: 6axes:
sharedstepperdisablepin: NOPIN
homing_runs: 2
x:
microstep mode 5: 1000 steps/round with 5mm/round -> 200 steps/mm
stepspermm: 200.0
maxratemmpermin: 1000.000
accelerationmmper_sec2: 25.000
maxtravelmm: 430.000
soft_limits: true
homing:
cycle: 2
positive_direction: false
mpos_mm: 0.000
feedmmper_min: 100.000
seekmmper_min: 500.000
settle_ms: 250
seek_scaler: 1.100
feed_scaler: 1.100 motor0:
limitnegpin: gpio.26:low:pu
limitpospin: NO_PIN
limitallpin: NO_PIN
hard_limits: false
pulloff_mm: 1.000
standard_stepper:
step_pin: I2SO.2
direction_pin: I2SO.1
disable_pin: I2SO.0
y:
stepspermm: 200.000
maxratemmpermin: 1000.000
accelerationmmper_sec2: 25.000
maxtravelmm: 850.000
soft_limits: true
homing:
cycle: 2
positive_direction: true
mpos_mm: 560.000
feedmmper_min: 100.000
seekmmper_min: 500.000
settle_ms: 250
seek_scaler: 1.100
feed_scaler: 1.100
motor0:
limitnegpin: gpio.33:low:pu
limitpospin: NO_PIN
limitallpin: NO_PIN
hard_limits: false
pulloff_mm: 1.000
standard_stepper:
step_pin: I2SO.5
direction_pin: I2SO.4
disable_pin: I2SO.7
z:
stepspermm: 200.000
maxratemmpermin: 500.000
accelerationmmper_sec2: 25.000
maxtravelmm: 380.000
soft_limits: true
homing:
cycle: 1
positive_direction: true
mpos_mm: 140.000
feedmmper_min: 50.000
seekmmper_min: 250.000
settle_ms: 250
seek_scaler: 1.100
feed_scaler: 1.100
motor0:
limitnegpin: NO_PIN
limitpospin: gpio.32:low:pu
limitallpin: NO_PIN
hard_limits: false
pulloff_mm: 1.000
standard_stepper:
step_pin: I2SO.10
direction_pin: I2SO.9
disable_pin: I2SO.8
Startup Messages
[MSG:INFO: FluidNC v3.9.3 https://github.com/bdring/FluidNC]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty]
[MSG:INFO: Local filesystem type is littlefs]
[MSG:INFO: Configuration file:JaRa_CNC.yaml]
[MSG:INFO: Machine JaRa CNC]
[MSG:INFO: Board 6 Pack CNC by Bart Dring]
[MSG:INFO: I2SO BCK:gpio.22 WS:gpio.17 DATA:gpio.21]
[MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19]
[MSG:INFO: SD Card cspin:gpio.5 detect:NOPIN freq:8000000]
[MSG:INFO: Stepping:I2S_STREAM Pulse:6us Dsbl Delay:0us Dir Delay:6us Idle Delay:255ms]
[MSG:INFO: Axis count 3]
[MSG:INFO: Axis X (0.000,430.000)]
[MSG:INFO: Motor0]
[MSG:INFO: standard_stepper Step:I2SO.2 Dir:I2SO.1 Disable:I2SO.0]
[MSG:INFO: X Neg Limit gpio.26:low:pu]
[MSG:INFO: Axis Y (-290.000,560.000)]
[MSG:INFO: Motor0]
[MSG:INFO: standard_stepper Step:I2SO.5 Dir:I2SO.4 Disable:I2SO.7]
[MSG:INFO: Y Neg Limit gpio.33:low:pu]
[MSG:INFO: Axis Z (-240.000,140.000)]
[MSG:INFO: Motor0]
[MSG:INFO: standard_stepper Step:I2SO.10 Dir:I2SO.9 Disable:I2SO.8]
[MSG:INFO: Z Pos Limit gpio.32:low:pu]
[MSG:INFO: feedholdpin gpio.2:low:pu]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: Connecting to STA SSID:PalimPalim]
[MSG:INFO: Connecting.]
[MSG:INFO: Connecting..]
[MSG:INFO: Connecting...]
[MSG:INFO: Connected - IP is 192.168.0.77]
[MSG:INFO: WiFi on]
[MSG:INFO: Start mDNS with hostname:http://fluidnc.local/]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]
[MSG:INFO: UART1 Tx:gpio.15 Rx:gpio.16 RTS:gpio.14 Baud:9600]
[MSG:INFO: SiemensV20 Spindle Tx:gpio.15 Rx:gpio.16 RTS:gpio.14 Baud:9600]
User Interface Software
WebUI
What happened?
I configured the motor parameters in the VFD and can start the spindle in manual operation mode (after pressing M+OK). Also I
set the parameters in the VFD as mentioned in #457 and activated connection macro CN11.
I then tried to start the spindle by
“M3 S10000
but it doesn't start. Instead after a while it prints:
[MSG:ERR: SiemensV20 spindle did not reach device units 166. Reported value is 0]
ok
[MSG:INFO: ALARM: Spindle Control]
ALARM:10
ALARM:10
“
I am sure the RS485 is connected properly, as the scope clearly shows the transmitted data and (with slightly different voltage levels) the response from the VFD.
Any idea for the issue or how I could dig into it deeper to find a solution is warmly welcome.
GCode File
No response
Other Information
Big THANK YOU for all the work here.
FluidNC rocks.
YOU rock!
评论 (30)
#2 – ramack 于 2025-02-15
Yeah sure. @rootcnc can advise?
#3 – RootCNC 于 2025-02-15
Hey Ramack, when you commanded to the turn spindle on, Did you send a speed command with it? If not. I would expect this error, as the spindle starts up to it’s minimum speed. Which could be different to the minimum speed Fluidnc is expecting.
Please try and sending a spindle command with a relative high speed. For example, “M3 S10000”
#4 – ramack 于 2025-02-15
Thanks for thw tipp, I tried this, as also S10000 alone, followed by M3. Even started the spindle at th VFD in manual mode and issued the command then, but had the same:
[MSG:INFO: SiemensV20 Spindle Tx:gpio.15 Rx:gpio.16 RTS:gpio.14 Baud:9600]
ok
$H
$H
[MSG:Homed:Z]
[MSG:Homed:XY]
ok
M3 S10000
[MSG:ERR: SiemensV20 spindle did not reach device units 166. Reported value is 0]
ok
[MSG:INFO: ALARM: Spindle Control]
ALARM:10
ALARM:10
My impression is, that the VFD needs some more tweaking in the RS 485 parameters but have no idea where to start or how to debug it. Do you have a link at hand to a description of the protocol or some commands to try controlling the VFD from a Linux machine? (Rs485 USB adapter is available) – I guess there is no debug console in fluidnc available 😃
#5 – RootCNC 于 2025-02-15
I think if you’re able to manually control the spindle with the BOP (builtin operators panel) then you might have some parameters wrong in the configuration of the VFD.
If you have a look in the V20spindle.cpp file. You’ll see a list of vfd parameters you need to set.
#6 – ramack 于 2025-02-16
Thanks for pointing those out! I tried double checking them several times without any luck. – For now we have connected the 0-10V control such that we are at least able to commission our CNC. I’d still prefer to go for the RS485 connection, so I hope to find the time and motivation to dig deeper in it another day.
#7 – ramack 于 2025-02-18
BTW @RootCNC isn’t the V20 also based on Modbus, so why don’t we use the generic modbus configuration for the Siemens VFD?
#8 – MitchBradley 于 2025-02-18
I derived the V20 config for the generic modbus from the code, but since I have no way to test it, I cannot be sure that it is correct. http://wiki.fluidnc.com/en/config/config_spindles#siemensv20-untested . It would be nice if someone with a V20 could test it and report the results.
#9 – ramack 于 2025-02-18
I will surely test this, thanks, but need to get some issues in the orthogonality of the axis fixed first and will probably not be able to do it this weekend.
#10 – RootCNC 于 2025-02-18
@ramack the Generic module was not a thing why at the time that module has been committed – but has been working solidly since that commit for me.
I know of a couple of users who have been using this V20 VFD type with no issues, so it is somewhat odd you’re struggling to get working.
#11 – MitchBradley 于 2025-02-18
@RootCNC does that mean that you have tested the V20 spindle with the generic module, or am I misinterpreting? Is the V20 generic config correct?
#12 – MitchBradley 于 2025-02-18
Long-term, I hope to remove as many of the hardcoded vfd spindles as possible, to save code space and complexity.
#13 – RootCNC 于 2025-02-18
Mitch, I have not tested the Generic configuration but it looks correct. I have a feeling @ramack might need to perform a reset of the drive and ensure the registers are set as per the settings listed in the file https://github.com/bdring/FluidNC/blob/main/FluidNC/src/Spindles/VFD/SiemensV20Protocol.cpp
#14 – MitchBradley 于 2025-02-18
Yes, it certainly seems like a VFD register settings problem.
#15 – ramack 于 2025-02-18
fairly possible, even though I double checked several times and got it easily working with the AIN. With the generic modbus driver I have some possibilities to output communication details for debugging, right?
#16 – MitchBradley 于 2025-02-18
With the generic driver you can display the transmitted and received data.
#17 – RootCNC 于 2025-02-18
You definitely swapped to CN11?
#18 – ramack 于 2025-03-08
Finally it looks like I can dig into this again. Is the generic ModbusVFD support in 3.9.5-pre1 enough to give it a try, or would I need to compile the head?
#19 – MitchBradley 于 2025-03-08
We are doing some merging at the moment, so give us some time to complete that.
#20 – ramack 于 2025-03-14
Here we go. First I was disappointed a bit, that I didn’t find any guide how to compile the code from scratch, but after seeing build-release.py installing remoteio it was easy to flash FluidNC 3.9.5-pre1 (main-18aff2e2-dirty).
So I tried configuration of the generic modbus spindle driver with:
ModbusVFD:
debug: 3
uart_num: 1
modbus_id: 1
model: SiemensV20
cw_cmd: 06 00 63 0c 7f > echo
ccw_cmd: 06 00 63 04 7f > echo
off_cmd: 06 00 63 0c 7e > echo
setrpmcmd: 06 00 64 rpm > echo
maxrpmcmd: 03 10 82 00 01 > 03 02 rpm*60/100
minrpmcmd: 03 10 80 00 01 > 03 02 rpm*60/100
getrpmcmd: 03 00 6e 00 01 > 03 02 rpm
speed_map: 0=0.000% 1000=0.000% 24000=100.000%
speed_map: 0=0% 1=12.5% 3000=37.5% 9000=37.5% 24000=100%
offonalarm: true
The maxrpmcmd caused an error and it looks, like the wiki should be changed to getmaxrpm_cmd (same for min).
The log shows
[MSG:INFO: RS485 Tx: 01 03 40 21]
[MSG:INFO: RS485 Rx: ]
[MSG:INFO: RS485 No response]
while there the V20 doesn’t respond at all and I even wonder what this command is about.
So I switched back to the V20 driver and activated logging there also with
SiemensV20:
debug: 3
uart:
txd_pin: gpio.15
rxd_pin: gpio.16
rts_pin: gpio.14
baud: 9600
mode: 8E1
modbus_id: 1
tool_num: 0
spinup_ms: 500
spindown_ms: 500
speed_map: 0=0% 1=12.5% 3000=37.5% 9000=37.5% 24000=100%
offonalarm: true
There I get the following:
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 00 00 B8 44]
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:DBG: SiemensV20: setState:3 SpindleSpeed:10000]
[MSG:INFO: RS485 Rx: 01 03 02 00 00 B8 44]
[MSG:DBG: Syncing speed. Requested: 166 current:0]
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 00 00 B8 44]
So communication is working and reading the current speed (as zero) works, but adjusting the spindle speed from the UI logs state and speed changes, but doesn’t transmit anything that would make the VFD ajdust anything and after some clicks a buffer overflows.
Any ideas?
#21 – ramack 于 2025-03-14
With the SiemensV20 driver from @RootCNC I get the following while running the spindle from the BOP:
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 14 9B F6 EF]
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 14 9B F6 EF]
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 14 9B F6 EF]
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 14 9B F6 EF]
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 14 9B F6 EF]
[MSG:INFO: RS485 Tx: 01 03 00 6E 00 01 E5 D7]
[MSG:INFO: RS485 Rx: 01 03 02 14 9B F6 EF]
so the speed is read correctly. Only the other commands are not transmitted…
#22 – RootCNC 于 2025-03-15
It’s been a little while since I digested the programming manual for the V20. I seem to recall there is a register that tells the vfd what commands It can respond too. Its a mixture of speed and enable and direction commands. If you’re using CN10 (IIRC) The BOP should not respond to button pressed. So it sounds like the vfd is miss configured.
#23 – ramack 于 2025-03-15
Thanks for your comment. The BOP only react when I put it explicitly in manual mode, normally it doesn’t react, and I am in CN11. As there is no command in the Tx log that would indicate any command (expect reading the current speed) I am quite sure that it’s not (only) the VFD configuration.
With the SiemensV20 spindle I at least get some communication established, with the generic ModbusVFD FluidNC only emmits too short frames (which are not in the configuration)…
#24 – ramack 于 2025-03-15
SiemensV20Protocol::initialization_sequence seems to always return a handler and I get the impression that this means the initialization is never considered finished…
For the generic I have the impression that @MitchBradley injected a small issue in parsing here
#25 – MitchBradley 于 2025-03-15
Feel free to fix any errors that you find. I am busy working on the IO expander and don’t have time right now to deal with a VFD that I don’t have access to.
#26 – ramack 于 2025-03-16
OMG I messed up the parity setting when configuring the generic VFD driver. We clearly need:
mode: 8E1
for the Siemens V20.
For the logs: here is an helpful document about the different modbus registers for the Siemens V20.
#27 – MitchBradley 于 2025-03-16
If you type “compile” in the wiki search box, this page comes up http://wiki.fluidnc.com/en/installation#compiling-reference-only-you-do-not-need-to-compile.
#28 – ramack 于 2025-03-16
oh, yes. I didn’t search there, but only in the README.md here on github, but anyways I managed at the end by running build-release.py and fixing the error about the missing dependency.
The SiemensV20 driver is now working on my side, while I still struggled with the GenericVFD driver. – Would like to dive a bit deeper into this, as it would be cool to have only one generic driver without the need of a dedicated one, but it will take some time.
I can test again for the net release and if you prefer we can keep the ticket open until then, or you close it.
#29 – ramack 于 2025-05-02
I think we can close this. In the meantime I upgraded to v3.9.6 and with the SiemensV20 driver it works. (Did not yet test with the generic driver.)
I once had an “overtemperature” warning in the V20 but the temperature calculation was not working properly due to the motor parameters, so it would be quite cool to monitor the parameters which could cause trouble and display them somewhere in FluidNC and trigger a warning before the VFD stops the spindle or even try cooling it.
But this is not essential for sure, it just happened in the early approaches and it would have been cool to see it before in FluidNC.
Also it would be cool to see live data of the power (+voltage and current?) of the spindle in a “spindle” view. Anyhow, for now I don’t even write a feature request ticket for it, maybe I will try to implement something to read more “interesting” status registers.
#30 – MitchBradley 于 2025-05-02
Considering the enormous amount of uncompensated time that we spend just trying to help people get VFDs working at all, it is unlikely that we would add extra complexity that is specific to a particular VFD, especially one that only one or two people have.
#1 – MitchBradley 于 2025-02-15
Ask the author of #457, who submitted the V20 code. The fluidnc developers do not have one and this have no experience with it.