07-08-2016 02:27 AM
and this is the complete code of raster scan.
07-08-2016 02:31 AM
07-08-2016 02:38 AM
Grrr... why do people inisist a picture of a block diagram is "code"? How are we supposed to know what is going on in the three other frames? If I took a screenshot of text-based code, is that really posting code? What if the code is more than can fit into that one screen shot?
From what I can see of the code, it is ill-conceived and probably should be rewritten from scratch. On the main page of the LabVIEW forum, on the upper right side, there are links to some tutorials you can do to help you out.
07-08-2016 04:24 AM
07-08-2016 07:10 AM
Imtisal,
I had not realized that you basically "hijacked" a twelve-year-old thread. Please stop posting on this thread. Instead, open a New Message, ask your New Question, and post your code. This means attach VIs, not pictures of VIs. We cannot closely inspect pictures (difficult to see the "false" case of Case statements), cannot edit pictures, cannot execute pictures. If you are using LabVIEW Project, you can compress the folder holding your code and attach the resulting .ZIP file (so we can see all the sub-VIs and load your code without "missing VI" errors).
Bob Schor
07-08-2016 10:19 AM - edited 07-08-2016 10:40 AM
@imtisal wrote:and this is the complete code of raster scan.
OK, this VI contains missing subVIs, so we are not much closer to a solution. The subVI itself does not contain any loops, so it should return quickly unless the waits are long. How long are they? Maybe the inner subVIs are stalling the code?
Who wrote that code? Wherever you got this code, I would not recommend to trust that source for anything. The subVI is complely gummed up and unmaintainable. It looks like it is written by someone with a little bit on text programming experience, but with no formal training in LabVIEW whatsoever.
Whenver the most frequent structure is a stacked sequence structure, the most freqeuent items are local variables, and if the terminals are not even connected to the code, we are dealing with a nightmare! Look at the inner case structure: you have two identical cases with tons of code, but the only difference is s single primitive (add vs subtract)! You only need one instance of all that code! Only the add/sutract belongs inside the case structure, right? I don't think that you even need one single local variable. Place all controls and indicators outside any structures, and wire them directly to the operations. This will also eliminate all the sequences, because the wires determine the execution order automatically. If you need to write to the same indicator several times or If you need to re-use modified data, create a small state machine.
In fact, al you probably need is something like this (Is that wait really needed? Shouldn't that be handled in the calling VI?):
So thanks for posting that small subsection of code. It tells us that your problems are much deeper than you think and you need all the help you can get. As Bob also said, you need to attach all your VIs, not just pictures. If you keep positng images of small code fragments, we cannot help you and we won't keep asking for VIs. So place all your VIs ina zip file and attach it here. Until then, I will ignore this thread.
Good luck!
07-08-2016 09:04 PM
I am pretty much understand the problem now. With your help, I am now getting it. I have attached the all the VI's. In the scanning section, I want to run the TWO marked loop to run in parallel. First one was scanning and 2nd one for feedback which should move faster as compared to XY loop.
I attached the pciture also for better understanding that which part creates problem.
In the previous code, I was using the feed back subVI in the same for loop but that runs only for once along the MOVE Y subvi. But when I placed it outside of FOR loop to run independetly, DUE to data dependency, while loop keep running and for loop not executes.
I hope to have good response as you already help me a lot.
Kindly, let me know if some more data is required.
Kindly, go through the VI's please.
Imtisal
07-09-2016 01:40 PM
Imtisal,
This will be my last response on this 12-year-old thread. If you want further help from me, at least, you will follow the courtesy procedures of this Forum and start your thread, with your program, asking your specific question, and posting all of your code that is relevant (including move XYQ (Change 6353), OneStepFDCurves, FD curve measure, color code, picomotor start, Pixel_to_Voltage_2_BackScan, and others).
I'm guessing that you did not write this code, and probably don't know much about it. In your new Post, tell us what you do know, what VI is exhibiting the problem, what it is that you want to change. Is someone going to "take charge" of this code and try to turn it into something readable and maintainable?
In case I wasn't clear with my suggestion(s),
Bob Schor
07-13-2016 09:39 AM
Hello Bob_Schor,
That example is very helpful for me and I am modifying my code according to your example. Its working perfect and I am using the x100 address to call asynchronously and collect data. I am almost done with the code but I need help in few things.
Both VI's have FOR loops which running independently and equal number of time (i.e. 128). Due to the time difference, the feedback loop finish execution before the main loop (which is not required as it should finish execution along with the main Loop). I want your help how can I make the feedback loop to finish along with the main FOR Loop.
I have attached the modified code along with the feedback vi.
Kindly, let me know that you understand the query.
Thanks
Imtisal