Author Topic: LineShapeHMI help  (Read 840 times)

sarclimber

  • Newbie
  • *
  • Posts: 20
    • View Profile
LineShapeHMI help
« on: February 22, 2020, 03:11:55 PM »
Project background:  I have a background image and I am trying to put multiple lines on it to represent multiple processes.  I am trying to control the visibility or color of the lines dependent on multiple plc tags.  I am using OPC and that is working fine as basic labels are fully controllable by the plcs.  I muddled through installing the LineShapeHMI control and it is working but does not seem to have the orientation control I need, lines have to be various lengths and angles on the background image...am I missing something obvious there?

I also tried installing Visual Basic Powerpack and used the line shape.  Used a basic label and wrote code to control the visibility of the powerpack line shape.  Built with no errors but the form with the background image will not display as long as the code is there.  If I comment out code, leave line on form, the form will display fine but obviously no plc control of visibility.  Any ideas?

i have searched the forums and read (multiple times) each post on line control but having no luck so far.

Any help is appreciated.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: LineShapeHMI help
« Reply #1 on: February 22, 2020, 03:59:24 PM »
Maybe try manipulating X1, X2, Y1, Y2 similar to this:

https://www.advancedhmi.com/forum/index.php?topic=142.msg313#msg313

sarclimber

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: LineShapeHMI help
« Reply #2 on: February 22, 2020, 05:26:25 PM »
Thanks Godra, I will give that a try and report back.  Any thoughts on why code controlling powerpack line shape causes form to not work?  This would be very simple way to control lines if I can get it to work.

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: LineShapeHMI help
« Reply #3 on: February 23, 2020, 11:30:36 PM »
You didn't post your code so it's difficult to be exact.

The code should be as simple as this:

Code: [Select]
    Private Sub BasicLabel3_ValueChanged(sender As Object, e As EventArgs) Handles BasicLabel3.ValueChanged
        If BasicLabel3.Value = "True" Then
            Me.LineShape1.Visible = False
        Else
            Me.LineShape1.Visible = True
        End If
    End Sub


sarclimber

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: LineShapeHMI help
« Reply #4 on: February 27, 2020, 11:34:02 AM »
Code did match what you posted above.  Gave up, deleted Windows form and started over.  Still using Powerpack LineShape and working fine now, do not see any differences but I am not complaining.  Thanks for the assistance.