![vijeo citect 2015 vijeo citect 2015](https://www.proface.com/library/SCHNEIDER_ELECTRIC/SE_LOCAL/APS/193017_685A/0.1A6.gif)
If you have not configured a down command the up command can be cancelled. If you have configured a down command then the up command cannot be cancelled. When set to 1 the behaviour of command cancellation is determined by the configuration of the button. 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 0 Citect behaves as with previous releases. This parameter has three possible values: 0, 1, 2 1 is default. In these versions a new INI parameter, ButtonCancelMode, has been added which specifies the behaviour of push button command cancellation. This problem has been acknowledged and is addressed in versions 3.3 and 4.10 of Citect. If you press the button down and then drag off the button the bit (and motor) will be left on. 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). This can cause problems for users who assume that the up command will execute in pairs with each and every down command.
VIJEO CITECT 2015 WINDOWS
This is the correct Windows operation as this way you can cancel pressing a button. 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. In version 3 Citect you can configure a button to respond to both down and up button states. I found an old tech note (see below) that follows the same reasoning you suggest about the mouse movement away from the object before releasing the button.
![vijeo citect 2015 vijeo citect 2015](https://demo.dokumen.tips/img/380x512/reader026/reader/2021092405/55cf96fc550346d0338f175c/r-2.jpg)
On cidode function set/reset bit and pass status back with write command to variable name.
VIJEO CITECT 2015 CODE
Maybe better would call Cicode function (Which you have maded), then call this cicode function and pass variable name inside to cicode code called. The command will execute as soon as the mouse button is clicked.
![vijeo citect 2015 vijeo citect 2015](https://demo.dokumen.tips/img/380x512/reader024/reader/2021021815/549dec13ac795915768b45ce/r-1.jpg)
Select this option if you want a command to be executed (and a unique message to be logged) when the operator positions the mouse pointer over the object/group, and clicks the left mouse button. Select this option if you want a command to be executed (and a unique message to be logged) when the operator positions the mouse pointer over the object/group, and clicks and releases the left mouse button.Īs with standard Windows buttons, if the operator moves the cursor away from the object/group before releasing the mouse button, the command isn't executed (unless you also select the Down option). I have verified that there is no difference in the construct (code, etc.) of this one object that is still getting "stuck". Almost all the Start bits now seem to be resetting but one bit still gets "stuck". I am not sure the actual scan time of PLC but increasing the delay would not impact the process so I gave it a try. I thought perhaps the PLC scan was not seeing the command to reset the bit so I increased the delay to five seconds as shown above. The only remedy was to reset the bit via the PLC programming software. My initial code had the up command wait two seconds before resetting the bit and with the shorter delay a few of these Start bits would get "stuck".
![vijeo citect 2015 vijeo citect 2015](https://docplayer.net/docs-images/104/166016974/images/28-0.jpg)
Sometimes the the Start bit does not reset. There are several uses of this code in my project, each one setting a resetting a different Start bit. When the mouse button is released (up) the code waits a few seconds the sets the Start bit to zero. The code sets a Start bit with the mouse button is clicked (down). I have created a Vijeo Citect 2015 project with code to mimic a momentary pushbutton.