LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT target only runs when I reconfigure the 'Open FPGA VI Reference'

I have a FPGA code and an RT code. The RT code is meant to capture analog input data when the 'Wait on IRQ' Timeout = False. The problem is the RT target only runs successfully when I reconfigure the 'Open FPGA VI Reference' but when I try to run it again, the RT target does not run successfully until I reconfigure the Reference again (in any way whether it is changing the OPEN from Bitfile to VI or Run Dynamically or even RUN FPGA). When I observe the issue using the "Highlight Execution' it shows that the 'Wait on IRQ' Timeout = True and continues to wait for IRQ. It should be noted that this operation is meant to run headless on Startup.

wsimpson0050_0-1760623192394.png

RT

wsimpson0050_1-1760623247944.png

FPGA

0 Kudos
Message 1 of 7
(107 Views)

My first guess would be that in subsequent runs, the FPGA is already running and past the point where it sends the IRQ. If I'm not loading the FPGA into flash, I'll typically run the download method explicitly between open and run methods so I always know what state the FPGA is in during initialization.

Message 2 of 7
(63 Views)

Thank you, I believe you are correct. I made a few changes...

FPGA:wsimpson0050_0-1760715310621.png

1.) I made controls on the FPGA that are controlled by the RT target. 

RT: wsimpson0050_2-1760715664011.png

 

2.) I made this controls and added a "reinitialize to default value". 

 

I did a test where I ran the FPGA first and then ran the RT Target and observed the front panels of both the RT and FPGA. The test showed that on the first run the FPGA was using the correct values from the RT target and the IRQ was being acknowledged. On the second test I would run it again but the FPGA was using the values from the previous test and not acknowledging the IRQ. To fix this I would have to 'Reinitialize all values to default" on both the FPGA and RT targets before running the test again. 

 

I think you may have answered the follow up question but need more understating.

 

How can I reinitialize the values to default on the FPGA side after starting, stopping, and starting the RT target? 

 

Thanks.

0 Kudos
Message 3 of 7
(59 Views)

here is the ZIP file for the current setup 

0 Kudos
Message 4 of 7
(56 Views)

There's a Reset method you can run using the FPGA reference which reverts most things to default (I think the exception is memory items). The Download method is what I normally use during initialization as it should download the target bitfile onto the FPGA regardless of what's currently on the FPGA.

 

If you use the Reset command, just be aware that you'll have to call the run method because the reset method will stop what's on the FPGA but won't start it up again.

Message 5 of 7
(42 Views)

okay thank you again. another thing, I plan on making 30-minute files that start at a 30-minute mark in time (example, start at 11:00 or 11:30). Let's say we start a file at 11:00, record for 30 minutes stop file (11:30), save it, and then start over again by 11:30. what is the best way to do this?

 

0 Kudos
Message 6 of 7
(39 Views)

I think this package may already have a function to do that if you want to give it a try.

 

https://www.vipm.io/package/hooovahh_tremendous_tdms/

 

For a simple implementation, instead of directly calling a write method you could first check the current time against the time the file was created. If the file isn't 30 minutes old then you just write the data to that file. If the file is older than 30 minutes you close the existing file, create a new one, write the data to that file and pass out that new file reference for future use.

0 Kudos
Message 7 of 7
(35 Views)