<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/</id><updated>2020-02-27T18:06:53.285000Z</updated><subtitle>Recent posts to Signal when Slider is active.</subtitle><entry><title>Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/?limit=25#d1b4" rel="alternate"/><published>2020-02-27T18:06:53.285000Z</published><updated>2020-02-27T18:06:53.285000Z</updated><author><name>Comingback4u</name><uri>https://forge.codesys.com/u/comingback4u/</uri></author><id>https://forge.codesys.comc7eecf063edf3a5c2ecbfc8be651d8acc62cf57c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
If you can do it the way M.Prestel shows it i'm sure it is a better approach. If you can't do it that way maybe you could upload a sample project for me to take a look at. As Marcel mentions Pointers is not the best approach but I'm using 3.5.5.4 and don't know if his approach is available in this version. Haven't had time to look into it thoroughly. What version of CoDeSys are you using also helps.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
CB&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/?limit=25#8ef9" rel="alternate"/><published>2020-02-27T18:06:52.154000Z</published><updated>2020-02-27T18:06:52.154000Z</updated><author><name>paularnenyborg</name><uri>https://forge.codesys.com/u/paularnenyborg/</uri></author><id>https://forge.codesys.com617e589a410eb378d5400977dd09be90df11eed3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Comingback4u hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
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...:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VAR_INPUT&lt;/span&gt;
    &lt;span class="nv"&gt;siSlider1POS&lt;/span&gt; : &lt;span class="nv"&gt;SINT&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;; (*Slider value*)&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
&lt;span class="nv"&gt;VAR&lt;/span&gt;
    &lt;span class="nv"&gt;xInit&lt;/span&gt; : &lt;span class="nv"&gt;BOOL&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;TRUE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;pSlider1&lt;/span&gt; : &lt;span class="nv"&gt;POINTER&lt;/span&gt; &lt;span class="nv"&gt;TO&lt;/span&gt; &lt;span class="nv"&gt;visufbelemslider&lt;/span&gt;&lt;span class="c1"&gt;;  (*Library part of "System_VisuElemsWinControls that should already be in your project*)&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;xInit&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
    &lt;span class="nv"&gt;xInit&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;FALSE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;pSlider1&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;__VisuInitInstantiation_Gvl&lt;/span&gt;.&lt;span class="nv"&gt;__VisuInitInstantiation_Instance&lt;/span&gt;.&lt;span class="nv"&gt;inst__Home&lt;/span&gt;.&lt;span class="nv"&gt;GEN_Instance_2&lt;/span&gt;.&lt;span class="nv"&gt;_visufbelemslider&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;; (*Pointer to slider*)&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;NOT&lt;/span&gt; &lt;span class="nv"&gt;pSlider1&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;.&lt;span class="nv"&gt;m_bDragged&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
    &lt;span class="nv"&gt;siSlider1POS&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;; //Set slider value to 0 when slider is not being dragged.&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Hi, and thanks for reply.&lt;br/&gt;
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?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/?limit=25#297b" rel="alternate"/><published>2020-02-27T18:06:49.140000Z</published><updated>2020-02-27T18:06:49.140000Z</updated><author><name>mprestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com0d74542af7d4d8cdd3f5a75838f68fef359aee60</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Paul,&lt;/p&gt;
&lt;p&gt;attached you can find an example using the interface IMouseEventHandler.&lt;/p&gt;
&lt;p&gt;With this you are not depending on internal structures, which may change at any time.&lt;/p&gt;
&lt;p&gt;Keep in mind, this attached example is only designed for a single client! &lt;br/&gt;
If you have multiple clients, we would have to store the iSliderValueOnMouseDown in an array.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=4984" rel="nofollow"&gt;ResetSliderValue.project &lt;span&gt;&lt;span&gt;[175.13 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/?limit=25#2dab" rel="alternate"/><published>2020-02-27T18:06:48.041000Z</published><updated>2020-02-27T18:06:48.041000Z</updated><author><name>Comingback4u</name><uri>https://forge.codesys.com/u/comingback4u/</uri></author><id>https://forge.codesys.com31a667e2f3493900e1d31ea0e52894c33380b52a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;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...:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VAR_INPUT&lt;/span&gt;
    &lt;span class="nv"&gt;siSlider1POS&lt;/span&gt; : &lt;span class="nv"&gt;SINT&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;; (*Slider value*)&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
&lt;span class="nv"&gt;VAR&lt;/span&gt;
    &lt;span class="nv"&gt;xInit&lt;/span&gt; : &lt;span class="nv"&gt;BOOL&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;TRUE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;pSlider1&lt;/span&gt; : &lt;span class="nv"&gt;POINTER&lt;/span&gt; &lt;span class="nv"&gt;TO&lt;/span&gt; &lt;span class="nv"&gt;visufbelemslider&lt;/span&gt;&lt;span class="c1"&gt;;  (*Library part of "System_VisuElemsWinControls that should already be in your project*)&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;xInit&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
    &lt;span class="nv"&gt;xInit&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;FALSE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;pSlider1&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;__VisuInitInstantiation_Gvl&lt;/span&gt;.&lt;span class="nv"&gt;__VisuInitInstantiation_Instance&lt;/span&gt;.&lt;span class="nv"&gt;inst__Home&lt;/span&gt;.&lt;span class="nv"&gt;GEN_Instance_2&lt;/span&gt;.&lt;span class="nv"&gt;_visufbelemslider&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;; (*Pointer to slider*)&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;NOT&lt;/span&gt; &lt;span class="nv"&gt;pSlider1&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;.&lt;span class="nv"&gt;m_bDragged&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
    &lt;span class="nv"&gt;siSlider1POS&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="c1"&gt;; //Set slider value to 0 when slider is not being dragged.&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/?limit=25#9c61" rel="alternate"/><published>2020-02-27T18:06:45.042000Z</published><updated>2020-02-27T18:06:45.042000Z</updated><author><name>paularnenyborg</name><uri>https://forge.codesys.com/u/paularnenyborg/</uri></author><id>https://forge.codesys.com854826bc3e196274b30b8f2571a3fa022d96727d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;m.prestel hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hello Paul,&lt;br/&gt;
do you mind sharing what you want to do with this signal?&lt;br/&gt;
This may help me or others understand what you need and how you can achieve it.&lt;br/&gt;
Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Marcel.&lt;/p&gt;
&lt;p&gt;I want the slider to go back to a set value when I release it. My slider spans from -100 to + 100. I want it to 0 when I don't touch it.&lt;br/&gt;
I thought I could write a small code that takes the slider to 0 when that signal goes FALSE.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/?limit=25#eb60" rel="alternate"/><published>2020-02-27T18:06:43.979000Z</published><updated>2020-02-27T18:06:43.979000Z</updated><author><name>mprestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.comf691e214b938530fcb75952f49161d6b6c311372</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Paul,&lt;/p&gt;
&lt;p&gt;do you mind sharing what you want to do with this signal?&lt;br/&gt;
This may help me or others understand what you need and how you can achieve it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Signal when Slider is active.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/8b76b3d349/?limit=25#8a59" rel="alternate"/><published>2020-02-27T18:06:40.969000Z</published><updated>2020-02-27T18:06:40.969000Z</updated><author><name>paularnenyborg</name><uri>https://forge.codesys.com/u/paularnenyborg/</uri></author><id>https://forge.codesys.com49983442051a80a2e7c6f49075d3a1bdb6604d59</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I have a couple of sliders in my visu. Is it possible to get a signal from a slider that it is being touched?&lt;br/&gt;
I'm not thinking about the value that I change, but rather a BOOL that goes TRUE when I touch the slider and FALSE again when I don't touch it.&lt;br/&gt;
I have tried with hollow buttons, invisible buttons etc with no luck.&lt;/p&gt;
&lt;p&gt;Paul  &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>