ethercat-linux/scripts/tc-json-cmd.ps1

9 lines
508 B
PowerShell
Raw Normal View History

Set-Location -LiteralPath 'C:\Users\tonycao\work\twincat3-auto-cli\TwinCAT_EL6695_Secondary'
$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'
$cmd = '{"commands":[{"method":"ActivateConfiguration"},{"method":"StartRestartTwinCAT"}]}'
Write-Host "Executing command: $cmd"
& $helper -v 4026.0 -o $tsproj -c $cmd 2>&1
Write-Host "Exit code: $LASTEXITCODE"