Modbus spindle control using the Toshiba VF-S11 and PLCM-B1-G2 expansion board

Last modified by writer on 2023/06/06 17:25

You will need a frequency converter (hereinafter referred to as the FC) with support for Modbus RTU control, such as Toshiba VF-S11, to control the spindle via Modbus via the PLCM-B1-G2 expansion board.

Modbus spindle control setting procedure:

  1. Set FC to the control mode using the Modbus RTU protocol (RS-485) and remember the COM port settings in FC (count of bits per second, data bits, parity and stop bits).

Example for Toshiba VF-S11.

Function codeValueDescription
F8003Transfer rate: 9600 bits per sec
F8011Parity check enabled
F8021Device number on the bus
F8291Communication Protocol: Modbus RTU

2.  Connect FC to the PLCM-B1-G2 expansion board via RS-485 interface.

3. Purchase the "MODBUS protocol support" option or activate a trial period for this option in the menu "Configuration" → "License Manager" → "Common".

4. Enable and configure Modbus in the menu "Configuration" → "Modbus Setup".

Create new Modbus-master. Number of COM port is PLCM. The rest of the settings should be exactly the same as in the FC (in the screenshot, an example of a standard configuration of the COM port of Toshiba VF-S11).

master_plcm.png

You need to add registers to control the FC and read statuses from FC. For example you need to configure registers named SpindleMode, SpindleRPM and SpindleStatus.

We recommend using exactly these names, since in the future, registers will be accessed from background operations by their names.

NameMasterAddressRegisterRegister type
SpindleModePLCM164000Output
SpindleRPMPLCM164001Output
SpindleStatusPLCM164769Input

Register numbers must be specified as decimal values.

These values ​​can be indicated in HEX (hexadecimal) in the instructions for the frequency converter. For example, 0x1001, 0x1002.

5. Create new background operation (macro) through the macro manager.

The main task of the background macro is to monitor the current state and spindle speed and send the values to the frequency converter via Modbus.

An example of background operation modbus_spindle.bm for ModBus spindle control via FC Toshiba VF-S11 posted in attachment. This file must be added to background operations list.

Download background operation

Access to Modbus registers from macros is done by the name of the Modbus register case sensitive! For example SpindleRPM and SpindleRpm are different registers.

6. Enable the background operation. Make sure that the operation has started and is working properly. This will be indicated by the green indicator to the right of the operation name.

2021-11-29 14_18_03-Управление макросами.png

The spindle should now turn on and off if everything is configured correctly. The spindle speed accordingly must also change at the FC when it changing in PUMOTIX.