Using the GetStatus method with RX devices returns erroneous information

Tech Note: TN0826
Product: ActiveX
Version: All
Date Added: 2008-05-09


When using the GetStatus method with RX devices, the method returns erroneous values. RX devices return higher bit information, and this causes issues with the status values described in the ActiveX help documentation.

For example, a GetStatus value 7 corresponds to a device that is connected and has a circuit loaded and running. Using the GetStatus method on a connected RX device that has a circuit loaded, and running will not return the value 7, but will return the value 7 plus high bit information resulting in the erroneous value.


To access relevant status information in MATLAB, use bitget (or the equivalent in other programming languages) to read each bit directly. For example, the following code is compatible with RX devices:

if all(bitget(RP.GetStatus,1:3))
    disp('Circuit loaded and running');
If RP.GetStatus And 7 <> 7 Then
    Msgbox("Error loading circuit")
End If