How to use DDS for scaling

Forum for discussing PicoScope (version 5)
Post Reply
Ahlo

How to use DDS for scaling

Post by Ahlo »

Hi I have a question about how to use DDS for scaling

1, Is there any limitation in using it?

2, I tried to copy the part of the DDS file in help, and create a file
named : try00000.dds and make a change of Unite=C to Unite=CCC
to see if it works. I put it in C:\pico

try00000.dds file as follows
-----------------------------
[Scale100]
Resistor=330
LongName=Temperature
ShortName=TempC
Units=CCC
MinValue=-40
MaxValue=120
OutOfRange=0
Places=1
Method=0
Fast=Yes
NoOfPoints=32
Raw1=2.385
Scaled1=-30
Raw32=1.32
Scaled32=100


can you let me know why it dosent work ? If you can give an example to use DDS file?

Thank you

Ahlo

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

To use this .DDS help file you would have to use a 330 Ohm resistor across the ground pin and the auto detect pin. The best source of information on how to do this is the help manual.

The .DDS file is loaded up when it registors the resistor that has been used with the sensor.

Best regards,
Regards,

Mark Spencer

ahlo

use drdaq_get_scalings and drdaq_set_scaling

Post by ahlo »

I try to use drdaq_get_scalings and drdaq_set_scaling.
But the discription of this part in manual is not very clear, I was failed to do it (program blocked).

This is my code
-----------------------------------------
Declare Function drdaq_set_scaling Lib "drdaq32.DLL" (ByVal channel As Integer, ByVal scaling As Integer) As Integer
Declare Function drdaq_get_scalings Lib "drdaq32.DLL" (ids As Integer, ByVal channel As Integer) As Integer

k99 = drdaq_get_scalings(ids, 8 )
-------------------------------------------
Then I get k99 retures 2 and ids returns 908
What 's these data mean?

How I can use drdaq_set_scaling next step?
Which one I need put for ByVal scaling As Integer? For example, I have another
dds file with [SCALE90] in this channel. ( I just use the temperature sensor
with 330kOhms, it is Pico reserved value. I want to re-scale it after calibration)

What is the Declare of drdaq_get_scalings_text to get the scaling name?
What is scaling name?

Best regards

Ahlo

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

You only need to use the set_scaling function and get_scaling function if you have more than one sacling file. To check that your scaling file has been correctly written test it with Picoscope. If it works with this software it should also work with your own VB application.

The scaling file should be place in the same directory as the .dll file that your application is using.

Therefore the only reason that the set and get needs to be called is when more than one scaling file is applicable to the sensor you have made. The IDS parameter in the get_scalings is an array of numbers returned listing the scaling files ids. One of these numbers can then be used in the set_scaling function. It is the second parameter.

Best regards,
Regards,

Mark Spencer

Ahlo

How to scale the internal sensors by using dds scaling file

Post by Ahlo »

Thanks a lot, Mark! it works.

Now, if I want to re-scale the internal sensors by using dds scaling file, how I can do?

Best regards

Ahlo

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

The scaling is done with the RAW values and the SCALING values in the .dds. You assign the voltage that is coming (raw) into a scaled voltage. The minimum number of points is 2. This can also be specified.

Best regards,
Regards,

Mark Spencer

Ahlo

virtual resistor for scaling internal sensor

Post by Ahlo »

How I have to treat the virtual indication resistor to let the drdaq32.dll knows that there is a dds for a desired internal sensor scaling?

I tried to use the virtual resistor value in DDS file as 1000 (light channel 7) , but it does not work.

Best regards

Ahlo

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

The scaling file goes into the same directory as the .dll. The resistor that you have between pin 2 and pin 3 on the sensor which is used to auto detect the sensor. This resistor's value is then included in the .dds file eg for a 1000 ohm resistor the value of 1 is placed in the scaling file. The resistor which is recognised is then used by the .dll to find all the relevant scaling files and these are then loaded up and made available. This is all done without user intervention.

Best regards,
Mark S.
Regards,

Mark Spencer

Post Reply