Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2178

10bit parallel port

$
0
0

I'm trying to read a 10bit parallel port with a NI-6251 board synchronizing the acquisition with an external clock.

 

If I try to read only 8bit with the following code, everything goes well:

 

    DIGIN_Task = New Task("")

    DIGIN_TaskReader = New DigitalMultiChannelReader(DIGIN_Task.Stream)

    DIGIN_Task.DIChannels.CreateChannel(NI6251_Dev & "/port0/line0:7", "SIGNAL_DIN", ChannelLineGrouping.OneChannelForEachLine)

    DIGIN_Task.Stream.Timeout = 20000

    DIGIN_Task.Timing.ConfigureSampleClock("/"& NI6251_Dev & "/"& CLOCK_GATED_OUT, clockFreqKHz * 1000, SampleClockActiveEdge.Falling, SampleQuantityMode.FiniteSamples, nPixels * nScanlines)

    DIGIN_Task.Stream.ReadAllAvailableSamples = True

    DIGIN_TaskReader.BeginReadMultiSamplePortByte(nPixels * nScanlines, AddressOf sampleDIGchReadEventHandler, Nothing)

    DIGIN_Task.Start()

 

How can I read all the 10 bits? I can't declare port0/line0:7 + port1/line0:1?

 

Thanks

 


Viewing all articles
Browse latest Browse all 2178

Trending Articles