From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running FPGA and DAQmx on the same VI

I am using three cards on my computer: 2 PCIe-7841R and one PCIe-6361 and i am trying to control digital outputs, along with analog inputs and outputs on all cards from one VI. The controls for the R series cards works just fine, but the analog input for the PCIe-6361 is giving me unexpected voltages that are negative. If i try to control the PCIe-6361 on a separate VI it works just fine. Is there a way i can control all cards on one VI or is there some kind of conflict going on?

0 Kudos
Message 1 of 7
(2,703 Views)

How often are you getting these unexpected voltages from the PCIe-6361, is frequent or random? Also, how are you reading and writing to the FPGA on the PCIe-7841R's (read/write control, DMA FIFO, or both)?

dK
0 Kudos
Message 2 of 7
(2,665 Views)

For the PCIe 6361 im getting unexpected voltages every time i try to read them using the same VI i use to run the FPGA. For the FPGA cards, im only using the read/write controls.

0 Kudos
Message 3 of 7
(2,656 Views)

That's strange that we are seeing unexpected measurements from the 6361 only when we are communicating with both the 6361 and FPGA cards. There should be no conflict in trying to control both from the same VI on the host side, as the NI-RIO and NI-DAQmx drivers are compatible in this manner. How far off are these unexpected measurements and do you ever receive any correct voltages from the 6361 when running the combined VI?

 

Also, are you able to reproduce this issue with a simple example? Could you possibly post your code or a screenshot so that we can get a better idea of how you implementing the communication? It is helpful to get as much information as possible.

dK
Message 4 of 7
(2,634 Views)

I have attached a few screenshots of the program. I have done it two ways: one in which both cards are controlled by a single VI, and one in which i am using 2 VIs, ones for the FPGA and one for the DAQmx and using global variables to share data between the two. When i put everything on one VI and run the program, the input voltages: LD Current Covega, Temp Monitor Covega, and Detector Data start at -2V then slowly increase to the values on the screenshot. They also seem to vary more, going up and down by 0.1V. If i am using two separate VIs then the input voltages do not change my more than 0.1V. 

0 Kudos
Message 5 of 7
(2,620 Views)

Do you get the same results if you have the FPGA and DAQmx functionality in separate while loops? Also, is this behavior reproduced with an extremely simple example using limited I/O for both FPGA and DAQmx?

dK
Message 6 of 7
(2,592 Views)

I put the FPGA and DAQmx on separate while loops and now the program works perfectly. Thank you very much for all your help!

0 Kudos
Message 7 of 7
(2,581 Views)