Hello Hitesh,
Happy new year and thank you for the reply
typing python on the command line I get:
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
I believe it is the 64 bit python envirnoment...
when I run
import sys
print("%x" % sys.maxsize, sys.maxsize > 2**32)
I get '7fffffffffffffff True' as the response indicating it is a 64 bit python architectecture.
Thank you,
Colin
Hi Hitesh,
Thank you, I can confirm that when I use 32 bit python with the 32 bit driver the program works fine.
However, the software I am using controls other devices that require me to use 64 bit python.
Do you know how I can fix the problem of using a 64 bit python using the 64 bit driver?
Kind regards,
Colin
Hi,
I am using Python 3.6 on WIN10 64 bit. I also had problems with passing the arguments to the get_single dll function.
This is how I got things work without using numpy :
# usage of ctypes
from ctypes import *
# in def __init__ declaration of _temp and _overflow_flags which are used as callback args
self._temp=(c_float *9)()
self._overflow_flags=c_int16()
# usage in get single, function will return a list with the temperature of channel 1 .. 8
# self._temp and self._overflow_flags are passed by reference
def get_single(self):
self._dll.usb_tc08_get_single(self._handle, byref(self._temp), byref(self._overflow_flags), self._units.value)
return [self._temp[1],self._temp[2],self._temp[3],self._temp[4],self._temp[5],self._temp[6],self._temp[7],self._temp[8]]
Are you checking the cold junction compensation value from index 0 in the array as well?
We are in the process of reviewing the content of our Python example repository on GitHub and hope to provide bindings for data logger support. You can also open a Pull request if you wish to contribute code - we can then review this and accept the change if it meets our guidelines.
I'm looking to measure 16 channels (two TC-08's) every 100 milliseconds, but the only code I have found in the following places show how to make a single measurement with no option for measuring all at once; measuring single in a loop is not acceptable in my case:
- this forum thread's user-uploaded code
- the piclog github repository for python code (not updated anymore i think?)
- the piclog github repo for picosdk python wrapper
Does anyone have example code for measuring more than 8 channels at a time?
The code I've tried from this forum thread doesn't loop quick enough for my purposes. I would love to have all measurements within 100 milliseconds of each other but looping a single measurement doesn't cut it sadly.
You are aware that the TC08 only has one high resolution ADC chip and that the inputs are multiplexed. It takes 100msecs to do a single conversion, and therefore 900msecs to perform a conversion for each channel and the Cold Junction.
Hi, Im struggling with an error i get in get_single
File "C:\GitRep\pico_logger\tc08usb.py", line 105, in get_single
return (self._dll.usb_tc08_get_single(self._handle, self._temp.ctypes.data, self._overflow_flags.ctypes.data, self._units.value))
ctypes.ArgumentError: argument 2: : int too long to convert
Can someone help me with that?
running python 3.9 64bit