Don't know if this is the correct way of doing it but this has worked for me in the past. You can build off of this to make sure the pointer is valid, slider element is pointing to the correct slider, etc...:
siSlider1POS : SINT := 0; (*Slider value*)
xInit : BOOL := TRUE;
pSlider1 : POINTER TO visufbelemslider; (*Library part of "System_VisuElemsWinControls that should already be in your project*)
IF xInit THEN
xInit := FALSE;
pSlider1 := ADR(__VisuInitInstantiation_Gvl.__VisuInitInstantiation_Instance.inst__Home.GEN_Instance_2._visufbelemslider); (*Pointer to slider*)
IF NOT pSlider1^.m_bDragged THEN
siSlider1POS := 0; //Set slider value to 0 when slider is not being dragged.
Hi, and thanks for reply.
I am having trouble pointing to my slider. It has ID 0 i my visu. Is it suppose to be located in the Input Assistant?