
eShark HD-PLC LON EVK
35
HD
-P
LC/
Us
erDo
ce
S
h
ark
_
HD
-P
LC_
LON_
m
an
u
al
_
en
_
V
0
2
0
1
.d
o
cx
At first select the location of the template files with the
xtf
extension. Please re-
fer to the installation chapter. Afterwards select the output directory, which sould
be a good place in your project.
The XIFEditor generates now a new EposCustomApp.c and EposCus-
tomApp.h. So it is wise to generate not directly into the source code tree but
in a separate subfolder. Otherwise your changes in these files will be de-
stroyed. Sync both source codes afterwards.
6.4
Drop in custom code
Now custom code needs to be dropped into the generated framework. For incom-
ing updates, here the updates for the digital output network variable (nviDigitalx)
switch
(msg->
nv_index
) {
case
NvIdx_nviDigital_0:
// 0; nviDigital[0]
HAL_GPIO_WritePin(DIO2_GPIO_Port, DIO2_Pin,
msg->
value
[0] ?
GPIO_PIN_SET
:
GPIO_PIN_RESET
);
break
;
case
NvIdx_nviDigital_1:
// 1; nviDigital[1]
HAL_GPIO_WritePin(DIO4_GPIO_Port, DIO4_Pin,
msg->
value
[0] ?
GPIO_PIN_SET
:
GPIO_PIN_RESET
);
break
;
In dependency of the incoming value, directly the STM32 HAL functions to set
the digital output are called. Same happens for the analog outputs.