Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ NI 9401 Clocked Serial Output

I have a cDAQ NI 9401 module that I want to use to simulate an absolute encoder.  The encoder communicates to the controller on a two wire serial bus.  The controller periodically sends a 9-bit clocked pulse train, and reads the data lin on the falling edge.  I want to use the 9401 to provide the serial data at the clocked frequency.

 

I've attached a screenshot of the relavent portion of the encoder datasheet.

 

Is this even possible with a cDAQ NI 9401? 

 

Any suggestions on where to start?

 

Thanks,

 

Andy

0 Kudos
Message 1 of 3
(3,620 Views)

Which cDAQ chassis are you using?  With the older chassis (9172), you would have to perform correlated DIO or supply an external clock because there is no DO sample clock.  For an example of using the 9401 to perform correlated DIO, you can take a look at the Correlated Dig Write with Counter.vi from the Example Finder.  For an example that uses an external clock, see Cont Write Dig Port-Ext Clk-Non Regeneration.vi. 

If you are using on of the newer chassis (9174 or 9178), then they have a sample clock for the DO, so it will be easier.  You can just set up a continuous task and set the rate to whatever you need.  (You will still probably want to turn off onboard regeneration so you can send it different values everytime, the same way the second example does.) 

In either case, I would think you would just set the sampling rate to twice the rate that you need the data to be transmitted.  That way the clock line can alternate between high and low, and any value on the data line would be sent for two consecutive samples. 

 

-Christina

0 Kudos
Message 2 of 3
(3,607 Views)

Thanks.

 

I am using the cDAQ 9172 chassis.  I will give that a try and see how things go.

0 Kudos
Message 3 of 3
(3,604 Views)