Phase 3 PR 56 -- Siemens S7-1500 pymodbus profile + smoke #55

Merged
dohertj2 merged 1 commits from phase-3-pr56-s7-sim-profile into v2 2026-04-18 23:10:09 -04:00
Owner

Summary

  • tests/.../Pymodbus/s7_1500.json: S7-1500 + MB_SERVER default deployment — DB1.DBW0 = 0xABCD fingerprint, scratch HR 200..209, Float32 1.5f at HR[100..101] in ABCD word order (opposite of DL260), Int32 0x12345678 at HR[300..301] ABCD, coil/DI markers.
  • tests/.../S7/S7_1500Profile.cs + S7_1500SmokeTests.cs — single smoke fact write-then-read HR[200], gated on MODBUS_SIM_PROFILE=s7_1500.
  • serve.ps1 ValidateSet extended to include s7_1500 + mitsubishi.
  • csproj copies S7/** as PreserveNewest.

Validation

  • 1/1 S7 integration test pass against live pymodbus s7_1500 profile
  • 143/143 Modbus.Tests unit suite green

Test plan

  • Profile boots cleanly under pymodbus
  • Write + read round-trip
  • No regression in DL205 tests
## Summary - `tests/.../Pymodbus/s7_1500.json`: S7-1500 + MB_SERVER default deployment — DB1.DBW0 = 0xABCD fingerprint, scratch HR 200..209, Float32 1.5f at HR[100..101] in **ABCD word order** (opposite of DL260), Int32 0x12345678 at HR[300..301] ABCD, coil/DI markers. - `tests/.../S7/S7_1500Profile.cs` + `S7_1500SmokeTests.cs` — single smoke fact write-then-read HR[200], gated on `MODBUS_SIM_PROFILE=s7_1500`. - `serve.ps1` ValidateSet extended to include `s7_1500` + `mitsubishi`. - csproj copies `S7/**` as PreserveNewest. ## Validation - 1/1 S7 integration test pass against live pymodbus s7_1500 profile - 143/143 Modbus.Tests unit suite green ## Test plan - [x] Profile boots cleanly under pymodbus - [x] Write + read round-trip - [x] No regression in DL205 tests
dohertj2 added 1 commit 2026-04-18 23:10:05 -04:00
Phase 3 PR 56 -- Siemens S7-1500 pymodbus profile + smoke integration test. Adds tests/ZB.MOM.WW.OtOpcUa.Driver.Modbus.IntegrationTests/Pymodbus/s7_1500.json modelling the SIMATIC S7-1500 + MB_SERVER default deployment documented in docs/v2/s7.md: DB1.DBW0 = 0xABCD fingerprint marker (operators reserve this so clients can verify they're talking to the right DB), scratch HR range 200..209 for write-roundtrip tests mirroring dl205.json + standard.json, Float32 1.5f at HR[100..101] in ABCD word order (high word first -- OPPOSITE of DL260 CDAB), Int32 0x12345678 at HR[300..301] in ABCD. Also seeds a coil at bit-addr 400 (= cell 25 bit 0) and a discrete input at bit-addr 500 (= cell 31 bit 0) so future S7-specific tests for FC01/FC02 have stable markers. shared blocks=true to match the proven dl205.json pattern (pymodbus's bits/uint16 cells coexist cleanly when addresses don't collide). Write list references cells (0, 25, 100-101, 200-209, 300-301), not bit addresses -- pymodbus's write-range entries are cell-indexed, not bit-indexed. Adds tests/ZB.MOM.WW.OtOpcUa.Driver.Modbus.IntegrationTests/S7/ directory with S7_1500Profile.cs (mirrors DL205Profile pattern: SmokeHoldingRegister=200, SmokeHoldingValue=4321, BuildOptions tags + probe-disabled + 2s timeout) and S7_1500SmokeTests.cs (single fact S7_1500_roundtrip_write_then_read_of_holding_register that writes SmokeHoldingValue then reads it back, asserting both write status 0 and read status 0 + value equality). Gates on MODBUS_SIM_PROFILE=s7_1500 so the test skips cleanly against other profiles. csproj updated to copy S7/** to test output as PreserveNewest (pattern matching DL205/**). Pymodbus/serve.ps1 ValidateSet extended from {standard,dl205} to {standard,dl205,s7_1500,mitsubishi} -- mitsubishi.json lands in PR 58 but the validator slot is claimed now so the serve.ps1 diff is one line in this PR and zero lines in future PRs. Verified end-to-end: smoke test 1/1 passes against the running pymodbus s7_1500 profile (localhost:5020 FC06 write of 4321 at HR[200] + FC03 read back). 143/143 Modbus.Tests pass, no regression in driver code because this PR is purely test-asset. Per-quirk S7 integration tests (ABCD word order default, FC23 IllegalFunction, MB_SERVER STATUS 0x8383 behaviour, port-per-connection semantics) land in PR 57+. 10c724b5b6
dohertj2 merged commit e33783e042 into v2 2026-04-18 23:10:09 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#55