02-09-2018 04:40 AM
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:
Best regards!
02-09-2018 06:44 AM
> 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.
02-09-2018 05:56 PM
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
02-12-2018 01:37 AM
With Front Panel Controls and Indicators I can read others indicators. From Particle Analysis
I did not get anything. Results was empty.
02-12-2018 02:09 AM
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.
02-12-2018 09:42 AM
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
02-16-2018 02:27 AM
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:
Host program:
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.