09-04-2007 01:52 AM
09-04-2007 02:00 AM
Use enum type def to replace the constants. This will give you a description for each output.
@Raghunathan wrote:
I am not sure if there is ay other better way to do this and with descriptive names for the concerned outputs ? In both of my methods there is no facility for naming the individual DOs.
09-04-2007 02:39 AM
Well, how you do this is not that important, but the shift register is certainly not needed because it forces you to reset booleans back to FALSE when the cases changes. Also, since you don't reset all booleans, you'll run into problem if you would change the order of states. Each state needs to define all ON and OFF booleans else you run into potential problems hater.
You also make your life way too complicated. You don't need to wire all these indices. If they are in consecutive order, all you need is to wire the topmost if they should not start counting at zero. You also don't need a seperate bolean diagram constant for each element, use one TRUE and one FALSE and brach the wire.
Also, you have the state indicator after the case structure, meaning you'll display the next state instead of the current state most of the time spend in a state. Is that what you want?
The attached modification shows a few more ways (LV 8.0). All are simpler and take less diagram space than yours.
09-04-2007 03:35 AM - edited 09-04-2007 03:35 AM
Message Edited by Raghunathan on 09-04-2007 03:42 AM
09-04-2007 03:39 AM
Sounds interesting. But I am not sure as of now how to go about implementing it. Let me give it a try and come back if I can't
andre.buurman@carya wrote:Use enum type def to replace the constants. This will give you a description for each output.
09-04-2007 11:54 AM
Though not exactly what was suggested, I have made some modification to the VI that is now atleast easy to check if the right DOT is on. Working on the ENUM Type Def still. Let me see if I get THAT right...
andre.buurman@carya wrote:Use enum type def to replace the constants. This will give you a description for each output.
09-04-2007 01:21 PM
Have you looked at my Action Engine Nugget ?
Reply #2 in that thread has an action engine that handles DO's.
BTW an enum for the offsets is a good idea.
Ben
09-04-2007 01:51 PM
09-04-2007 02:06 PM
@johnsold wrote:
If you use a cluster of booleans, you can name each output.
Since only one state can be active at any given time, you might as well use a "radiobutton control".
If you wire the radiobutton control to a case structure, it will act like an enum using the control names as items. Try it, it is actually pretty cool! 🙂
09-04-2007 08:16 PM
Yes of course I have read the Action Engine thread many times over. Interesting stuff.
@Ben wrote:
Have you looked at my Action Engine Nugget ?
Reply #2 in that thread has an action engine that handles DO's.