LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waiting to start ADC samples from NI-9215

My current project runs quite smoothly, (using a cRIO-9053, NI-9215, and NI-9467) with the exception of the NI-9215 waiting approximately 5ms to start taking voltage samples from t0. Sense the wait period is consistent through every test I figure the answer might be straight forward. I have tried several things including changing the 'loop wait timer' from 0ms to 5ms. 

 

wsimpson0050_2-1756415380674.png

 

 

wsimpson0050_3-1756415437209.png

 

0 Kudos
Message 1 of 12
(203 Views)

Please share your FPGA code as well. The issue might be from your FPGA code.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 12
(177 Views)

Here you go!

wsimpson0050_0-1756428846605.png

 

0 Kudos
Message 3 of 12
(171 Views)

There is no correlation between NI-9467 and NI-9215 in your current code.

Please refer to the example cRIO data logger with GPS synchronisation and timing

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 4 of 12
(154 Views)

Hi wsimpson,

 

AI0/A1 will only get read once after starting the FPGA as there is no loop around that sequence frame…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 12
(143 Views)

yeah I accidentally removed the loop before taking the screenshot and posting it. With the loop it still has the same problem…

0 Kudos
Message 6 of 12
(137 Views)

Hi wsimpson,

 


@wsimpson0050 wrote:

yeah I accidentally removed the loop before taking the screenshot and posting it. With the loop it still has the same problem…


This doesn't help to debug your code, especially since you only post images of code!

 

Additionally you start the FPGA VI just before the while loop in the RT code. Seems senseless to me as you already try to do other stuff with FPGA before…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 12
(132 Views)

Hi GerdW! Thanks for the feedback! Very helpful! Would you like for me to attach a zip file with the code? If so, please say yes.

 

Additionally, thanks for pointing out my senseless mistake! As I stated before, the code does what I want, except for the first 5.1ms! My question is why.

0 Kudos
Message 8 of 12
(125 Views)

Hi ZYOng! Thanks I will look at it again. Could you also explain what you mean by “no correlation between NI-9467 and NI-9215 in your current code”. 

0 Kudos
Message 9 of 12
(120 Views)

Hi wsimpson,

 


@wsimpson0050 wrote:

Could you also explain what you mean by “no correlation between NI-9467 and NI-9215 in your current code”. 


Because there is no dataflow dependency between the NI9215 and NI9467 loops visible in the image.

There also is no other dependency between those two modules visible in your images…

 

Do you know the basic LabVIEW mantra of "THINK DATAFLOW!"?

 

When you want us to debug your code then you should attach code - and not just images of code, even with deleted structures!

As I don't have your hardware I will not be able to run your code: in this case you should follow our advices and change your code to apply common sense and THINK DATAFLOW!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 12
(115 Views)