← Back to Docs

DrvDLT645 Driver (Custom)

DrvDLT645 communicator driver documentation.

Custom Communicator DriversVersion6.0.0Updated2026-04-29OwnerScadaV6CommExt

DrvDLT645 Communicator Driver (Custom)

Functional Description

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

Scope and Version

  • Source: ScadaV6CommExt/DrvDLT645.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
RetryCountExtracted from source; confirm meaning in driver implementation.
StationExtracted from source; confirm meaning in driver implementation.
EnableCodeFEExtracted from source; confirm meaning in driver implementation.
UseSecurityResquestExtracted from source; confirm meaning in driver implementation.
PasswordExtracted from source; confirm meaning in driver implementation.
OpCodeExtracted from source; confirm meaning in driver implementation.

Code hints

23: protected DeviceTemplate deviceTemplate;
44: ConnectionRequired = false; //不使用默认连接池
92: string fileName = PollingOptions.CmdLine.Trim();
93: deviceTemplate = new DeviceTemplate();
108: InitPlcConnection();
125: if (plcDeviceSession.CheckPlcConnection(dLT698, deviceTemplate))
187: private void InitPlcConnection()
189: RetryCount = (short)LineContext.LineConfig.CustomOptions.GetValueAsInt("RetryCount");
197: if (channelOptions is SerialPortChannelOptions serialPortChannel)
199: dLT698.Station = LineContext.LineConfig.CustomOptions.GetValueAsString("Station");
200: dLT698.EnableCodeFE = LineContext.LineConfig.CustomOptions.GetValueAsBool("EnableCodeFE");
201: dLT698.UseSecurityResquest = LineContext.LineConfig.CustomOptions.GetValueAsBool("UseSecurityResquest");
203: PipeSerialPort pipe = new PipeSerialPort();
204: pipe.SerialPortInni(serialPortChannel.PortName, serialPortChannel.BaudRate, serialPortChannel.DataBits, serialPortChannel.StopBits, serialPortChannel.Parity);
205: pipe.RtsEnable = serialPortChannel.RtsEnable;
206: pipe.DtrEnable = serialPortChannel.DtrEnable;
207: pipe.SleepTime = serialPortChannel.SleepTime;
209: Log.WriteAction($"[Channel]SerialPortChannelOptions, PortName: {serialPortChannel.PortName}, BaudRate: {serialPortChannel.BaudRate}");
237: protected DeviceTemplate deviceTemplate;
258: ConnectionRequired = false; //不使用默认连接池
306: string fileName = PollingOptions.CmdLine.Trim();
307: deviceTemplate = new DeviceTemplate();
322: InitPlcConnection();
339: if (plcDeviceSession.CheckPlcConnection(dLT645, deviceTemplate))
401: private void InitPlcConnection()

Administrator UI (DrvDLT645.View)

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

  • View source: ScadaV6CommExt/DrvDLT645.View
  • Main forms:
    • (无独立 Forms 目录或仅有控件)
Phrase keyText
gbCmdCommand Parameters
lblCmdCodeCommand code
lblCmdNumCommand number
lblCmdAddressElement address
lblTemplateFileNameDevice template
ConfigDirRequiredThe device template file must be located inside {0}
TemplateNotExistsThe device template file does not exist.
btnAddCmd.ToolTipAdd Command
gbTemplateDevice Template
TemplateTitleAllenBradley. Device Template Editor
DuplicatedCmdNumsDuplicated command numbers:
EmptyCmdCodesEmpty command codes found.
AddressHint{0}, starting from {1}
lblCmdNameName
lblCmdCodeWarnFill out code
lblCmdDataBlockData block
chkCmdMultipleMultiple
lblCmdFuncCodeFunction code
lblCmdFuncCodeHexHexadecimal
lblCmdElemTypeElement type
lblCmdElemCntElement count
lblCmdByteOrderByte order
lblCmdByteOrderExampleFor example, 01234567
lblElemAddressAddress
lblGrAddressStart element address
thisDevice {0} Properties
gbCommLineCommunication Line
lblTransModeProtocol
gbDeviceDevice
btnEditTemplateEdit

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/DrvDLT645.Logic
  • Common: DrvDLT645.Common

Overrides

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

CmdLine / template

  • PollingOptions.CmdLine.Trim();

DeviceConfig properties referenced

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

Line CustomOptions

KeyDefault
RetryCount
Station
EnableCodeFE
Password
OpCode
UseSecurityResquest

XML keys (Common)

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

Code excerpt

87: 
88:         public override void InitDeviceTags()
89:         {
90:             string fileName = PollingOptions.CmdLine.Trim();

89:         {
90:             string fileName = PollingOptions.CmdLine.Trim();
91:             deviceTemplate = new DeviceTemplate();
92:             if (!deviceTemplate.Load(Storage, fileName, out string errMsg))

100:                 //初始化点位
101:                 plcDeviceSession.InitDeviceTags(DeviceTags, deviceTemplate);
102: 
103:                 CanSendCommands = deviceTemplate.Cmds.Count > 0;

106:             InitPlcConnection();
107:             Log.WriteAction($"InitDeviceTags -> Line running");
108:         }
109: 

111: 
112:         public override void Session()
113:         {
114:             base.Session();

113:         {
114:             base.Session();
115:             if (deviceTemplate == null)
116:             {

Troubleshooting

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