The below script can run in controllers having the STO circuitry and running firmware 2.1 or later. To run the test, the controller should be connected to power supply through Vmot and the motors must be disconnected. The script will give information about the failed MOSFETs.
The script follows:
'Disclaimer:
'----------
'The script is tested and validated by Roboteq and is believed to be fault-free.
'The possibility always exists, however, that the particular configuration and/or use
'condition uncovers a fault that escaped our validation test coverage. Always
'extensively test the script under your use conditions prior to deploying it in the field.
option explicit
dim zsrm as integer
dim STT[2] as integer
dim i as integer
dim mask as integer
mask = 1
print("\n \nMOSFET test starting...\n \n")
zsrm = getconfig(_ZSRM,1)
if (zsrm < 58000)
print("\n \nController is miscalibrated! The test will not continue!\n \n")
elseif (getvalue(_V,1)<50)
print("\n \nPower stage disabled! The test will not continue!\n \n")
else
gosub checkFets
end if
terminate
checkFets:
setcommand(_STT,1)
wait(2000)
STT[0] = getvalue(_STT,1)
STT[1] = getvalue(_STT,2)
if (STT[0] <> 5)
print("\n \nMOSFETs ok!\n \n")
else
print("\n \nDamaged MOSFETs!")
print("\n----------------")
if (STT[1] and mask)
print("\nU1 top fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nU1 bottom fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nV1 top fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nV1 bottom fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nW1 top fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nW1 bottom fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nU2 top fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nU2 bottom fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nV2 top fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nV2 bottom fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nW2 top fault\n")
end if
mask = mask << 1
if (STT[1] and mask)
print("\nW2 bottom fault\n")
end if
end if
return