mysticbaklava - 2021-02-19

So I'm writing a basic modbus rtu program.

I have defined a structure. It's like this,
**TYPE DataArray :
STRUCT

Refperc:INT;
KW:UINT;
HZ:UINT;
Freqperc:UINT;
Volt:UINT;

Speedperc:INT;

END_STRUCT
END_TYPE**

When applying this to the modbus data input. I have defined an array which is,

INSERTDATA: ARRAY [1..6] OF DataArray;

To change the variables while reading ad writing I've made a slave counter and used in it. When I apply it, it looks like this,

INSERTDATA[slavecounter].refperc

So I want to be able to change the variable after the point mark. Like, switching it to KW,HZ,Freqperc, Volt using another counter. How can I do this?