Author Topic: Trackbar  (Read 4391 times)

sunny

  • Newbie
  • *
  • Posts: 22
    • View Profile
Trackbar
« on: March 31, 2015, 03:31:27 PM »
Hi all

I have found the source code for a trackbar (slider) but I have no idea how to intergrate it in AdvancedHMI. Is there some one how can help me with that.
Thanks in advance.
Marcel

The source code can be found here.
http://www.codeproject.com/Articles/35104/gTrackBar-A-Custom-TrackBar-UserControl-VB-NET

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Trackbar
« Reply #1 on: April 08, 2015, 10:34:37 PM »
There is the gTrackBar.dll file inside the "gTrackBar\gTrackBar\bin\Release" folder, which you should add as a reference to both AdvancedHMI and AdvancedHMIControls in your project.

Then just download the attached file and add it as Existing Item to the PurchasedControls folder, close all forms and rebuild the project (the control appears to be working fine as it is).

- PLCAddressValue inputs the value from that PLC address to the gTrackBar
- Changing the gTrackBar value will write the new value back to the PLCAddressValue

If you either drag a slider to a certain value or enable JumptToMouse property and jump directly to any value or just use mouse clicks (functionality of the ChangeLarge property), the last gTrackBar position value will be written to the PLCAddressValue address. If instead you use the Up/Down buttons to change the gTrackBar value then don't click on them too fast.

EDIT: In this post, there is also post-v3.99a AHMI file attached. See also the post below for v3.99y file.
« Last Edit: October 14, 2018, 01:02:26 PM by Godra »

sunny

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Trackbar
« Reply #2 on: April 09, 2015, 02:34:05 PM »
thanks verry much Godra

Jose

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Trackbar
« Reply #3 on: October 13, 2018, 12:23:41 AM »
Hi all!  I'm new to this software so please bare with me.
I have tried to install the gtrackbar as stated above and it seems to have installed and I can configure a slider (trackbar) on the form however there is no option for PLC coms in the property section.  Am I missing something?
All other AdvancedHMI components include a PLC Communications option.

Please help

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Trackbar
« Reply #4 on: October 13, 2018, 01:01:07 AM »
You should read my previous post again.

Here in this post, I have attached the file that works fine with 3.99y Beta 12 (since the previously posted file will show an error related to double "m" in CommComponent). Besides for the attached file, all that is required are references to the gTrackBar's dll file.

The attached picture shows gTrackBar working fine over ModbusTCP and communicating with the MODRSsim2 simulator.
« Last Edit: October 13, 2018, 11:39:55 PM by Godra »

Jose

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Trackbar
« Reply #5 on: October 13, 2018, 03:30:18 PM »
Thank you so much
This worked like a charm!

BRX_Noob

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Trackbar
« Reply #6 on: November 12, 2018, 02:23:57 PM »
Hello, I'm new to AdvancedHMI. After reading the previous posts, I'm still confused as to adding the PLCAddressValue to the TrackBar. I downloaded AdvancedHMI recently and it has the TrackBar in the Toolbox. I downloaded gTrackBarHMI.vb and put it in AdvancedHMI\AdvancedHMIControls\PurchasedControls. PLCAddressValue isn't showing up in the properties window, even after rebuilding and closing/reopening AdvancedHMI.

I think what I may be missing is adding gTrackBar.dll as a reference to AdvancedHMI and AdvancedHMIControls. I'm not sure how to do that, though.

Phrog30

  • Guest
Re: Trackbar
« Reply #7 on: November 12, 2018, 03:17:04 PM »
To add a reference right click on references and click add existing item.

BRX_Noob

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Trackbar
« Reply #8 on: November 13, 2018, 08:28:26 PM »
I tried that, but I couldn't see the 'add existing item'. Am I looking in the right place? My attachment shows what I'm seeing.

Phrog30

  • Guest
Re: Trackbar
« Reply #9 on: November 13, 2018, 08:55:14 PM »
I'm sorry, just click add reference. I told you wrong on the existing item.

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: Trackbar
« Reply #10 on: June 24, 2020, 06:05:31 AM »
Hello Guys,

originally from the file I downloaded are these lines with error:
Public Class gTrackBarHMI
    Inherits gTrackBar.gTrackBar

what should be the correct one?

am using V3.99y

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Trackbar
« Reply #11 on: June 24, 2020, 03:01:54 PM »
You probably didn't read all the posts.


joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: Trackbar
« Reply #12 on: June 24, 2020, 09:45:50 PM »
my bad, should only add one file.