Git Product home page Git Product logo

Comments (8)

davelopez01 avatar davelopez01 commented on June 11, 2024

Which LabJack device are you using? UE9, U3 or U6?

from exodriver.

scr4tchy avatar scr4tchy commented on June 11, 2024

Hello,

Sorry. I didn't remember to tell you that.
I'm using U3 & U3 HV

from exodriver.

davelopez01 avatar davelopez01 commented on June 11, 2024

In the eDI source code, u3.c, starting at line 998 in the eDI function change this chunk of code:

/* Setting up Feedback command to set digital Channel to input and to read from it */
sendDataBuff[0] = 13;  //IOType is BitDirWrite
sendDataBuff[1] = Channel;  //IONumber(bits 0-4) + Direction (bit 7)

sendDataBuff[2] = 10;  //IOType is BitStateRead
sendDataBuff[3] = Channel;  //IONumber

if( ehFeedback(Handle, sendDataBuff, 4, &Errorcode, &ErrorFrame, recDataBuff, 1) < 0 )
    return -1;

to this:

/* Setting up Feedback command to only read from the digital Channel */
sendDataBuff[0] = 10;  //IOType is BitStateRead
sendDataBuff[1] = Channel;  //IONumber

if( ehFeedback(Handle, sendDataBuff, 2, &Errorcode, &ErrorFrame, recDataBuff, 1) < 0 )
    return -1;

This should be the only changes needed, and it will let you read the digital line's state without forcing it to an input. Let me know if this does not work or if you need further help.

from exodriver.

scr4tchy avatar scr4tchy commented on June 11, 2024

Thanks. I was looking to edit these lines but I can't figure out to what ^^
I'll try ASAP.

from exodriver.

scr4tchy avatar scr4tchy commented on June 11, 2024

Thanks again. Sorry, didn't remember to send a feedback. It's working like a charm.

I made a new function called "eDI_Passive" for this. You can maybe implement it ? ;-)
I've to do the same thing for the eAIN function. I looked a bit but it seems to be more complicated..

Best regards.

from exodriver.

davelopez01 avatar davelopez01 commented on June 11, 2024

I am not sure I understand what change in functionality you want with eAIN. In eAIN, you set ConfigIO to a value > 1 (true) if you want the function to force ChannelP and ChannelN to analog inputs, and ConfigIO to 0 if you want the function to only read the AIN channel regardless of current analog input settings. I assume your passive reading would just need to set ConfigIO to 0 unless I am missing something.

from exodriver.

scr4tchy avatar scr4tchy commented on June 11, 2024

Hello,

Thanks for your interest.
I want to act as a voltmeter (like you did with the digital..)

----------------- Writing (analog) 1.200000 on DAC1
----------------- Reading (analog) DAC1 (get PreviousValue) :1.393065

I want to read value to be 1.2 here.

Here is the reading call :
eAIN_Passive(t->m_device->device, t->m_device->caliInfo, 0, 0, t->m_port, 31, &previousValue, 0, 0, 0, 0, 0, 0)

Thanks.

from exodriver.

scr4tchy avatar scr4tchy commented on June 11, 2024

After many tweaks, I finally found.

Have to modify the line 860.

if( ehFeedback(Handle, sendDataBuff, 3, &Errorcode, &ErrorFrame, recDataBuff, 2) < 0 )

->
if( ehFeedback(Handle, sendDataBuff, 1, &Errorcode, &ErrorFrame, recDataBuff, 2) < 0 )

Thanks.

from exodriver.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.