ChargeLink Native

NI VeriStand Bench

The ChargeLink package (ChargeLink-0.5.0-rc2-bench-kit-win64.zip) sets up a two-PC bench for ISO 15118-20 DC charging with external identification (EIM). PC1 runs the charger (SECC) coupled to a simulated DC power stage, an FMI 2.0 plant model executed by NI VeriStand 2024 Q4. PC2 runs the ChargeLink vehicle (EVCC). The two PCs talk over a dedicated Ethernet link with SDP, mutual TLS 1.3 and the ISO 15118-20 DC EIM message sequence from SupportedAppProtocol to SessionStop.

This page explains what the package contains and how a session runs. The installation is described step by step in Set Up the VeriStand Bench, and the channels and their mapping in VeriStand Signal Mapping. The package's own docs\INSTALL-PC1.md, docs\INSTALL-PC2.md and docs\OPERATION.md describe the same procedure.

ChargeLink with NI VeriStand: components and data paths from the vehicle to the plant model EVCC on PC2 chargelink.exe started by Start-Evcc.ps1, dedicated link SDP · TCP · TLS 1.3 · V2GTP · EXI CHARGELINK ON PC1 (pc1\bin, pc1\host, pc1\broker) chargelink.exe evse start --external-evcc-session --plant-grpc-endpoint SECC, ISO 15118-20 DC EIM chargelink.exe integration serve :50051 veristand operator-bridge signals · sessions · health plant command frame ↓ ↑ measured source frame (CRC32C) ChargeLink.Veristand.XilHost (owner host) plant provider · safety supervision · operator channels session result and evidence in the run folder started with dotnet by Start-SeccSession.ps1 ChargeLink.Veristand.NativeClientBroker.exe loads your installed NI ClientAPI, deploys the system definition, reads and writes channels NI ClientAPI + veristand-server 25 ms cycle NI VERISTAND 2024 Q4 (installed by you on PC1) Gateway + Engine target Controller, 500 Hz SIL 64 User Channels, 44 mappings Plant FMU (FMI 2.0) ISO15118-20 DC EIM plant 26 in · 18 out · 6 param · 1 ms OPERATOR PC1 operator scripts New-BenchConfiguration.ps1 · Start-SeccSession.ps1 Send-OwnerCommand.ps1 (manual sessions) Operator channels User Channels\ChargeLink Operator: 7 commands, 7 status status written by the owner host while it runs manual commands reach the owner host through its local pipe WHAT FLOWS WHERE 1 Vehicle targets (voltage, current) arrive in EXI 2 The state machine writes EV.Target* and EVSE.*Command_* as a command frame 3 XilHost → broker → ClientAPI → User Channels → FMU inputs 4 FMU outputs (EVSE.Present*, EV.Battery*) return as the source frame 5 PreCharge and ChargeLoop responses are encoded from those measurements 6 Safety inputs and command age gate every step; a fault drives the plant to its safe state Ten of these channels are also canonical gRPC signals (Vehicle.SocPct, Charger.PresentVoltageV, …).
The components on PC1 and PC2 and the path a vehicle request takes to the plant model and back.

Prerequisites

You provide the following; the package contains none of it.

ItemPC1 (charger, VeriStand)PC2 (vehicle)
Operating systemWindows 11 Pro x64 (reference PC: build 26200)Windows 10 or 11 x64 with Windows PowerShell 5.1
NI VeriStandNI VeriStand 2024 Q4 with a licence activated on PC1 that runs the VeriStand engine and gateway on Windows, installed in C:\Program Files\National Instruments\VeriStand 2024. docs\INSTALL-PC1.md lists the SHA-256 of veristand-server.exe and NationalInstruments.VeriStand.SystemDefinitionAPI.dll that the bench was verified with.not needed
.NET.NET 10 runtime x64 (Microsoft.NETCore.App 10.0.x) for the owner host; .NET Framework 4.8 for the broker (part of Windows 11)not needed
C++ runtimeMicrosoft Visual C++ 2015-2022 Redistributable x64 (chargelink.exe imports VCRUNTIME140.dll)
Processorat least 13 logical processors; logical processors 10, 11 and 12 free of other loadno minimum; the EVCC is a light process
Disk20 GB free on the drive that holds the run folders
Networkone Ethernet adapter per PC dedicated to the PC1-PC2 link, IPv6 enabled; link-local addressing is enough (no router, no DHCP)
Accountsan operator account that can write %ProgramData%\DEVlink\ChargeLink\RuntimeOwnership; an administrator once, for the firewall rulesan administrator once, if the firewall filters outbound traffic
TLS materialISO 15118-20 Annex B certificate chains and keys for the SECC and the EVCC and their trust anchors: either your own PKI, or the engineering bench PKI that chargelink.exe evse tls-material-init --bench-pki generates on PC1 (engineering and test use only). The package contains no certificate and no key.

The system definition places the VeriStand primary control loop on logical processor 10, the model on 11 and the secondary (data) loop on 12. On a PC with fewer logical processors, or where those processors are busy, the placement must be reviewed and the system definition re-saved before use. The package contains no tool for this, and a re-saved file no longer matches the package's manifest\SHA256SUMS; record the change.

What is in the package

Every VeriStand-related file of the package, as it is after extraction to C:\ChargeLink\0.5.0-rc2:

PathWhat it is
pc1\veristand\ChargeLink_Blank_Windows.nivssdfThe VeriStand system definition: Windows target Controller, engine rate 500 Hz, data rate 50 Hz, the plant model, 64 User Channels and 44 mappings. It is deployed by the owner host; there is no separate VeriStand project file.
pc1\veristand\ChargeLink\Models\The plant model: an FMI 2.0 co-simulation FMU of the DC power stage, battery and safety inputs (26 inputs, 18 outputs, 6 parameters, 1 ms step). The system definition references it by this relative path; keep the folder next to the .nivssdf.
pc1\host\ChargeLink.Veristand.XilHost.exe, .dll, .deps.json, .runtimeconfig.jsonThe owner host (.NET 10, framework-dependent). It owns the VeriStand plant, starts the gRPC bridge and the SECC, applies the safe start-up state, supervises safety and writes the session result and evidence. Start-SeccSession.ps1 starts it with dotnet.
pc1\host\config\Configuration files that belong to the owner host build. The bench procedure does not use or change them.
pc1\broker\ChargeLink.Veristand.NativeClientBroker.exe and .exe.configThe NI ClientAPI broker (.NET Framework 4.8). It loads your installed NationalInstruments.VeriStand.ClientAPI.dll, deploys the system definition through the VeriStand gateway and gives the owner host read and write access to its channels.
pc1\bin\chargelink.exeThe ChargeLink CLI. The owner host runs it as the SECC listener and as the gRPC operator bridge (integration serve, veristand operator-bridge); you run it once to generate the engineering bench PKI.
pc1\config\iso15118_20_dc_eim_runtime_profile.jsonThe charger's ISO 15118-20 DC EIM values and safety thresholds (below).
pc1\config\operator_channel_contract.json, pc1\config\grpc_signal_mapping.jsonThe 14 operator channels and the plant-channel-to-signal mapping that the owner host validates against the system definition (VeriStand Signal Mapping).
pc1\templates\native.template.json, campaign-configuration.automation.template.json, campaign-configuration.manual.template.jsonPer-session configuration with {{PLACEHOLDER}} values. Start-SeccSession.ps1 renders them into every run folder.
pc1\New-BenchConfiguration.ps1Run once per bench: records the link adapter, its IPv6 link-local address, the TLS files and the VeriStand folder in pc1\bench-configuration.json.
pc1\Start-SeccSession.ps1Run for every session: creates the run folder, renders and validates the configuration, starts the owner host. -Mode Automation (default) or -Mode Manual; -ValidateOnly starts nothing.
pc1\Send-OwnerCommand.ps1, pc1\tools\OwnerDriver.psm1, pc1\BenchKit.psm1Sends one command to a manual-mode owner host and waits until it is applied; the two modules are used by the scripts.
pc2\chargelink.exe, pc2\Start-Evcc.ps1The EVCC (the same bytes as pc1\bin\chargelink.exe) and its launcher.
pc2\cases\nominal.json, emergency-transition.json, full-wire-session-manifest.jsonThe EV values for -Case Nominal and -Case EmergencyTransition, and the message sequence the EVCC checks every exchange against. Do not edit them.
pc2\tls\README.txtThe empty folder where the EVCC's TLS files go.
docs\INSTALL-PC1.md, INSTALL-PC2.md, OPERATION.md, KNOWN_LIMITATIONS.mdThe package's installation, operation and limitation notes.
licenses\DOTNET_AND_NI.txtThe .NET and NI runtime dependencies of the owner host and broker, which you install yourself.

NI VeriStand, its assemblies and licence, the .NET runtimes and the Visual C++ runtime are never part of the package.

How a session runs

  1. Start-SeccSession.ps1 creates a run folder under runs_root (default C:\ChargeLink\0.5.0-rc2\runs), renders native.json and campaign-configuration.json into it from pc1\templates and pc1\bench-configuration.json, sets CHARGELINK_ISO20_RUNTIME_PROFILE to the package's runtime profile, and has the owner host validate the configuration.
  2. It starts the owner host: dotnet pc1\host\ChargeLink.Veristand.XilHost.dll --config <run>\campaign-configuration.json --output <run>\host-output ….
  3. The owner host starts the broker, which connects to the local VeriStand gateway (veristand-server.exe) through your installed NI ClientAPI and deploys ChargeLink_Blank_Windows.nivssdf. The host checks the broker's SHA-256 and the channel contract, then applies the safe start-up state to the plant.
  4. The host starts chargelink.exe integration serve on 127.0.0.1:50051 (loopback only) and the operator bridge, then the SECC listener on the link adapter: SDP on UDP 15118, TLS on TCP 50118.
  5. Start-Evcc.ps1 on PC2 waits until the SECC accepts connections and runs one EVCC session at 80 kW requested power. During PreCharge, PowerDelivery and the DC charge loop, the SECC writes the vehicle targets and charger commands to the plant channels and answers from the plant's measured voltage and current.
  6. When the session has ended and the plant is back in its safe state, the owner host releases VeriStand and exits.

The runtime profile

The SECC refuses a plant-coupled ISO 15118-20 session without an explicit runtime profile. Start-SeccSession.ps1 sets CHARGELINK_ISO20_RUNTIME_PROFILE to pc1\config\iso15118_20_dc_eim_runtime_profile.json (schema chargelink.iso15118_20.dc_eim.runtime_profile.v1) for every session and records its SHA-256 in the run's SESSION.json. The package's values:

FieldValueMeaning
evse_idDEAASE3C4D5578Advertised EVSEID
offered_parameter_set_ids, selected_parameter_set_id[1], 1One DC parameter set
control_modescheduledThe control mode offered: scheduled or dynamic; parameter_set_control_modes can offer both and the EV selects one. The package offers Scheduled.
certificate_installation_service, service_renegotiation_supported, free_service, connector, mobility_needs_mode, pricingfalse, false, true, 1, 1, 0Service discovery and service detail answers
schedule_tuple_id, schedule_duration_s1, 60One charging schedule of 60 s; the charge loop must end inside it
evse_minimum_charge_power_w, evse_minimum_charge_current_a, evse_minimum_voltage_v0, 0, 0Charger minimums
precharge_voltage_tolerance_v, charge_loop_voltage_tolerance_v, charge_loop_current_tolerance_a, charge_loop_min_measured_power_w75, 75, 20, 10000Windows between the vehicle targets and the plant measurements
emergency_safe_max_current_a, emergency_safe_max_power_w, welding_safe_max_current_a, session_stop_safe_max_current_a0.05, 100, 5, 5Safe-state thresholds the plant must reach before the SECC reports the state change
emergency_terminate_notification_max_delay_s5Upper bound for the ISO 15118-20 Terminate notification after an emergency stop

The maximum power and voltage come from the session configuration (requested_power_kw 80, target_voltage_v 800). Keep the profile unchanged: a changed file no longer matches manifest\SHA256SUMS, and its new hash appears in every SESSION.json.

Running a session

Before every session:

  • PC1: no other VeriStand project is deployed and no other program holds the VeriStand gateway. Close browsers, media players and other simulators.
  • PC1: no chargelink.exe or ChargeLink.Veristand.XilHost from an earlier session is still running (Task Manager).
  • The link is up on both PCs (Get-NetAdapter), and pc1\bench-configuration.json still matches the adapter.
  • Open a new PowerShell window for each session: Start-SeccSession.ps1 refuses to run when other CHARGELINK_* variables are set.
  • Leave at least 20 seconds between the end of one session and the start of the next.

Automated session

PC1, in C:\ChargeLink\0.5.0-rc2\pc1:

powershell -NoProfile -ExecutionPolicy Bypass -File .\Start-SeccSession.ps1

It prints the run folder, validates the configuration and prints Starting the owner host together with the PC2 command line. The host waits up to 120 s for the EVCC.

PC2, in the pc2 folder, as soon as PC1 prints that line:

powershell -NoProfile -ExecutionPolicy Bypass -File .\Start-Evcc.ps1 -PeerIpv6 <SECC link-local address> -InterfaceAlias '<PC2 adapter>'

The EV ends the session itself after its charge loop. PC2 exit code 0 means the EVCC completed its sequence; the PC1 host ends once the plant is back in its safe state.

Manual session and the emergency stop

-Mode Manual starts the owner host with owner safety supervision and without automation. You drive it from a second PC1 window with Send-OwnerCommand.ps1, one command at a time; each command returns when the owner reports it applied.

PC1, window 1:

powershell -NoProfile -ExecutionPolicy Bypass -File .\Start-SeccSession.ps1 -Mode Manual

PC1, window 2 (window 1 prints the run folder):

cd C:\ChargeLink\0.5.0-rc2\pc1
$run = '<run folder>'
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command ApplySafeStartup
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command StartSession
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command StartExternalEvccLane

PC2: .\Start-Evcc.ps1 -PeerIpv6 <SECC address> -InterfaceAlias '<PC2 adapter>' -Case EmergencyTransition for an emergency stop during the charge loop, or the default -Case Nominal for a manual session without one.

PC1, window 2, once the plant is coupled (GetStatus shows EVSE.PresentCurrent_A above 5 A and EVSE.ContactorClosed 1) and within the 60 s charging schedule:

.\Send-OwnerCommand.ps1 -RunDirectory $run -Command AssertEmergencyStop
# repeat GetStatus until typed_safety_terminal is true and typed_safety_phase is safe_measured
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command GetStatus
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command ResetSafety
# repeat GetStatus until typed_safety_phase is recovered_idle
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command StopExternalEvccLane -TimeoutSeconds 150
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command StopSession
.\Send-OwnerCommand.ps1 -RunDirectory $run -Command ShutdownWorkflow

Without an emergency stop, leave out AssertEmergencyStop and ResetSafety. Always send ShutdownWorkflow at the end, also after a failed step: it leaves the plant in its safe state and releases VeriStand. Every request and reply is kept in <run>\owner-commands. The valid commands are GetStatus, ApplySafeStartup, StartSession, StartExternalEvccLane, AssertEmergencyStop, ResetSafety, StopExternalEvccLane, StopSession and ShutdownWorkflow; the default timeout is 60 s.

Reading the result

Everything a session writes is in its run folder (<runs_root>\<yyyyMMdd-HHmmss>-automation or -manual):

PathContent
SESSION.jsonMode, SHA-256 of chargelink.exe, the runtime profile, the configuration and the broker, and the host's exit code
campaign-configuration.json, native.jsonThe exact configuration the session ran
validation.log, host.logThe configuration check and the owner host's console output
host-output\patch598_stagec_external_evcc_result.jsonThe owner host's result; status is passed for a completed session
host-output\patch598_stagec_external_evcc_failure.jsonPresent only when the host stopped on an error: where and why
host-output\patch598_stagec_external_evcc_evidence.jsonPlant samples, safety and timing
external_evcc_artifacts\fix010-pc1-secc\The SECC's own evidence: traces\evse-listener.jsonl, traces\live-v2gtp-frames.jsonl (every V2GTP frame) and protocol\*.json
owner-commands\Manual sessions: every command request and reply

The host exits with 0 for passed, 71 for a completed run that did not pass, 40 for an error (see the failure file) and 2 for invalid arguments. The exit code is not the verdict. An emergency stop, for example, is a correct outcome shown by the evidence (the safe state reached, the ISO 15118-20 Terminate sent), not by exit code 0. Judge a session from the result and evidence files and the SECC's frame trace.

Troubleshooting

SymptomCauseAction
Start from a clean shell: these ChargeLink variables are set …CHARGELINK_* variables from an earlier command in the same windowOpen a new PowerShell window.
No bench configuration at …pc1\bench-configuration.json missingRun New-BenchConfiguration.ps1 (setup step 5).
The owner host did not accept the configuration (exit …, status …)A path, file or value in the rendered configuration is wrongRead <run>\validation.log; correct the bench configuration with New-BenchConfiguration.ps1 … -Force.
dotnet.exe not found.NET 10 runtime x64 not installedInstall it; dotnet --list-runtimes must show Microsoft.NETCore.App 10.0.x.
Host stops before the listener starts; failure file names the broker or the gatewayAnother VeriStand project is deployed, another program holds the gateway, or the NI installation differsUndeploy and close the other VeriStand client; compare the NI file hashes with docs\INSTALL-PC1.md; run the session again.
Late or irregular plant samples in the evidence fileLogical processors 10, 11 and 12 are busy or do not existClose other load; on a different processor topology see the placement note.
PC2: SECC did not accept connections within … sNo session running on PC1, wrong address or adapter, or the inbound firewall rules are missingStart PC1 first; pass the address PC1 printed (without %) and the PC2 adapter name; check the three PC1 rules (Get-NetFirewallRule -DisplayName 'DEVlink ChargeLink*').
TLS handshake failsPC1 and PC2 material from different generations, or a chain that does not validate to the other side's rootCopy the current pc2 files of the bench PKI into pc2\tls again; check the trust anchors (setup step 3).
Second session refused right after the firstThe SECC listener still holds its port, or a process from the earlier session is still runningWait at least 20 s; end leftover chargelink.exe or ChargeLink.Veristand.XilHost processes.
Send-OwnerCommand.ps1: no owner descriptor … within 30 sThe manual-mode owner host is not running, or the run folder is wrongStart Start-SeccSession.ps1 -Mode Manual first and pass the run folder it printed.
Send-OwnerCommand.ps1: … refused: … or … not applied within … sThe command does not fit the owner's current stateRun GetStatus, follow the order above, and end with ShutdownWorkflow.
Session refused at the pre-session safety checkowner_scheduling was changed in the configurationUse the package's templates unchanged; owner_scheduling stays at the owner host's default (on), which is the configuration the bench runs with.

Processor placement: the shipped system definition uses logical processors 10, 11 and 12. If your PC cannot provide them, the placement must be reviewed and the system definition re-saved; the package contains no tool for this.

Limits

  • Simulated power stage. Current and voltage are the plant model's, not measured; CableCheck is simulated; no energy flows. There is no physical charging interface: no PLC/SLAC, control pilot, CAN or power stage.
  • Your safety controller keeps physical authority. The owner host's safety supervision acts on the simulated plant only. On any bench with real hardware, your own safety controller and emergency stop keep physical authority; ChargeLink does not replace them.
  • NI VeriStand 2024 Q4 only. Other VeriStand versions are not supported. Record any difference in the NI file hashes before relying on a result.
  • One charging schedule of 60 s per session with the package's runtime profile and EV cases; schedule renegotiation is answered when an EV requests it.
  • The EVCC is a test peer that runs only the EV cases in pc2\cases; it is not a vehicle implementation.
  • No conformance or certification claim. A passed session is engineering evidence of an ISO 15118-20 DC EIM exchange against a simulated plant, not certification and not proof of interoperability with other equipment. See Capability Boundaries and the package's docs\KNOWN_LIMITATIONS.md.