VisuFbXYChartDataProvider (FB)

FUNCTION_BLOCK VisuFbXYChartDataProvider IMPLEMENTS IXYChartDataProvider3

This function block is the implementation of the IXYChartDataProvider interface. It is used by the generated code to provide suitable instances of this interface. An instance of this is present in generated code only

InOut:

Scope

Name

Type

Comment

Input

iNumOfAxes

INT

Axes designed by the customer using configuration page Here I’ve: 1) the number of the axes 2) a pointer to array of pointers of structures containig the axis data.

Each cell can contain a structure allocated by the customer in IEC code and next assigned into configuration page or, if not, an automatic allocation of the same structure done by the system. In the first case customer can manipulate the data at run time, in the second case not

  1. a pointer to array of BOOL to know if the variable used is local or user defined

  2. a pointer to array of pointers of structures containig the axis properties written by generated code, from SP16.

paAxisVar

POINTER TO ARRAY [0..20] OF POINTER TO VisuStructXYChartAxis

paAxisIsLocVar

POINTER TO ARRAY [0..20] OF BOOL

paAxisVarProper

POINTER TO ARRAY [0..20] OF POINTER TO VisuStructXYChartAxis

iNumOfCurves

INT

Curves designed by the customer using configuration page Here I’ve: 1) the number of the curves 2) a pointer to array of pointers of structures containig the curve data.

Each cell can contain a structure allocated by the customer in IEC code and next assigned into configuration page or, if not, an automatic allocation of the same structure done by the system. In the first case customer can manipulate the data at run time, in the second case not

  1. a pointer to array of BOOL to know if the variable used is local or user defined

  2. a pointer to array of pointers of structures containig the curves properties written by generated code, from SP16.

paCurveVar

POINTER TO ARRAY [0..20] OF POINTER TO VisuStructXYChartCurve

paCurveIsLocVar

POINTER TO ARRAY [0..20] OF BOOL

paCurveVarProper

POINTER TO ARRAY [0..20] OF POINTER TO VisuStructXYChartCurve

pElementVar

POINTER TO VisuStructXYChart

Pointer to the XY element structure, either the customer one or the system one, depending on if the customer has allocated the his one

xElementIsLocVar

BOOL

Points to the XY element structure

pElementVarProper

POINTER TO VisuStructXYChart

If the variable used is local or user defined

eUpdateType

EnXYChartUpdateType

Points to the XY system element structure where the generated code writes the properties defined at design time, from SP16 Update type

itfUpdateVar

IXYChartGenericVariable

Type of update used for element

itfAutoUpdEnaVar

IXYChartGenericVariable

update variable

pItfDataProviderCurve

POINTER TO ARRAY [0..20] OF IXYChartDataProviderCurve

Automatic update enable variable Pointer to the interfaces of curves data provider

pItfDataProviderAxes

POINTER TO ARRAY [0..20] OF IXYChartDataProviderAxis

Pointer to the interfaces of axes data provider

itfCursXPosVar

IXYChartGenericVariable

Variable of X axis value at cursor position, if present

paAxisStruWD

POINTER TO ARRAY [0..20] OF StruXYChartWorkingDataAxis

These data are instantiated in generated code, but not use there Because these data are “number of axes/curves depending”, I’ve defined them in generated code where I know those numbers In this way I don’t need dynamic allocation memory in IEC code

paCurveStruWD

POINTER TO ARRAY [0..20] OF StruXYChartWorkingDataCurve

Data for single curve elaboration, working data

pClientData

POINTER TO VisuStructClientData

Variables used to get the correct data in case of “multiclient” (see “IsMultiClient” method to see more general comment)

pClientSpecificData

POINTER TO StruXYChartClientSpecificData

xMultiClient

BOOL

Methods:

GetAxisFontLabel

GetDataProviderCurve

GetLineLevelFont

GetLineLevelStruct

GetNumberOfAxes

GetNumberOfCurves

GetPntAxis

GetPntCurve

GetPntData

GetPntWorkingDataAxis

GetPntWorkingDataCurve

GetUpdateType

GetVariableItf

IsAxisVarLocal

IsCurveVarLocal

IsElementVarLocal

GetDataProviderAxis

GetPntAxisProper

GetPntCurveProper

GetPntDataProper

SetMultiClientData

Structure: