07-01-2014 11:52 PM - edited 07-02-2014 12:16 AM
@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...
07-02-2014 12:01 AM - edited 07-02-2014 12:09 AM
@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 place
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
07-02-2014 12:15 AM
@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?
07-02-2014 02:10 AM
@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
07-02-2014 02:21 AM
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
07-02-2014 05:39 AM
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