Reading A Digital Input


Msrivas

Recommended Posts

I am trying to stream data from a digital input using a U6. Before I do that, i wanted to make something that polls the data at the digital input ever second.The code is below.  The code is not working and I need help figuring out what's wrong.

 
// standard labjack commands:
using("device.labjack.")
try
   include("c:\program files (x86)\labjack\drivers\labjackud.h")
catch()
   include("c:\program files\labjack\drivers\labjackud.h")
endcatch
AddRequest(0, LJ_ioPIN_CONFIGURATION_RESET, 0, 0, 0) 
double dblValue ;
 
private string message 
while(1) 
   AddRequest (0, LJ_ioGET_DIGITAL_BIT, 2, 0, 0, 0);
   GoOne (0);
   GetResult (0, LJ_ioGET_DIGITAL_BIT, 2, @dblValue);
   ? dblValue;
   delay(1) 
endwhile 
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.