79225885

Date: 2024-11-26 08:35:23
Score: 4.5
Natty:
Report link

@Guiorgy

Thank you, this worked well.

I added a variable to plot the curve and added it to the Array Indexes Maximum.

plot_Index := sample_index-1;

The -1 adjustment was necessary because the first array index is 0 but the sample_index is incremented to 1. So without this, the unwanted line back to the origin would still be plotted.

Additionally, are arrays in Codesys automatically initialized to 0? I simply declared my array, and all values seem to default to 0. Thanks for the help.

Fixed XY Chart

Variable for plot

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Guiorgy
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: fel_fe