05-14-2021 08:08 AM - edited 05-14-2021 08:09 AM
05-14-2021 08:19 AM
Do you know about Shift Registers? It is a commonly used construct in LabVIEW that would've been covered in any LabVIEW courses or tutorials you would have taken. It takes the value in a wire in one iteration of a while or for loop and returns it to the beginning of the loop to be used in the next iteration. Feedback nodes are a similar construction, with some advantages of one or the other being used in certain situations.
You should also use Block Diagram Cleanup to eliminate some of your backwards running and hidden wires.
05-14-2021 08:21 AM - edited 05-14-2021 08:24 AM
Hi Jaycobian,
@Jaycobian wrote:
How am I going to declare the condition like after the coordinates are obtained and saved in CSV file, then the Python node only reads the coordinates through CSV file ?
In a technical way you already solved that problem!
Due to THINK DATAFLOW your case structure containing that Python call will be executed after all the other case structures in your loop - just because you placed that case structure AFTER the loop. Again: THINK DATAFLOW!
Probably you want to solve a different problem: how to execute the Python node inside the loop, but after a CSV file has been written!?
Then you need to move the case structure inside the loop.
The condition to execute that case will be set inside the other case structure, based on successful saving of the CSV file. (Aka by analyzing the error output of the CSV file write function…)
Call Python node on successful write of CSV data…
Btw. there is so much wrong in your code you really should take the Training resource (again) to learn LabVIEW (better)…
05-14-2021 08:34 AM
Thanks alot !
I will study more on dataflow. Appreciated.