STone 2c.pCOModbus RTUApache 2.0 Prototype

InverterCoolvert: control an Invertek Optidrive Coolvert compressor drive from a CAREL c.pCO controller

The STone library connects a c.pCO controller to an Optidrive Coolvert drive over Modbus RTU. It sends run and speed commands, writes the full configuration for groups P1–P7 and continuously checks that the drive settings match. It handles drive trips and resets, while a separate block manages the protection parameters. Because the drive has no built-in keypad, technicians configure it from the pGD1 terminal using lists with the same parameter codes as the drive manual.

First public release. The library has been tested with one Coolvert CV-220070-1FHP drive and an induction motor in V/F mode. Testing was carried out in the STone simulator and on a c.pCO mini controller. Other control modes and three-phase drives have not been tested. Review the limitations before use.

pGD1 Web terminal by IceLAB

Why this library exists

The Optidrive Coolvert is a drive designed for refrigeration compressors. It has no built-in keypad, and its configuration consists of dozens of parameters across groups P1–P7, usually set from a PC. In a refrigeration system built around a CAREL controller, this adds extra work: the drive must be configured separately, and replacing it means repeating the process. If someone changes a parameter directly on the drive, the controller does not detect the change and carries on as if nothing happened.

InverterCoolvert moves the drive configuration into the controller. The controller stores it in persistent memory and writes it to the drive on request or automatically when it detects a new serial number. It also continuously compares the drive parameters with the stored configuration. Any mismatch blocks the next start until the technician chooses which configuration to keep: write the controller settings to the drive, or read the drive settings into the controller. The library also handles run and speed commands, drive trips with the reset delays specified in the manual, and compressor protection parameters in a separate checksummed block. Commissioning can be carried out from the pGD1 terminal.

How it works

  1. 1

    Add the library and configure Modbus

    Add InverterCoolvert_v.0.2.0.stlib to the STone 2 project and add USING Libs.InverterCoolvert;. In ClientProtocols.stmp, configure a Modbus client on the controller’s RS-485 port and add a device that uses the library’s MBC_TMPL_CVRT template. The drive defaults are 115,200 baud, 8N1, and address 1.

  2. 2

    Call the block on every task cycle

    Declare an instance of InverterCoolvert.InverterCoolvert and the CFG_DRIVE configuration as persistent variables (PERSISTENT). In the task that handles the drive, copy the polled registers into the template, call the block, then copy the commands from the block back into the template. The task interval can be up to 500 ms.

  3. 3

    Enter the motor data and write the configuration

    In the P1 list on the pGD1 terminal, enter the motor’s rated voltage, current, frequency and speed (P1-07–P1-10). The library will not install the configuration until all four values are present. Then set C01 = Write. The controller writes the full configuration to the drive, verifies it with three consecutive error-free polls and stores the drive’s serial number.

  4. 4

    Control the drive and monitor its status

    The application passes the run request and speed setpoint, expressed as a percentage, to the block. The block generates the control word and speed setpoint in revolutions per second, but only when starting is permitted: the configuration is in sync, the STO circuit is closed and the drive has no active trip. The library screens show the drive state, measurements, trip history and Modbus counters.

Features

01

The full drive configuration lives in the controller

CFG_DRIVE covers every parameter in groups P1–P7 except the protection parameters and communication settings. Field names include the Invertek parameter codes, for example P1.P1_07_MotRatedV. Each field has a unit, range, default value and description based on the drive manual. When a drive is replaced, the controller detects its new serial number and automatically writes the stored configuration to it.

02

Continuous parameter consistency check

The controller polls the drive parameters and compares them with the stored configuration. InSync means the values match, Differs indicates a mismatch, and NotChecked means the check cannot be completed, for example while the drive is offline. A mismatch blocks the next start until the technician chooses the direction of synchronisation: write the controller configuration to the drive (C01 = Write) or read the drive values into the controller (C01 = Read).

03

Starting is allowed only when all conditions are met

The CanStart output is true only when the motor data has been entered, the configuration is in sync, the STO circuit is closed, and the drive is online with no active trip. The run bit does not wait for the STO circuit to close. If the protection-parameters block is attached, its configuration must also pass the consistency check.

04

Trip handling and reset timing follow the manual

The library recognises drive trip codes and displays their descriptions, for example O-I: output over current. Reset timing follows the manual: 120 s for class B trips and 2–64 s for overcurrent trips. The reset pulse is released only after the trip has cleared. Automatic reset is optional and attempts are limited — three within 30 minutes by default.

05

Protection parameters are managed separately

InverterCoolvert_SafetyBlock stores the current limits, automatic-reset delay and locked-rotor detection settings in a separate persistent configuration protected by a CRC checksum. It verifies the drive identity before every write. Writing is allowed only when the STO circuit is open and the compressor is stopped. The sequence unlocks the parameters with P7-11, writes and verifies each register, reads all values back, and locks the parameters again.

06

pGD1 screens use the drive manual’s parameter codes

The native CAREL parameter lists display groups P1–P7 using the same codes as the drive manual. Encoded values are shown as text, for example IM V/F. The library also provides a menu showing the drive state and suggested next action, a manual mode with risk acknowledgement and a 5-minute limit, a control screen with measurements, and an information screen with the trip history.

What the library contains

ElementRole
MBC_TMPL_CVRTModbus client template containing the drive registers. Registers with one decimal place use the REAL type and are scaled by 10 in the template; the remaining registers are passed through without scaling.
InverterCoolvertControl block for the line address and timeouts, online status, installation and consistency checking of CFG_DRIVE, control word and speed setpoint, trip handling and reset, and estimation of whether the compressor is still running while the drive is offline.
InverterCoolvert_SafetyBlockProtection-parameters block for P5-07 and P5-18 (current limits), P7-02 (automatic-reset delay), P7-12 and P7-13 (locked-rotor detection), and drive identity. The data is stored in SAFETY_CFG, protected by a CRC checksum.
InverterCoolvert_UiLinks the screens to the drive and handles manual mode, commands from the parameter lists and resets.
MenuWidget, ManualModeWidget, ControlWidget, InfoWidgetpGD1 screens: a group and command menu showing drive status, risk acknowledgement and manual mode, control with measurements, trip history and an “About” page.

The control block inputs are Enable, Address, RunCmd, SpeedPct, HeatCmd (crankcase heater), FaultReset and the configuration. Outputs include CanStart, Online, CommLost, Faulted, FaultCode, RunsOffline and the Info structure containing the consistency-check status, measurements and Modbus counters.

Quick start

  1. Add InverterCoolvert_v.0.2.0.stlib to the project (Dependencies › Libs) and add USING Libs.InverterCoolvert;. Qualify names with the InverterCoolvert. prefix. Do not add a USING declaration for the inner namespace, as names such as Ui and ON_OFF could conflict with names used by the application.
  2. In ClientProtocols.stmp, configure a Modbus client on the RS-485 port and add a device that uses the MBC_TMPL_CVRT template. Set the device path to the instance’s MBC_Cvrt field.
  3. Declare the persistent variables and call the block on every cycle of the drive task.
USING Libs.InverterCoolvert;

VAR_GLOBAL PERSISTENT
    CfgDrv       : InverterCoolvert.CFG_DRIVE;
    InstallReq   : BOOL;
    InstallDone  : BOOL;
    InstallError : BOOL;
    StoredSerial : InverterCoolvert.DRIVE_SERIAL;
END_VAR
VAR_GLOBAL
    Cvrt1 : InverterCoolvert.InverterCoolvert;
END_VAR

(* drive task, interval up to 500 ms *)
DriveLine.Init();   (* does nothing once the line is started *)
DriveLine.Read();
Cvrt1(Address := 1, SpeedPct := SpeedRequest, RunCmd := RunRequest, Enable := TRUE,
      CfgDrive := CfgDrv, InstallReq := InstallReq, InstallDone := InstallDone,
      InstallError := InstallError, StoredSerial := StoredSerial);
DriveLine.Write();
  1. Enter the motor data in CfgDrv.P1 (P1-07–P1-10) and set the control mode in P5.P5_01_CtrlMode. Then set InstallReq to TRUE. The library resets this request when installation is complete. The first installation always requires InstallReq; after that, a drive with a new serial number is configured automatically.
  2. To display the parameters on the terminal, copy the DrvCfg.*, SafCfg.* and Drive.MBC_Cvrt.* entries from the demo application’s Parameters.stparam, EN.lang and Workspace.spark files. Adjust the names to match the global variables in your project.

The demo application contains a complete example, including the protection-parameters block, screens and navigation.

Demo application

The CoolvertDemo application uses the published library rather than its source code. It supports one drive connected to the FBUS1 port of a c.pCO mini. It includes the library screens, native parameter lists, the protection-parameters block, and a ready-to-use Firmware#App-CoolvertDemo-0.2.0.pack file containing the Manufacturer, Service and User profiles and parameter descriptions.

  1. Unpack the archive and open Demo/CoolvertDemo.stone in STone 2. The required CAREL libraries, SystemMenu_v.1.0.7.stlib and ParamListWidget_v.1.3.3.stlib, are already in the Libs folder.
  2. Download the .pack file to the controller using CAREL Sparkly, for example: Sparkly.exe app download --src "Pack\Firmware#App-CoolvertDemo-0.2.0.pack" --connection Serial,COM3,1152008N2,248. Each time it starts, the application unpacks the profiles and parameter descriptions from the .pack file.
  3. If you modify and build the application yourself, build the Release configuration and create a new .pack file using Sparkly.exe pack-file create and pack-file embed-from-spark with Workspace.spark, as described in README.md.
  4. In the P1 list enter the motor data (P1-07 to P1-10) and set C01 = Write.

The parameter-list commands are: C01 synchronises the motor configuration (Write: controller → drive; Read: drive → controller); C02 synchronises the protection parameters (Write: sign and write; Read: read and sign); C03 resets the drive trip; C04 resets the protection-parameters alarm; and C05 enables the drive.

Requirements

  • CAREL STone 2 version 2.0.7 or later. The library was built with version 2.0.7.1426.
  • A CAREL controller with an RS-485 port (for example, FBUS1) and a pGD1 terminal. The library project targets the c.pCO; the demo application targets the c.pCO mini.
  • An Invertek Optidrive Coolvert drive connected to the controller’s RS-485 port. Drive defaults: address 1, 115,200 baud, 8N1.
  • CAREL Sparkly to load the parameter profiles. Without the profiles, the terminal lists display No tag.

Download

InverterCoolvert is available in two packages. Each includes a README.md with full documentation. The ready-to-use .pack file of the demo application is also available on its own.

STone library v0.2.0

The InverterCoolvert_v.0.2.0.stlib library for STone 2 includes the MBC_TMPL_CVRT Modbus template, three function blocks and the pGD1 screens. The package also includes the drive register map and scaling information (Docs/register-map.md).

SHA-256 85fc9e06f66b63bbad0a5363e22028e340a7b8a513343740dde764e58bde90cb

Download · 103 kB

Demo application (c.pCO mini + pGD1) v0.2.0

The complete STone project CoolvertDemo, built on the library. It includes one drive on the FBUS1 port, the library screens, native parameter lists, the protection-parameters block, the parameter definitions and the Spark workspace. The package also contains the required CAREL libraries and a ready-to-use .pack file with the profiles and parameter descriptions.

SHA-256 6d85e95cc58831bb8fa7d5c9b2dfcc800f6f85f33025deed9215a257574e0284

Download · 254 kB

Demo application .pack file (c.pCO mini) v0.2.0

The ready-to-download demo application for the c.pCO mini, built in the Release configuration, with the Manufacturer, Service and User profiles and the parameter descriptions. Load it with CAREL Sparkly (Sparkly.exe app download) without building the project in STone. The same file is included in the demo application package.

SHA-256 ada4fbb93a40de53e3ff0532b0d30ae40c0b2d5b043b573f11db7b3131c7471a

Download · 159 kB

Checksums are provided in SHA256SUMS.txt. InverterCoolvert is released under the Apache License 2.0 (see NOTICE). The CAREL libraries included in the demo application (SystemMenu, ParamListWidget) remain CAREL software and are subject to CAREL’s terms, not Apache 2.0. The Invertek drive manual is not included in either package; it is available from the Coolvert product pages.

Limits and residual risks

Frequently asked questions

Which controllers does the library support?

CAREL controllers programmed in STone 2, with an RS-485 port and a pGD1 terminal. The library project targets the c.pCO, while the demo application targets the c.pCO mini. You can change the target controller in the project settings.

Which drives does it support?

Invertek Optidrive Coolvert drives. Testing was performed on the single-phase CV-220070-1FHP model. According to the manual, other Coolvert models use the same register map, but this has not yet been verified. If the drive rejects a value — for example, a rated current below 20% of the drive’s rating — the library reports an installation error.

Do I need a PC with Invertek software for commissioning?

No. You can set all drive parameters from the pGD1 terminal, and the controller writes them to the drive. A PC is needed only to build the application in STone.

What happens if someone changes a parameter directly on the drive?

The audit detects the mismatch and blocks the next compressor start. The menu screen shows the technician the reason and the suggested action. They can write the controller configuration to the drive (C01 = Write) or read the drive values into the controller (C01 = Read).

Can I use the library without the screens or the protection-parameters block?

Yes. The control block works on its own; the screens and protection-parameters block are optional. If you do not want to use the protection-parameters block, remove it from the project entirely. A block that is no longer called can still prevent the drive from starting.

How much does it cost, and what licence applies?

The library and demo application are free and released under the Apache 2.0 licence. You may use, modify and redistribute them, including in commercial projects, provided you retain the author attribution. The CAREL libraries included in the demo application remain subject to CAREL’s licence terms.

InverterCoolvert: Hubert Lepiarczyk, IceLAB (www.icelab.pl). Apache 2.0 licence. CAREL, STone, c.pCO, pGD1, Spark and Sparkly are trademarks of CAREL Industries S.p.A. Invertek, Optidrive and Coolvert are trademarks of Invertek Drives Ltd. This is an independent project and is not affiliated with either company.