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
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.
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?
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.
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.
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.