INITIALIZE_DISABLE.ps1 533 B

1234567891011121314
  1. param(
  2. [string]$Port = "COM5",
  3. [int]$Baud = 921600
  4. )
  5. Set-StrictMode -Version Latest
  6. $ErrorActionPreference = "Stop"
  7. $root = Split-Path -Parent $MyInvocation.MyCommand.Path
  8. Write-Warning "DANGER: DISABLE DOES NOT STOP an active JOG in this temporary image. Only RESET, POWER-OFF, or CPLD RECONFIGURATION can STOP the motor."
  9. & powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $root "SEND_HEX.ps1") `
  10. -Port $Port `
  11. -Baud $Baud `
  12. -Hex "A55A02040500000000000000000426000000C4AE"
  13. exit $LASTEXITCODE