There is no such ready-to-use example, but you can modify any existing example where Serial API commands are parsed. You have to send command CMD_GET_ANGLES_EXT or CMD_REALTIME_DATA_CUSTOM and parse response. To encode and decode commands, define and use C-structures, like it's done for other commands in examples. The variable STATOR_ROTOR_ANGLE[3] in API holds encoder angles.
thanks aleksey after long research i found out that the raw encoder values are in CMD_DEBUG_VARS_3[254].
STATOR_ROTOR_ANGLE[3] values are always 0 if the camera is leveled. a good start for me was to send the hex via realterm to the board good day and thanks