LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

race condition

  • Well, maybe this was not available in 7.0, but check your palette again (See top of image).
  • The code at the bottom of the image replaces all your formatting (3 string diagram constants, 2 fractional string conversions, 2 integer diagram constants, and the concatenate string operation).


It was in 6.02
Jim

LV 2020
Message 11 of 36
(1,753 Views)
yeah, it was in the 7.0
i know its a really stupid question. but i gotta ask.
the example you showed me was if empty path is TRUE
in my case is if the empty path is NOT TRUE?

Best regards,
Krispiekream
0 Kudos
Message 12 of 36
(1,745 Views)
Hi krispiekream,

either use
-an additional NOT
-a compound boolean operation, here you can set a negation for each individual input (and the output too)
-think BOOLEAN and use a different boolean operatorSmiley Wink (Several weeks of apprenticeship spent for such boolean calculations...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 36
(1,739 Views)


krispiekream wrote:
in my case is if the empty path is NOT TRUE?

Easiest, just invert the output. You could also play with swapping the true/false cases of the case structure and modifying the boolean logic before it. 🙂
Message 14 of 36
(1,736 Views)
What are you doing???  I know this is not causing the race condition, then again... who knows... but it is worth mentioning. 
Why do you place the error cluster inside this other cluster?  and also wire a Local Variable if you use a cluster?  I'm confused...
 


krispiekream wrote:
  • oh yeah. about the error cluster. that is one of my question too. i dont want to be doing that all the time. it gets boring and waste alot of time, but the reason why i did that because i want to run my wire, left to right. And i dont want it to face race condition, therefore i  run everything left to right. if it is coming error out, then i would bundle it, and then unbundle it when i face another subvi to let the data flow? can you sugguest a solution for me? i really dont like doing it that way. 

Wiring from left to right does not automatically prevent a race condition 😄 
As a coding practice, I never put the error cluster inside another cluster.  I treat that one as a completely different wire independent from all the others.  It goes from VI to VI (function to function), and even if the sub-vi does not generate any error, I still provide it and route it inside the sub-vi in order to manage dataflow.
 
R
Message 15 of 36
(1,735 Views)


krispiekream wrote:
in my case is if the empty path is NOT TRUE?

I probably would use an "implies" function and (2) swap the two cases of the case structure.
 

 


Message Edited by altenbach on 07-25-2008 11:57 AM
Message 16 of 36
(1,732 Views)
I just want to give credit to Krispiekream.  It seems like whatever he posts, he gets a lot of "why are you doing that" and "don't do that, do this".  But over the course of reading his messages, there have been some major improvements in his coding techniques, and he keeps coming coming to the forum and looking for further improvements.Smiley Happy
Message 17 of 36
(1,726 Views)


@Ravens Fan wrote:
I just want to give credit to Krispiekream.  It seems like whatever he posts, he gets a lot of "why are you doing that" and "don't do that, do this".  But over the course of reading his messages, there have been some major improvements in his coding techniques, and he keeps coming coming to the forum and looking for further improvements.Smiley Happy

Reading his messages there have been major improvements in MY coding.  Just from this thread:
1) I had never used the format string function.  Much better than converting AND appending.
2) I didn't know that you could negate the input of a compound arithmetic.
3) I didn't know about the "implies" function.

God, a Vulcan mind meld would speed this process up! Smiley Very Happy

A big thank you to all of you who contribute here.
Jim

LV 2020
Message 18 of 36
(1,720 Views)

I hope it is not perceived as bashing 😮

It is noticeable the progress...  In my case, I am just trying to understand the logic behind some coding decisions to offer additional suggestions 😉

R

Message 19 of 36
(1,694 Views)


JoeLabView wrote:

I hope it is not perceived as bashing 😮

It is noticeable the progress...  In my case, I am just trying to understand the logic behind some coding decisions to offer additional suggestions 😉

R



I don't think it's bashing, and I don't get the sense that Krispiekream feels he's being bashed.  I just wanted to give an "attaboy" and to keep working on improving the code.
Message 20 of 36
(1,692 Views)