@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.