LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Order of static reactions - Statechart Module

Alright, I think I can explain what is going on. Your suspicion that using the same name as a previously deleted reaction was somehow involved is correct.

 

Generally, the order is whatever order your reactions were created in.

 

However, if during a configuration, you delete a reaction that existed before you began this configuration, and then create another reaction and give it the same name as the deleted one, it will assume the position of the deleted reaction.

 

Example:

  1. Reactions A, B, C.
  2. Open config dialog.
  3. Delete B.
  4. Create new reaction named B.
  5. Hit OK.
  6. Reopen config dialog. Your new "B" will have taken the place of the old "B". Your reactions will be in the order A, B, C.

I think this explains what you are seeing. If you were to change the example above slightly, you would get the expected, correct behavior. This bug only occurs when you name a new static reaction the same name as one that existed when you began your configuration but then deleted. For example, this similar sequence gives the correct behavior:

  1. Reactions A, B, C.
  2. Open config dialog.
  3. Delete B.
  4. Hit OK.
  5. Open config dialog.
  6. Create new reaction named B.
  7. Hit OK.
  8. Reopen config dialog. Your reactions will be in the order A, C, B.

 I have created a CAR (134252) for this issue. The workaround if you want to delete a reaction and create a new one with the same name is to open the config dialog, do the delete, hit OK to commit the change, then open the config dialog again to create your new reaction with the old name.

Message Edited by aggieNick02 on 11-20-2008 06:01 PM
0 Kudos
Message 11 of 12
(607 Views)

Expanding on this, with the knowledge of how things work behind the scenes, there is actually another, more sinister bug here.

 

Say you have static reactions A and B, both with different actions. No config dialog is open.

 

You then go to configure your state. You rename B to C, then A to B, then C to A. (You are basically swapping names for A and B.)

 

Now hit OK. Open the config dialog again. You'll discover that nothing has changed (the new A should have the old B's action, but it will have the old A's action; likewise for the new B). I'll add this wrinkle to the CAR.

Message 12 of 12
(604 Views)