03-07-2024 04:18 PM
Hi there,
I cant seem to understand why b is the answer, could anybody share their thoughts?
For question 4, it says b. But only one "value change" event ocurrs, there are two possible events, mouse down and mouse up, but those are not value change events, am i right?
So answer should be D.
Question 11, i would say d and a are the same, sure in a) they are forced to be sequential, but the question does not mention that.. Is that right? Solution says a)
I appreciate your time.
Thanks.
Solved! Go to Solution.
03-07-2024 09:56 PM
@AldhairGarza wrote:
For question 4, it says b. But only one "value change" event ocurrs, there are two possible events, mouse down and mouse up, but those are not value change events, am i right?
So answer should be D.
I guess you did not really set the mechanical action to "latch until released" when testing? (One of the more unusual settings)
03-08-2024 02:57 AM
I did a test for 'Latch Until Released' and I am surprised that the 'NewVal' is TRUE for both 'Value Change' events.
I would expect the first value to be TRUE and the second to be FALSE.
Is this expected behavior? Did I do something wrong?
03-08-2024 09:31 AM - edited 03-08-2024 09:32 AM
@UliB wrote:
Is this expected behavior? Did I do something wrong?
I guess that's the way it is and I am sure there is a good explanation. You get the same value when tapping into the terminal directly:
@UliB wrote:
I did a test for 'Latch Until Released' and I am surprised that the 'NewVal' is TRUE for both 'Value Change' events.
Not exactly true. IF(!) the default value of the boolean is TRUE, You get FALSE on both. (Latch action got from the default to non-default back to default, no necessarily from FALSE to TRUE). 😄
(Can you explain why your snippet says LV18.0, but it is actually in LV22.3?)
03-08-2024 10:15 AM
@altenbach wrote:(Can you explain why your snippet says LV18.0, but it is actually in LV22.3?)
I'm using Code Capture Tool from LavaG. In the Snippet Configuration there is LV Version 18 selected. The selected version information goes in the header.
I expected the tool to save the snippet in the selected version, but I don't know why the Snippet is not saved in that version.
03-08-2024 10:52 AM
@AldhairGarza wrote:
Hi there,
I cant seem to understand why b is the answer, could anybody share their thoughts?
Producer/Consumer uses a Queue to pass data from one loop to the other. Due to the nature of the Queue, every element will be processed.
A Master/Slave, on the other hand, uses a Notifier to pass the data. Due to the nature of the Notifier, only the last element that has sent will be processed. This meets the requirement of "most recent acquired data".
03-08-2024 11:17 AM
@AldhairGarza wrote:
Question 11, i would say d and a are the same, sure in a) they are forced to be sequential, but the question does not mention that.. Is that right? Solution says a)
This is one of those where you must choose the "best" answer. A proper shut down order does help reliability. So in this case, A is the "best" answer.
03-08-2024 01:58 PM
@crossrulz wrote:
A proper shut down order does help reliability. So in this case, A is the "best" answer.
Wow, this is ancient code, just look at the boolean constants and the no longer existing "Merge errors". 😄 This hasn't been touched in 15 years and really should be updated. Current users don't even recognize some of these primitives!
The problem description seems incomplete, because it is not necessarily obvious in what order things need to occur or if it even matters. The globals might not even be read elsewhere in the same order as written! It is probably reasonable to pull the "power" last, but there are no guarantees unless we look at the code that reads these globals. Then we have that completely pointless "clear errors" in A. Oh well, good enough for a Friday chuckle. 😄
In any case, one part of the question is not about the correctness of the code, but about which code will report all errors. I hate to tell you this, but none of the four code option will report all errors! Once you merge, you only get the first one! Same if you line them up as in C. (Since I never use globals, I still assume that they no longer write if there is an incoming error, so C might not shut down everything, but I have not tested that)