← Back to Docs

DrvBachmannSvi Driver (Custom)

DrvBachmannSvi communicator driver documentation.

Custom Communicator DriversVersion6.0.0Updated2026-04-29OwnerScadaV6CommExt

DrvBachmannSvi Communicator Driver (Custom)

Functional Description

DrvBachmannSvi is a custom Communicator driver in ScadaV6CommExt for field device connectivity. Protocol details follow the source implementation.

Scope and Version

  • Source: ScadaV6CommExt/DrvBachmannSvi.Logic
  • TFM: net8.0
  • Version: 6.0.0

Install and Enable

  1. Deploy driver binaries to Communicator folders.
  2. Activate driver in Administrator → Communicator → Drivers.
  3. Upload configuration and restart Communicator.

Line and Device Configuration

  1. Create a communication line with the proper channel type.
  2. Add device and set address/timeouts.
  3. Set polling options and CmdLine as required by this driver; see Functional notes and configuration (template and source) below for file names, address format, and line keys.

CustomOptions (extracted)

KeyDefaultNote
RetryCount10Extracted from source; confirm meaning in driver implementation.
UsernameExtracted from source; confirm meaning in driver implementation.
PasswordExtracted from source; confirm meaning in driver implementation.
Timeout3000Extracted from source; confirm meaning in driver implementation.

Code hints

17: protected DeviceTemplate deviceTemplate;
26: ConnectionRequired = false;
46: string fileName = PollingOptions.CmdLine.Trim();
47: deviceTemplate = new DeviceTemplate();
60: retryCount = Math.Max(1, LineContext.LineConfig.CustomOptions.GetValueAsInt("RetryCount", 10));
62: string username = LineContext.LineConfig.CustomOptions.GetValueAsString("Username");
63: string password = LineContext.LineConfig.CustomOptions.GetValueAsString("Password");
64: int timeout = LineContext.LineConfig.CustomOptions.GetValueAsInt("Timeout", 3000);
210: string[] keys = { "Host", "Ip", "IP", "IPAddress", "TargetIP" };
213: string val = LineContext.LineConfig.CustomOptions.GetValueAsString(key)?.Trim() ?? string.Empty;

Administrator UI (DrvIEC104.View)

Configure in Administrator → Communicator. Labels below come from the View language pack.

  • View source: ScadaV6CommExt/DrvIEC104.View
  • Main forms:
    • FrmAuthSetting.cs
    • FrmDeviceProps.cs
    • FrmDeviceTemplate.cs
    • FrmTemplateSettings.cs
Phrase keyText
thisIEC104. Device Template Editor
btnAddCmd.ToolTipAdd command
gbDevTemplateDevice template
gbCmdCommand parameters
lblCmdAddressElement address
lblCmdNumCommand number
CmdsNodeCommands
DefCmdName
lblDevTemplateDevice template
TemplNotExistsThe device template file does not exist.
btnNew.ToolTipCreate new template
btnOpen.ToolTipOpen template
btnSave.ToolTipSave template
btnSaveAs.ToolTipSave template as
btnEditSettings.ToolTipEdit template settings
lblGrAddressStart element address
lblElemAddressAddress
lblCmdNameName
lblCmdTableTypeData table
cbCmdTableType.Items[0]归一化遥测值 (NVA)
cbCmdTableType.Items[1]标度化值(SVA)
cbCmdTableType.Items[2]短浮点数(Float)
chkCmdMultipleMultiple
lblCmdFuncCodeFunction code
lblCmdElemTypeElement type
lblCmdElemCntElement count
lblCmdByteOrderByte order
lblCmdByteOrderExampleFor example, 01234567
AddressHint{0}, starting from {1}
SaveTemplateConfirmTemplate has been modified. Save the changes?

Administrator UI

No matching Drv*.View project found for DrvBachmannSvi. Use the actual device/line property dialogs in Administrator.

Functional notes and configuration (template and source)

Derived from Logic/Common and device template XML: driver behavior and the Administrator/Communicator fields to set (address, CmdLine, line CustomOptions, template nodes).

Logic location

  • ScadaV6CommExt/DrvBachmannSvi.Logic
  • Common: DrvBachmannSvi.Common

Overrides

OnCommLineStart(), OnCommLineTerminate(), InitDeviceTags(), Session(), SendCommand()

CmdLine / template

  • PollingOptions.CmdLine.Trim();

DeviceConfig properties referenced

PropertyNote
未检测到 DeviceConfig.* 引用(可能使用基类封装)。

Line CustomOptions

KeyDefault
RetryCount10
Username
Password
Timeout3000

XML keys (Common)

NodeNote
未在 Common 中解析到 GetChildAs*/AppendElem 节点(或无 Common 工程)。

Code excerpt

41: 
42:         public override void InitDeviceTags()
43:         {
44:             string fileName = PollingOptions.CmdLine.Trim();

43:         {
44:             string fileName = PollingOptions.CmdLine.Trim();
45:             deviceTemplate = new DeviceTemplate();
46: 

54:             driverCommonLib.InitCommandMaps(deviceTemplate);
55:             driverCommonLib.InitDeviceTags(DeviceTags, deviceTemplate);
56:             CanSendCommands = deviceTemplate.Cmds.Count > 0;
57: 

57: 
58:             retryCount = Math.Max(1, LineContext.LineConfig.CustomOptions.GetValueAsInt("RetryCount", 10));
59:             string host = ResolveHost();
60:             string username = LineContext.LineConfig.CustomOptions.GetValueAsString("Username");

59:             string host = ResolveHost();
60:             string username = LineContext.LineConfig.CustomOptions.GetValueAsString("Username");
61:             string password = LineContext.LineConfig.CustomOptions.GetValueAsString("Password");
62:             int timeout = LineContext.LineConfig.CustomOptions.GetValueAsInt("Timeout", 3000);

60:             string username = LineContext.LineConfig.CustomOptions.GetValueAsString("Username");
61:             string password = LineContext.LineConfig.CustomOptions.GetValueAsString("Password");
62:             int timeout = LineContext.LineConfig.CustomOptions.GetValueAsInt("Timeout", 3000);
63: 

Troubleshooting

  • No data: line, address, template, connectivity.
  • Template load errors: check logs.
  • Options ignored: verify option scope (line vs device).