I want the user to enter some volt meter values to keep in the logs. I am using IdInputA00. It works for the first entry but the 2nd entry - it accepts the value - but then says “Fail”. Since there is no test I don’t see why it says fail. Can I only use this feature once per test?
In an ideal world I could say ask for a voltage and it issues a pass or fail based on if that value is in an approved window. Is there a way to do this without having the volt meter option?
Hi @HawkerAMpT, as you have discovered, there’s no way to enter a string and have it further qualified. The IdInputA00 is mostly useful for barcode scanning. However, there is a shell command that would let you ask the user to enter a serial number and a voltage, and then the shell command could write that.
For example, the windows bat file below (not tried) shoudl ask the operator to enter a serial number and voltage. Note the InputA00 allows you to specify a parameter, so you could issue that initially with a parameter called UpperRail and then issue it again with the parameter LowerRail and collect the data that way. And of course, there’s the source for Tractor if you’d like to add in your own command to prompt the user for an entry and check it against limits.
@echo off
setlocal
:: Ask for serial number
set /p SERIAL=Enter serial number:
:: Ask for voltage
set /p VOLTAGE=Enter voltage:
:: Create filename based on serial
set FILENAME=%SERIAL%.txt
:: Write voltage to file
echo %VOLTAGE% > "%FILENAME%"
echo.
echo Voltage %VOLTAGE% written to file %FILENAME%
pause
Thanx Matt.
Can you confirm that I cannot use Tractor to enter/record more than 1 value?
the 2nd time I use IdInputA00, it takes the value, then gives a fail and crashes. I had hoped to at least record measured values. Modifying the code or a 2nd script outside of Tractor is more than I want to subject our team to at this time but we could at least record the measured values for our records.
Hi @HawkerAMpT, right now it can’t because the IdInput test is for entering the ID of the device, and so when you enter a second ID, it fails due to a namespace collision in the dictionary–iow, the ID has already been entered.