01-13-2018 12:59 PM
Hey All, I made the attached vi for the stoplight CLD problem. I would appreciate some input as to how I did and if there is anything my code is missing. Here's the Challenge for the exam
My solution Main VI:Main Loop
State Timer
Enum to CTL
01-16-2018 09:36 AM
Hello,
Here are my recommendations:
Regards,
MJR.
01-16-2018 10:19 AM
Your code looks clean and is well documented. I would ignore the comment about backward flowing wires. Your use of the feedback nodes is perfectly acceptable and your wires must flow backward when using them. You could make use of clusters for the application but it isn't absolutely necessary in this case.
01-16-2018 10:28 AM - edited 01-16-2018 10:29 AM
I've heard differing views on needing to use the LabVIEW quit function. My take is that you needed to invoke this node in LV versions 7.x and older for executables, but not necessary after that. I've based that on posts that I've read, but sometimes my recollection is not accurate.
01-17-2018 08:07 AM
@Mark_Yedinak wrote:
Your code looks clean and is well documented. I would ignore the comment about backward flowing wires. Your use of the feedback nodes is perfectly acceptable and your wires must flow backward when using them. You could make use of clusters for the application but it isn't absolutely necessary in this case.
In terms of clustering: the only place I would see to use them would be combining the two feedback nodes in the "State Timer" Vi. Although I agree that you can do that, doesn't it create an additional level of complexity?
01-20-2018 01:35 PM - edited 01-20-2018 01:56 PM
Remind me again, do you get a template with the controls already in place or do you need to design from scratch?
I am not sure about your icon with arbitrary (=non-rectangular) shape (i.e. your "enum to CTL"). I have used them in the past (example), but they are typically rare. In your case, there is no real justification for that protrusion at the bottom of the icon.
One problem with the UI is the fact that the off states are too bright, especially the yellow. I would make all the off states black or very dark grey. Starting from scratch, it would be much more reasonable to use a radiobutton indicator for the lights. Now the state is a simple typedef'd enum with three states. Attached is a trivially simple draft to show the idea, of course one would need to adapt the rest of the code, but I think it would simplify things. (create a second radiobutton for the left turn and create a cluster of the two for the full indicator, etc.).
01-20-2018 02:44 PM
@altenbach wrote:
Remind me again, do you get a template with the controls already in place or do you need to design from scratch?
I am not sure about your icon with arbitrary (=non-rectangular) shape (i.e. your "enum to CTL"). I have used them in the past (example), but they are typically rare. In your case, there is no real justification for that protrusion at the bottom of the icon.
One problem with the UI is the fact that the off states are too bright, especially the yellow. I would make all the off states black or very dark grey. Starting from scratch, it would be much more reasonable to use a radiobutton indicator for the lights. Now the state is a simple typedef'd enum with three states. Attached is a trivially simple draft to show the idea, of course one would need to adapt the rest of the code, but I think it would simplify things. (create a second radiobutton for the left turn and create a cluster of the two for the full indicator, etc.).
That's a cool application of a radio button, I'll keep that in mind for future projects. I think you are given the panel.
As for making Icons, I'll keep that in mind. As long as it's a rectangle though you're good, or should they only be full size icons?