How can one get the reading of the resistance to 2 decimals.
I get rounding off. A value of 2.538 in Picolog give 2.00 in the excel example that comes with SDK.
Is it driver related or the way it is declared? When I covert the VBA to Xojo I also get 2.00.
In one of the forum post one explains the resistance problem but I assumed it is fixed as Picolog gives the right value.
DrDAQ resistance to 2decimals in excel example
-
- Newbie
- Posts: 0
- Joined: Sun Nov 15, 2015 1:49 pm
-
- Advanced User
- Posts: 0
- Joined: Sat May 11, 2013 10:03 am
- Location: San Marzano Oliveto, Asti, Italy
Re: DrDAQ resistance to 2decimals in excel example
Dear Chrissalon. please go herechrissalon wrote:How can one get the reading of the resistance to 2 decimals.
I get rounding off. A value of 2.538 in Picolog give 2.00 in the excel example that comes with SDK.
Is it driver related or the way it is declared? When I covert the VBA to Xojo I also get 2.00.
In one of the forum post one explains the resistance problem but I assumed it is fixed as Picolog gives the right value.
topic15421.html
and to related posts before and after and you will find several ways to read resistance with two or more decimals.
glovisol
-
- Newbie
- Posts: 0
- Joined: Sun Nov 15, 2015 1:49 pm
Re: DrDAQ resistance to 2decimals in excel example
Thanks for your response Glovisol.
I looked at the posts but they don't answer my query. Maybe I did not phrase it right.
I want to read the resistance using VBA in excel.
Call UsbDrDaqGetSingle(handle, 6, value, overflow)
This returns in 1K readings not 1.250K or 1250 ohms.
I am using the current driver from the PicoSKD.
Am I using the right Call function?
I looked at the posts but they don't answer my query. Maybe I did not phrase it right.
I want to read the resistance using VBA in excel.
Call UsbDrDaqGetSingle(handle, 6, value, overflow)
This returns in 1K readings not 1.250K or 1250 ohms.
I am using the current driver from the PicoSKD.
Am I using the right Call function?
-
- Advanced User
- Posts: 2856
- Joined: Tue May 31, 2011 3:43 pm
- Location: St. Neots, Cambridgeshire
Re: DrDAQ resistance to 2decimals in excel example
Hi chrissalon,
Please use the UsbDrDAQGetSingleF function as defined in the usbDrDaqApi.h header file in the SDK:
You will need to add this function definition to your VBA code. The parameters are the same as the UsbDrDaqGetValues function but the values are returned as floating point numbers.
Edit: The dll should be available through SDK version 10.6.10 or later.
Regards,
Please use the UsbDrDAQGetSingleF function as defined in the usbDrDaqApi.h header file in the SDK:
Code: Select all
PREF0 PREF1 PICO_STATUS PREF2 PREF3 (UsbDrDaqGetValuesF)
(
int16_t handle,
float *values,
uint32_t *noOfValues,
uint16_t *overflow,
uint32_t *triggerIndex
);
Edit: The dll should be available through SDK version 10.6.10 or later.
Regards,
Hitesh
Software Dev. Engineer
Software Dev. Engineer
-
- Newbie
- Posts: 0
- Joined: Sun Nov 15, 2015 1:49 pm
Re: DrDAQ resistance to 2decimals in excel example
Thanks for your support Hitesh,
Function works well in VBA and in fact works well using Xojo Programming.
(see my previous post (DrDaq Access using VB).
Much appreciate your feedback.
Regards,
Function works well in VBA and in fact works well using Xojo Programming.
(see my previous post (DrDaq Access using VB).
Much appreciate your feedback.
Regards,