Configuration

A bar chart can be configured in different ways:

aVaules : ARRAY [1..10] OF INT;
aValues : ARRAY [1..2, 1..10] OF INT;

Definition via Engineering:

1. Add a bar chart to the interface.

2. Define which type of object you want to use.

Array of numbers (Array<number>):

3. Define the number of members of the array and their values for the 'Bar Graph Data' attribute of the 'Common' category using the 'Bar Graph Data' dialog.

Array of arrays of numbers (Array<Array<number>>)

3. Define the number of data sets of the array for the 'Bar Graph Data' attribute of the 'Common' category using the 'Bar Graph Data' dialog.

4. Define the number of members of the array and their values using the 'Bar Graph Data' dialog.

Definition via an array from the PLC:

1. Add a bar chart to the interface.

2. Link the array to the 'Bar Graph Data' attribute of the 'Common' category.

Advanced Settings:

1. Define the color of the individual data sets for the 'Bar Graph Colors' attribute of the 'Common' category using the 'Bar Graph Color' dialog.

2. Deactivate the 'X-Axis Autoscaling' attribute of the 'X-Axis' category.

3. Define the minimum and maximum value of the x-axis corresponding to your data set in the 'X-Axis Maintick Min Value' and 'X-Axis Maintick Max Value' attributes of the 'X-Axis' category.

4. Define the step size matching your data set for the 'X-Axis Maintick Steps' attribute of the 'X-Axis' category.

Example: Barchart