Jump to content
  • 0

MCC-128 DAQHAT-NOSCALEDATA conversion


fpandpf

Question

Hi, i am using mcc-128 hat, I would like to record the data in 16 bit integer with OptionFlags.NOSCALEDATA enabled just to redece size of the file, 16bit integer instead of 64bit float after conversion to volts.

 

for example: if the input range is selected to be -/+ 5v

voltage_resolution = =10V / 65536= 0.00015258789 

V=(adc_value - 32768) * voltage_resolution

 

Just want to make sure that's how you convert it to volt as well if OptionFlags.NOSCALEDATA is not enabled?

Thanks for your time.

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

to add on this, i just found out when OptionFlags.NOSCALEDATA is enabled, the returned reading are actually not integer (see below), actually has one decimal

 

51323
51329.1
51290.3
51285.2
51307.7
51305.6
51293.4
51292.4
51332.1
51335.2
51338.2
 

Link to comment
Share on other sites

  • 0

Use OptionFlags.NOCALIBRATEDATA | OptionFlags.NOSCALEDATA to get numbers like:

51305.0
51293.0
51292.0
51332.0
51335.0
51338.0

Your formula for converting back to volts looks correct.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...