LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IC-3173 FPGA Particle Analysis data transfer to Host

Hello,

 

I using Industrial Controller IC-3173. I have problems with transfer data of Particle Analysis back to Host machine. At first I grab the image, then I send image to FPGA. FPGA processing the picture and at the end do Particle Analysis. FPGA then send processing image back to host machine. I like to transfer Particle Analysis data back to host, but I don’t know how to do this. I have try with Front Panel Controls and Indicators but this did not work.

 

Front panel communication:

http://zone.ni.com/reference/en-XX/help/371599M-01/lvfpgaconcepts/pfi_data_transfer/

 

Maybe I must assembly the data of Particle Analysis before I send data back to host?

 

Unfortunately, I do not have much experience with LabView. If anyone knows how to do this, please let me know. Thank you!

 

Whole process:

  1. Generate the LabView code vith Vision Assistant.

Ass.jpg

 

  1. Host machine program

Host.jpg

 

  1. FPGA program

FPGA.jpgBest regards!

0 Kudos
Message 1 of 7
(3,736 Views)

> I have try with Front Panel Controls and Indicators but this did not work.

 

You should be able to read the indicator on the host.

 

What did not work? Do you get errors? Are the results empty? Can you read\write other controls\indicators?

 

Note that if the FPGA is running at 60MHZ, there is no way to get all the results by polling the indicator. It will just take snapshots.

 

 

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

Vision Assistant only returns the image that has been processed on the FPGA, due to the wide range of results that users can compute on the FPGA.

I would encourage you to study the Particle Analysis Report on FPGA example to learn how to send results back to the host:

C:\Program Files (x86)\National Instruments\<LabVIEW>\examples\Vision FPGA\Particle Analysis Report on FPGA\Particle Analysis Report on FPGA.lvproj

You have to use FIFOs, instead of just reading the indicator output, because the Particle Report FPGA VI returns one particle at a time, as soon as we're done scanning the particle. So you have to stream the particle data back to the host using FIFOs, as soon as they become available.

If you still have difficulties, please post again, and I'll do my best to help.

May I ask what is your application?

 

Hope this helps,

 

Christophe

 

0 Kudos
Message 3 of 7
(3,699 Views)

With Front Panel Controls and Indicators I can read others indicators. From Particle Analysis
I did not get anything. Results was empty.

0 Kudos
Message 4 of 7
(3,682 Views)

I have studied the Particle Analysis Report on the FPGA example. I will try to solve my problem with this example. I will use FIFOS and send data back to host.

 

It is any option to use Particle Filter on FPGA. In Vision Assistant for my FPGA I do not have the option to use Particle Filter as I can use on normal CPE. This can help me a lot because I will eliminate small object and therefore I will have less Particle Analysis data to transfer to Host. And I have to do Particle Analysis anyway, because my particles are always about the same dimensions and with this step I can eliminate what is not interesting. So this is also my issue.

 

My application is color sorting. With FPGA I like to find particle on the image, because I must know where my object is. Then I will do Color Classification on these spots.

 

Thank you for now.

0 Kudos
Message 5 of 7
(3,677 Views)

The indicators of the particle analysis VI return the result for a single particle, once the algorithm finishes scanning that particle. They are only valid when the output valid output of the VI is true. This is why with such a VI, you can't just read the value of  the Particle Statistics Out indicator, like you would with a different algorithm. You have to use FIFOs.

 

Unfortunately, we don't have a particle filter algorithm on FPGA at this point, but using FIFOs, it is easy to only return the particle analysis report of the particle that fit certain criteria:

In the example, when you look at Particle Analysis Report on FPGA (FPGA).vi, instead of directly connecting the output valid of the Particle Report VI to the enable of the particle count, and to the enable to the Write FIFO method, AND the Output valid with some logic to filter only the particle you want, based on their area.

Let me know if that makes sense or if you need an example that illustrates that concept.

 

Christophe

 

 

 

0 Kudos
Message 6 of 7
(3,661 Views)

Hello!

 

I try to implement FIFO-s in my program like is in the Particle Analysis Report on FPGA example. I have the same FIFO settings and very similar FPGA program. Now I have problems because my FIFO are empty or I don’t know how to read them. And if I put something else in FIFO I receive this on Host.

 

Also I get error d-50400 with description: Invoke Method: FIFO.Read in IVA Vision FPGA (Host).vi

 

FPGA program:

FPGA_code.png

 

Host program:

Host.jpg

  

On this link (https://we.tl/U4A5lif7k1) is Host, FPGA program, Vision Assistant file and test picture. I cannot put this in attachments, because is too big. 

If anyone can help, I would be very happy. 

0 Kudos
Message 7 of 7
(3,635 Views)