EN RU CN
encoder 5048a read the values with serial api with arduino
  • hello

    i have read all the comments for serial api and did not found a solution for me

    i'd like to read the 3 encoder_values and calculate them in an arduino.
    someone has a simple way for that? part of a code?

    my idea is to send CMD_GET_ANGLES_EXT and decode the received string for all axes
    thanks
  • Hello!

    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.

    Aleksey
  • 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