LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing information between case structure

Hi all, my project is pick and place robot.
I faced a problem in case structure.
I had created 1 case structure for the detected object coordinates (saved in CSV file) and another one for Python robot arm command purpose.
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 ?

Please help ! 
0 Kudos
Message 1 of 4
(1,177 Views)

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.

0 Kudos
Message 2 of 4
(1,170 Views)

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)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(1,160 Views)

Thanks alot ! 

I will study more on dataflow. Appreciated.

0 Kudos
Message 4 of 4
(1,141 Views)