Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read Digital I/O using PXI-7813R?

Solved!
Go to solution

code?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 25
(3,469 Views)

Sorry for the late reply, I have attached the code.

 

Just to clarify things again, I wanted to make the Host vi to control the signal acquired through the FPGA vi. When I mean control, I mean, just a switch to start the signal/stop the signal.

 

Also, since in the FPGA vi, the DMA FIFO is configured to write, where would I need to actually connect the DIO line/port? I think my connection could be wrong in the FPGA.

 

Thanks as always, Anoop

Download All
0 Kudos
Message 12 of 25
(3,464 Views)

I thought you were trying to read from a digital line and send it to the PC.  Your code shows you writing out of the digital line.  Which are you trying to do?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 25
(3,457 Views)

Sorry for the confusion, I am trying to read data from the digital line in the PXI to the FPGA. As I understand it, there are 39 digital lines available in the PXI and I thought it was possible to feed in data to these digital lines through the PXI backplane? I have connected one of the connectors to an SCB 68 for reading in the signal. Does that make sense?

 

Again, sorry about the confussion but I am new to all this.

0 Kudos
Message 14 of 25
(3,453 Views)

...and from the Host vi, I want to control the FPGA vi, to start/stop or condition the signals acquired.

0 Kudos
Message 15 of 25
(3,449 Views)

@The_Sugarman wrote:

Sorry for the confusion, I am trying to read data from the digital line in the PXI to the FPGA. As I understand it, there are 39 digital lines available in the PXI and I thought it was possible to feed in data to these digital lines through the PXI backplane? I have connected one of the connectors to an SCB 68 for reading in the signal. Does that make sense?

 

Again, sorry about the confussion but I am new to all this.


The FPGA needs to read this digital line and send the data through the DMA to the host PC.  I would change the DMA to be a Boolean to make it a little easier.  Your VIs should look something like this:



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Download All
0 Kudos
Message 16 of 25
(3,444 Views)

Thanks a lot!!! But I have another problem now (I know I know), How do I change the DMA to boolean type? I tried right-clicking, but there are no options for it.

0 Kudos
Message 17 of 25
(3,441 Views)

From the project window, right-click on the DMA and select "Properties".  Theres a "tab" for data type.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 18 of 25
(3,438 Views)

Just did this, but to change the data type from the properties, I have to change the ' type ' category to 'Target Scooped', which does not allow me to change the DMA in the Host vi redundant or unusable for some reason. It doesn't give me an option to change the DMA to a READ either.

0 Kudos
Message 19 of 25
(3,434 Views)

That seems strange to me.  But you are using a version before I started using LV FPGA.  Maybe something changed.  Oh well.  Just convert the boolean to a U32 and feed that into the DMA on the FPGA side.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 20 of 25
(3,430 Views)