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.



  • Please log in to reply
2 replies to this topic

#1 realolman

  • Members
  • 17 posts

Posted 17 January 2014 - 02:39 PM

I have looked at everything I can find ...


would you please explain the parameters for EDigitalIn? 


I don't understand the "state" or the " ReadD" and I can't seem to get it to work  VBStudio2013 for desktop

Visual Basic     U12



I want to read whether the input is 5v or 0v on a single  connected labjack


thank you


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 17 January 2014 - 03:24 PM

EDigitalIn is documented here in the User's Guide:




You set readD to 0 to read an IO line and > 0 to read a D line. Channel indicates what IO/D channel to read, and the state reading is returned in the state parameter (0 = low, 1 = high). For a 0 V reading the state should return 0, and 1 for 5 V. Here's some quick example calls to read IO1 and then D1:


' Read from IO1

errorCode = lj.LabJack.EDigitalIn(idnum, 0, 1, 0, state)

' Do error check


' Read from D1

errorCode = lj.LabJack.EDigitalIn(idnum, 0, 1, 1, state)

' Do error check

#3 realolman

  • Members
  • 17 posts

Posted 17 January 2014 - 03:40 PM

I was not using "state" for the return from the function


I got  it now... thanks

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users