10-30-2015 04:58 AM - edited 10-30-2015 04:58 AM
Hi All,
I have been fixing an intensitiy graph on my code for awhile now but I still have a couple of issues to solve,
I need to plot line by line on the intensity graph, but then all I see is the image on the whole graph as soon as i press start button.
I do a raster scan and for a given number of Xpixel I increase the Y pixel by 1.
Now these are my problems;
1. I have 3 columns in the array.....Z signal, Xpixel and Y pixel. sometimes the columns interchange. i dont know why.
2. I need a line by line plot. what am I not doing right?
3. I think I have a problem with the DMA FIFO. what could b the problem with my set up (see the attachment)?
4. When I press the stop button. there seem to be some data transfer even after the stop button is pressed, why?
5. The trace and retrace indicators on the host someties are ON at the same time meaning there is a problem with my data transfer (Only 1 of them should be ON at a given time)?
I have attached some part of my code. Its a little complex at the
Any ideas or clues on any of these will be highly appreciated.
Kind Regards,
Opuk
10-30-2015 09:50 AM
Hi,
it's kind of hard to debug without all the code.
What's visible in the second screen cap is a possible race condition with the boolean "Trace" which is written outside the case structure and read inside without a way to force an order of execution. Local variable are dangerous. In LabVIEW the wire is the variable you should use.
Am I correct in assuming that you are new to LabVIEW (the infinite loop is another tell)?
If so I would recommend taking the tutorials NI provides.
Best Regards,
Florian
10-30-2015 11:54 AM
Can you attach a VI with some standard data? At the DMA Fifo.read you can make an indicator on the "Data" output. Run the VI once to populate the indicator, then right click on it (on the block diagram) and choose "change to constant". This will give us an idea of the kind of data you are seeing. Then send the VI with all of the logic and array manipulation after that.
11-01-2015 07:24 AM
Hi Florian,
You are absolutely correct, I am new to labview. Just learning now and I have been going through lots of tutorials.
I developed a state machine that performs a raster scanning. This works pretty well without any problem.
My problem is on data transfer from FPGA to host using DMA FIFO most of which are highlighted in the previous post.
Kind Regards
Opuk
11-01-2015 07:24 PM - edited 11-01-2015 07:35 PM
Opuk wrote:You are absolutely correct, I am new to labview. Just learning now and I have been going through lots of tutorials.
Showing trucated diagram and front panel pictures is completely useless. You need to attach the actual VI else we cannot help. We cannot see what's in the other cases and some of your wires are hidden. There is blatant overuse of local variables and the actual terminals are nowhere to be seen.
Just a few general comments. (I don't have access to FPGA at the moment, so I cannot test):
11-02-2015 09:23 AM
Hii All,
Thank you so much Altenbach, Florian.Ludwig Florian.Ludwig and GregoryJ for your responses. I have tried to implement most of the suggestions you suggested.
As requested, I have attached the host and fpga vi to give more information.
Thank you.
Kind Regards
Opuk
11-02-2015 10:38 AM
10 second glance at host code:
11-12-2015 05:42 PM
Hi Altenbach,
Thanks a bunch. Your suggestions to this problem was an eye opener. I implemented them and with a couple of some other trials managed to sort out the problem. Thanks guys for your ever willing heart to offer solutions in the forum.
Kind Regards,
Opuk
07-12-2021 02:39 AM
Hello Opuk,
I came across this post while having the same problem and I am also working on the same kind of AFM imaging. I am gald that I found this post but it seems quite old.
If you receive this message could you please let me know what else you have changed in your code? Please
I will be grateful to you for your kindness.
Thanks
Imtisal