03-11-2013 06:32 PM - edited 03-11-2013 06:33 PM
@EngineeringBizi wrote:
1. What is the point of representations? Also, under representations I don't have colour options but all these other short codes of 3 letters that I do not understand, EXT, DBL, CXT, CDB and so on.
2. Yes the case is identical expect a green color constant instead. Yes it applies to the entire plot as intended, thanks.
3. What do you mean by duplicate code? What shouldn't be in the structure?
4. Can you please explain property node as I don't understand, what do you mean after the case structure? Property node?
5. When I was seraching the pallettes I found 'Select <<Comparison>>', it has 3 inputs one green, and the other true and false. It also has one output, I don't understand how I can connect that up to give me two different coloured graph charts when the value is about the limit.
6. I have no idea what you are talking about, sorry, when you talk about the race condition, with the error out of the outer property node, you really have to dumb this down...
7. How do I disable the delta control once the program starts?
Your other points were so helpful.
1: you really need some fundamental knowledge here. Did you teacher not mention any of this? Start here.
2: not a question.
3. The property node is the same in both cases. If you place it after the case, you only need one instance and the code is easier to read. As I said, the case structure only need to contain the stuff that differs: the color constant in this case.
4. enable the context help (ctrl+h) and hover over the program elements. The context help window will tell you how things are called.
5. You wire the true or false from the limit testing to the middle and the red or green color, resp. to the other two terminals. Depending on the value of the boolean, the output is one of the two colors. Right? did you read the help?
6. When the program starts, the clearing of the history and the while loop start at the same time. There is no way to tell what occurs first, but the result will differ slightly, depending on who wins the race. If you wire from the property node to the loop, the loop must wait until the property has been written. This prevents the race condition mentioned.
7. using a property node, for example (e.g. disabled&grayed, or invisible).
03-11-2013 06:47 PM - edited 03-11-2013 06:49 PM
@altenbach wrote:
1: you really need some fundamental knowledge here. Did you teacher not mention any of this? Start here.
There is also a nifty list at http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/numeric_data_types_table/ of what the numeric side of that means in practical terms. In your case as you can only aquire a whole number of points, there is no point using a floating point representation for that value (hence use an integer). The "wait until nex ms multiple" uses an integer input (see Altenbach's comment about context help) so again there's no point using a floating point.
03-11-2013 06:48 PM
1. Search the LV help for
2. and 3. The property nodes are in both cases.They are the code.
4. Drag one of the property nodes outside the case structure - to the right. Wire the color box constants from the two cases to the one property node. Only one property node is needed and only the data changes.
5. Select is polymorphic, like many ohter functions. This means that it can accept many idfferent datatypes. The help file will tell you what kinds will work or you can wire it up and try it. The "t", "f", and output will all have the same datatype. The "s" input is boolean or an error cluster. In your case wire the selector to the same point the selector of the case structure was wired to. The color constants go to the "t" and "f" inputs. The output will go to the property node for the plot color.
6. Race conditions can occur when two parts of the code may execute in parallel. You have no way of knowing which will execute first. The History property node which clears the chart can execute in parallel with the loop where the data is written to the loop. It is possible that one or more data points could be written to the chart before the property node clears it. The best way and often the the only way to assure that one thing occurs before another in LabVIEW is to create a data dependency between them. Search the LV Help for "data depedency". The Block Diagram Data Flow page is the place to start. This is fundamental to how LV works. Make sure you understand Data Flow.
7. You can use a property node to disable a control.
To blink the boolean, create a property node. One of the properties is Blinking. On my system it is the second item on the third block of properties in the pop up menu.
Have you looked at the tutorials yet? A lot of your questions would be answered more quickly by learning how LV works than posting here.
Lynn
03-11-2013 06:53 PM
03-12-2013 09:40 AM
Can you please direct me to on-line tutorials and tell me what I should be going through i,e, step 1, complete this, step 2, go to this, and so on. If you could please provide the links at the same time aswell.
03-12-2013 10:44 AM
When I Google "Getting Started with LabVIEW", the first several results link to useful tutorials and other documents.
Lynn
03-12-2013 11:01 AM
@EngineeringBizi wrote:
Thanks. I'm going to be studying the tutorials soon but due to short time I posted here.
Kudos to both. Thanks!
Typically, you would mark the most helpful post as solution, not your own reply. Right?
03-18-2013 07:55 AM
You can find a sample LabVIEW coding standard (style guide) on this page:
https://decibel.ni.com/content/groups/west-michigan-labview-user-group?view=documents
It's a presentation I did for our LabVIEW user group in Grand Rapids MI. I have some of those expensive books you mentioned and used them as references when I wrote my own. I've also seen a lot of "bad" LabVIEW code from contract programmers and wrote some myself before I knew the difference between poor and acceptable style.
It won't cost you a pile of money to look at. Hope it helps.