VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

XIL MAPort Read Channel Error

I'm creating a python script to control a 2020R6 VeriStand project using the ASAM XIL API.  I can get everything working except when it comes to reading the channel values.  The MAPort.Read(channel) returns a "IBaseValue" object, but using the ".Value" attribute on that object gives me this error "IBaseValue object has no attribute 'Value' ".  Any help would be appreciated.  Thanks.Capture.JPG

0 Kudos
Message 1 of 2
(611 Views)

Try using __raw_implementation__ to get correct object.

# Read a value from the probe
raw_probeExp = maPort.Read('Probe1')
probeExp = raw_probeExp.__raw_implementation__
print(str(probeExp.Value))

I assume that XIL API assemblies are not fully compatibile with new pythonnet library. Some more information what changed: https://github.com/pythonnet/pythonnet/blob/master/CHANGELOG.md#changed-3

0 Kudos
Message 2 of 2
(399 Views)