U3-HV Analog input configuration | LabJack
 

U3-HV Analog input configuration

5 posts / 0 new
Last post
Sahil
sahilbhat94's picture
U3-HV Analog input configuration

Hi, 

I am using U3-HV to measure analog voltages. I am using 11 lines (FIO0 - F107, EIO1, EIO3, EIO6) and to configures these ports as analog input ports, i am using command: ePut(lngHandle1, LJ_ioPUT_ANALOG_ENABLE_PORT, 0, 19199, 16). It works good for all FIO lines and EIO1 but for EIO3 and EIO6 it gives error "Error, Missing channel number". I dont know why this is happening. Can you please help me what am i doing wrong.

Please guide.

Thanks

LabJack Support
LabJack Support's picture
Your call looks okay to me.

Your call looks okay to me. What programming language are you using? C/C++?

One basic troubleshooting step is to make sure you have our most recent software version installed:

https://labjack.com/support/software/installers/ud

 

The error you described does not look like it matches any of our error codes. What error code are you getting from the ePut call?

Also note that you should only need to call ePut once to set the config for all IO; I am not sure I understand what you mean by " for EIO3 and EIO6 it gives error...", could you elaborate?

Sahil
sahilbhat94's picture
I am using C++. I am using

I am using C++. I am using Labjack.cpp and LabjackUD.h files

I use this command to configure the FIO and EIO lines(in Labjack.cpp) as the analog inputs:

lngErrorcode = ePut(lngHandle1, LJ_ioPUT_ANALOG_ENABLE_PORT, 0, 19199, 16)

My results:

"V1 = 4.755
"V2  = 1.802
"V3 = 1.849
"V4 = 2.457
"V5 = 1.137
"V6 = 5.501
"V7 = 5.497
"V8 = 4.984

These are comnnected to FIO0- FIO8. They work fine.


"V9  = 2.165

V9 is connected to EIO1 in DB15 connector and that woks fine too. 

But for EIO3 and EIO6, I get error:

Error, Missing channel number
"V10= 0.000
Error, Missing channel number
"V11  = 0.000

 

I checked using DMM there is voltage at both the ports, but I dont know why Labjack U3 module is not detecting the voltages at those 2 points.

Please guide. 

Thanks

LabJack Support
LabJack Support's picture
Your error must be something

Your error is related to how you are getting your readings then. What calls are you using to read the AIN? Also note that you should not be able to or try to read voltages above 2.44V normally or 3.6V if you use the special voltage range setting. See this page:

https://labjack.com/support/datasheets/u3/hardware-description/ain/chann...

To read EIO3 you would use either eGet or AddRequest, GoOne, GetResult. For example, the eGet call would look something like:
lngErrorcode = eGet(lngHandle, LJ_ioGET_AIN, 11, &value, 0)

I suggest adding a pin configuration reset call before the analog pin configuration. This would ensure you are working in a well defined initial configuration state without any timers/counters enabled, etc.
lngErrorcode = ePut(lngHandle, LJ_ioPIN_CONFIGURATION_RESET, 0, 0, 0);

Sahil
sahilbhat94's picture
Hi There, 

Hi There, 

I realised it was an internal problem. I fixed it. Its working now. 

 

Thanks for your help and prompt replies.