New to the ADP3250 and so far very impressed at the capabilities and trying to learn how to program my applications up in linux mode.
I'm trying to read the IO status register "temperature" which I think is channel 1, node 0, see table below. Using linux mode and running a python script. I keep getting "0" for the temperature. I feel like I'm not enabling the device correctly or somehow not understanding how to read the Status? Help?
from ctypes import *
from dwfconstants import *
from subprocess import call
import sys
dwf = cdll.LoadLibrary("libdwf.so")
hdwf = c_int() # device handle
dwf.FDwfDeviceOpen(c_int(0), byref(hdwf)) # open first device
Question
Robert White
Hi,
New to the ADP3250 and so far very impressed at the capabilities and trying to learn how to program my applications up in linux mode.
I'm trying to read the IO status register "temperature" which I think is channel 1, node 0, see table below. Using linux mode and running a python script. I keep getting "0" for the temperature. I feel like I'm not enabling the device correctly or somehow not understanding how to read the Status? Help?
from ctypes import *
from dwfconstants import *
from subprocess import call
import sys
dwf = cdll.LoadLibrary("libdwf.so")
hdwf = c_int() # device handle
dwf.FDwfDeviceOpen(c_int(0), byref(hdwf)) # open first device
T1=c_int()
dwf.FDwfAnalogIOChannelNodeStatus(hdwf, c_int(1), c_int(0), byref(T1))
temp_internal=str(round(T1.value,3))
print(temp_internal)
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now