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

configIO argument settings


  • Please log in to reply
1 reply to this topic

#1 brodsky

brodsky
  • Members
  • 17 posts

Posted 31 December 2013 - 01:23 PM

The example code delivered with the exodriver includes verbage about the configIO parameter to the "easy" functions (eAIN, eDAC).

According to the comment, configIO should be set to 1 (true) initially, then false from there on.

But in the actual sample code (u3EFunctions.c), configIO is set to zero initially (in the call to eDAC), then to 1 in the subsequent call to eAIN.

 

There's equivalent confusion for the DAC1Enable argument.  (It's an output from eAIN).

 

I'll be calling both the eAIN and eDAC functions repeatedly - can someone summarize how I should set these arguments?

 

Thank you.

 

 



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 31 December 2013 - 03:10 PM

Take a look at the eAIN and eDAC documentation in the u3.h file as the ConfigIO and DAC1Enable parameters are documented there. For eDAC, ConfigIO only enables DAC1 and is not applicable to DAC0 since it is always enabled. Since the example is using DAC0, the parameter is ignored and we passed 0 to indicate nothing is being configured.

 

As for ConfigIO for eAIN, when set to 1 it sets ChannelP to an analog input and returns the current DAC1Enable setting. It's recommended to set this to 1 initially to configure the line and get DAC1Enable, and then set it to 0 afterwards so the configuration calls are not performed which do 1 to 2 command/responses or 2 to 4 USB communications. Passing the correct DAC1Enable setting is necessary so the correct calibration is applied.

 

Note that the DAC1Enable related settings are only necessary for U3 hardware versions less than 1.30. For hardware 1.30 both DAC0 and DAC1 are always enabled. eAIN ignores DAC1Enable and eDAC ignores ConfigIO as it only enabled DAC1.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users