Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Why does DAC1 value decrement on every 'Write Values' click?


  • Please log in to reply
2 replies to this topic

#1 BobGLN

BobGLN
  • Members
  • 2 posts

Posted 13 April 2015 - 11:21 AM

When setting both DAC0 and DAC1 to 2.5V and clicking Write Values, DAC0 drops to 2.4999 while DAC1 stays at 2.5000. But every Write Values click after that decrments DAC1 by 100uV; DAC0 stays at 2.4999.

Curious...



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 13 April 2015 - 12:29 PM

I assume you are talking about setting the DACs in the Defaults panel of LJControlPanel. The DAC changes you are seeing are due to the back and forth conversions between the binary DAC voltage value stored on U6 and the decimal voltage value (slope/offset conversion on the binary DAC voltage) calculated in the driver/LJControlPanel. DAC0 and DAC1 have separate calibration constants (slope/offsets) so these changes differ between them. When you click "Write Values", the binary voltage is calculated and sent to the U6, then based on the binary value the Defaults panel's DAC values are updated. When you click "Write Value" again, the process is done again on the current value.

 

A quick math example with the calibrated DAC0 slope/offset of 13255.2526 / 63.6608 (note these values will differ on your U6):

 

Write 1 (2.5 V):

binary value = (2.5000 * 13255.2526) + 63.6608 = 33138

updated value in Defaults panel = (33138 - 63.6608) / 13255.2526 = 2.4951 V

 

Write 2 (2.4951):

binary value = (2.4951 * 13255.2526) + 63.6608 = 33136

updated value in Defaults panel = (33136 - 63.6608) / 13255.2526 = 2.4950 V

 

Write 3 (2.4950):

...

 

The above calculations are 4 decimal places for simplicity. The driver/LJControlPanel uses 64-bit doubles for converted voltages, and the stored DAC binary value is 16-bit.



#3 BobGLN

BobGLN
  • Members
  • 2 posts

Posted 14 April 2015 - 04:56 AM

I figured as much, once I thought about it. Just caught me off guard. Thanks for the detailed explanation.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users