- ticker: --spin mode polls FPRD until payload changes (phase-locks processing to TwinCAT frame arrival instead of free-running ticker), timeout at 1.5 periods keeps loop alive on master stop - verified: 238k cycles, 0 errors, exec=245us (FPWR-bound), TwinCAT PLC task confirmed at 2000.8 Hz (all three tasks 0.5ms; base tick was already 50us - no base-time change needed) - docs: 500us latency plan; scripts: task-rate ADS probe, 2kHz deploy, UI automation experiments (pywinauto) for task cycle inspection
23 lines
1.0 KiB
PowerShell
23 lines
1.0 KiB
PowerShell
#Requires -RunAsAdministrator
|
|
$ErrorActionPreference = 'Continue'
|
|
$dte = New-Object -ComObject TcXaeShell.DTE.17.0
|
|
$dte.MainWindow.Visible = $true
|
|
try { $dte.SuppressUI = $false } catch {}
|
|
$dte.Solution.Open('C:\Users\tonycao\work\twincat3-auto-cli\TwinCAT_EL6695_Primary\TwinCATProject1.sln')
|
|
Start-Sleep 25
|
|
$sm = $null
|
|
for ($i = 0; $i -lt 20; $i++) {
|
|
try { $sm = $dte.Solution.Projects.Item(1).Object; if ($sm) { break } } catch {}
|
|
Start-Sleep 3
|
|
}
|
|
if (-not $sm) { Write-Host 'no sysmgr'; exit 1 }
|
|
$rt = $sm.LookupTreeItem('TIRT')
|
|
$xml = $rt.ProduceXml($false)
|
|
[System.IO.File]::WriteAllText('C:\Users\tonycao\work\ethercat-linux\tmp_tirt.xml', $xml, [System.Text.Encoding]::UTF8)
|
|
Write-Host "TIRT xml saved ($($xml.Length) bytes)"
|
|
try { $sm.SetTargetNetId('169.254.176.217.1.1') } catch {}
|
|
Start-Sleep 2
|
|
$xml2 = $rt.ProduceXml($true)
|
|
[System.IO.File]::WriteAllText('C:\Users\tonycao\work\ethercat-linux\tmp_tirt_online.xml', $xml2, [System.Text.Encoding]::UTF8)
|
|
Write-Host "TIRT online xml saved ($($xml2.Length) bytes)"
|