Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

10bit parallel port

Solved!
Go to solution

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

 

0 Kudos
Message 1 of 4
(3,884 Views)
As you can see from the specs, only 8 lines are clocked. The others are static/software timed. You would need a different device.
0 Kudos
Message 2 of 4
(3,876 Views)

You're right:    "PFI/Port 1/Port 2 Functionality: Static digital input, static digital output, timing input, timing output"

 

I could use NI-6534 instead of 6251, is it true?

 

0 Kudos
Message 3 of 4
(3,865 Views)
Solution
Accepted by topic author D.Anto
I haven't used one but I think it should work.
0 Kudos
Message 4 of 4
(3,861 Views)