Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-9401as SPI Slave Device

Hello Members,

I have an SPI master device which sends data to slave device. In response to Master data , slave device sends 6 byte of data and this process go repeatedly. I was trying to use NI 8452 but this can only be used as SPI master. Therefore i am trying to use NI 9401 and cDAQ chassis NI 9178. 

My connection are as follows;

 

1. Master Clock into PF0 (in  cDAQ NI 9178 Chassis)

2. Master; MOSI into NI 9401 Input Number 0.

3. Master MISO into NI 9401 Input Number 7 .

 

The read data from Master SPI device is working fine but writing data from SPI Slave to Master is not working.

Thanks

 

Regards

Muhammad

0 Kudos
Message 1 of 10
(3,739 Views)

Hi MuhammadShazor,

 

Are you receiving an error when you run your code, or is it not behaving as expected? What is the behavior you are observing? In addition, could you attach your code?

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 2 of 10
(3,707 Views)

Hello Brain,

Thanks for your response. As per now, I am not getting any error and I can visualize my data is being sent to the device but I am not getting any digital pulses at master device .

 

Regards

Muhammad Shazor

 

0 Kudos
Message 3 of 10
(3,692 Views)

It looks like you may have already created a service request with us at NI for this issue, and it will probably be easier to troubleshoot through that process. A couple of thoughts:

  • I assume the NI 9401 works fine on its own (i.e. you can run simple DIO tasks and verify you can read/write on the channels)
  • Have you probed channel 7 (your MISO line) to see what is being output?
Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 4 of 10
(3,681 Views)

Thanks for your reply . I have checked the DIO module using as Digital Outputs. It is working fine . I have also checked the MISO line using probe but i did not get any data. 

Do you have any idea or thoughts on this issue.

0 Kudos
Message 5 of 10
(3,671 Views)

What data have you tried writing in your array out?

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 6 of 10
(3,656 Views)