LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case statement evaluation order

Solved!
Go to solution

Tom, thank you for the explanation.   That's the most clear and concise answer.  It makes a lot of sense that the Execution Highlights would only show single threaded exectution and therefore could lead to my incorrect assumption.

We added the wiring as you mentioned and that should completely control the flow.

0 Kudos
Message 11 of 16
(835 Views)

I also think I know why I never had trouble even with 30,000 times of code execution in a row.  The RTS state is always the same (unasserted) after one execution so the race codition actually doesn't impact whether DTR or RTS is set first in the code.   However, I think the problem we would run into is that both would be trying to use the same VISA resource for setting the serial port at the same time.   I don't how the internal workings of the VISA vi are, but perhaps it can lock up the port when both try to access the same resource.

 

Message 12 of 16
(827 Views)

Both property nodes run in the UI Thread so one will always wait for the other to complete before starting (which runs first is unknowable) but the calls cannot happen "Simultaineously"


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 16
(815 Views)

What are you doing in the TRUE case?  If you are setting the DTR State to Unasserted in the TRUE case, then you could get away with a single property node.  Expand the first property node to show a second property and set it to the DRT State.  Just use the Select function to choose which value to set it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 16
(814 Views)

Jeff,

 

    That's a very good thing to know.  Thank you for the explanation.   This is the sort of subtlety that I'd like to know since it's not explained anywhere.  So simultaneous resource sharing cannot happen in LabView then, I presume?

 

Thanks,

Patrick

0 Kudos
Message 15 of 16
(801 Views)

pchaopricha wrote: So simultaneous resource sharing cannot happen in LabView then, I presume?

That can't happen in any programming environment.  The OS or driver should stop that.  Only one command at a time.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 16
(798 Views)