Test and Measurement Forum

Digital Input can't be read.

Post any questions you may have about our current range of USB data loggers

Digital Input can't be read.

Postby Munetugu Watanabe » Mon May 29, 2017 5:18 am

I'm Data Logger ADC-24 user.
It's being programed in VB.Net 2008, but Digital Input (1 to 4) is always in Hi (1).
It is.
Even hrdlcon.exe (hrdlcon.c) in 32Bit SDK (PicoSDK_32_10.6.10.22.exe) is the same result.
It can be read in accessory soft plw32.exe, so it isn't a breakdown of hardware.
What is bad?

VB.Net 2008
SDK PicoSDK_32_10.6.10.22.exe
PicoHRDL.dll 1.4.4.3

hrdlcon.exe Outputs
Opening devices.........
1: CU980/29
20: 0
Device opened successfully
1.4.0.205
USB 1.1
1
24
CU980/xx
22Jan16
PICOPP.SYS V1.13

Channel 1, 156mV range, single ended
Select an operation:
B - immediate block
W - windowed block
S - streaming
U - single readings
A - set analog channels
D - set digital channels
X - exit
Operation:

Set digital 1, direction input? (Y/N)
Set digital 2, direction input? (Y/N)
Set digital out 2, high? (Y/N)
Set digital 3, direction input? (Y/N)
Set digital out 3, high? (Y/N)
Set digital 4, direction input? (Y/N)
Set digital out 4, high? (Y/N)
Digital channels set.


Collect block immediate...
Press a key to start
Waiting for device to complete collection......
First 5 readings
Time 1234 Ch1
(ms) DO (mV)
0 1111 0.737682
61 1111 0.738800
Munetugu Watanabe
Newbie
 
Posts: 0
Joined: Mon May 29, 2017 5:14 am

Re: Digital Input can't be read.

Postby Hitesh » Tue May 30, 2017 5:02 pm

Hi Munetugu,

Have you tried the C console application from our GitHub repository?

We do have a VB .NET example available but it doesn't include a digital input collection (I will look into this and post an update).

Regards,
Hitesh

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

Re: Digital Input can't be read.

Postby Munetugu Watanabe » Wed May 31, 2017 9:31 am

Hello Hitesh!
Thank you for your reply!

I tried a 32Bit SDK(PicoSDK/PicoHRDL/C console/hrdlcon.c) for Windows.
I'm waiting VB .NET example you'd make to be finished pleasantly.
Munetugu Watanabe
Newbie
 
Posts: 0
Joined: Mon May 29, 2017 5:14 am

Re: Digital Input can't be read.

Postby Hitesh » Thu Jun 01, 2017 10:49 am

Hi Munetugu,

Could you try the C example from our GitHub repository in the meantime please?

Thanks,
Hitesh

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

Re: Digital Input can't be read.

Postby Munetugu Watanabe » Fri Jun 02, 2017 9:44 am

Hi Hitesh,
I tried the C example(picosdk-c-examples/picohrdl/picohrdlCExamples.sln), but it wasn't a result as expected.

=================================================
HRDL driver example program for ADC-20/24 data loggers
Version 1.2
Copyright 2004 - 2017 Pico Technology Ltd.
Open devices Asynchronously (Y/N)? Y
Opening devices.
...
1: CU980/29
20: 0
Device opened successfully.
Device Information
==================
Driver Version : 1.4.3.5
USB Version : USB 1.1
Hardware Version : 1
Variant Info : ADC-24
Batch and Serial : CU980/xx
Calibration Date : 22Jan16
Kernel Driver Ver.: PICOPP.SYS V1.13
Convert ADC counts to mV? (Y/N): Y
Reject 50Hz mains noise? (Y/N): Y
1 - Channel 1
2 - Channel 2
16 - Channel 16
Select a channel..
1
Enable the channel? (Y\N) Y

0 - 2500mV
6 - 39mV
Select Range... 0
Single ended? (Y\N) Y
Channel 1, 2500mV range, single ended

Set digital 1, direction input? (Y/N) Y
Set digital 2, direction input? (Y/N) Y
Set digital 3, direction input? (Y/N) N
Set digital out 3, high? (Y/N) N
Set digital 4, direction input? (Y/N) N
Set digital out 4, high? (Y/N) N
Digital channels set.

Operation: B (Immediate block)

Collect block immediate...
Press a key to start
Waiting for device to complete collection............

First 5 readings
Time 1234 Ch1
(ms) DO (mV)
0 1111 2023.316284
61 1111 2023.318970
========================================================

I expected that indication becomes 10xx.
When I try in PLWRecorder, 10xx as expected is indicated.

Thanks,
Munetugu Watanabe
Newbie
 
Posts: 0
Joined: Mon May 29, 2017 5:14 am

Re: Digital Input can't be read.

Postby Hitesh » Tue Jun 06, 2017 12:58 pm

Hi Munetugu,

Sorry for the delay in getting back to you.

After further investigation it appears that the digital values coming back as '1111' is a bug so I have reported this. The workaround is to call the HRDLGetSingleValue() function for now.

There is an updated version of the C console example available via GitHub.

Regards,
Hitesh

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

Re: Digital Input can't be read.

Postby Munetugu Watanabe » Wed Jun 07, 2017 7:21 am

Hi Hitesh,
I'm thankful for your advice.
I didn't think of to read Digital Input using HRDLGetSingleValue().
Fortunately, it can be achieved to want to program me.

Thanks,
Munetugu Watanabe
Newbie
 
Posts: 0
Joined: Mon May 29, 2017 5:14 am

Re: Digital Input can't be read.

Postby Hitesh » Mon Jun 12, 2017 3:16 pm

Hi Munetugu,

Good to hear that you can use that as a workaround.

The VB .NET example has been updated to show collection from 1 digital channel input and 1 analogue channel and pushed to our GitHub repository so once the fix to the driver has been made, you should be able to use this.

Regards,
Hitesh

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


Return to USB PC Data Loggers

Who is online

Users browsing this forum: No registered users and 0 guests