Translation of pointers from C to ST

I need to translate from C to ST following:

ptr = (ACP10PRADR_typ*) para_ptr->para.par_sequ.int_adr + para_ptr->para.par_sequ.cnt_adr;

Should this in ST work:

var

 ptr : REFERENCE TO ACP10PRADR_typ

end_var;

ptr ACCESS ADR(servo.para.par_sequ.int_adr + servo.para.par_sequ.cnt_adr);

where: “servo.para.par_sequ.int_adr” is address of memory buffer allocated with TMP_alloc. In this memory buffer there is stored array/table of ACP10PRADR_typ.

Hi @Matjaz_Kopac ,
para_ptr->para.par_sequ.int_adr and para_ptr->para.par_sequ.cnt_adr are already 2 addresses so in ST you should not call ADR:

ptr ACCESS (servo.para.par_sequ.int_adr + servo.para.par_sequ.cnt_adr);

Ciao
Valerio