Author Topic: ChartBySampling Question  (Read 1067 times)

acarr

  • Newbie
  • *
  • Posts: 4
    • View Profile
ChartBySampling Question
« on: September 11, 2019, 03:55:17 PM »
I have a question about the ChartBySampling Function. I'm attempting to take samples of an item over a certain length and report these values to a line graph (Y-Axis is Diameter of a part and X-Axis is the position along that part). I've successfully labeled all of the axis and the line graph is communicating with my PLC. However I wish the graph to stop after a set number of samples.

For Example, I want it to report 100 data points from the PLC then stop refreshing the graph. Is this possible and if so is anyone able to steer me in the right direction?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: ChartBySampling Question
« Reply #1 on: September 11, 2019, 04:11:32 PM »
I will first recommend using the version 3.99y beta because it has a ChartWithLogging which has much more capability including a property EnableLogging. This will get you one step closer to your goal.

acarr

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: ChartBySampling Question
« Reply #2 on: September 11, 2019, 04:34:32 PM »
Thanks for the quick reply. I'll give that a try.

acarr

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: ChartBySampling Question
« Reply #3 on: September 12, 2019, 11:32:48 AM »
So I tried what you recommended and this is more along the lines of what I am looking for, but is it possible to use this ChartWithLogging to have a distance be displayed along the x-axis as opposed to time? I'm looking to plot the change in the diameter of a rod over a distance.

Also how can I find the name of the increment left button. It seems that by clicking that once the chart stops scrolling to the right but still logs data (which I want). I plan on printing the screen for a report.

I apologize as I'm still very new to visual basic and don't know a lot of commands just yet.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: ChartBySampling Question
« Reply #4 on: September 12, 2019, 11:39:19 AM »
The ChartWithLogging is only designed for value vs. time charting

The left button does stop scrolling otherwise you will be fighting with trying to move left while it tries to scroll right. The right double arrow button moves full right and re-starts scrolling.

acarr

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: ChartBySampling Question
« Reply #5 on: September 12, 2019, 12:51:00 PM »
So then for what I'm attempting to do I assume ChartByArray would probably work a little better?

Edit: That is to do a line chart where I can have a custom x-axis (not against time).
« Last Edit: September 12, 2019, 01:12:22 PM by acarr »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: ChartBySampling Question
« Reply #6 on: September 14, 2019, 08:36:09 AM »
As long as the data in the PLC array is uses the array index as position and the value as the diameter, then you can make ChartByArray work.