LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A breakpoint problem (step into and step over makes differences)

Hi crossrulz, I have a question here regarding race condition. If there indeed have a race condiction in this block, how did you figure out this one is from "visa resource"? Is there any other ones caused this race condition? Thank you!

0 Kudos
Message 11 of 21
(1,074 Views)

It is all about data dependency.  If there is no data dependency between the VISA Clear and the VISA Write, then it is very possible that you are clearing the buffer after the data has been recieved, cleared, and then read.  The best way to make sure the Clear happens first is to wire the VISA Resource and the Error cluster from the VISA Clear to the VISA Write.

 

But thinking about this again, I am wrong.  The Diagram Disable Structure has to complete first.  So that is not a race condition.


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 12 of 21
(1,072 Views)

After letting cross do all of the dirty work...

 

Could it be a timing issue and the operation is timing out but in lightbulb mode it has more time?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 21
(1,069 Views)

Hi Ben, if there is a timing issue, where do you think can cause it? Because I do not see any time related items there, could you give me more deatil? Thank you!

0 Kudos
Message 14 of 21
(1,064 Views)

the widget you are talking to may need more time to reply.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 15 of 21
(1,047 Views)

Hi Ben, if it needs more time to reply, what should I do? Thank you very much!

0 Kudos
Message 16 of 21
(1,043 Views)

Hi Ben, if it needs more time to reply, what should I do? Thank you very much!

0 Kudos
Message 17 of 21
(1,043 Views)

You could use a simple state machine. The other simple way is to insert a delay between your actions. If you are waiting for responses you can also increase your read timeout.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 18 of 21
(1,038 Views)

@bhl3302 wrote:

Hi Ben, if it needs more time to reply, what should I do? Thank you very much!


 

 

THat question is probably best answered by the maker of the widget.

 

THey may have a "status" flag that can be checked to see if it is done or the widget just needs more time where a small dealy can be introduced (ms wait function) or simply retry the operation until it responds.

 

But I am speculating.

 

You should drop probes or indicators on all of the wires of interest to get a clue of the nature of the failure. Quoting myself "The first step in solving a problem is clearly defing what the problem is."

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 19 of 21
(1,037 Views)

Ben,

 

Re: your quote.  I guess great minds think alike.  I've heard a similar saying quoted as though it were a well-known (but unattributed) aphorism, "A problem well-defined is a problem half-solved."

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 20 of 21
(1,029 Views)