10-29-2009 01:23 AM
I am thinking about switching to from Datasocket to shared variables, but I just have one small question. When call to "write to shared variable" node ends, is it certain that the new value has been written (unless there is an error)? If I read the same shared variable right after writing to it, I just want to be sure that I always read the new value (without performing any additional checking such as comparing old value to the read value...).
10-29-2009 01:48 AM
You can check this by writing tag (for ex. Current time) information along with the data and recheck the same by reading the data at Read Shared variable node. Later you can detach the tag from the data by using some pattern comparison.
Reagards
Visuman
10-29-2009 02:05 AM
10-29-2009 02:14 AM
Yeah thats right, the shared variable always reads the updated one. I suggested the method to test the udation frequency
Reagrds
Visuman
10-29-2009 05:30 AM
11-19-2009 10:52 AM
Thanks veryone. I guess I'll use the timestamp method if it looks like the program is not reading the variable properly sometimes.
11-19-2009 02:11 PM