11-17-2013 01:34 AM
@altenbach wrote:
Hi,
So I wrote a simple state architecture. Could you please check for me, stuck with just 1 error 🙂
11-17-2013 02:59 AM
@concacid wrote:So I wrote a simple state architecture. Could you please check for me, stuck with just 1 error 🙂
Where is it?
11-17-2013 03:06 AM
Ok,
This code is not totally complete. I will have to insert sub-vis for to actuallly do read from the meter but this will run I'm sure. What I'm trying to do is to ensure that the string doesnt show until it gets to the actual sequence where it is contained. I tried to use a property node but still cant get it out.
Do you think this will work compared to the earlier one when I insert the missing code into the flat sequence?
11-17-2013 03:32 AM
Looks much better.
Still there are some strange things.
11-17-2013 06:55 AM
@altenbach wrote:
Looks much better.
Dear Altenbach,
Thank you for your help. I think I did some work. All the points you've made above are very valid.
1. I decided to duplicate the cases because labview kept returning some form of error. I've tried to change the tunnel to use default if unwired..hope that works.
2. I cant find the option for making the enum strict type def. I can however make it type def...still need to work on that
3. I want that text to ONLY during that case and disappear afterwards.
4. I decided to leave it at the constant pop-up phase for now because of its simplicity. I know its such a pain. I'm still figuring how not to actively follow the instruction.
I used the SafetoDefaultValues.vi to save the values in my indicators after a case. Was that what you were talking about?
Apart from the above, I dont know how bad I have done.I dont want to ask for too much but...X_X
I just need a knight to review my work. Just in-case you will be kind to help, I can mail or post them (vis&subvis) as you wish.
I'm still in learning school. LOL.
11-17-2013 01:13 PM
@concacid wrote:
1. I decided to duplicate the cases because labview kept returning some form of error. I've tried to change the tunnel to use default if unwired..hope that works.
Just delete these case structures completely! They are not needed. If you use default if unwired, you get the default value, which might be different to what you actually want.
@concacid wrote:
2. I can however make it type def...still need to work on that
That should be OK.
@concacid wrote:
3. I want that text to ONLY during that case and disappear afterwards.
Well, I could not find a property where you make it disappear again. You could use a string indicator with a transparent background and simply write your text, or an empty string to it depending on the condition. No need to make it invisible with property nodes. 😉
@concacid wrote:
I used the SafetoDefaultValues.vi to save the values in my indicators after a case. Was that what you were talking about?
I am not familiar with that VI. Where did you find it?
@concacid wrote:
Apart from the above, I dont know how bad I have done.I dont want to ask for too much but...X_X
I just need a knight to review my work. Just in-case you will be kind to help, I can mail or post them (vis&subvis) as you wish.
I'm still in learning school. LOL.
Seems you are learning very fast. That's a good thing. 😄
11-17-2013 10:02 PM - edited 11-17-2013 10:02 PM
altenbach wrote:
Just delete these case structures completely! They are not needed. If you use default if unwired, you get the default value, which might be different to what you actually want.
I did that but it then brings out an error of incomplete cases.
I used the SafetoDefaultValues.vi to save the values in my indicators after a case. Was that what you were talking about?
altenbach wrote: I am not familiar with that VI. Where did you find it?
I found it on the National Instrument's website: Find it here
altenbach wrote:
Seems you are learning very fast. That's a good thing. 😄
I would love to learn faster. What is the next to learn, I think I'm a little bit okay with state architecture. Kindly suggest!
11-17-2013 11:25 PM
If you removed the case structure, then it is impossible to have incomplete cases. You can't have cases without a case structure!
11-18-2013 01:59 AM
Now it's looking good, a BIG difference from the 1st attempt, good job!
Regarding the case you should remove the full structure, not just one case, which could case the incomplete error can occur.
More of a style thing, but i prefer to wire a True from the Exit case to the Stop loop instead of comparing to the Exit case, with Use Default all others will be false and the loop wont stop, just like you want it and some less stuff on the block diagram.
The next step if taking a loop at events and queued state machine, both have examples and templates you can open. The queued state machine is ofc the next logical step and have the benefit och being able to queue up commands, e.g. if you change parameters you might need to both run Init, Measure and Redraw again.
/Y