LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

connecting the output of one program to input of another

Hi Everyone, I have a confusion regarding how to connect the output the one program to another input of a program. I am able to run the code for the sick lms 100 laser scanner in the main block diagram. I have achieved distance  and angle using sick lms 100laser scanner. The diagram given below  (position of obstacle) represents the calculation step taken for calucating the position of point B ( AC,BC)= (8.6,5.0001)cm. Now,the major problem comes .

 

I have other program which is running on the main block diagram. Now, i want to put the output that is point B output which is (AC,BC) = (8.6, 5.001) into the (x,y ) coordinate of this program.Note that: These are two different programs which is not integrated yet. I just want to pass the ouput of (AC,BC) into my program for input (x,y).

 

can anyone help me?

Download All
0 Kudos
Message 1 of 6
(4,242 Views)

Hi Everyone, I have a confusion regarding how to connect the output the one program to another input of a program. I am able to run the code for the sick lms 100 laser scanner in the main block diagram. I have achieved distance  and angle using sick lms 100laser scanner. The diagram given below  (position of obstacle) represents the calculation step taken for calucating the position of point B ( AC,BC)= (8.6,5.0001)cm. Now,the major problem comes .

 

I have other program which is running on the main block diagram. Now, i want to put the output that is point B output which is (AC,BC) = (8.6, 5.001) into the (x,y ) coordinate of this program.Note that: These are two different programs which is not integrated yet. I just want to pass the ouput of (AC,BC) into my program for input (x,y).

 

can anyone help me?

0 Kudos
Message 2 of 6
(4,285 Views)

Hello Sapkota,

if you are speaking about VI´s you can use the connection terminal. If both VI should run independent, a easy way is to use a FGV , global variable, notification, queue and so on. If both are programms you need a transfer method like TCP/IP or network variables to transfer values between the two programms.

 

Be careful because, if you do not know, when the data will be sent or received a race condition can happen. So a little bit more information is need, what programm is mean in your case or a example code.

best regards
Alexander
0 Kudos
Message 3 of 6
(4,272 Views)

Both are different program. The first program gives the distance and angle. The second program needs the input of the first program that is it needs x and y coordinate which is measured by first program. It gives the distance (entferungen )here in german language. Now using formula mode in labview by using trigonometry i can calculate the position of B as i mentioned earlier. The main block diagram of output program is given below:

 

This output should be pass to another program which is input for this program.

0 Kudos
Message 4 of 6
(4,254 Views)

Hi Sapkota,

 

use any of the methods mentioned above!

I would prefer a queue or notifier…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(4,246 Views)

Hello Sapkota,

 

are the progamm run under Window, because a timed loop is in use.

You are speaking about transferring values between two VI`s then you can use the methods i mention.

best regards
Alexander
0 Kudos
Message 6 of 6
(4,245 Views)