The ChartByArray was originally designed for a batch process. Here would be an example of using ChartByArray. Let's say you have a batch mixer and you want to chart the power used by the motor at 3 second sample intervals. Register 40001 will be used as the index, so it will reset to 0 at the start of the batch and increment every 3 seconds when the mixer is running. Just before incrementing 40001, you will store the motor power in the register 40100 plus the value in 40001 as an indirect index. The first sample would store in 40100, three seconds later a sample in 40101, six seconds a sample in 40102, etc.
Here is how you then setup the ChartByArray:
- Register 40001 would be put in PLCAddressArrayIndex
- In PLCAddressItems, add an item with PLCAddress set to 40100
As the program runs, it will monitor the value in PLCAddressArrayIndex. As the value increments, it will read the values starting in 40100 up to the current array index value, then chart the values.