Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just a little thing about eDI #6

Closed
scr4tchy opened this issue Apr 19, 2012 · 2 comments
Closed

Just a little thing about eDI #6

scr4tchy opened this issue Apr 19, 2012 · 2 comments
Assignees

Comments

@scr4tchy
Copy link

Hello,

I developped an automation program with your driver (thanks)
I've just a little problem.

At the start of my software, I set eDO for port 8 & 9 to Low.
On an Event, I read the value of 8 & 9 (eDI) and I set (eDO) to the contrary. After a while, I set 8 & 9 with previous read states.

Ex:
Starting.. 8 & 9 = Low (by eDO)
Event
Reading 8 & 9 ( => previousState = Low )
Setting 8 & 9 to High
Wait a bit
Setting back 8 & 9 to previousState = Low.

That's work. Right.

But now, when I want to do this :
Starting.. 8 & 9 = HIGH (by eDO)
Event
Reading 8 & 9 ( => previousState = Low ) <=== PROBLEM. It should be High!
Setting 8 & 9 to High
Wait a bit
Setting back 8 & 9 to Low.

Do you see what I mean ? ^^ It's a bit stange x) Or maybe I'm a noob. Do you have any idea on How to do the trick ?

Thanks for all !

(You're credited into the program^^)

@davelopez01
Copy link
Collaborator

eDO will force the channel to an output and eDI forces it to in input. So your problematic eDI call is setting the channel to an input and reading the state instead of reading the output state which I think you are expecting. Using the eDI source code, try creating a similar function that does not set the direction and reads only the state. The low-level Feedback command in the code will need to be modified to do this. If you run into trouble, tell me what LabJack device you are using and I'll help to point out what part of the code needs to be changed.

@ghost ghost assigned davelopez01 Apr 20, 2012
@scr4tchy
Copy link
Author

Thanks for your answer ! You made my day =]

Thanks again for your work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants