01-14-2009 02:33 PM
To help understanding more my problem, please see the Figure 2 of this link http://expressionflow.com/2007/10/01/labview-queued-state-machine-architecture/
- I have a state machine similiar with the above link. The state machine was handled by a similiar Type Def1 (on the left) & in one event there is a similiar Type Def2 (on the right), my state machine working fine!
However, I need to add a new event into the existed state machine ... I did try the following:
1. I add a new item New_Event into the Type Def1 (Auto Update Type Def) & Save, then Add Case After in the state machine ---> it inserts automatically a new event New_Event. In this event I use a PopUp dialog box = "New_Event does happen!")
2. I aslo add a new item New_Event into the Type Def2 (Auto Update Type Def) & Save!
3. In a specific event (as in the link), in Type Def2, I select the New_Event (to make sure it works, in this event I use a PopUp dialog box = "Should execute event New_Event") then add the 2nd event which will show "Second task is excecuted!"
4. Run program & the PopUp dialog box shows "Should execute event New_Event" ... but there is no PopUp dialog box "New_Event does happen!". Somehow it could not invoke the New_Event
5. After a while, it shows PopUp dialog "Second task is excecuted!"
6. I did try to Update Change both Type Def1 & Type Def2 then run again ---> same thing happen again!
*) I am not very experience with state machine ... might be I forget some thing to make it work when adding some thing new?
Thanks to any help
01-14-2009 02:45 PM
Can you post your code? Make sure you include the typedef control.
01-14-2009 03:10 PM - edited 01-14-2009 03:14 PM
Hi, the project size is 92.6 Mbytes that was why I did not attach the zip. I can only attach the Main vi, but then you can not load or run it because of missing a lot of vi's & also you can not examine them! Please tell me what do you do like (whole files or only 1 Main vi)?
In your experience, if you have to add a new event in the existed state machine (as in my case), what steps I should do?
Thanks
01-14-2009 03:18 PM
01-14-2009 03:26 PM
Hi Paul,
I thought that I missing some thing, but I did forget to do this method for debugging, I will do as you suggested to see what is happen!
Thanks
01-15-2009 08:05 AM
Hi Paul,
As you suggested I did find the state machine actually fall into another state by previous programmer (which defined as Default case), that was why it ignores my new event! I did add my new event into his state & now the New_Event is activated as I wanted
Thank for the suggestion ... I was so busy with other stuff & forgot this debugging (silly me)!
Thank again