- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a state machine. The counters work but the status flags do not. Ex. code below.
if (condition1) begin set f1; goto ST2; end else begin reset c1; goto ST1; end if (condition2) begin set f2; goto ST3; end else goto ST2; if (c1==2) begin trigger; goto ST1; end else if (condition3) begin increment c1; goto ST3; end Neither will be get set to a 1. Always 0. Anyone know why the flags don't get set? Also I found that one does not have to reset the counter. Simply by hitting the Run Analysis button seems to reset everything.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do you know the flag is not set? You don't read it, but just write, in your state machine.
Actually, you can setup the initial value of counter and flag when acquisition is started. By default, they are 0s. I remember there were problems of changing names and initial values using that table windows in a few versions. I wonder if this could be related.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page