04-01-2019 09:02 AM
Hi,
I'm trying to read two values from a MyRio devices via FPGA interface. I can only get one of the values to read in real-time at any given time (either temperature from DIO-1, or from the onboard accelerometer).
I've including both sub-systems in the same for loop, and separate for loops, but neither has worked.
Is this something to do with the FPGA interface prioritising reading one element over the other?
04-02-2019 02:34 AM
Hi, I haven't seen your code but following link should help you.
Transfer multiple channels of data through one DMA FIFO on FPGA
04-02-2019 08:15 AM
Thanks for the info! I'm attempting to implement a FIFO now, but have a query about my FPGA target vi.
Should I have individual FPGA target VIs for each type of data from the sensors (i.e. one for temperature, one for accelerometer, one for GPS), or include them all within the same VI?
Thanks in advance!
04-02-2019 07:14 PM - edited 04-02-2019 07:15 PM
You can transfer acquired data through FPGA FIFO.
One FIFO has only one data type. You cannot combine and transfer DBL and FXP at once.
Using the Single-Precision Floating-Point Data Type
As above link, convert the data to SGL and then transfer it.
SGL data type uses more FPGA resource, be careful.
04-09-2019 06:23 AM
For my GPS modules I am reading the NMEA sentences, in a string format.
Would you suggest that I use separate Target-To-Host FIFOs for each data type acquired from the MyRio to transfer the data to the host or RT?
If so, would it be best to acquire all data from sensors within the same subVI?
04-09-2019 02:46 PM
Make sure to check out what the working code looks like on an oscilloscope, you'll need that later.
Let's say you have code that works and a loop around that. You can put everything in that loop into a subVI. Assuming there's no resource conflicts, you should be able to put multiple of those subVIs in one big loop and still have that work. If it doesn't, go back to the oscilloscope and try and figure out what changed in the signal.
If there is some resource conflict you should be able to wire an enum control to a case structure and drop one of those subVIs in each frame of the structure. That would make it so they don't run at the same time.
I didn't see accelerometer code or GPS code. Is that also 1 wire?