LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring strange behaviour happens very rarely


@billko wrote:

What happened, Ranjeet?  You had started out with so much potential.  😞

 

I don't mean this disparagingly.  It's kind of like losing Anikan to the Dark Side...

------------------------------------------------------------------------------------------------------------------------------

I am still with so much potential.. I was out of office. Now here I am...

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 11 of 16
(575 Views)

@JÞB wrote:

 

Read the value of Model read Change the value and select max and min Then do some lengthy Database operation and write the stale value back to model and get the stale values text.  

Th solution is fairly straight forward  Do not write to the value property at 4 Instead, read the rings Strings[] property and index by the old value  to get the ring text that was displayed when the operation began.  Alternatly read ringtext.text at the begining of the long operation for later use. 

 

You are doing a lot of dangerous stuff waiting until the operation is complete to gather the logfile information (and abuing locals and p-nodes for no good reason.  A more standardized design pattern selection would make that type of bug easier to find if it didn't prevent you writting it in the first placeSmiley Wink

 


Thanks for you suggestion. I will do all the changes and validate it...I have only one question, why this is happening occasionaly..Why not everyday. Its very difficult when its happening. Same code works for months and same code shows bug

 

Along with my selected model string my min and max also changes and updated then again I need to change the value. 

Is it possible that tab is focusing on model when serial number scanned then at last when it send the ENTER then it changing to 0th value and chaning accordingly

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 12 of 16
(571 Views)

@Yamaeda wrote:

User changes model, in the mean time the model property has already read the old value and is waiting for the serial number ... that's a race, you could fix it by wiring the error wire from the serial number read to the model property, that way it'll always be read after the serial number, not before.

I'd change it to an event structure, model change event and serial number change event, it'd make things safer and better.

/Y


After user changes the model, in the front panel it shows proper min and max as per selected model, after user scans the serial number then only it happens. Changing model and scanning serial number is sequential and happends after 5 or more secon after chaning the model then why it is happening?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 13 of 16
(567 Views)

@Ranjeet_Singh wrote:



After user changes the model, in the front panel it shows proper min and max as per selected model, after user scans the serial number then only it happens. Changing model and scanning serial number is sequential and happends after 5 or more secon after chaning the model then why it is happening?


1. Yes, since that all happens in the top loop.

2. You miss the fact that the Model property could have been read 30 secs ago since there's no wire to it. Wire the error out from Read visa and it will only read that property after a new serial number has been read.

Race condition is a female hound.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 14 of 16
(553 Views)

I changed the position of model property node and attached the VI. I think this will solve the issue. Let me know if this is correct

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 15 of 16
(549 Views)

That'd solve the problem, but is a Rube. There's no need to read the value just to write the same value to get the string ... just get the string. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 16 of 16
(533 Views)