@echo off
set MY_PATH=%~dp0
if "%MY_PATH%"=="" set MY_PATH=.\
for /f "delims== usebackq tokens=1,2" %%G in ("%MY_PATH%tool-path.txt") do set %%G=%%H
set TOOL_PATH=%MY_PATH%%COIA_PATH%
echo COIA batch: Write PDO Data digital out node 5, enforce SDO. no PDO
if -%1-==-- echo Use COWr SerialPort
if -%1-==-- goto:eof
echo Use: COIA write node 5 enforce SDO, digital out
"%TOOL_PATH%\COIA.exe" -p %1 --node-write 5,0x6200,1,1,0x11 --node-write 5,0x6200,2,1,0x22 --node-write 5,0x6200,3,1,0x33 --node-write 5,0x6200,4,1,0x44
"%TOOL_PATH%\COIA.exe" -p %1 -w 0x5F01,4,4,0x0000003F
"%TOOL_PATH%\COIA.exe" -p %1 --node-write 5,0x6200,1,1,0x55 --node-write 5,0x6200,2,1,0x66 --node-write 5,0x6200,3,1,0x77 --node-write 5,0x6200,4,1,0x88
"%TOOL_PATH%\COIA.exe" -p %1 -w 0x5F01,4,4,0x0000001F
"%TOOL_PATH%\COIA.exe" -p %1 --node-write 5,0x6200,1,1,0xCC --node-write 5,0x6200,2,1,0xDD --node-write 5,0x6200,3,1,0xEE --node-write 5,0x6200,4,1,0xFF
echo COIA batch COWr: end
