LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ok, where is the integer to enumeration type converter?

I'm looking for the integer to enum converter as used by the State Diagram code generator. See screenshot below. Is this only available if you install the State Diagram editor toolkit? I can't find it anywhere on my diagram tool palette nor in Help.



Message Edited by Bill@NGC on 09-03-2007 01:30 PM

0 Kudos
Message 1 of 9
(3,116 Views)
Most likely it's not exposed in a palette, which does not mean it does not exist. 😉
 
What's the path shown in context help when you hover over it.
(make sure to set the context help to "show optional terminals and full paths" (button in lower left of the context help window)).
Message 2 of 9
(3,105 Views)
Nothing shows when hovering regardless of the context help setting. Even unlocking the code makes no difference (state diagram editor tool locks portions of the code so you can edit the state diagram). I can't copy and paste to a new VI nor can I drag it from one to the other. I have a feeling it's tied to the State Diagram editor tool which I don't have installed at home. I'll do a workaround for the time being.
0 Kudos
Message 3 of 9
(3,093 Views)
This can be done with convert to u16 then typecast to enum.  Not as elegant as a single vi but should work.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 4 of 9
(3,092 Views)
Thanks, that saved me a bit of work.
0 Kudos
Message 6 of 9
(3,057 Views)
Oops, should have tried it before replying. You can't just wire your own enumeration type into that VI without getting a conflict (since the control has to match in type to the parameter passed in). That's why the N.I. one is apparently using scripting to allow any enumeration to be wired. It does this as the state diagram transitions are going to be different obviously between different states. This means several or more unique enumerator constants are created.
0 Kudos
Message 7 of 9
(3,055 Views)


@Bill@NGC wrote:
You can't just wire your own enumeration type into that VI without getting a conflict (since the control has to match in type to the parameter passed in).

Actually, you can. You just need to know how to drop in the diagram so that it will adapt to its inputs. I suggest you read the links in the other thread.

Note - external nodes were an experiment in 7.x and were replaced by Xnodes. You should not rely on them in your code. Instead, you can make your own converter for each enum or use either the typecast or a conversion to a variant and back. I would personally be careful about both of them.


___________________
Try to take over the world!
Message 8 of 9
(3,045 Views)
I'm moving forward now after using the State Diagram Editor and then modifying the autocode. No sense getting hung up over that one VI. I will read the links from the other thread when I have time.
0 Kudos
Message 9 of 9
(3,001 Views)