ADC-24 Serial number

Post your VB and VBA discussions here
Post Reply
islamsaid
Newbie
Posts: 0
Joined: Sat Nov 17, 2018 9:38 pm

ADC-24 Serial number

Post by islamsaid » Sun Nov 18, 2018 9:51 pm

Hi,

I've ADC-24 unit and I'm trying to get its serial number using Visual Basic :
HRDLGetUnitInfo(hrdl_handle,Serial_number,10,4)

I need to store the serial number into a string variable called Serial_number


Best regards

Martyn
Site Admin
Site Admin
Posts: 3376
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: ADC-24 Serial number

Post by Martyn » Mon Nov 19, 2018 7:06 am

Without seeing the code it would be difficult to comment but I would suggest that before you call the function you actually assign a string of ten spaces to the variable Serial_Number.

The Excel VBA example code for the ADC-24 on GitHub may help.
Martyn
Technical Support Manager

islamsaid
Newbie
Posts: 0
Joined: Sat Nov 17, 2018 9:38 pm

Re: ADC-24 Serial number

Post by islamsaid » Mon Nov 19, 2018 5:44 pm

Dear Martyn,
Many thanks , The VBA file was so useful.

PicoUser101
Newbie
Posts: 0
Joined: Wed Dec 12, 2018 11:44 am

Re: ADC-24 Serial number

Post by PicoUser101 » Wed Dec 12, 2018 3:16 pm

I have a problem reading the serial no. of my ADC-24 HRDL.
I am using 32 bit python v.2.7 with the attached code. If I use the latest 32 bit version of the dll (v.1.5.1.102) python crashes when I try to read the serial. Reading any other info. such as "calibration date" or "driver version" works ok.
The error message is this:
Fatal Python error: GC object already tracked
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Using an older version of the dll (v.1.4.3.5) returns the serial no. without problems.

I get the same problem if I try the 64 bit version of the dll with 64 bit python. This means I can only use the 32 bit version, because only that older driver works for me. I'm hoping that if you can solve this problem, I will be able to run the 64 bit version without problems.
Attachments
pico_read_serial.zip
python code
(516 Bytes) Downloaded 2 times
picohrdl v.1.5.1.102 (32 bit).zip
new dll - doesn't work
(139.29 KiB) Not downloaded yet
picohrdl v.1.4.3.5 (32 bit).zip
older dll - works
(98.47 KiB) Downloaded 1 time

Post Reply