04-12-2018 08:03 AM
@DG76 wrote:
The Tons of Peanuts control in the cluster is essentially being used as an indicator in this exercise, as it is showing the current Tons of Peanuts count, whereas the Fill and Use buttons are used to increment or decrement the count.
No, it is still a control. You can adjust the dial and perform reactions based on that vale being changed. You just use those buttons to have more refined adjustments. Would have been easier to just show the digital value, but that is beside the point.
04-12-2018 08:42 AM - edited 04-12-2018 08:46 AM
I do realise that it is technically a control, which is why I phrased it "essentially being used as an indicator". I hope you are not offended that I did not take your previous post as a solution, crossrulz! I think it would be misleading for other readers for me to mark anything as a solution for this, because as I stated previously I do not think there really is a good solution in this case. That is because of the exercise requirements, and is no fault of yours. I appreciate your input, it has been very helpful. Thank you.
04-12-2018 09:30 AM
@DG76 wrote:
I do realise that it is technically a control, which is why I phrased it "essentially being used as an indicator". I hope you are not offended that I did not take your previous post as a solution, crossrulz! I think it would be misleading for other readers for me to mark anything as a solution for this, because as I stated previously I do not think there really is a good solution in this case. That is because of the exercise requirements, and is no fault of yours. I appreciate your input, it has been very helpful. Thank you.
One of the objectives of the CLD Prep material IS TO get you to think critically about how to implement a set of requirements.
This has been achieved! The sample solution provided may lack in many ways (as I've pointed out before, it wouldn't pass my standards) however it is testable against the requirements! and since it meets those requirements - Ta DA. Ship it!
04-12-2018 09:39 AM
One role that these exercises provide is to help prevent rude surprises during the exam by giving test-preparers the opportunity to work through challenges which, while not overly complicated, might not be fair to present for the first time in a 4-hour, timed, high-pressure setting. The discussion indicates you've got the degree of familiarity you'll need.
04-12-2018 10:08 AM - edited 04-12-2018 10:20 AM
@DG76 wrote:
Unfortunately, writing to local variables in this context is simply not possible for this CLD exercise as far as I can tell. Has anyone actually tried it? I get the attached errors when I do.
If someone has in fact implemented this, I would be interested as to exactly how they did it.
My solution is still possible, but you need to change the buttons to "switch when pressed". Since you need to rewrite the cluster anyway, this gives you an opportunity to write a FALSE back to the booleans to simulate latch action. (However, I am not sure if changing the mechanical action is allowed).
Still, as many have said, this is not such a great example to begin with and the functionality could be implemented in a much more reasonable fashion by changing the entire template in a more suitable form.
I would probably start with something as follows (see picture). Note that you only need one event case for this. Status indicators not shown.
To expand, you would use an array of such clusters, for a fully scalable solution where you can change the number of plants by just changing the array size. You would first tell which element has changed, index it out using an IPE, process as shown with an unbundle IPE, and write it back to the same element. Use an array of status indicators for the display (not shown) .
04-12-2018 10:57 AM
@altenbach wrote:
Still, as many have said, this is not such a great example to begin with and the functionality could be implemented in a much more reasonable fashion by changing the entire template in a more suitable form.
Thinking about it a little more, I would change those clusters into an XControl with just the numeric value the control value. It is scalable, simple to use, and eliminates a lot of the weird logic in the state machine. It would even remove that Property Node. But that is a little outside of the CLD.
04-12-2018 10:59 AM
@DG76 wrote:
I hope you are not offended that I did not take your previous post as a solution, crossrulz!
Not one tiny bit. I actually agree that it was not the right solution.
04-12-2018 12:28 PM
wrote:
... I would change those clusters into an XControl with just the numeric value the control value. ....
I intentionally did not suggest that 😄
One problem is that Xcontrols cannot be placed inside arrays eliminating my expansion suggestion.
Another problem with Xcontrols are that they are not really future-proof (NXG) 😉