Author Topic: Graphic  (Read 2219 times)

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Graphic
« on: July 24, 2019, 01:55:35 AM »
Hello, I'm new to Advanced HMI, and I think it's great. I have already made a page for home automation management and it works well. I communicate with a Schneider Twido PLC in TCP ModBus.

I would like to create a second page with a graph that records the temperature values of my 2 sensors and my PID (%MFxx, %MWxx). Can you help me, please.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Graphic
« Reply #1 on: July 24, 2019, 04:04:55 AM »
- In Solution Explorer, Right click the AdvancedHMI project and select Add->Windows Form
- Give the form a name
- Build the solution
- On the MainForm add a FormChangeButton
- Set FormToOpen to the new form you added
- On the new form add a FormChangeButton and set FormToOpen to Mainform

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Graphic
« Reply #2 on: July 24, 2019, 11:12:18 AM »
Thank you very much @Archie, it works perfectly well and I now understand how to add pages to my project.

Now it's how to create an animated graph that represents the curves of my probes over a time/temperature period. I have the means to read the words of my Schneider Twido PLC to read their values, but how do I format it on a page?

Thank you for your patience and help.

Sincerely.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Graphic
« Reply #3 on: July 24, 2019, 11:30:49 AM »
Make sure the form has a driver instance

- Add a ChartBySampling
- Use the PLCAddressItems to add series to the chart

Note : If you use the 3.99y Beta version, it has a ChartWithLogging

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Graphic
« Reply #4 on: July 24, 2019, 04:08:51 PM »
Thank you again for this information, but it doesn't work. However, I have positioned the Modbus TCP on my page 2, I have added the PLC addresses of %MW12 (PLC Adress 40013) and %MW31 (PLC Adress 40032), but I do not see anything on the graph appear. I'm really new to this field. I would have even liked to read some %MF values, because they tolerate a number after the comma.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Graphic
« Reply #5 on: July 24, 2019, 04:13:23 PM »
Add a BasicLabel to the form and set PLCAddressValue to 40013

This will show you any communication errors.

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Graphic
« Reply #6 on: July 25, 2019, 04:17:31 AM »
Hello, I added a BasicLabel with PLC address 40013 but I have no errors. On my page I have no problem to display the states of my bits or words of my PLC.
The graph is all white for me.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Graphic
« Reply #7 on: July 25, 2019, 07:54:30 AM »
What version of AdvancedHMI are you using and what OS?

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Graphic
« Reply #8 on: July 25, 2019, 09:17:33 AM »
It is 3.99r1 and Windows 10 pro(update ok)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Graphic
« Reply #9 on: July 25, 2019, 09:43:11 AM »
Do you see a chart in Design View in Visual Studio or the same white area?

Can you try the latest Beta version:

https://www.advancedhmi.com/forum/index.php?topic=2450.0

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Graphic
« Reply #10 on: July 25, 2019, 11:10:33 AM »
Yes, I can see a graph in creation mode. I have configured only one input, that of my temperature probe. Shouldn't we configure time in addition by a word? Don't you need an ordered axis and an abscissa axis?  But I don't know how to do it.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Graphic
« Reply #11 on: July 25, 2019, 11:57:51 AM »
The Sample time is determined by the PollRateOverride setting of the driver instance

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Graphic
« Reply #12 on: July 25, 2019, 12:01:28 PM »
I can't find this parameter "PollRateOverride"

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Graphic
« Reply #13 on: July 25, 2019, 12:11:55 PM »
See the attached image

Beaware

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Graphic
« Reply #14 on: July 25, 2019, 12:35:47 PM »
I found, really sorry for the inconvenience I hadn't entered the IP address in the ModbusTCP module. Sorry and thank you for your help, I haven't finished my project.