キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

State Machine

解決済み
解決策を見る

Hi! I also have a question about state machines: once your state machine is built and fonctionnal, how do you edit the item list of the Enum Constant Properties (like remove or rename a state) and have the Case structure reflect the changes? When I do the slightest change to the list, all the related information in the Case structure disappear leaving only case numbers? Can anyone help me? Thank you very much!

0 件の賞賛
メッセージ11/22
1,110件の閲覧回数

Use a typedefed ENUM. Use this typedef for ALL of your ENUM constants in your state machine. That way when you edit the typedef everything derived from it will be updated as well.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 件の賞賛
メッセージ12/22
1,103件の閲覧回数

Hello Mark,

Thanks for the quick response! I tryed to modify my Enum Constant to select the "Update from Type Def." option, and then modify a list item name. Unfortunately, the Case Structure does the same thing: all information related to the Enum item list disappear except for the item numbers. Am I doing something wrong, or haven't I understand correctly your instructions? Thanks for your help!

0 件の賞賛
メッセージ13/22
1,100件の閲覧回数

@StephChouinard wrote:

Hello Mark,

Thanks for the quick response! I tryed to modify my Enum Constant to select the "Update from Type Def." option, and then modify a list item name. Unfortunately, the Case Structure does the same thing: all information related to the Enum item list disappear except for the item numbers. Am I doing something wrong, or haven't I understand correctly your instructions? Thanks for your help!


Yes, ALL instances of the ENUM, and I mean EVERYONE of them, but use the typedef. If even a single one does not the case structure will only show numbers if you changce the ENUM typedef.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 件の賞賛
メッセージ14/22
1,097件の閲覧回数

I did change ALL Enum Constant occurences in the Case structure to select the "Auto-Update From Type Def." option, and still, the Case Structure lost all information but the item numbers...

0 件の賞賛
メッセージ15/22
1,094件の閲覧回数

Were they all created from the same typedef? Can you post you code? It is easier to see what is going on if one can actually see the code.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 件の賞賛
メッセージ16/22
1,088件の閲覧回数

Here is my code before modifications...

0 件の賞賛
メッセージ17/22
1,084件の閲覧回数

You did not include your typdef. In addition, only one of your ENUMs in this code was associated with the typedef. Modifying the typedef would result in the behavior you described. It would be much more helpful for you to post the code after your modifications that you say is not working.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 件の賞賛
メッセージ18/22
1,079件の閲覧回数

Hello again Mark,

When I try to "Update from Type Def." all my ENUMs, the system saves a new Control Type Def every time instead of pointing to an existing one. I end up with as many Control Type Def files (Control x.ctl) as I have ENUMs in my code. I must be doing something wrong, but I don't know what?

0 件の賞賛
メッセージ19/22
1,076件の閲覧回数

Replace all of your ENUMs with th etypedef. Don't create a new one for each one. For each of your ENUMs right click on it and choose replace. Then select your typedef. Lesson to be learned here is that you should always use typedefs for ENUMs. If you start there you don't waste a ton of time replacing all of your instances or modifying all of them to make a change.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 件の賞賛
メッセージ20/22
1,074件の閲覧回数