17 lines
795 B
PowerShell
17 lines
795 B
PowerShell
|
|
$helper = 'C:\Program Files (x86)\Beckhoff\TwinCAT\3.1\Components\Base\TcSysManCmdHelper.exe'
|
||
|
|
$tsproj = 'C:\Users\tonycao\work\twincat3-auto-cli\TwinCAT_EL6695_Secondary\TwinCAT_EL6695_Secondary.tsproj'
|
||
|
|
$out = 'C:\Users\tonycao\work\twincat3-auto-cli\TwinCAT_EL6695_Secondary\Logs\el6695_export.xml'
|
||
|
|
|
||
|
|
New-Item -ItemType Directory -Path 'C:\Users\tonycao\work\twincat3-auto-cli\TwinCAT_EL6695_Secondary\Logs' -Force | Out-Null
|
||
|
|
|
||
|
|
$path = 'TIID^设备 1 (EtherCAT)^模块 1 (EK1100)^模块 8 (EL6695)'
|
||
|
|
Write-Host "Exporting EL6695 to $out ..."
|
||
|
|
& $helper -v 4026.0 -o $tsproj -w $path $out 2>&1
|
||
|
|
Write-Host "Exit code: $LASTEXITCODE"
|
||
|
|
if (Test-Path $out) {
|
||
|
|
Write-Host "Export OK: $out ($((Get-Item $out).Length) bytes)"
|
||
|
|
Get-Content $out -TotalCount 50
|
||
|
|
} else {
|
||
|
|
Write-Host "Export failed"
|
||
|
|
}
|