- 8B PDO config: ULINT-sized payload, no 0x1A01 diag PDO on SM3 (device rejected SM3=8 with diag assigned: 'size not allowed, min/max 0xa') - twin_layout_blob_sized(): single 64-bit mapping entry for 8B payloads - Ticker: per-byte XOR 0x5A transform in 8B mode so TwinCAT can verify every byte individually (1KB path unchanged, const-guarded) - TwinCAT automation scripts: deploy with RPC retry, LinkVariables-based whole-array relink (element links only carry 1 byte), ADS watch, diag - Docs: 8B design, verification methodology, test report
30 lines
1.4 KiB
PowerShell
30 lines
1.4 KiB
PowerShell
$tsproj = 'C:\Users\tonycao\work\twincat3-auto-cli\TwinCAT_EL6695_Secondary\TwinCAT_EL6695_Secondary.tsproj'
|
|
|
|
try {
|
|
[xml]$doc = Get-Content -LiteralPath $tsproj -Encoding UTF8
|
|
Write-Host 'XML parse OK' -ForegroundColor Green
|
|
|
|
$pdo1608 = $doc.SelectNodes('//Pdo[@Index="#x1608"]')
|
|
$pdo1A08 = $doc.SelectNodes('//Pdo[@Index="#x1a08"]')
|
|
|
|
Write-Host "0x1608 nodes: $($pdo1608.Count)"
|
|
foreach ($pdo in $pdo1608) { Write-Host " entries: $($pdo.Entry.Count)" }
|
|
Write-Host "0x1A08 nodes: $($pdo1A08.Count)"
|
|
foreach ($pdo in $pdo1A08) { Write-Host " entries: $($pdo.Entry.Count)" }
|
|
|
|
# Check device AmsNetId
|
|
$devs = $doc.SelectNodes('//Device[@AmsNetId]')
|
|
Write-Host "Devices with AmsNetId: $($devs.Count)"
|
|
foreach ($d in $devs) { Write-Host " $($d.Name) AmsNetId=$($d.AmsNetId)" }
|
|
|
|
} catch {
|
|
Write-Host "XML parse FAILED: $_" -ForegroundColor Red
|
|
}
|
|
|
|
# Check for lock files / backups
|
|
$dir = Split-Path $tsproj -Parent
|
|
Write-Host "`nLock/backup files in project dir:" -ForegroundColor Cyan
|
|
Get-ChildItem -Path $dir -Filter '*.tsproj.*' -ErrorAction SilentlyContinue | Select-Object Name, LastWriteTime, Length
|
|
Get-ChildItem -Path $dir -Filter '*.sln.*' -ErrorAction SilentlyContinue | Select-Object Name, LastWriteTime, Length
|
|
Get-ChildItem -Path $dir -Filter '*.user' -ErrorAction SilentlyContinue | Select-Object Name, LastWriteTime, Length
|