Programming the KGW Kaltgasregler SC4/5
The SC4/5 consists of two independant devices which are ModBus slaves internaly connected by RS485:
The Jumo controller (address 1) handles heater and chamber control and the "Security Controller" (address 11) handles jet and main power supply.
An external RS485 connector can be used to communicate with both controllers..
Documentation Jumo Controller
Interface Documentation Jumo Controller
Documentation Security Controller
Command Overview Security Controller (Stellgrad = Jet)
Example code in C#, .NET 2.0, Microsoft Visual Studio 2010. ModBus communikation is handled by the NModBus library:
General ModBus communication is documented in the interface documentation of the Jumo Contoller in chapter 2 to 4 and the addresses are described in chapter 5.
Examples
obtaining the heater tempereature (
heaterTemp = _Controller.Analogeingang1
)- read the float values of the Jumo controller at address 0x0050 (
_mbus.ReadFloat(0x0050)
)
- read the float values of the Jumo controller at address 0x0050 (
setting a new set point (
_Controller.Sollwert = newSetpoint
)- write the float value into the Jumo controller at address 0x0050 (
_mbus.WriteFloat(0x0050, newNetpoint)
)
- write the float value into the Jumo controller at address 0x0050 (
setting a new jet value (
_Controller.Jet = newJet
)- write the int value into the Security controller at address 0x0050 (
_mbus.WriteInt(0x0050, newJet, 11)
)
- write the int value into the Security controller at address 0x0050 (
obtaining the current jet value (
jet = _Controller.Jet
)- read the int value of the Security controller at address 0x0050 (
_mbus.ReadInt(0x0050, 11)
)
- read the int value of the Security controller at address 0x0050 (
switch to the parameter set memory of Jumo controller (
Device.SwitchParameterPage(true)
)- write the int value 2 (2 = on, 0 = off) into the Jumo controller at address 0x0013 (
_mbus.WriteInt(0x0013, 2)
) - With this the Jumo controller will switch the visiblility og the parameters in memory. For read/write from “normal” memory do not forget reset to 0
- write the int value 2 (2 = on, 0 = off) into the Jumo controller at address 0x0013 (
switch to chamber control instad of heater (
_Controller.IsControllingChamber = true
)- switch to the parameter set memory of Jumo controller
- switch to the second parameter set of the controller by writing the value 2 in the lower byte of the Jumo controller at address 0x300c (
_mbus.WriteInt(0x300c, 2*256+getUByte(_mbus.ReadInt(0x300c)))
) - switch back to the normal memory of Jumo controller
- write the int value 2 into the Jumo Controller at address 0x0074 (
_mbus.WriteInt(0x0074, 2)
)
ATTENTION
Setpoint must be below 200°C (Controller.Maxtemp
) and SPH below 120°C (Controller.ParameterSphMax
).