Test and Measurement Forum

USB TC-08 in python

Post general discussions on using our drivers to write your own software here

Re: USB TC-08 in python

Postby colinb » Wed Jan 03, 2018 12:11 pm

Hello Hitesh,
Happy new year and thank you for the reply :D
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
colinb
Newbie
 
Posts: 0
Joined: Thu Dec 14, 2017 7:51 am

Re: USB TC-08 in python

Postby Hitesh » Wed Jan 03, 2018 1:36 pm

Hi Colin,

Happy New Year to you too :)

Please try the 32-bit dll with a 32-bit Python environment.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2551
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: USB TC-08 in python

Postby colinb » Tue Jan 16, 2018 8:34 am

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
colinb
Newbie
 
Posts: 0
Joined: Thu Dec 14, 2017 7:51 am

Re: USB TC-08 in python

Postby Hitesh » Mon Jan 22, 2018 11:44 am

Hi Colin,

Referring to this documentation page, you may wish to try the following when passing the array to the function call:

Code: Select all
temp.ctypes.data_as(ctypes.POINTER(ctypes.c_float))

rather than
Code: Select all
temp.ctypes.data


The error is possibly due to how ctypes is trying to interpret a 64-bit pointer.

I hope this helps.

Please note that Pico Technology is not responsible for the content of external sites.
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2551
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Previous

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests