Applies To:
  • CitectSCADA 3.x 4.x

Summary:
When changing values by means of a slider from within Citect, I need to be able to write to the operator-log who did it, which value was changed to what, nd when. The immediate problem is, that putting a keyboard-command on top of the slider works perfectly - except for the mouse commands, which unfortunately is all that I've got! 

Solution:
There is no nice clean way to do this however you should see the OnEvent() function and event numbers 29, 30 and 31. Following is some example code:

INT
FUNCTION
GetSliderAN()
   INT iAN;

   iAN = DspGetAnCur();
   Prompt("Slider AN is " + IntToStr(iAN));
   /* Add your logging code in here, it will need to know the text to log for each animation point */
   RETURN 0;
END

/* Make this part of your startup code if you already have some, see [Code]Startup= */
FUNCTION
StartupFn()
   OnEvent(29, GetSliderAN);
END

The above code only tells you if the slider has been clicked on, you should also log the value of the variable.

 

Keywords:
 

Attachments