Comments (8)
Which LabJack device are you using? UE9, U3 or U6?
from exodriver.
Hello,
Sorry. I didn't remember to tell you that.
I'm using U3 & U3 HV
from exodriver.
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.
Thanks. I was looking to edit these lines but I can't figure out to what ^^
I'll try ASAP.
from exodriver.
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.
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.
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.
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)
- Update Tag HOT 1
- Need support for new T-series devices HOT 2
- install.sh breaks if executed from within gnome terminal HOT 2
- Build fails on macOS 10.13 with Xcode 9 HOT 3
- New release? HOT 5
- Question about LJUSB_OpenAllDevicesOfProductId warning HOT 1
- please add 2.7.0 release tag HOT 1
- Overflow / ERROR PIPE HOT 4
- Just a little thing about eDI HOT 2
- Tagging release HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exodriver.