02-06-2013 04:49 AM
Hi guys,
I am trying to read a digital signal using one of the ports in the PXI-7813R. The 7813R has 5 digital ports or 39 lines for reading in digital data. I connected a SCB-68 as the physical hardware interface for 'plugging-in' a 5V adapter, which will act as my signal for now.
After configuring the PXI through MAX, I wrote two codes, one for my Host pc and one for controlling the FPGA through the host. But I think, I may have over complicated things or gone in the wrong direction completely.
Any help in writing these codes would be much appreciaetd.
Thanks, Anoop
Solved! Go to Solution.
02-06-2013 05:16 AM
Where are you having problems? Can you share your code?
02-06-2013 05:31 AM
Well, I want to display the data I obtain, but that desn't seem to work. Also, there is some error while you highlight the execution.
i have attached the code.
02-06-2013 06:33 AM
Well, I don't see you writing into the DMA in the FPGA. That will cause a timeout error on the DMA read.
Are you trying to get all of the data points sampled at a specific rate? If so, you just need to write the data into the DMA.
02-06-2013 07:03 AM
Hi, thanks for the reply.
Couple of questions, 1. when you mean sampling at a specific rate, what do you mean? Would I need to know frequency etc. of the incoming signal to adjust the sapling within my program?
Also, if I write into the DMA, how can i view this signal as it is written in continuously?
Thanks a bunch again, Anoop
02-06-2013 07:29 AM
You need the FPGA to sample the signal at whatever frequency you expect the device to send the data.
If you write your data in the FPGA to the DMA, then on the PC side you just need to read from the DMA. I like to think of the DMA as a queue. It makes it easier for me to understand how it works.
02-06-2013 07:38 AM
Ok great, thanks man! or women!
AG
02-06-2013 08:38 AM
Hi, sorry to bother you again, but where would the DMA write be in the FPGA? I mean, what value are we writing in? As far as I can see, there is only 'number of elements' and timeout in the write DMA.
02-06-2013 09:05 AM
Configure the node to write (right-click it).
02-06-2013 11:07 AM
Thanks man, but now, the Host vi reads in nothing, even though I have a 5v connected and configured through the PXI.