Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Siemens V20 VFD Spindle type #457

Merged
merged 14 commits into from Mar 21, 2024
Merged

Add Siemens V20 VFD Spindle type #457

merged 14 commits into from Mar 21, 2024

Conversation

RootCNC
Copy link
Contributor

@RootCNC RootCNC commented May 29, 2022

(I hope this Pull request is done correctly)

Siemens v20 basic VFD spindle control via RS485.

Info on implementing the VFD can be found the .cpp file.

I suspect this VFD drive is not very common but its a great bit of kit and has been rock solid for a number of year and now its finally got RS485 control!

known limitation: some parameters are hard coded. like Min and Max frequency - I couldn't find a suitable register to read and set these programmatically. for now these are hard set to 0-400hz which seems the most common implementation of a standard spindle motor. it is easily updated in the header file.

Wiki info:
Part Number: Siemens SINAMICS V20 Inverter Drive PN:6SL3210
reference LINK

Info:
The Siemens V20 is offered in a number of different sizes and configurations. The manual has a good commissioning section which you can use to get the spindle drive up and running. This is needs to be done prior to setup of the remote control via RS485.

The manuals can be easily found on the Siemens website or via a quick google.

VFD Settings:
To use this spindle type - it assumes you have a working/ configured VFD with motor - the following settings are changed to select the method of where the VFD takes it information from. This does not override the built-in control panel as manual operation can always be done by pressing the ‘M’ and ‘OK’ button together and a flashing hand icon will show.

Please do not enable this without a properly configured VFD.

Setting for remote operation:

VFD settings:

Parameter Description Factory default Default for Cn011 Set to: Remarks
P0700[0] Selection of command source 1 5 5 RS485 as the command source
P1000[0] Selection of frequency 1 5 5 RS485 as the speed setpoint
P2023[0] RS485 protocol selection 1 2 2 MODBUS RTU protocol
P2010[0] USS/MODBUS baudrate 6 6 6 Baudrate 9600 bps
P2021[0] MODBUS address 1 1 1 MODBUS address for inverter
P2022[0] MODBUS reply timeout 1000 1000 1000 Maximum time to send reply back to the master
P2014[0] USS/MODBUS telegram off time 2000 100 0 Time to receive data 0 = Disabled
P2034 MODBUS parity on RS485 2 2 2 Parity of MODBUS telegrams on RS485
P2035 MODBUS stop bits on RS485 1 1 1 Number of stop bits in MODBUS telegrams on RS485

Example YAML Config:

SiemensV20:
  uart:
    txd_pin: gpio.17
    rxd_pin: gpio.16
    rts_pin: gpio.4
    baud: 9600
    mode: 8E1
  modbus_id: 1
  tool_num: 0
  speed_map: 0=0% 24000=100%

@RootCNC
Copy link
Contributor Author

RootCNC commented May 29, 2022

Oh - please ignore the changes to the FluidNC/src/Spindles/VFDSpindle.h

This does not need to be pulled back into the main repo- it was just set to aid debugging - please ignore.

@bdring
Copy link
Owner

bdring commented May 29, 2022

Thanks, this looks good.
It is probably best to just remove VFDSpindle.h from this PR

@RootCNC
Copy link
Contributor Author

RootCNC commented May 29, 2022

Thanks Bart,

can I remove the VFDSpindle.h from the PR?

I'll have a look around but not too sure how to do it

I think this'll remove it from the PR
@bdring
Copy link
Owner

bdring commented May 29, 2022

I think you just need to return it to exactly the the same state as before the PR.

@MitchBradley
Copy link
Collaborator

Deleting the file has the effect of deleting it from the repository. As Bart said, what you need to do is to revert the file to its original state in RootCNC:Devt .

@MitchBradley
Copy link
Collaborator

When we take a PR that adds a new VFD type, that creates an implicit support responsibility for us going forward, because anybody who uses it later might ask questions. That can be tricky for us if we do not have the hardware and thus cannot reproduce the problem. It is a double whammy, because if we need to change anything that affects the VFD class interface, we have to propagate the change to the new VFD code, and we cannot test it.

For that reason, we ask that people who wish to add new VFD types accept some share of the ongoing support for them. One way of doing that is to include your email address in the code and on the wiki page section that documents that VFD.

@bdring
Copy link
Owner

bdring commented Jun 8, 2022

Fixed your accidental removal of VFDSpindle.h

@bdring
Copy link
Owner

bdring commented Jun 8, 2022

@RootCNC

I would like to add your Discord name and Github name to the header. Are you OK with that. We cannot support this without a test device. Are you sailorpete on Discord?

// Copyright (c) 2022 - Peter Newbery

@RootCNC
Copy link
Contributor Author

RootCNC commented Jun 26, 2022

Hey everyone,

I've been away on holiday and been moving jobs since - so been hectic.

by the looks of it - this got merged? do I need to do anything else?

Yup - I'll more than happily support it, no worries.

@buildlog you are correct my discord name is sailorpete#4490

Going forward - shall I add my email address on to it?

I will look to write up a configuration/ how to setup the V20 going forward, as my friend has just purchased one due to availability for the chinses VFDs being an issue here in the UK. So as we go through the setup together, I'll take notes on how to set one up. would you like to host this in the wiki? or as a .md file that'll accommodate the source?

@bdring
Copy link
Owner

bdring commented Jun 26, 2022

It has not been merged yet. All I need now is the info for the wiki. An markdown file would be fine. The wiki is not to easy to PR

@RootCNC
Copy link
Contributor Author

RootCNC commented Sep 14, 2022

So my good friend has written a write up on how to configure the VFD drive it self. But looking through the current Devt branch, I cannot see the original source for the V20? am I missing something?

@MitchBradley
Copy link
Collaborator

If you can give us the writeup for the Wiki in markdown, then we can merge the PR and add the writeup to the Wiki. Bart is on vacation right now so I am pretty slammed with holding down the fort.

@RootCNC
Copy link
Contributor Author

RootCNC commented Feb 21, 2023

SiemensV20About.md
Hey Mitch,

please see attached - let me know if that is suitable, there is a growing number of us who use the V20 spindle. so it would be great to get it pre-compiled.

Thanks

@MitchBradley
Copy link
Collaborator

What level of ongoing support are you proposing to offer? We end up spending a lot of time answering questions from new users who have trouble hooking up various VFDs. It is especially difficult to help people with VFDs that we do not have.

Copy link
Collaborator

@MitchBradley MitchBradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine at first reading.

@RootCNC
Copy link
Contributor Author

RootCNC commented Mar 4, 2023

Where possible I will support it. we have a couple of users over on the Root CNC discord who are using the V20 drive and I have been supporting them. so going forward, that shouldn't be an issue.

Added the additional input pins on the ESP32-MINI-1U-N4
@MitchBradley MitchBradley changed the base branch from Devt to main March 19, 2024 04:59
@MitchBradley MitchBradley merged commit 23debb2 into bdring:main Mar 21, 2024
@MitchBradley
Copy link
Collaborator

@RootCNC We merged your VFD PR. Could you please update the FluidNC Wiki to add information about this VFD in this section . Information about wiki contributions is here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants