Author Topic: how to merge the controls into another project  (Read 3702 times)

ians

  • Newbie
  • *
  • Posts: 7
    • View Profile
how to merge the controls into another project
« on: July 24, 2013, 10:19:14 AM »
hello
how can i merge the controls , drivers into another project to add you functionality, rather than downloading your app and opening it please.
great job
many thanks

ps  vs 2012 for desktop

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: how to merge the controls into another project
« Reply #1 on: July 24, 2013, 10:07:09 PM »
You will need to start with AdvancedHMI solution and add your code to it. There are a lot of references and links that make it complicated to try to turn your existing project into an AdvancedHMI solution.

ians

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: how to merge the controls into another project
« Reply #2 on: July 25, 2013, 03:16:01 PM »
hello
understood, thanks, ill try again to get the zedgraph into yours

do you have pointers on this!
manyt hanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: how to merge the controls into another project
« Reply #3 on: July 25, 2013, 06:42:25 PM »
I would use the Chart that is part of Visual Studio and .NET 4.0

ians

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: how to merge the controls into another project
« Reply #4 on: July 27, 2013, 04:01:15 AM »
hello
ok, will do.
i went for zedgraph as it seemed to have good zoom, pan etc, i would like to do a scrolling graph , i think you may have touched on this before. any pointers
thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: how to merge the controls into another project
« Reply #5 on: July 27, 2013, 04:30:08 AM »
I haven't used ZEDGraph for years so I don't remember the exact details, but the trick to a scrolling graph is to add a new point, then remove the oldest from the point collection when the count exceeds a certain value. This is how to do it with Microsoft Chart:

Dim p as double
p=EthernetIPforCLXCom1.ReadSynchronous("MyTag",1)(0)
Chart1.Series(0).Points.Add(p)
if Chart1.Series(0).Points.count>100 then
  Chart1.Series(0).Points.RemoveAt(0)
end if

ians

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: how to merge the controls into another project
« Reply #6 on: July 29, 2013, 12:39:03 PM »
hello
great,
thanks for the pointer i will try it this week or this weekend.
many thanks

ians

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: how to merge the controls into another project
« Reply #7 on: August 04, 2013, 08:06:47 AM »
hello
i tried this in the timer tick event, but i get an error,
etherntipforclxcom1 is not declared. it may be inaccessible due to its protection level

Dim Value As Integer
    Try
        Value = EthernetIPforCLXCom1.ReadSynchronous("MyTag", 1)(0)
    Catch ex As Exception
        Exit Sub
    End Try
    '* Add the next point to the chart
    Chart1.Series(0).Points.Add(Value)
    '* Do not let more than 100 point be on the chart
    If Chart1.Series.Count > 100 Then
        Chart1.Series(0).Points.RemoveAt(0)
    End If


thanks

ians

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: how to merge the controls into another project
« Reply #8 on: August 04, 2013, 09:15:33 AM »
hi
managed to sort it out, done in a different order and it worked.
great
thanks