How to use DDS for scaling

 
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoScope
Author Message
Ahlo
Guest





PostPosted: Sat Aug 02, 2003 8:14 pm    Post subject: How to use DDS for scaling Reply with quote

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
Back to top
markspencer
Site Admin
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Mon Aug 04, 2003 8:55 am    Post subject: Reply with quote

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,
Back to top
ahlo
Guest





PostPosted: Thu Aug 28, 2003 12:16 am    Post subject: use drdaq_get_scalings and drdaq_set_scaling Reply with quote

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
Back to top
markspencer
Site Admin
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Thu Aug 28, 2003 8:19 am    Post subject: Reply with quote

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,
Back to top
Ahlo
Guest





PostPosted: Sat Aug 30, 2003 7:24 am    Post subject: How to scale the internal sensors by using dds scaling file Reply with quote

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
Back to top
markspencer
Site Admin
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Mon Sep 01, 2003 7:39 am    Post subject: Reply with quote

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,
Back to top
Ahlo
Guest





PostPosted: Wed Sep 03, 2003 6:57 am    Post subject: virtual resistor for scaling internal sensor Reply with quote

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
Back to top
markspencer
Site Admin
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Wed Sep 03, 2003 8:31 am    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoScope
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group