LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parallel while loop is not synchronized

Hi I am Himmet.

 

I have a that my question. It wait to a acknowledgment while tcp runs.so tcp quite creating a standby  in arm embedded software..

 

I have add a picture.there is  necessary descriptions.

 

Thanks for your answers.

 

 

Himmet GENCER
Software Development Coordinator at TDG
himmetgencer@gmail.com

View Himmet Gencer's profile on LinkedIn

View on Instagram
0 Kudos
Message 1 of 8
(3,314 Views)

I think your code changes the value of the stop variable to "true" when some errors occur in the tcp/ip publisher loop. Another possibility is that the error in the publisher makes something in the server loop (or listener) which modifies the value of the STOP global variable to true.

Because of not all code is visible I can't tell you exactly where you have to look at so, first of all you have to search where your code write the value of the  Stop global variable and then you have to check what happen when an error occur.

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 2 of 8
(3,303 Views)

thanks ricky but stop gloable variable causes to stand by first while loop.Because first while loop sometimes works, sometimes does not work.

Himmet GENCER
Software Development Coordinator at TDG
himmetgencer@gmail.com

View Himmet Gencer's profile on LinkedIn

View on Instagram
0 Kudos
Message 3 of 8
(3,297 Views)

What I have seen in your code is: the Stop viariable stops the above loop, and the Stand by variable, set in stand-by mode the tcp loop. Isn't it?

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 4 of 8
(3,289 Views)

You really don't provide enough information for us to troubleshoot the problem. A picture is not enough, attach your VIs.

 


@Himmet wrote:

thanks ricky but stop gloable variable causes to stand by first while loop.Because first while loop sometimes works, sometimes does not work.


What is the meaning of "works" here?

0 Kudos
Message 5 of 8
(3,282 Views)

Ok.Stop variable removed.But first while loop stops  when second  while loop stops... 

 

vi attached(But this vi is not included the others vi)

Himmet GENCER
Software Development Coordinator at TDG
himmetgencer@gmail.com

View Himmet Gencer's profile on LinkedIn

View on Instagram
0 Kudos
Message 6 of 8
(3,279 Views)

@Himmet wrote:

But first while loop stops  when second  while loop stops... 


What is your meaning of "stops"? Does the entire VI complete?

 

Could it be that loop 1 is hanging in a subVI?

0 Kudos
Message 7 of 8
(3,267 Views)

Ok, if you want the first while loop is stoped when the tcp/ip while loop stops it is right to use a stop global variable if that kind of variable will stop some other parallel threads in the software, if the stop variable stops only those two loops it will be better to use a local boolean variable, but you have to implement a logic that set to true the variable when the tcp/ip have to stop the second loop. So, first you have to wonder when do I want the second loop has to be stopped? 

Ricky
Italian Developer engineer
www.www.selt-sistemi.com
0 Kudos
Message 8 of 8
(3,266 Views)