Applies To:
  • CitectSCADA 3.30 4.10 5.xx

Summary:
In version 3 Citect you can configure a button to respond to both down and up button states. However, when in the down state if you drag the mouse off the button the button returns to its up state and the up command will not be executed when the mouse button is released. This is the correct Windows operation as this way you can cancel pressing a button. This can cause problems for users who assume that the up command will execute in pairs with each and every down command. This is typically a problem if you turn on a bit with the button down and turn it off on the button up (eg to bump a drive). If you press the button down and then drag off the button the bit (and motor) will be left on. 

Solution:
This problem has been acknowledged and is addressed in versions 3.3 and 4.10 of Citect. In these versions a new INI parameter, [ANIMATOR] ButtonCancelMode, has been added which specifies the behaviour of push button command cancellation. This parameter has three possible values: 0, 1, 2; 1 is default. When set to 0 Citect behaves as with previous releases. That is, on button down the button down command is executed and the button up command is only executed if the mouse button is released whilst the mouse cursor is on top of the button. When set to 1 the behaviour of command cancellation is determined by the configuration of the button. If you have configured a down command then the up command cannot be cancelled. If you have not configured a down command the up command can be cancelled. When set to 2 command cancellation is disabled. That is irrespective of how the button was configured the up command can never be cancelled.

The ButtonCancelMode parameter doesn't apply to CitectSCADA v5 button objects. In Citect v5 and later, the up command always executes if you have a down command defined as well. If you only have an up command defined it is possible to cancel it by dragging the mouse off the button before releasing. You can remove the possibility of cancelling the up command if you define a down command with the statement: Sleep(0);

Citect v3/4 button objects used in v5 projects will still work according to the ButtonCancelMode parameter setting.

 

Keywords:
 

Attachments